Tieshi taa visi ar kautko saak :unsure:
<?php
$filename = "images.php";
$imagesCount = @file_get_contents('pic/auto/images.txt',r); // sheit nolasa skaitu
$page = (int) $_GET['page'];
$perPage = 9; //noraad cik buus bildes vienaa lapaspusee
$pages = ceil( $imagesCount / $perPage ); //sadal cik buus lapas puses
if ($page<1 || $page>$pages) $page = 1; //ja page lielaaks pa noeikto lpp.sk. page ir 1
$start = $perPage * ( $page - 1 ); //apmeeram nojaushu
$end = ($start+$perPage<$imagesCount) ? $start+$perPage : $imagesCount-1; // apmeeram nojaushu
$dir=opendir("pic/auto/");
$i = 1;
while(($fails=readdir($dir)) !=false){
if ( !eregi('(jpg|jpeg)$',$fails) ) continue;
if ($i<$start) continue;
if ($i>$end) break;
print("<img src=pic/auto/$fails width=120 height=81
border=1><b>$fails</b> ");
if( $i % 3 == 0 ) echo "<br/><br/>";
$i++;
}
for ($i = 1; $i<=$pages; $i++)
{
echo " [<a href=\"$filename?page=$i\">$i</a>] ";
}
echo "</center>";
?>
bet nu tomeer man kaads pateiks kur iisti ir kljuuda, nu nekaadi nevaru izdomaat, izlasiijos manuaali cauri un cauri bet nekaa... :huh: