Файл: persy/index.php
Строк: 53
<?
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();
$set['title']='Выбор персонажей';
include_once '../sys/inc/thead.php';
title();
aut();
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `persy_razd`"),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_m'>n";
echo "Разделов нет</div>";
}
$quer = mysql_query("select * from `persy_razd` ORDER by `id` DESC LIMIT $start, $set[p_str];");
while ($razd = mysql_fetch_array($quer)){
if ($num==1)
{
echo "<div class='rowdown'>";
$num=0;
}
else
{
echo "<div class='rowup'>";
$num=1;
}
echo "<div class='p_t'><img src='/img/dir.png' alt='' /> <a href='razd.php?razd=$razd[id]'>$razd[name]</a>";
echo "[<font color='green'>".mysql_result(mysql_query("SELECT COUNT(*) FROM `persy` WHERE `id_dir` = '$razd[id]' AND `times` = '1'"),0)."</font>/<font color='red'>".mysql_result(mysql_query ("SELECT COUNT(*) FROM `persy` WHERE `id_dir` = '$razd[id]' AND `times` = '0'"),0)."</font>/<font color='blue'>".mysql_result(mysql_query("SELECT COUNT(*) FROM `persy` WHERE `id_dir` = '$razd[id]' AND `times` = '-1'"),0)." </font>]</div>";
}
if ($k_page>1)str("?",$k_page,$page);
include_once '../sys/inc/tfoot.php';
?>