tiny-slitaz view create.php @ rev 19
100 uers max
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Feb 12 12:16:10 2017 +0100 (2017-02-12) |
parents | |
children |
line source
1 <?php
3 $sizes = array(
4 "1474560" => "1.44 MB", "1720320" => "1.68 MB",
5 "1966080" => "1.92 MB", "2949120" => "2.88 MB"
6 );
7 ?>
8 <form method="post" enctype="multipart/form-data" action="<?php echo $_SERVER["PHP_SELF"]; ?>">
9 <table>
10 <tr>
11 <td>Initramfs :</td>
12 <td><select name="initrd">
13 <option value="">No configuration</option>
14 <option value="upload">Use my configuration ----></option>
15 <?php
16 // <option value="builder">Use online rootfs builder</option>
18 function blocksize($file)
19 {
20 global $use_sectors;
21 if ($use_sectors)
22 return floor((filesize($file) + 511) / 512)." sectors";
23 else
24 return "use ".((filesize($file) + 511) & -512)." bytes";
25 }
27 foreach ($demos as $name)
28 echo "<option value=\"demos/$name\">Demo $name (".blocksize("demos/".$name).
29 ")</option>\n";
30 closedir($dir);
31 ?>
32 </select></td>
33 <td><input type="file" name="uploadinitrd" /></td>
34 </tr>
35 <tr>
36 <td>Kernel :</td>
37 <td><select name="kernel">
38 <option value="dist/bzImage.lzma">LZMA (<?php echo blocksize("dist/bzImage.lzma") ?>)</option>
39 <option value="dist/bzImage.gz">GZIP (<?php echo blocksize("dist/bzImage.gz") ?>)</option>
40 <option value="upload">Use my kernel ----></option>
41 </select></td>
42 <td><input type="file" name="uploadkernel" /></td>
43 </tr>
44 <tr>
45 <td>Floppy :</td>
46 <td><select name="size">
47 <?php
48 foreach ($sizes as $key => $value) {
49 if ($use_sectors)
50 echo " <option value=\"$key\">$value (".($key/512)." sectors)</option>\n";
51 else
52 echo " <option value=\"$key\">$value ($key bytes)</option>\n";
53 }
54 ?>
55 </select></td>
56 <td align="center">
57 <input name="build" value="Build floppy" type="submit" />
58 <?php if (file_exists("/boot/isolinux/isolinux.bin")) { ?>
59 <input name="buildiso" value="Build ISO image" type="submit" />
60 <?php } ?>
61 </td>
62 </tr>
63 </table>
64 </form>