"); $output = strip_tags($input); $output = stripslashes($output); $output = mysql_real_escape_string($output); $output = strtolower($output); return $output; } function imgstuff(){ if (empty($_GET['img']) || $_GET['img'] == null || $_GET['img'] == ''){ $img = ''; }else{ $img = $_GET["img"]; // get the image } if(!empty($img) || $img != null || $img != ''){ require('dbsettings.php'); $img = sanitize($img); // clean image string $sql = "SELECT id, name, location, type, size, time, comment, username, tags FROM $tbl_name WHERE name='$img' LIMIT 1;"; $result = mysql_query($sql); $row = mysql_fetch_assoc($result); if ($row){ $_SESSION['noimg'] = false; $_SESSION['id'] = $row['id']; $_SESSION['img'] = $row['name']; $_SESSION['location'] = $row['location']; $_SESSION['type'] = $row['type']; $_SESSION['size'] = $row['size']; $_SESSION['time'] = $row['time']; $_SESSION['comment'] = $row['comment']; $_SESSION['username'] = $row['username']; $_SESSION['tags'] = $row['tags']; echo "

"; //echo "$id
$img
$location
$type
$size
$time
$comment
$username
$tags\n"; mysql_close(); }else{ $_SESSION['noimg'] = true; echo "

That image was not found in our database D:

"; } }else{ noimg(); $_SESSION['noimg'] = true; } } function headstuff(){ echo "\n"; echo "\n"; echo "\n"; echo "\n"; } function textstuff(){ 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:

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

Comment:

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

Tags:

- ".$_SESSION['tags']."\n"; echo "
"; } } function noimg(){ $thelist = ''; //include('getfiles.php'); echo "

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

List of files:
$thelist
"; } function title(){ if(empty($img) || $img = null || $img = ''){ return; }else{ return " - Now Showing: ".$img; } } ?> UnPS-GAMA Image Host<?php echo title(); ?>
New design underway :D