//phpSlideShow created by Stefan Georg, me@stefangeorg.net //please edit the following lines $function="show"; $title = "Stefan's test phpSlideShow"; $header = "Test drive StefanGeorg.net's phpSlideShow"; $body = "This is an eary version of phpSlideShow. Functionality will be expanded in the future. Please test drive this software and report any bugs to me"; switch($_GET['function']) { case 'show': show($_GET);break; case 'admin': header("Location: ./index.php"); default: create_cache();welcome();break; } function create_cache() { $handle = opendir("./"); $x = 0; if(!$handle) die("Error opening current directory"); while($file = readdir($handle)) { if($file == '..' || $file =='.' || $file =='.cache' || $file == 'index.php') continue; if(is_dir($file)) continue; $files.="\$files[$x] = '$file';\n"; $x++; } $files.="\$total_files = $x;\n"; closedir($handle); $fp = fopen(".cache",'w'); if(!$fp) die("error creating cache file"); fputs($fp," \n".$files."?>"); fclose($fp); } function show($a) { require(".cache"); //print "
";print_r($files); print ""; $num = $a['photo']; if($num < 0 || $num > 21) header("Location: index.php?function=show&auto=1&photo=0"); $file_name = $files[$num]; //$next_file_name = $files[$num+1]; $file_size = filesize($file_name); if($a['auto']==1) $refresh = ""; ?>
|
|
Nasreddine Dinet - Tableaux méconnus (exposition déroulante ... patientez ...) |