Файл: persy/razd.php
Строк: 73
<?
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';
only_reg();
if (!isset($_GET['razd']))
{
header("Location: index.php?");
exit;
}
$quer=mysql_fetch_array(mysql_query("select * from `persy_razd` where `id`='".intval($_GET['razd'])."';"));
$set['title']='Выбор персонажа - категория '.esc(trim(br(bbcode(smiles(links(stripcslashes(htmlspecialchars($quer['name'])))))))).'';
include_once '../sys/inc/thead.php';
title();
err();
aut();
if(isset($_GET['razd']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `persy_razd` WHERE `id` = '".intval($_GET['razd'])."'"),0))
{
$razd=mysql_fetch_array(mysql_query("select * from `persy_razd` where `id`='".intval($_GET['razd'])."'"));
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `persy` WHERE `id_dir` = '$razd[id]'"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
if($k_post==0)
{
echo "<div class='p_t'>n";
echo "Перасонажей категории нет";
echo "</div>n";
}
$query = mysql_query("select * from `persy` WHERE `id_dir` = '$razd[id]' AND `times`>-220 ORDER by `id` DESC LIMIT $start, $set[p_str];");
while ($item = mysql_fetch_array($query)){
if($num==1)
{
echo "<div class='rowdown'>";
$num=0;
}
else
{
echo "<div class='rowup'>";
$num=1;
}
echo "<div class='p_m'>";
echo "<table><tr><td>";
echo "<img src='$item[url]'<width='60' height='60'>";
echo "</td><td>";
echo "<a href='item.php?id=$item[id]'>$item[name]</a>";
if ($item['times']==0){echo "<b>(<font color='red'>Занят</font>)</b><br />n";}
if ($item['times']==1){echo "<b>(<font color='green'>Свободен</font>)</b><br />n";}
if ($item['times']==-1){echo "<b>(<font color='blue'>Мертв</font>)</b><br />n";}
echo "Пол:";
if ($item['pol']==1)
{
echo "<font color='blue'>Шиноби</font><br />";
}
else
{
echo "<font color='red'>Куночи</font><br />";
}
echo "</td></tr></table>";
echo "</div>";
echo "</div>";
}
if ($k_page>1)str("?razd=$razd[id]&",$k_page,$page);
echo"<div class='foot'>n";
echo "<img src='/img/back1.png' alt='' /> <a href='index.php?'>Назад</a>n";
echo @iconv_substr(output_text($item['opis']), 0,45, 'utf-8');
echo"</div>n";
}
include_once '../sys/inc/tfoot.php';
?>