Фотографии выполненных работ
\n"; if(isset($_GET["count"]) && is_numeric($_GET["count"]) && $_GET["count"]>0 ){ $count=$_GET["count"]+0; if ($count<0 || $count>count($desc)){ $count=0; }; } else { $count=0; }; $endCount=$count+10; if(isset($_GET["idlink"]) && strlen(trim($_GET["idlink"]))>0 ){ $countNew=0; foreach($desc as $str){ $fotoDesc=preg_split("/;/",$str); //echo "11111=".trim($fotoDesc[0])."===".trim($_GET["idlink"])."jpg".""; if(trim($fotoDesc[0])===(trim($_GET["idlink"]).".jpg")){ //echo "===Ok==="; $count=$countNew; $endCount=$count+1; break; }; $countNew++; }; } else { $endCount=$count+10; }; $endStr=0; for($ind=$count; $ind<$endCount;$ind++){ if(!isset($desc[$ind])){ break; }; $strFoto=$desc[$ind]; $fotoDesc=preg_split("/;/",$strFoto); $fileName=trim($fotoDesc[0]); $fileNameS=str_replace(".jpg", "-s.jpg", $fileName); if(strlen($fileName)==0){ continue; }; // width=\"400\" height=\"300\" if($endStr>1){ $endStr=0; echo "\n
\n"; }; echo "\n"; $endStr++; }; if($endStr>0){ echo "\n
\n"; } else { echo "\n
\n"; }; echo "
\n";
echo "\n";
echo "Первая страница\n";
if($count>10){
$indStr=floor($count/10)*10-1;
$indStr=floor($indStr/10)*10;
if($indStr<0) { $indStr=0; };
echo "Предыдущая страница\n";
};
if(isset($desc[$ind]) ){
echo "Следующая страница\n";
};
$indStr=floor(count($desc)/10)*10;
if($indStr<0) { $indStr=0; };
echo "Последняя страница\n";
echo "\n";
echo "
\n";
echo ""; ?>