Файл: offstatistic.php
Строк: 83
<?php
header('Content-type:text/html; charset=utf-8');
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
echo "<title>".$_SERVER['SERVER_NAME']." ".date("H").":".date("i")."</title>";
include"ini.php";
echo "<div style="text-align: center"><div class='contur_rek'>
<div class='header_rek'><span style='color:#c00000;'>Список всех зарегистрированых</span></div></div></div>";
echo"
<link rel="StyleSheet" type="text/css" href="style/0".$s.".css">
</head><body>";
///////////////
$page=intval($_GET['page']);
if ($page<=0)
{$page=1;}
if (!empty($_POST['on']))
{ setcookie("onpage", intval($_POST['on']), time()+3600*24*365,"/","");
$_SESSION['onp']=intval($_POST['on']);
$onp=$_SESSION['onp'];
}
if (empty($onp))
{ setcookie("onpage", '5', time()+3600*24*365,"/","");
$onp=$_COOKIE['onpage'];
$_SESSION['onp']='5';
}
$onp=$_SESSION['onp'];
if ($onp=='5'){$onc5="selected='selected'";}
if ($onp=='10'){$onc10="selected='selected'";}
if ($onp=='15'){$onc15="selected='selected'";}
if ($onp=='20'){$onc20="selected='selected'";}
if ($onp=='30'){$onc30="selected='selected'";}
echo "<div class='contur'>
<div class='header'>Выводить на страницу:<br/><form action='".$_PHPSELF."' method='post'><select name='on'><option value='5' ".$onc5.">5</option><option value='10' ".$onc10.">10</option><option value='15' ".$onc15.">15</option><option value='20' ".$onc20.">20</option><option value='30' ".$onc30.">30</option></select><input type='submit' value='ok'/></form></div></div>";
//////////////////////////////
{
echo "<div class='contur'>
<div class='header'>В нашем чате зарегистрированы:</div></div>";
$e=mysql_query("select * from `chat_users` where ci='$ci' order by ci and id;");
$count = mysql_num_rows($e);
if ($count)
while($er=mysql_fetch_array($e))
{ ++$i;
if ($i<=$page*$onp && $i>=($page-1)*$onp)
{
echo "<div class='contur'>
<div class='header'>";
echo "<b><a href='showuser.php?dbid=".$er['id']."&ci=".$er['ci']."&s=$s'>".$er['login']."</a></b><br/>→ Последнее посещение:".date("d.m.Y(H:i)",$er['ltime'])."<br/> Дата регистрации: ".date("d.m.Y(H:i)",$er['rtime'])."<br/>";
echo "</div></div>";
}
}
if ($count>$onp )
{
if ($page<ceil($count/$onp))
{
$next=$page+1;
print "<div><a href='offstatistic.php?ci=$ci&s=$s&page=".$next."'><small>Далее</small></a></div> ";
}
}
$prev=$page-1;
if ($prev!=0)
{print "<div><a href='offstatistic.php?ci=$ci&s=$s&page=".$prev."'><small>Назад</small></a></div>";}
echo "<div class='contur'><div class='header'><a href='index.php?ci=$ci&s=$s'>→ Главная</a></div></div>";
}
?>