banner_zone != '') $banner_zone = $row->banner_zone; require_once "types.php"; require_once "trial_access.php"; if(!isset($added_path) || trim($added_path) == "") $added_path = ""; $Files = Array(); $i = 0; $dir = opendir($row->path.$added_path); while ($s = readdir($dir)) { if($s != '.' && $s != '..' && !ereg("icon.[jJ][pP][gG]", $s) && !ereg("icon[1-9].[jJ][pP][gG]", $s) && !ereg("^(tn_)", $s) && !eregi(".zip", $s) && is_file($row->path.$added_path.$s)) { if(($_SESSION['MEM_TRIAL'] == 'trial') && ($i >= TRIAL_PICS))continue; $Files[$i]['name'] = $s; if(eregi("_", $s)) { preg_match_all("/[0-9]+/", str_replace("_", "", $s), $temp); } elseif(eregi("-", $s)) { preg_match_all("/[0-9]+/", str_replace("-", "", $s), $temp); } else { preg_match_all("/[0-9]+/", $s, $temp); } $Files[$i]['val'] = (int)($temp[0][0]); $i++; } } closedir($dir); for ($i = 0; $i < sizeof($Files); $i++) { $min = $Files[$i]['val']; for ($k = $i+1; $k < sizeof($Files); $k++) { if ($min > $Files[$k]['val']) { $temp = $Files[$i]; $Files[$i] = $Files[$k]; $Files[$k] = $temp; $min = $Files[$i]['val']; } } } $main_url = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; preg_match_all("/.*\//", $pic, $temp); $pic_url = $temp[0][0]; $temp = explode('/', $pic); $pic_name = $temp[sizeof($temp)-1]; $MAIN = Array(); for ($i = 0; $i < sizeof($Files); $i++) { $MAIN[$i] = $Files[$i]['name']; if ($Files[$i]['name'] == $pic_name) $Current = $i; } if(PIC_PAGE_BUTTON == 2){ $P = ""; $N = ""; $F = ""; $L = "";} else { $P = "Previous"; $N = "Next"; $F = "First"; $L = "Last";} // create nav begin if ($Current != 0) { $temp = $Current-1; $First = "$F"; $Previous = "$P"; } else { $First = ''; $Previous = ''; } $size = sizeof($MAIN)-1; if ($Current == $size) { $Next = ''; $Last = ''; } else { $temp = $Current+1; $Next = "$N"; $Last = "$L"; } $NAV = << {$First} {$Previous} {$Next} {$Last} HTML; // create nav end if($file = @fopen("picture.html", "r")) { $PICT = ''; while(!feof($file))$PICT.=fgets($file, 1024); fclose($file); } $PICT = str_replace("#%NAV%#", $NAV, $PICT); $PICT = str_replace("#%PICTUREURL%#", $pic, $PICT); if(isset($added_path) && $added_path != '') $PICT = str_replace("#%ROWID%#", $n."&added_path=$added_path", $PICT); else $PICT = str_replace("#%ROWID%#", $n, $PICT); $PICT = str_replace("#%EXTRA1%#", stripslashes($row->extra1), $PICT); $PICT = str_replace("#%EXTRA2%#", stripslashes($row->extra2), $PICT); $PICT = str_replace("#%NAME%#", stripslashes($row->name), $PICT); $PICT = str_replace("#%DESCRIBE%#", stripslashes($row->text), $PICT); $PICT = str_replace("#%MODEL_NAME%#", stripslashes($row->model_name), $PICT); $PICT = str_replace("#%HEIGHT%#", stripslashes($row->height), $PICT); $PICT = str_replace("#%BUST%#", stripslashes($row->bust), $PICT); $PICT = str_replace("#%WEIGHT%#", stripslashes($row->weight), $PICT); $PICT = str_replace("#%HIPS%#", stripslashes($row->hips), $PICT); $PICT = str_replace("#%HAIR%#", stripslashes($row->hair), $PICT); $PICT = str_replace("#%EYES%#", stripslashes($row->eyes), $PICT); $PICT = str_replace("#%2257%#", $row->f2257, $PICT); $PICT = str_replace("#%PICTURE%#", $pic, $PICT); $surt_name = rand(0, 10000000); $fp = fopen($surt_name, 'w'); fwrite($fp, $PICT); fclose($fp); @chmod($surt_name, 0777); require($surt_name); unlink($surt_name); unset($PICT); ?>