Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. <?php require_once dirname(__FILE__) .'/../config.php';?>
  2. <!DOCTYPE HTML>
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
  4. <head>
  5. <meta charset="utf-8" />
  6. <title>Kalkulator</title>
  7. </head>
  8. <body>
  9.  
  10. <form action="<?php print(_APP_URL);?>/app/calc.php" method="post">
  11. <label for="id_kwota">Kwota: </label>
  12. <input id="id_kwota" type="text" name="kwota" value="<?php isset($_REQUEST['kwota']) ? $_REQUEST['kwota'] : null; ?>" /><br />
  13. <label for="id_ytp">Długość kredytu w latach: </label>
  14. <input id="id_ytp" type="text" name="ytp" value="<?php isset($_REQUEST['ytp']) ? $_REQUEST['ytp'] : null; ?>" /><br />
  15. <label for="id_kwota">Oprocentowanie w skali roku w %: </label>
  16. <input id="id_oprocentowanie" type="text" name="oprocentowanie" value="<?php isset($_REQUEST['oprocentowanie']) ? $_REQUEST['oprocentowanie'] : null; ?>" /><br />
  17. <input type="submit" value="Oblicz ratę kredytu" />
  18.  
  19. </form>
  20.  
  21. <?php
  22. //wyświeltenie listy błędów, jeśli istnieją
  23. if (isset($messages)) {
  24. if (count ( $messages ) > 0) {
  25. echo '<ol style="margin: 20px; padding: 10px 10px 10px 30px; border-radius: 5px; background-color: #f88; width:300px;">';
  26. foreach ( $messages as $key => $msg ) {
  27. echo '<li>'.$msg.'</li>';
  28. }
  29. echo '</ol>';
  30. }
  31. }
  32. ?>
  33.  
  34. <?php if (isset($result_rata)){ ?>
  35. <div style="margin: 20px; padding: 10px; border-radius: 5px; background-color: #ff0; width:300px;">
  36. <?php echo 'Stała rata kredytu wynosi: '.$result_rata; ?>
  37.  
  38. </div>
  39. <?php } ?>
  40.  
  41. </body>
  42. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement