Jump to content

bluealien

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Everything posted by bluealien

  1. Thanks for the suggestion but this is to complicated ... the user never logs in ... its just to view a calender based on today, the problem is it was written to call server time and not to offset based on local time of the events when this is setup ... just wanted to modify .date() call to offset - 8 PST gmdate("F j, Y", time()-(28800));
  2. Thanks for the suggestion, however I dont know how to re-write this to use your suggestion ... I am on php5 .. thanks
  3. sorry for got to mention my servers is 8 hrs a head of me ... so I need to set this - 8 hrs to have it display correctly form my local date & time. thanks again
  4. Can someone please help me rewrite this to handle UTC - 8 hrs for PST.. <td class="'.(date("Ymd", mktime (0,0,0,$c_month,$i,$c_year))==date("Ymd")?'current-day':'day-with-date').$no_events_class.'"> Thanks for the help
  5. ok figured it out something changed on my server and now Cat was case sensitive... grr i hate that. correct: <?php IF (!isset ($_GET['cat'])) { echo 0; } ELSE { echo $_GET['cat']-1; } ?>
  6. Dang, can some one please explain whay this dont work anymore? what I want it to do is if "gallery.php" does not have Cat= anything, I want it write 0, but if Cat= a number 1, then go to that number. It use to work, but now it doesnt, I think my php has update to a different version, 4+ something, and I now also have v 5 too. <?php IF (!isset ($_GET['Cat'])) { echo 0; } ELSE { echo $_GET['Cat']-1; } ?> thanks for your help
  7. thanks for the link, however its more advanced then what Im looking for, I specific requirements and need to fit to page, and flash will take up too much room, as to why Im looking for a php xml version.
  8. Im looking for a gallery script that will read from a xml and post title, description and allow you to scroll among several images. example image: Anyone know where to locate this, as I keep finding more advanced versions that don't suit my needs? I tried writing one, but it doesn't work correctly. Thanks for your help.
  9. Thanks for the help revraz, as it made me understand what I was doing wrong passing it in a flashvar originally: so.addParam("flashvars", "cat=<?php IF (!isset ($_GET['Cat'])) { echo 0; } ELSE { echo $_GET['Cat']-1; } ?>"); my first Category is 0, even though in XML I call it 1, based on flash variables of starting the array of 0,1,2,3.
  10. How would I write if else statment with no query string was passed? This works with "gallery.php?Cat=1" but how to have it default to Cat=1 if no value was passed "gallery.php" <?php echo $_REQUEST["Cat"]-1; ?> thanks for the help
  11. Can someone help me clean this code up better, it works but I know it can be simpler? Thanks for your help <?php // Images directories $img_dir = 'images/'; // Validate its a JPE if (preg_match("/\w+\.jpg$/",$_GET['p'])) { $image = $_GET['p']; } // Read the directory and only get images if ($handle = opendir($img_dir)) { while (false !== ($filename = readdir($handle))) { if (preg_match("/\w+\.jpg$/",$filename)) { $files[] = $filename; sort($files); } } closedir($handle); } // If no image was set, we'll make the first image the default if ($image && file_exists("$img_dir/$image")) {} else { $image = $files[0]; } for ($i=0;$i<count($files);$i++) { if ($files[$i] == $image) { $last = $files[$i-1]; $next = $files[$i+1]; $image = $files[$i]; break; } } ?> <center> <?php echo "<img src='$img_dir/$image'>"; ?> <p> </p> <?php if (file_exists("$img_dir/$last")) { echo "<a href='?p=$last'> « Last</a> | ";} // $imgdir = 'images/'; $allowed_types = array('png','jpg','gif'); $dimg = opendir($imgdir); while($imgfile = readdir($dimg)) { if(in_array(strtolower(substr($imgfile,-3)),$allowed_types)) { $a_img[] = $imgfile; } } sort($a_img); $totimg = count($a_img); for($x=1; $x < $totimg;) { echo "<a href='?p=$a_img[$x]'>$x</a> "; $x++; } // if (file_exists("$img_dir/$next")) { echo " | <a href='?p=$next'> Next » </a>"; } ?>
×
×
  • 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.