function showSamples() { $t = new Template('_template/_page'); $t -> set_file(array('main' => 'samples.tpl')); $dpic = opendir(sprintf('_samples/%s' , addslashes($_GET['DIR']))); while ($file = readdir($dpic)) { if (!preg_match('/^.{1,2}/', $file)) { $file_1 = eregi_replace(".jpg","",$file); $file_jpg = $file_1; $file_jpg .=".jpg"; if ($file == "$file_jpg" ) { $files[] = $file; $count++; } } } $picture = sprintf('_samples/%s%s' , $_GET['DIR'] , $files[($_GET['COUNT'] == "") ? "0" : $_GET['COUNT']]); $picturetext = exif_read_data($picture); $t -> set_var(array('PIC' => sprintf('' , $_GET['DIR'] , $files[($_GET['COUNT'] == "") ? "0" : $_GET['COUNT']] , $picturetext[Author] , $picturetext[Subject] , $picturetext[Comment] , $picturetext[Title]), 'DIR' => sprintf('content.php?ACTION=createSamples&FILE=_samples/%s%s' , $_GET['DIR'] , $files[($_GET['COUNT'] == "") ? "0" : $_GET['COUNT']]), 'FORWARD' => (($_GET['COUNT'] >= ($count - 1)) ? "" : sprintf ("weiter >>" , $_GET['DIR'] , (($_GET['COUNT'])+1))), 'BACKWARD' => (($_GET['COUNT'] < ($count - 1 || $_GET['COUNT'] < "0" )) ? "" : sprintf ("<< zurück" , $_GET['DIR'] , (($_GET['COUNT'])-1))) )); //Session übergeben $t -> set_var(array('SID' => writeSID())); $t -> pparse('out', 'main'); }//showSamples()_END