Jump to content

lice200

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

lice200's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I am looking into skinning my FTP pages. ATM I do not like the way they look and want to improve them. I want to change the way this looks. (http://bastardfiles.com/Test/) Can anyone give me any info that might help me with this?
  2. Put the $vars in index.php instead of each file then just echo it in header and footer. Then include index.php; in footer and header.php.
  3. I didn't think about that. I will give it a try!
  4. I want to make a download page. However I do not want it to be linked anywhere on my site. Say I typed blahblahblahblah.com/instantdownload.html into my broswer, as soon as it loads that page i want it to start a download, can you help?
  5. Thanks for installing the mod, its very very handy and a nice addition to the website.
  6. what I want is two variable's in a single if statement. The only thing is I cannot make it work the way i have it. I do not want to have 7 if statements if possible. [code][code=php:0] <?php $day = Sat; if ($day = ('Sat', 'Sun')) { echo "It is the weekend!"; } ?> [/code][/code]
  7. Lawl thanks for posting after me :( you have me confused enough! heeh
  8. Do you see any problems with the changed code below? Such as errors, things that might cause a problem down the road? (I didnt change the fprint line yet, but i will) [code=php:0] <?php $times = array (     '0000' => 'Link Three',     '0600' => 'Link One',     '1400' => 'Link Two',     '1500' => 'Link Three', );   $curtime = date('Hi'); //Get the current time in format 24/h #for ($curtime = '0000'; $curtime < '2400'; $curtime += 100) {     foreach ($times as $t => $l) #{         if ($curtime >= $t) $link = $l; {     printf ("Current Time: %04d : %s<br>",$curtime,$link);    } ?> [/code]
  9. Barand, If you had to write the same script, how would you do it? Can you help me out more help, this doesn't seem the best way to write it. Thanks.
  10. [quote author=Barand link=topic=119506.msg489576#msg489576 date=1166708041] What link do you want displayed prior to 1200? [/quote] It should be Link Three because it is the last one. So; Current Time: 1500/0000 -through 1100 : Link Three
  11. Hello, I am trying to write code for a script that will take a set time, compare it to the current time, then echo a set link for that time slot. The thing is i have not been able to do this thus far with php. One of my problems is with if statements. When I use if statements the script becomes unstable and gives off results. At the moment I have some code written for the script. (See Code One) The problem is that when $curtime clicks over to 2000 (24/h format) the script stops working. Another problem is if $timestr is higher then $timstr2 the script again, stops working. So I am wondering, is there a better way to make this work. If you can give me a place to start that would be the first step in helping me make this work. Maybe you can write something out for me to help me compare and get me out of this block. Code One: [code=php:0] <?php //Specify the start time and the delay $timestr  = "1200"; $link1 = "Link One"; $timestr2 = "1400"; $link2 = "Link Two"; $timestr3 = "1500"; $link3 = "Link Three"; $curtime = date('Hi'); //Get the current time in format 24/h echo "Current Time: $curtime<br>"; if ($curtime >= $timestr) { // Script start. $link = $link1; } if ($curtime >= $timestr2) { $link = $link2; } if ($curtime >= $timestr3) { $link = $link3; } echo $link; ?> [/code]
  12. So I changed my code (Below) and now it is not echo'ing the $timestr2 even though it is past the set time. I changed the date function to Hi instead of hia. [code]<?php //Specify the start time and the delay $timestr  = "2333"; $link1 = "Link One"; $timestr2 = "2334"; $link2 = "Link Two"; $curtime = date('Hi'); //Get the current time in format 00:00:am/pm (Without ':') echo "Current Time: $curtime<br>"; if ($curtime > $timestr) { // Script start. echo "$link1"; } elseif ($curtime > $timestr2) { echo "$link2"; } ?>[/code]
  13. Hello, I am writing a script (duh) that will take a set time and the current time then within the code it will echo a set link (or whatever i want). However I am having trouble coming up with a way to do it. What I want it to do is when say it is 1030am I want it to echo a link (Set with $link). However if it is 1130am I want it to display different link instead of the other one. (Set with link2). My problem is when it is 1030am it echo's $link, then at 1130am it echo's $link2 at the same time as $link. Can you help me find a way to make it echo only one at a time? [code]<?php $curtime = date('hia'); //Get the current time in format 00:00:am/pm (Without ':') echo "Current Time: $curtime<br>"; //Specify the start time and the delay $timestr  = "0429pm"; $link1 = "Link One"; $timestr2 = "0431pm"; $link2 = "Link Two"; if ($curtime > $timestr) { // Script start. echo "$link1"; } if ($curtime > $timestr2) { echo "$link2"; } ?>[/code]
  14. When you add + 0 to the date in $curmonth it will show only the month. now i can take the current month which is 6, take the month of the link which is 3, find out the difference which is 3. Now that i know the link is three months old. I need to have it delete it. My problem is not with how I have the date setup, that is fine. My problem is i dont know how to make it auto-delete it. Like i said before, i have a delete script that is setup to run off $link_id. So if i tell it to delete link_id=17 it will delete the 17th link... So again my question is. What can I use to make it delete the link when it hits age?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.