Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php require_once dirname(__FILE__) .'/../config.php';?>
- <!DOCTYPE HTML>
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
- <head>
- <meta charset="utf-8" />
- <title>Kalkulator</title>
- </head>
- <body>
- <form action="<?php print(_APP_URL);?>/app/calc.php" method="post">
- <label for="id_kwota">Kwota: </label>
- <input id="id_kwota" type="text" name="kwota" value="<?php isset($_REQUEST['kwota']) ? $_REQUEST['kwota'] : null; ?>" /><br />
- <label for="id_ytp">Długość kredytu w latach: </label>
- <input id="id_ytp" type="text" name="ytp" value="<?php isset($_REQUEST['ytp']) ? $_REQUEST['ytp'] : null; ?>" /><br />
- <label for="id_kwota">Oprocentowanie w skali roku w %: </label>
- <input id="id_oprocentowanie" type="text" name="oprocentowanie" value="<?php isset($_REQUEST['oprocentowanie']) ? $_REQUEST['oprocentowanie'] : null; ?>" /><br />
- <input type="submit" value="Oblicz ratę kredytu" />
- </form>
- <?php
- //wyświeltenie listy błędów, jeśli istnieją
- if (isset($messages)) {
- if (count ( $messages ) > 0) {
- echo '<ol style="margin: 20px; padding: 10px 10px 10px 30px; border-radius: 5px; background-color: #f88; width:300px;">';
- foreach ( $messages as $key => $msg ) {
- echo '<li>'.$msg.'</li>';
- }
- echo '</ol>';
- }
- }
- ?>
- <?php if (isset($result_rata)){ ?>
- <div style="margin: 20px; padding: 10px; border-radius: 5px; background-color: #ff0; width:300px;">
- <?php echo 'Stała rata kredytu wynosi: '.$result_rata; ?>
- </div>
- <?php } ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement