Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $wielkosci = [
- "1" => "9",
- "2" => "15",
- "3" => "42",
- ];
- echo "<form name=\"rack-selector\" action=\"\" method=\"POST\">\n";
- for ($i = 1; $i <= sizeof($wielkosci) ; $i++) {
- echo "<input type=\"radio\" name=\"szafa\" value=\"".$wielkosci[$i]."\">".$wielkosci[$i]."U<br>\n";
- }
- echo "<input type=\"submit\" value=\"Wybierz\">";
- echo "</form>";
- $elementy = [
- "1" => "Pusto",
- "2" => "Switch",
- "3" => "Patchpanel",
- "4" => "Panel światłowodowy",
- "5" => "Panel porządkujący",
- "6" => "Listwa zasilająca",
- ];
- if (!empty($_POST)) {
- $rack=$_POST['szafa'];
- echo "<form name=\"szafka\" action=\"makeprtg.php\" method=\"POST\">\n";
- for ($i = 1 ; $i <= $rack ; $i++) {
- echo $i. "U <select name=\"U".$i."\">\n";
- for ($j = 1; $j <= sizeof($elementy) ; $j++) {
- echo "\t\t<option value=\"".$j."\"> ".$elementy[$j]."</option>\n";
- }
- echo "\t</select><br />\n" ;
- }
- echo "Tytuł: <input type=\"text\" name=\"tytul\" ><br>\n";
- echo "Podtytuł: <input type=\"text\" name=\"podtytul\" ><br>\n";
- echo "<input type=\"submit\" name=\"prtgsubmit\" value=\"Zrób obrazek\">";
- echo "</form>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement