Файл: user/icons/index.php
Строк: 84
<?
include_once '../../sys/inc/start.php';
include_once '../../sys/inc/compress.php';
include_once '../../sys/inc/sess.php';
include_once '../../sys/inc/home.php';
include_once '../../sys/inc/settings.php';
include_once '../../sys/inc/db_connect.php';
include_once '../../sys/inc/ipua.php';
include_once '../../sys/inc/fnc.php';
include_once '../../sys/inc/user.php';
$set['title']='Иконки';
include_once '../../sys/inc/thead.php';
title();
aut();
only_reg();
?>
<style>
.adv_user_link{
float: left;
border: 1px solid #dadada;
border-radius: 2px;
padding: 10px;
margin-right: 5px;
background: #fdfdfd;}
.oh{overflow:hidden}
</style>
<?
if(!isset($_GET['get'])){
echo '<table style="text-align:center;" class="mess" cellspacing="0" cellpadding="0">';
echo '<td style="border-right:none;" class="panel">Покупка иконки</td>';
echo '<td><a class="panel" href="?get=my_icons">Мои иконки</a></td>';
echo '</table>';
echo '<div style="overflow:hidden;" class="mess">';
$x=0;
while ($x++<125) echo '<a href ="pay.php?id='.$x.'"><span class="icon_s"><img src="png/'.$x.'.png" class="adv_user_link wa mt_m"></span></a>';
echo '</div>';
}
else
{
echo '<table style="text-align:center;" class="mess" cellspacing="0" cellpadding="0">';
echo '<td><a style="border-right:none;" class="panel" href="pay.php">Покупка иконки</a></td>';
echo '<td class="panel">Мои иконки</td>';
echo '</table>';
$icon=mysql_fetch_assoc(mysql_query("SELECT * FROM `us_icons` WHERE `id_user` = '".$user['id']."' LIMIT 1"));
if (empty($icon))
{
echo '<div class="gmenu"> У вас нет активных иконок</div>';
}
else
{
echo '<div class="mess">';
echo 'Иконка: <img src="png/'.$icon['id_icon'].'.png">';
if($icon['time'] > $time) {
echo '<br />До: '.vremja($icon['time']).'';
}
else
{
echo '<br />До: <i>срок истек</i>';
}
echo '</div><a class="link" href="?get=my_icons&delete"><i class="fas fa-times-circle"></i> Удалить</a>';
if(isset($_GET['delete']))
{
mysql_query("DELETE FROM `us_icons` WHERE `id_user` = '".$user['id']."'");
header('Location: index.php?get=my_icons'.SID);
$_SESSION['message']='Иконка успешно удалена!';
}
}
}
err();
include_once '../../sys/inc/tfoot.php';
?>