switch ($HTTP_GET_VARS['action']) {
case 'list':
$d = dir('.');
while (($file = $d->read()) !== false) {
if (!is_dir($file)&&$file!=='index.php'&&$file!=='Thumbs.db')
$s[count($s)]=$file;
}
if($n>count($s))
die("No more results");
//HTML Header
?>
Burke-Works Banners
if($n>0) { ?>[ Previous 10 ] } ?>
if($s[$n+10]) { ?>[ Next 10 ] } ?>
$i=0;
while($i<10 && $s[$i+$n])
{
?>
1. ![]()
$i++;
}
$d->close();
//HTML Footer
?>
if($n>0) { ?>[ Previous 10 ] } ?>
if($s[$n+10]) { ?>[ Next 10 ] } ?>
break;
default:
$d = dir('.');
$count=0;
while (($file = $d->read()) !==false) {
if (!is_dir($file)&&$file!=='index.php'&&$file!=='Thumbs.db') {
global $count;
$count++;
$sig["$count"]=$file;
}
}
$d->close();
$geh = $sig[rand(1,$count)];
$gd = explode(".",$geh);
switch ($gd[1])
{
case "jpg":
Header('Content-type: image/jpeg');
break;
case "gif":
Header('Content-type: image/gif');
break;
}
Header('Pragma: No cache');
$fp = fopen("$geh",'r');
while (!feof($fp)) {echo fread($fp,4096);}
fclose($fp);
break;
}
?>