Размер файла: 2.27Kb
<?php
$us=$_GET['id'];
$ps=$_GET['ps'];
$us=mysql_escape_string(htmlspecialchars(trim($us)));
$ps=mysql_escape_string(htmlspecialchars(trim($ps)));
include("ini.php");
$login = autorize();
if($login) {
@mysql_query("update `c_users` set `ltime`='".time()."', `room`='forum', `nev`='0' where `id`='".$id."';");
include("head.php");
echo "Вы вошли как <b>$nik_us</b><br/>";
echo "Темы:";
$query = @mysql_query("SELECT COUNT(*) FROM `c_forum_tema` WHERE `kto`='".$id."' ;");
$all = @mysql_result($query, 0);
if(isset($_GET['s'])) $s = intval($_GET['s']);
else $s = 0;
if($s < 0) $s = 0;
if($s > $all) $s = 0;
$c = $s + 1;
if($all==0) echo "<br/>---<br/>Вами не было создано тем !<br/>";
$tema_viv = @mysql_query("SELECT * FROM `c_forum_tema` WHERE `kto`='".$id."' ORDER BY `poschen` DESC LIMIT $s, 13;");
while($itog_tem = mysql_fetch_array($tema_viv))
{
$id_tm = $itog_tem['id'];
$nazwan_tm = $itog_tem['nazwan'];
$date_tm = $itog_tem['date'];
$utwerdil_tm = $itog_tem['utwerdil'];
$razdel_tm = $itog_tem['razdel'];
$msg_viv = @mysql_query("SELECT count(*) FROM `c_forum_msg` WHERE `razdel`='".$razdel_tm."' and `tema`='".$id_tm."';");
$itog_mgs = mysql_fetch_array($msg_viv);
$razdel_zagr = @mysql_query("SELECT * FROM `c_forum_razdel` WHERE `id`='".$razdel_tm."';");
$osn_razd = @mysql_fetch_array($razdel_zagr);
echo "<a href=\"msg.php?f=$f&id=$id&ps=$ps&id_rz=$razdel_tm&id_tm=$id_tm\">$nazwan_tm</a> [".$itog_mgs['count(*)']."]<br />
[<small>Создана: $date_tm | Раздел: <b><a href=\"temi.php?f=$f&id=$id&ps=$ps&id_rz=$razdel_tm\">".$osn_razd['nazwan']."</b></small>]<br/>";
$c++;
}
if($all>15)echo "<br />";
if($login) {
if ($s > 0) echo "<a href=\"?f=$f&id=$id&ps=$ps&s=".($s-13)."\"><<<<</a> |";
if ($all > $s + 13) echo "| <a href=\"?f=$f&id=$id&ps=$ps&s=".($s+13)."\">>>>></a>";
}else{
if ($s > 0) echo "<a href=\"?f=$f&s=".($s-13)."\"><<<<</a> |";
if ($all > $s + 13) echo "| <a href=\"?f=$f&s=".($s+13)."\">>>>></a>";
}
if($all>15)echo "<br/><br/>";
echo "<a href=\"index.php?f=$f&id=$id&ps=$ps\">Форум</a><br/>";
include("foot.php");
}else{
header("Location:index.php?f=$f");
}
?>