Файл: oko.php
Строк: 58
<?php
require 'lang_inc.php';
require 'sid.php';
require 'config.php';
$link = connect_db();
list($user, $id, $ps) = check_login($link);
whorm(0, 'oko');
include 'head.php';
include 'navigator.php';
echo $div_title . ''.$lang['Всевидящее око'].'' . $div_end . $div_left;
if (isset($_GET['clean'])) {
mysql_query("DELETE FROM `my_guest` WHERE `user` = '$user[id]'");
header('Location: myguest.php?lg='.$lg.'&' . $ref);
}
$look = mysql_result(mysql_query("SELECT COUNT(*) FROM `oko` WHERE `user` = '$user[id]'"), 0);
$n = new navigator($look, 10, '?lg='.$lg.'');
$view = mysql_query("SELECT * FROM `oko` WHERE `user` = '$user[id]' ORDER BY `id` DESC {$n->limit}");
if ($look != FALSE) {
$i = 0;
mysql_query("UPDATE `oko` SET `look` = '0' WHERE `look` = '1' AND `user` = '$user[id]'");
while($a = mysql_fetch_assoc($view)) {
/////////////////////////
if ($a['where'] == 'stranica') $where = ' <span style="color: #FF0000;">('.$lang['Смотрит страничку'].')</span>';
if ($a['where'] == 'infa') $where = ' <span style="color: #FF0000;">('.$lang['Смотрит анкету'].')</span>';
if ($a['where'] == 'avtoport') $where = ' <span style="color: #FF0000;">('.$lang['Смотрит автопортрет'].')</span>';
if ($a['where'] == 'group') $where = ' <span style="color: #FF0000;">('.$lang['Смотрит список групп'].')</span>';
if ($a['where'] == 'friend') $where = ' <span style="color: #FF0000;">('.$lang['Смотрит друзей'].')</span>';
if ($a['where'] == 'album') $where = ' <span style="color: #FF0000;">('.$lang['Смотрит альбомы'].')</span>';
if ($a['where'] == 'zametki') $where = ' <span style="color: #FF0000;">('.$lang['Смотрит заметки'].')</span>';
if ($a['where'] == 'fav') $where = ' <span style="color: #FF0000;">('.$lang['Смотрит закладки'].')</span>';
if ($a['where'] == 'present') $where = ' <span style="color: #FF0000;">('.$lang['Смотрит подарки'].')</span>';
/////////////////////////
echo ($i ++ % 2) ? $div_tworazdel : $div_razdel;
echo nikus($a['who']) . '<br/>' . $where . $div_end;
}
echo $n->navi();
} else {
echo ''.$lang['Не найдено'].'!<br/>';
}
echo $div_end;
include 'foot.php';
?>