Announcement

Collapse
No announcement yet.

Dreamweaver or script help??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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


    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

    Comment


    • #3
      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

      Comment


      • #4
        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!

        Comment


        • #5
          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

          Comment


          • #6
            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

            Comment


            • #7
              Re: Dreamweaver or script help??

              This post should help you


              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

              Comment


              • #8
                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

                Comment


                • #9
                  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!

                  Comment


                  • #10
                    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

                    Comment


                    • #11
                      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!

                      Comment

                      Working...
                      X