read()) { if ($entry != "." && $entry != "..") { if (!is_dir($dirName."/".$entry)) { array_push($result_array,$entry); } } } $d->close(); sort($result_array); return $result_array; } $DirContents = getDirContents("./pictures/".$dir); $nextpic = $DirContents[($index + 1)]; $prevpic = $DirContents[($index - 1)]; $nextindex = ($index + 1); $previndex = ($index - 1); if ($index == 0) { $prevpic = $DirContents[(Count($DirContents) - 1)]; $previndex = (Count($DirContents) - 1); } if (($index + 1) > (Count($DirContents) - 1)) { $nextpic = $DirContents[0]; $nextindex= 0; } $nextpic = str_replace(" ", "[spc]",(str_replace("&", "[amp]",$nextpic))); $prevpic = str_replace(" ", "[spc]",(str_replace("&", "[amp]",$prevpic))); ?>
Ankstesnė nuotrauka (".str_replace("[spc]", " ",(str_replace("[amp]", "&",$prevpic))).")"; ?>
 
Sekanti nuotrauka (".str_replace("[spc]", " ",(str_replace("[amp]", "&",$nextpic))).")"; ?>

"; ?>