Прикручиваем шаблон. Хороним идиотские ошибки.

This commit is contained in:
Igor Barkov (iwork) 2020-09-30 15:39:42 +03:00
parent 633b551889
commit 5855827f23
1 changed files with 4 additions and 13 deletions

View File

@ -23,6 +23,7 @@ if ($get == 'exit') {
$_SESSION[BANK_SESSION_NAME] = null;
}
$bank = new Bank($user->id);
$status = '';
if (isset($_POST['userlogin'])) {
$_SESSION[BANK_SESSION_NAME] = $bank->user_id;
@ -31,7 +32,6 @@ if ($_SESSION[BANK_SESSION_NAME]) {
$toid = (int)$_POST['to_id'] ?? 0;
$summa = (int)$_POST['summa'] ?? 0;
$submit = $_POST['action'] ?? '';
$status = '';
// Зачисление кредитов на счёт.
if ($submit === 'depositMoney' && $summa) {
$bank->depositMoney($summa);
@ -49,17 +49,10 @@ if ($_SESSION[BANK_SESSION_NAME]) {
}
unset($submit, $summa, $toid);
}
Template::header('Банк');
?>
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<link href="css/main.css" rel="stylesheet"/>
<link href="css/secondary.css" rel="stylesheet"/>
<script src="js/main.js"></script>
<title>Банк</title>
</head>
<body>
<h1>Банк</h1>
<?php if (!$_SESSION[BANK_SESSION_NAME]): ?>
<a href=# onclick=hrefToFrame('city.php?strah')> ← выйти из банка</a>
@ -94,8 +87,6 @@ if ($_SESSION[BANK_SESSION_NAME]) {
<input type="hidden" name="action" value="sendMoney">
<input type="submit" value="Перевести кредиты">
</form>
<span class="wrap">Комиссия: <?= Bank::BANK_COMISSION * 100 ?>% от переводимой суммы, но не менее 1 кр.</span>
<span class="wrap">Комиссия: <?= Config::$bank_comission * 100 ?>% от переводимой суммы, но не менее 1 кр.</span>
</div>
<?php endif; ?>
</body>
</html>
<?php endif; ?>