= (SELECT FLOOR( MAX(id) * RAND()) FROM files ) ORDER BY id LIMIT 1"; }else{ $query = "SELECT * FROM files WHERE filetype = 1 AND quicklink = '$id' AND status = '1' LIMIT 1"; } $sql = mysql_query($query); $row = mysql_fetch_array($sql); if($row){ $fileid = $row[id]; $file = $row[file]; $filetype = $row[filetype]; $hits = $row[hits]; $description = $row[description]; $posterip = $row[ip]; $clean = $row[clean]; if($filetype == '1'){ $folder = "pictures"; }elseif($filetype == '2'){ $folder = "videos"; }if($filetype == '3'){ $folder = "other"; } $date = $row[date]; $hits = $row[hits]; $startswith = substr($file, 0, 1); $thisfile = "files/" . $startswith . "/" . $file; $fullfile = "./files/" . $startswith . "/" . $file; $imgdimensions = getimagesize($fullfile); $imgwidth = $imgdimensions[0]; $imgheight = $imgdimensions[1]; if(is_file($thisfile)){ $fsize = (filesize($thisfile)/1000)/1000; $fsize = number_format($fsize, 2); }else{ $showfile = "The file you are looking for no longer exists."; $nofile = 1; } $parts = explode(".", $file); $extension = $parts[1]; if(($extension == "mpg") || ($extension == "mpeg") || ($extension == "avi") || ($extension == "mov") || ($extension == "wmv")){ $filetype = 2; } if((trim($description) != "")){ $showad = 1; } // ================= START WITH REFERRER CHECKING ================= // ================= END REFERRER CHECKING ======================= if($filetype == '1'){ $showfile = ""; }elseif($filetype == '2'){ $showfile = "


Click Here To Download Your File ($fsize MB)



Tip: Right click on the link to save the file to your computer."; }elseif($filetype == "3"){ $showfile = "Your file is not an image or video so it cannot be showed here.


Click Here To Download Your File ($fsize MB)



Tip: Right click on the link to save the file to your computer."; }else{ $showfile = "Your file is not an image or video so it cannot be showed here.


Click Here To Download Your File ($fsize MB)



Tip: Right click on the link to save the file to your computer."; } $now = date("Ymdhis"); $query = "UPDATE files SET hits = hits + 1, lasthit = '$now' WHERE id = '$fileid'"; $sql = mysql_query($query); }else{ $showfile = "This file no longer exists."; $nofile = 1; } }else{ $showfile = "You have entered an invalid file."; $nofile = 1; } if(IsSet($description) && ($description != "")){ $description = str_replace("'", "'", $description); $title = $row[description]; $description = "" . $description . "

"; }else{ $title = "Click the picture for more lols!"; } if($nofile != '1'){ $codelink = "Get Codes To Link To This File."; } if(IsSet($_COOKIE['click']) && ($_COOKIE['click'] == '1')){ setcookie('click', '0'); }else{ setcookie('click', '1'); } $title = str_replace("&#039;", "'", $title); $title = str_replace("&", "&", $title); $query = "SELECT * FROM files WHERE filetype = 1 AND quicklink != '' AND id != '$fileid' AND clean = 1 AND status = 1 ORDER BY rand() LIMIT 1"; $sql = mysql_query($query); $row = mysql_fetch_array($sql); if($row){ $nextlink = "http://picsurf.net/" . $row[quicklink]; }else{ $nextlink = "http://picsurf.net"; } ?> <? print("$title"); ?> " /> " />