-
Notifications
You must be signed in to change notification settings - Fork 0
/
list.php
34 lines (34 loc) · 1.12 KB
/
list.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php require_once("./inc/header.inc.php");?>
<?php
$path = "./data";
if (!($handle = opendir($path)))
{
die("Can not open data folder!");
}
?>
<div id="list" class="wrapper">
<h1>Schedule Visualizer</h1>
<h2>Please select a solution from this list : </h2>
<div>
<form name="selection" action="./index.php" method="get">
<select name="set">
<?php
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != ".." && is_dir($path."/".$entry)) {
echo "<option value=\"$entry\">$entry</option>\n";
}
}
closedir($handle);
?>
</select>
<input id="submit" name="submit" type="submit" value="Go!" />
</form>
</div>
<h2> Or upload your own solution.</h2>
<div id="upload">
<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input name="uploadedfile" type="file" />
</form>
</div>
</div>
<?php require_once("./inc/footer.inc.php"); ?>