File size: 1.62Kb
<?php
#########################################
#
# Create By LEM
# http://wapjava.org
# http://hostwap.info
#
#########################################
include ('conf.php');
echo $wml;
$sql = mysql_qw ('select * from razdel where id=?',intval($id));
$razdel = getarray($sql);
if($log) echo'++<a href="say.php?'.$sed.'&id='.$id.'">Новая тема</a><br/>';
if(empty($razdel[0])) exit('[Раздел не найден]'.$end);
echo '['.check_string($razdel[0][name]).']<br/>';
include ('add.php');
echo $system;
$qw=mysql_qw('SELECT * FROM tems WHERE id_razdel=? ORDER BY fix DESC,time DESC',$id);
$tem = getarray($qw);
if(empty($tem))
echo '[Раздел пуст]<br/>';
if($n == '' or $n < 0) $n = 0;
for($i=1; $i<=$onpage; $i++)
{
if(isset($tem[$n]))
{ $sw ='';
if($tem[$n][fix]==1) $sw ='!'; if($tem[$n][hide]==1) $sw .='#';
echo"<a href='tem.php?$sed&id=$id&tid=".$tem[$n][id]."'>".$tem[$n][avtor]." ".date("d.m.Y H:i",$tem[$n][creat])."[";
$arr = mysql_fetch_array(mysql_qw("select count(*) from post where id_tema=?",$tem[$n][id]));
$num = $arr[0];
echo $num."]$sw</a><br/>
".check_string($tem[$n][name])."<br/>";
}
$n++;
}
if($log) echo'++<a href="say.php?'.$sed.'&id='.$id.'">Новая тема</a><br/><br/>';
$all = count($tem)-1;
if(($n-$onpage)>0) echo'<=<a href="tems.php?'.$sed.'&id='.$id.'&n='.($n-($onpage*2)).'">Предидущие</a><br/>';
if($n<$all) echo'<a href="tems.php?'.$sed.'&id='.$id.'&n='.$n.'">Следущие</a>=><br/>';
exit("<<<a href='index.php?$sed'>Разделы</a><br/>".$end);
?>