Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta charset="utf-8" />
- <title>Choinka</title>
- <style type="text/css">
- .czarne {
- background-color: black;
- }
- </style>
- </head>
- <body>
- <form method="POST" action="?w=rysuj">
- <input type="number" name="wier" placeholder="3" required />
- <input type="number" name="kolum" placeholder="3" required />
- <input type="submit" value="Rysuj" />
- </form>
- <center>
- <?php
- if(isset($_GET['w']) && !empty($_GET['w'])) {
- $w = $_GET['w'];
- if($w == 'rysuj'){
- $wiersze = $_POST['wier'];
- $kolu = $_POST['kolum'];
- echo'<div style="color:green;">';
- for($x=1; $x<=$kolu; $x++){
- for($y=1; $y<=$wiersze; $y++){
- for($z=1; $z<=$y; $z++){
- echo'#';
- }
- echo'</br>';
- }
- $z=$z-3;
- }
- }
- echo '</div><div style="color:brown;"><b>
- | |</b>
- </div>';
- }
- ?>
- <form method="POST" action="?b=buduj">
- <input type="number" name="wys" placeholder="3" required />
- <input type="submit" value="Buduj" />
- <?php
- if(isset($_GET['b']) && !empty($_GET['b'])){
- $b = $_GET['b'];
- If($b == 'buduj'){
- echo '<table width="100%" border="1" color="black">';
- $t = $_POST['wys'];
- for($m=1; $m<=$t; $m++){
- echo'<tr width="100%" height="100%"><td class="czarne" height="42px"></td><td></td><td class="czarne" height="42px"></td><td></td>
- <td class="czarne" height="42px"></td><td></td><td class="czarne" height="42px"></td><td></td><td class="czarne" height="42px"></td><td></td><td class="czarne" height="42px"></td><td></td><td class="czarne" height="42px"></td><td></td><td class="czarne" height="42px"></td><td></td><td class="czarne" height="42px"></td><td></td><td class="czarne" height="42px"></td><td></td><td class="czarne" height="42px"></td><td></td><td class="czarne" height="42px"></td><td></td><td class="czarne" height="42px"></td><td></td>';
- }
- }
- }
- ?>
- </form>
- </center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement