Файл: modules/in.php
Строк: 87
<?php
/**
* @author Moroz Taras (-= MTV =-)
*/
namespace functions;
$mod = (isset($_GET['mod']) ? a_filter_url($_GET['mod']) : NULL);
$stmt = $db->prepare('SELECT * FROM `db_harvest` WHERE `id_user` = :id');
$stmt->bindValue(':id', a_isUser('id'));
$stmt->execute();
$counter = $stmt->rowCount();
switch($mod) :
default:
if(a_isUser() === true) {
a_header('Мой сад ');
$ip=htmlspecialchars(stripslashes($_SERVER['REMOTE_ADDR']));
$browser = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
$stmt1 = $db->query('UPDATE `db_users` SET `browser` = "'.$browser.'", `ip` = "'.$ip.'" WHERE `id` = "'.a_isUser('id').'" LIMIT 1');
$stmt1->bindValue(':id', a_isUser('id'));
$stmt1->execute();
$user_cover = $db->query('SELECT `cover` FROM `db_users` WHERE `id` = "'.a_isUser('id').'" LIMIT 1')->fetch();
if(empty($user_cover['cover'])) {
echo '<div class="mybar"><img src="' . a_img('lock.png') . '" width="22" height="22" alt="*"> Внимание! Введите Ключевое слово для восстановления акаунта! <a href="/?act=cover">Тык</a></div>';
}
echo '
<div class="title" style="border-bottom:none;">
<table style="width:100%" cellspacing="0" cellpadding="0">
<tbody><tr><td style="vertical-align:top;width:10%;"><center></a> <a href="/?act=profile"title="Кабинет"><img src="' . a_img('vcard.png' ) . '
" width="22" height="22" alt="*"></a></center>
</td><td style="vertical-align:top;width:10%;"><center><a href="/mail.php" title="Почта"><img src="' . a_img('message.png') . '" width="22" height="22" alt="*"></a></center></td><td style="vertical-align:top;width:10%;"><center><a href="/?act=settings" title="Настройки"><img src="' . a_img('round.png') . '" width="22" height="22" alt="*">
</a></center></td><td style="vertical-align:top;width:10%;"><center><a href="/?act=exit"title="Выход"><img src="' . a_img('vih.png') . '" width="22" height="22" alt="*"></a></center></td></tr></tbody></table></div>';
echo '<div class="about">';
while($f = $stmt->fetch()) {
echo '<p><img style="border-radius:100%;border:2px solid #b6b6b6;" width="35px" src="'.a_img(getFruitById('img', $f['fruit'])).'">
<small>Ваших '.$f['many'].' саженцев уродили:
<font color="red">'.$f['value'].'</font> плодов. <br><br><a class="input_submit" href="/?act=shop_garden&mod=sell&user='.$f['id_user'].'&fruit='.$f['fruit'].'">Продать плоды '.getFruitById('name', $f['fruit']).' за '.(100*(100*$f['value']/5000)/10000).'</a></small>
</p>';
}
if($counter < 1) {
echo '<div style="color:red;font-weight:bold;text-align:center;">Саженцев еще нет.</div>';
}
echo '</div>';
echo '<div class="do">';
if(a_isUser('access') == 1) echo '<img src="' . a_img('round.png') . '" width="22" height="22" alt="*"> <a href="/?act=admin">Админка</a></br></div>';
echo '<div class="do"><img src="' . a_img('farm.png') . '" width="22" height="22" alt="*"> <a href="/?act=shop_ferma">Ферма</a></div>
<div class="do"><img src="' . a_img('gyper.png') . '" width="22" height="22" alt="*"> <a href="/?act=shop_gyper">Гипер ферма</a></div>
<div class="do"><img src="' . a_img('shop.png') . '" width="22" height="22" alt="*"> <a href="/?act=shop_garden">Фруктовый склад</a></div>
<div class="do"><img src="' . a_img('bonus.png') . '" width="22" height="22" alt="*"> <a href="/?act=bonus">Бонусы</a></div>';
echo '</div><div class="mybar"><center> <img src="' . a_img('users.png') . '" width="22" height="22" alt="*"> Онлайн:
<a href="/?act=online"><span style="color:red">('.($db->query('SELECT `id` FROM `db_users` WHERE `online` > "'.(time()-1800).'"')->rowCount()).')</a></span> из
<a href="/?act=users"> ('.($db->query('SELECT `id` FROM `db_users`')->rowCount()).')</a></center></div>';
echo '<div class="title" style="border-bottom:none;">
<table style="width:100%" cellspacing="0" cellpadding="0">
<tbody><tr><td style="vertical-align:top;width:10%;"><center></a><a href="/?act=news"title="Новости"><img src="' . a_img('news.png' ) . '
" width="22" height="22" alt="*"></a></center>
</td><td style="vertical-align:top;width:10%;"><center><a href="/?act=reviews" title="Отзывы"><img src="' . a_img('rew.png') . '" width="22" height="22" alt="*">
</a></center></td><td style="vertical-align:top;width:10%;"><center><a href="/?act=kont" title="Контакты"><img src="' . a_img('adressbook.png') . '" width="22" height="22" alt="*"></a></center></td><td style="vertical-align:top;width:10%;"><center><a href="/?act=right"title="Правила"><img src="' . a_img('lis.png') . '" width="22" height="22" alt="*"></a></center></td></tr></tbody></table></div>';
a_footer();
} else {
exit(header('Location: /'));
}
break;
endswitch;