Файл: obkl/show_like.php
Строк: 33
<?php
require_once '../incfiles/core.php';
require_once '../incfiles/func.php';
require_once '../incfiles/auth.php';
require_once '../incfiles/user.php';
if (!empty($_GET['id']) && is_numeric($_GET['id']))
{
$id = abs(intval($_GET['id']));
$result = mysql_query("SELECT * FROM `obkl` WHERE `id` = '".$id."' LIMIT 1");
if (mysql_num_rows($result) == true)
{
$arr = mysql_fetch_array(mysql_query("SELECT * FROM `obkl` WHERE `id` = '".$id."' LIMIT 1"));
}
else go(URL.'/');
}
else
{
go(URL.'/');
}
if (empty($user_id) or $user_id != $arr['user_id']) {go(URL.'/');}
$title = lang('Просмотр аватарки :: Мне нравится','Перегляд аватарки :: Мені подобається');
require_once '../incfiles/head.php';
echo '<div class="title">'.lang('Просмотр аватарки','Перегляд аватарки').'</div>
<div class="block"><center>';
echo '<a href="'.URL.'/obkl/preview.php?fid='.$arr['id'].'"><img class="preview" src="'.URL.'/files/obkl/'.$arr['user_id'].'/preview/'.$arr['name'].'"/></a>';
echo'</center></div><div class="title">'.lang('Мне нравится','Мені подобається').' <div class="right">'.$arr['clike'].'</div></div>';
if (!empty($arr['ulike']))
{
$q = explode("||", substr($arr['ulike'], 1, -1));
$count = count($q);
$cp = ceil($count/10);
$p = (isset($_GET['p']) and is_numeric($_GET['p']) and $_GET['p']>1 and $_GET['p']<=$cp) ? $_GET['p'] : 1;
$start = $p*10-10;
for ($i = 0; $i < $count; $i++)
{
echo '<div class="block">'.user_name($q[$i]).'<br/><br/></div>';
}
navi($p,$cp,''.URL.'/obkl/show_like.php?id='.$arr['id'].'&');
}
require_once '../incfiles/foot.php';
?>