View file online.php

File size: 2.58Kb
<?php
$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 "<a href=\"index.php?f=$f&amp;id=$id&amp;ps=$ps\">Форум</a>&raquo; Онлайн (".$itog_forr_f['count(*)'].")<br/>";

if($itog_forr_f['count(*)']==0)
echo "В сети зарегистрированных пользователей нет!<br />";
if($itog_forr_f['count(*)']!=0){

$query = @mysql_query("SELECT COUNT(*) FROM `c_users` WHERE ltime>'".intval(time()-$offline)."' and anon ='0' and room='forum';");
$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;
$query = @mysql_query("SELECT * FROM `c_users` WHERE ltime>'".intval(time()-$offline)."' and anon ='0' and room='forum' ORDER BY `id` LIMIT $s, 15;");
while($praw_pol = @mysql_fetch_array($query))
{
$id_ml = $praw_pol['id'];
$nik_ml = $praw_pol['nik'];

if($login)
echo "&#8226; <a href=\"inslide.php?f=$f&amp;id=$id&amp;ps=$ps&amp;id_an=".$id_ml."\">".$nik_ml."</a> (<b>ID: $id_ml</b>)<br/>";
else
echo "&#8226; ".$nik_ml."</a> (<b>ID: $id_ml</b>)<br/>";
if($f=='h')$body=$body."<dl><dt></dt></dl>";
$c++;
}
$body=$body."---<br />";
if($login){
if ($s > 0)  $body=$body."<a href=\"?f=$f&amp;id=$id&amp;ps=$ps&amp;s=".($s-15)."\">&lt;&lt;&lt;&lt;</a> |";
if ($all > $s + 15)  $body=$body."| <a href=\"?f=$f&amp;id=$id&amp;ps=$ps&amp;s=".($s+15)."\">&gt;&gt;&gt;&gt;</a>";
}else{
if ($s > 0)  $body=$body."<a href=\"?f=$f&amp;kto=$kto&amp;s=".($s-15)."\">&lt;&lt;&lt;&lt;</a> |";
if ($all > $s + 15)  $body=$body."| <a href=\"?f=$f&amp;kto=$kto&amp;s=".($s+15)."\">&gt;&gt;&gt;&gt;</a>";
}
if($all>15)$body=$body."<br/><br/>";}
////////////////////////////////////////////////////////////////переходы формата//////////////////////////////[
/*
if($login){
$body=$body."<a href=\"index.php?f=$f&amp;id=$id&amp;ps=$ps\">Разделы</a><br/>";
if($f=="h")
$body=$body."$div2 [xHTML|<a href=\"?f=w&amp;id=$id&amp;ps=$ps\">WML</a>]".$divK.$divK."";
else
$body=$body."$div2 [<a href=\"?f=h&amp;id=$id&amp;ps=$ps\">xHTML</a>|WML]".$divK.$divK."";
}else{
$body=$body."<a href=\"index.php?f=$f\">Разделы</a><br/>";
if($f=="h")
$body=$body."$div2 [xHTML|<a href=\"?f=w\">WML</a>]".$divK.$divK."";
else
$body=$body."$div2 [<a href=\"?f=h\">xHTML</a>|WML]".$divK.$divK."";
}
*/
include("foot.php");
?>