Файл: vk.com_vhllam/ajax/frend.ajax.php
Строк: 49
<?
if(!(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')) die;
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';
?>
<style>
.arr img {
vertical-align: top;
}
</style>
<?
if (isset($_SESSION['id_user']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `frends_aut` WHERE `id_frend` = '$user[id]'"), 0) > 0)
{
$q = mysql_query("SELECT * FROM `frends_aut` WHERE `id_frend` = '$user[id]' ORDER BY `time` DESC");
while ($frend = mysql_fetch_assoc($q))
{
$frend = get_user($frend['id_user']);
echo '<div class="arr" style="background: #4d4d4d; padding: 10px; margin:5px; opacity: 0.9; filter: alpha(Opacity=70);color: #fff; border-radius: 6px; width: 260px;">';
echo '<b>Оповещение</b><br /> ' . status($frend['id']) . ' <a style="color:#26529b;" href="/id' . $frend['id'] . '"><b>' . $frend['nick'] . '</b></a> сейчас на сайте';
echo '</div>';
}
// Удаляем уведомления
mysql_query("DELETE FROM frends_aut WHERE id_frend = '$user[id]'");
}
exit;
?>