* @version $Revision: 1.4 $ $Date: 2004/11/20 19:51:43 $ * */ include_once('config.php'); $template = new template(); $template->title = 'View Image'; $template->section = 'home'; $template->right_column = 0; $template->description = $template->title; $template->open_page(); function match_img($istr){$testo = preg_match_all("/[0-9]{3,4}_p[0-9]{1,2}_[0-9]{1,2}\.[a-zA-Z]{3}/", $istr, $match); return $match;} function getpage($istr){$testo = preg_match("/p[0-9]{1,2}/", $istr, $match); return ltrim($match[0],"p");} function getnum($istr){$testo = preg_match("/_[0-9]{1,2}/", $istr, $match); return ltrim($match[0],"_");} function getrev($istr){$testo = preg_match("/[0-9]{3,4}/", $istr, $match); return $match[0];} function makelist($imgar) { $tlist='
'.show_review_image($img, 100, '').' | '; } $tlist.='
'.$bimage.' | '; $tlist.=''.$nimage.' | '; $tlist.='
' . $caption . '
'; } return $rimage; } function checkstr($strin) { $ext=substr($strin,-3); $pass=0; switch($ext) { case "jpg": $pass=1; case "gif": $pass=1; case "png": $pass=1; case "bmp": $pass=1; } if($pass){return true;}else{return false;} } $ichk = substr($_REQUEST["i"], 0, 8); if($ichk == '/images/') { $istr=$_REQUEST["i"]; $imgin = match_img($istr); $startimg = $imgin[0][0]; $folds = preg_split('[/]', $istr, -1, PREG_SPLIT_NO_EMPTY); if($startimg!="") { if(checkstr($startimg)) { $revnum = getrev($startimg); $pagenum = getpage($startimg); $num = getnum($startimg); $path = rtrim($istr, $startimg); $incpath = str_replace("images","includes",$path); $revfile = ".".$incpath.$revnum."_".$pagenum.".inc"; $page = implode("",file($revfile)); $imglist = match_img($page); $imgs=count($imglist[0]); $indx = array_search($startimg,$imglist[0]); if($imgs>1) { $out='