1<?php
2if (empty($_REQUEST['list'])) {
3	header('Location: phpThumb.demo.demo.php');
4	exit;
5}
6?>
7<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
8<html>
9<head>
10	<title>Demo of phpThumb() - thumbnails created by PHP using GD and/or ImageMagick</title>
11	<link rel="stylesheet"    type="text/css" href="/style.css" title="style sheet">
12	<link rel="shortcut icon" type="image/x-icon" href="http://phpthumb.sourceforge.net/thumb.ico">
13	<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
14</head>
15<body style="background-color: #C5C5C5;">
16<?php
17$dh = opendir('.');
18while ($file = readdir($dh)) {
19	if (is_file($file) && ($file[0] != '.') && ($file != basename(__FILE__))) {
20		switch ($file) {
21			case 'phpThumb.demo.object.simple.php':
22			case 'phpThumb.demo.object.php':
23				echo '<code>'.str_replace(' ', '&nbsp;', str_pad(filesize($file), 10, ' ', STR_PAD_LEFT)).'</code> '.$file.' (cannot work as a live demo)<br>';
24				break;
25			default:
26				echo '<code>'.str_replace(' ', '&nbsp;', str_pad(filesize($file), 10, ' ', STR_PAD_LEFT)).'</code> <a href="'.$file.'">'.$file.'</a><br>';
27				break;
28		}
29	}
30}
31?>
32</body>
33</html>