\n"; echo " \n"; echo " \n"; echo " \n"; } } function textstuff(){ // Sets up right side box of info under the other sidebars if($_SESSION['noimg'] == false){ echo "
\n"; echo "

Image Name:

- ".$_SESSION['img']."\n"; echo "

Image Type:

- ".$_SESSION['type']."\n"; echo "

Image Size:

- ".$_SESSION['size']."\n"; echo "

Time Uploaded:

- ".$_SESSION['time']."\n"; echo "

Username:

- "; $username = $_SESSION['username']; echo "$username"; // For future use - catagorize by username echo "\n"; echo "

Comment:

- ".$_SESSION['comment']."\n"; echo "

Tags:

- "; $tags = $_SESSION['tags']; $tags = explode(" ", $tags); foreach($tags as $tag){ echo "$tag "; // For future use - catagorize by tag } echo "\n"; echo "
"; } } function noimg(){ // Shown in place of the image if one isn't available $thelist = ''; $thethumbs = ''; $_SESSION['thethumbs'] = ''; if($handle = opendir('Pictures')){ while(false != ($file = readdir($handle))){ if($file != "." && $file != ".." && $file != ".htaccess"){ $thelist .= "-".$file; } } closedir($handle); } if($thumbs = opendir('thumbs')){ while(false != ($fiel = readdir($thumbs))){ // Test if thumbnail exists if not show nothumb.png if($fiel != "." && $fiel != ".." && $fiel != ".htaccess"){ $thethumbs .= "-".$fiel; } } closedir($thumbs); } echo "

Please specify an image with the url: img.unps-gama.info/?img=(IMGAGE STUFF HERE)

Uploaded Pictures:

"; $thelist = explode("-", $thelist); $thethumbs = explode("-", $thethumbs); foreach($thelist as $pics){ if($pics == '' || $pics == null){ echo ''; }else{ // Checks if there is a thumbnail for the image, if not show nothumb.png if(in_array($pics, $thethumbs)){ // Totally figured out how to use in_array by looking at default php scripts (Thank you wingrep :3) echo ''.$pics.''."\n "; }else{ echo ''.$pics.''."\n "; } } } echo"
"; } function title(){ // Suffers same problem as headstuff() if(!isset($_SESSION['img'])){ echo ""; }else{ echo " - Now Showing: ".$_SESSION['img']; } } ?>