Permalink
Browse files

narcissus: assemble machine list by scanning config dir for supported…

… machines
  • Loading branch information...
1 parent 973b889 commit 2a331c2a06c46d96578e3cec9493aaedc8f4ad73 @koenkooi koenkooi committed Dec 14, 2008
Showing with 29 additions and 3 deletions.
  1. +29 −3 index.php
View
@@ -1,15 +1,41 @@
<html>
<head>
<title>Narcissus - Online image builder for the angstrom distribution</title>
-<script language="javascript" type="text/javascript" src="./internal_request.js">
+<script language="javascript" type="text/javascript" src="./internal_request.js"></script>
</head>
-</body>
+<body>
<?
/* Narcissus - Online image builder for the angstrom distribution
* Koen Kooi (c) 2008 - all rights reserved
*/
+?>
+<form action="post">
+ <p>
+ Machine:
-
+<select name="machine">
+<?
+if ($handle = opendir ('./conf/'))
+ {
+ /* This is the correct way to loop over the directory. */
+ while (false !== ($file = readdir ($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ print ("<option value='$file'>$file</option>");
+ }
+ }
+ closedir ($handle);
+ }
?>
+</select >
+ </p>
+
+ Image name:
+
+ <input type="text" name="name" id="name" />
+
+</form>
+
</body>
</html>

0 comments on commit 2a331c2

Please sign in to comment.