+ Reply to Thread
Results 1 to 11 of 11

Thread: Dreamweaver or script help??
      
   

  1. #1
    QuantumPhotography's Avatar
    QuantumPhotography is offline Master Sergeant
    Join Date
    Nov 2006
    Location
    Hobart, Australia
    Posts
    67

    Default Dreamweaver or script help??

    I am doing a site for a freind, in Dreamweaver.

    What I am trying to achieve is the site is a sales letter, thats says order by XX date, and you will recieve a bonus...You get the idea...

    What we are trying to achieve is that whatever day a customer looks at the site that the order by date will automatically change to a defined period ahead. So if i look today, the order by date is say 3 days ahead. And it to be say always 3 days ahead.

    Any help from anyone on this would be great.

    Thanks
    Photography is a snapshot of a time in your life.
    http://www.quantumphotography.net

    Websites you dream of... www.quantumwebworks.com

  2. #2
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,119

    Default Re: Dreamweaver or script help??

    Where the text needs to appear put this code

    <?=date('F d Y', time()+259200)?>

    259200 is the number of seconds in 3 day, so thats what has to be changed if needed

    Also make sure that the webpage you use that on is a .php page

    EDIT: Also if you want to change how the date is displayed, heres the documentation for the date function

    http://us.php.net/manual/en/function.date.php

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

  3. #3
    QuantumPhotography's Avatar
    QuantumPhotography is offline Master Sergeant
    Join Date
    Nov 2006
    Location
    Hobart, Australia
    Posts
    67

    Default Re: Dreamweaver or script help??

    Thanks Watdaflip,

    Worked a treat, after a bit of fiddling around. One question is, what clock does it go from? I change the date on my computer to see if it would change, but didnt. I have changed it to four days, but as per time here in Tassie ( Australia) it doesnt really match 4 days????

    The site for interest is www.justhairdressing.com if you scroll down most of the page you will see the dates I am talking about.

    Thank you very much.
    Darren
    Photography is a snapshot of a time in your life.
    http://www.quantumphotography.net

    Websites you dream of... www.quantumwebworks.com

  4. #4
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,061

    Default Re: Dreamweaver or script help??

    The above code is based on server time and can be fixed to your own timezone. However, the displayed offer expiry will always be the same: i mean, if the user visits today and sees that the offer expires on Friday, if he then visits again tomorrow, he will see that the offer expires on Saturday. It can not trace the user and give him always a 4 day expiry from the first time he ever visited. To achieve this, you would need to cookie his computer with the first ever visited date + 4.
    The script would need to follow these steps:

    1. When a user visits the site for the first time, the script will cookie the users computer with the expiry date, set to be 4 or whatever number of days you set it to be, after the actual date.

    2. When the user visits again, the script will "see" the cookie, and display the cookie value as expiry date, so it will display this date as expiry date. If there is no cookie, you are again in the conditions described in point 1.

    3. The script should also verify that the offer is not expired, in which case it should display no message at all.

    The logic is the same as for cookies used for the "Remember me" feature of login scripts.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  5. #5
    QuantumPhotography's Avatar
    QuantumPhotography is offline Master Sergeant
    Join Date
    Nov 2006
    Location
    Hobart, Australia
    Posts
    67

    Default Re: Dreamweaver or script help??

    Tank you naval, for your response, is there any category you do not read...ha ha ha ha. As the code is now, my mate is quite happy with. He has his response ready if customers call. The time frame as it is set now my freind is quite happy with.

    Thank you for your time and response and all others who respond.

    Darren
    Photography is a snapshot of a time in your life.
    http://www.quantumphotography.net

    Websites you dream of... www.quantumwebworks.com

  6. #6
    QuantumPhotography's Avatar
    QuantumPhotography is offline Master Sergeant
    Join Date
    Nov 2006
    Location
    Hobart, Australia
    Posts
    67

    Default Re: Dreamweaver or script help??

    Hi Naval,

    If you read this or anyone else, how would i adjust the line of code to show our time zone here in Tasmania. My timezone here is +10 hours????

    I dont think we need to worry about cookie ing someones computer, how ever if it is non invasive and easy enough code, my mate may consider it.

    Your thoughts and advice are much appreciated.
    Photography is a snapshot of a time in your life.
    http://www.quantumphotography.net

    Websites you dream of... www.quantumwebworks.com

  7. #7
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,119

    Default Re: Dreamweaver or script help??


    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

  8. #8
    QuantumPhotography's Avatar
    QuantumPhotography is offline Master Sergeant
    Join Date
    Nov 2006
    Location
    Hobart, Australia
    Posts
    67

    Default Re: Dreamweaver or script help??

    Hi Watdaflip,

    Unless I am reading it wrong, I dont know whether or how to change the code as in that post you show?? I must be having a brain freeze.

    This is the code I have in the site at the moment.
    <?=date('F d Y', time()+345600)?>

    As I mentioned the only thing is it is going on server time, not local time here. I presume it will change date later tonight here in OZ.

    Thanks
    Photography is a snapshot of a time in your life.
    http://www.quantumphotography.net

    Websites you dream of... www.quantumwebworks.com

  9. #9
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,061

    Default Re: Dreamweaver or script help??

    Well, it is really easy. Since Tasmania is Australia/Hobart timezone, transform the script as followes:

    <?
    putenv("TZ=Australia/Hobart");
    echo date('F d Y', time()+345600)
    ?>
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  10. #10
    QuantumPhotography's Avatar
    QuantumPhotography is offline Master Sergeant
    Join Date
    Nov 2006
    Location
    Hobart, Australia
    Posts
    67

    Default Re: Dreamweaver or script help??

    Thank you Naval, I just checked the date from what it was this morning, and it changed, so server time must of also changed days? I pasted the appropriate code and will now stay up till midnight and see if it changes...lol.

    Thank you very much for your time.
    Photography is a snapshot of a time in your life.
    http://www.quantumphotography.net

    Websites you dream of... www.quantumwebworks.com

  11. #11
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,061

    Default Re: Dreamweaver or script help??

    Server date changes at midnight server time. When you put the time zone in your script, as suggested, the displayed date will change at midnight Tasmanian time.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49