Файл: vsime.com/actions/inc/act_index.php
Строк: 70
<?
if (isset($_GET['id']))
{
$ank = profile(intval($_GET['id']));
if ($ank['id'] == 0)
{
$title .= ' - Ошибка!';
ex_head();
$error[] = 'Пользователь не найден.';
show_errors();
ex_foot();
}
} else {
if_user('is_reg');
$ank = $user;
}
$title .= ' c '.$ank['nick']; // тип заголовок
ex_head();
$count_results = mysqli_result("SELECT COUNT(*) FROM `actions_user` WHERE `id_user` = '$ank[id]'".($user['id']!=$ank['id'] && !isset($moderate_actions)?" AND (`type` = '0' OR `type` = '1' AND `id_ank` = '$user[id]')":NULL)."");
$count_pages = count_pages($count_results);
$page = page();
$start = start_pages();
if (!$count_results)
{
echo "<div class='list_empty'>n";
echo "Никаких действий с пользователем не проводилось :(n";
echo "</div>n";
}
$query = mysqli_query($dbi, "SELECT * FROM `actions_user` WHERE `id_user` = '$ank[id]'".($user['id']!=$ank['id'] && !isset($moderate_actions)?" AND (`type` = '0' OR `type` = '1' AND `id_ank` = '$user[id]')":NULL)." ORDER BY `time` DESC LIMIT $start, $config[rop]");
while ($post = mysqli_fetch_array($query))
{
$ank2 = profile($post['id_ank']);
$action = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `actions_list` WHERE `id` = '$post[id_action]'"));
echo "<div class='list'>n";
echo "<div class='left'>n";
echo "<img src='/i/actions/action_$action[id].png' />n";
echo "</div>n";
echo "<div class='overfl_hid'>n";
echo profile_icon($ank2['id']).profile_nick($ank2['id'], 1).profile_medal($ank2['id']);
echo " <span class='time'>".vremja($post['time'])."</span><br />n";
echo pol_word($ank2['id'], array($action['for_m'], $action['for_w']))."".($post['type'] == 1?" <span class='spared'>[приватное]</span>":NULL)."<br />n";
echo "</div>n";
echo "<div class='clear'></div>n";
echo "</div>n";
}
pages_show("?id=$ank[id]&");
if (isset($user) && $user['id']!=$ank['id'])
{
echo "<div class='mod_grad'>n";
echo "<img src='/i/site/action_user.png' /> <a href='?act=do&id=$ank[id]'>Выполнить действие</a>n";
echo "</div>n";
}
echo "<div class='foot'>n";
echo image_back()." <a href='$config[profile_page]?id=$ank[id]'>Назад</a>n";
echo "</div>n";
ex_foot();
?>