battles/hostel_checkpoint.php

24 lines
1.8 KiB
PHP
Raw Normal View History

2018-01-28 16:40:49 +00:00
<?
session_start();
if(!isset($_SESSION['uid'])) { header('Location: index.php'); die(); }
include('config.php');
include('functions.php');
$hostel = mysql_fetch_array(mysql_query('SELECT * FROM `hostel` WHERE `uid` = "'.$user['id'].'" LIMIT 1'));
$base = array(1 => array(8, 16, 24, 32), 2 => array(15, 30, 45, 60), 3 => array(25, 50, 75, 100), 4 => array(40, 80, 120, 160));
if(isset($_POST['act']) && $_POST['act'] == 'pay') {
if(isset($user['id']) && isset($hostel['id'])) {
echo '<fieldset class="hostelClientState">';
echo '<legend>Предварительная оплата</legend>';
2020-09-17 23:06:32 +00:00
echo '<div style="text-align: center;"><p class="NORMAL" style="margin: 5px 0">';
2018-01-28 16:40:49 +00:00
echo 'Аренда оплачена по: <b>'.date('h:i d.m.y', $hostel['time']).'</b> <small>('.timeOut($hostel['time']-time()).')</small></p></div>';
echo '<table align="center" class="periods"><caption style="text-align: left;">Выберите срок предоплаты.</caption>
<tbody>
<tr class="caption"><th>Сутки</th><td title="7 дн.">7</td><td title="14 дн.">14</td><td title="21 дн.">21</td><td title="28 дн.">28</td></tr>
<tr class="value"><th>Сумма</th><td title="7 дн."><a href="?pays=1">'.$base[$hostel['type']][0].'</a></td><td title="14 дн."><a href="?pays=2">'.$base[$hostel['type']][1].'</a></td><td title="21 дн."><a href="?pays=3">'.$base[$hostel['type']][2].'</a></td><td title="28 дн."><a href="?pays=4">'.$base[$hostel['type']][3].'</a></td></tr>
</tbody>
</table>
<div style="color: red; font-size: 9px; padding-top: 3px;"><b>Внимание!</b> При расторжении договора или смене тарифа, внесенная плата не возвращается</div></fieldset></div>';
}
}