Просмотр файла userlist.php

Размер файла: 5.17Kb
<?php
header("Content-Type: text/html; charset=utf-8");
error_reporting(0);
ob_start('ob_gzhandler');
session_name("sid");
session_start();
include "nm.php";
////////////////////////////////////
// Автор:  Swen                    //
// E-mail: [email protected]  //
// ICQ:   437-565-058              //
//---------------------------------//
//  Statistics_of_visitings-v_2    //
//   http://wapsoft.net.ru         //
//       24.01.2008                //
////////////////////////////////////
if($_SESSION['admin_name']=="")
{ header("Location: http://wapsoft.net.ru"); exit(); }
else
{
if($admin_name!=$_SESSION['admin_name'] && $admin_password!=$_SESSION['admin_password'])
{ header("Location: http://wapsoft.net.ru"); exit(); }}
echo' <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">';
echo' <html>';
echo' <head>';
echo' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
echo" <title>$nazw</title>";
echo' <link rel="stylesheet" href="still.css" type="text/css">';
echo' </head>';
echo' <body>';
echo"<div style=\"border: 2px solid #33CC00 ; background: #00CCFF ; padding: 2px\">";
echo"<div style=\"border: 2px solid #33CC00 ; background: #00CCFF ; padding: 2px\">";
echo"<span class=\"red\">";
echo"Топ юзеров";
echo"</span>";
echo"</div>";
$pnumber=$amount;
if($s == "")
$s=1; $begin=($s-1)*$pnumber;
$thm=mysql_query("select * from stat WHERE user!='' ORDER BY alt DESC limit $begin, $pnumber ;");
$tot=mysql_query("select count(*) from stat WHERE user!='' ;");
if($thm && $tot)
	{
while($theme = mysql_fetch_array($thm))
{
echo"<div style=\"border: 2px solid #33CC00 ; background: #00CCFF ; padding: 2px\">";
////////////////////////////////////
// Автор:  Swen                    //
// E-mail: [email protected]  //
// ICQ:   437-565-058              //
//---------------------------------//
//  Statistics_of_visitings-v_2    //
//   http://wapsoft.net.ru         //
//       24.01.2008                //
////////////////////////////////////
echo"<small>";
echo"<span class=\"yellow\">";
echo "<b>".$theme['user']."</b><br>";
echo"</span>";

echo"<span class=\"cp\">";
echo "<b>Зарегистрирован: </b><br>";
echo"</span>";

echo"<small>".$theme['time']." </small><br>";


echo"<span class=\"red\">";
echo "".$theme['info']."<br>";
echo"</span>";

echo"<span class=\"cp\">";
echo "<b>E-mail:</b> ".$theme['email']." <br>";
echo"</span>";

echo"<span class=\"cp\">";
echo "<b>ICQ: </b>".$theme['icq']." <br>";
echo"</span>";

echo "<span class=\"green\">Посещений: <b>".$theme['alt']."</b></span>";
echo"</small>";
echo"</div>";
}
echo"<div style=\"border: 2px solid #33CC00 ; background: #00CCFF ; padding: 2px\">";
$total=mysql_fetch_array($tot);
$number = (int) ($total['count(*)']/$pnumber);
if($total['count(*)'] >= ($pnumber+1))
	{

if((float) ($total['count(*)']/$pnumber)-$number !=0) $number++;
echo"<span class=\"red\">";
if($s == 1) echo"&lt;&lt;.Пред. |";
echo"</span>";

if($begin>0) {
echo "<a href=\"userlist.php?s=".($s-1)."&amp;set=$set\">&lt;&lt;.Пред.</a>";
echo"<span class=\"red\">|</span>"; }

if($total['count(*)']>$begin+$pnumber) {
echo"<span class=\"red\">|</span>";
echo "<a href=\"userlist.php?s=".($s+1)."&amp;set=$set\">След.&gt;&gt;</a>"; }

echo"<span class=\"red\">";
if($number == $s) echo"| След.&gt;&gt;";
echo"</span>";

$all=ceil($total['count(*)'] / $pnumber); $i=1;   $c="";   $tt=$s;
while($i<=$all){
if($i<=3  || $i==$tt- 1  || $i==$tt || $i==$tt+1  || $i>=$all-2)
{$ii="<a href=\"userlist.php?s=".$i."&amp;sid=$sid\">".$i."</a>";
if($i==$tt) { if($i!=$all){ $c.= "<b>$i</b>,";}
else{$c.= "<b>$i</b>";} 
////////////////////////////////////
// Автор:  Swen                    //
// E-mail: [email protected]  //
// ICQ:   437-565-058              //
//---------------------------------//
//  Statistics_of_visitings-v_2    //
//   http://wapsoft.net.ru         //
//       24.01.2008                //
////////////////////////////////////
}
else { if($i!=$all){ $c.= "$ii,";} else{$c.= "$ii";} }}
else{$c.= "."; } $i++; }
$c=preg_replace("/[,][.]+/", "...",$c);
echo"<span class=\"red\">";
echo "<br>$c";
echo"</span>";
echo"</div>";
echo"<div style=\"border: 2px solid #33CC00 ; background: #00CCFF ; padding: 2px\">";
echo"<span class=\"red\">";
echo"<b>Всего : ".$total['count(*)']."</b><br>";
echo"</span>"; } }
echo '<a href="./">Статистика</a><br>';
$Contents = ob_get_contents(); 
$gzib_file = strlen($Contents); 
$gzib_file_out = strlen(gzcompress($Contents,9));
if(!$vy){echo'<small>&#169; by Swen</small><br>';}else{echo'$kp';}
$gzib_pro=round(100-(100/($gzib_file/$gzib_file_out)),1); 
echo ' <small>Cжатие: '.$gzib_pro.'%</small>';
echo"</div>";
echo"</div>";
echo' </body>';
echo' </html>';
////////////////////////////////////
// Автор:  Swen                    //
// E-mail: [email protected]  //
// ICQ:   437-565-058              //
//---------------------------------//
//  Statistics_of_visitings-v_2    //
//   http://wapsoft.net.ru         //
//       24.01.2008                //
////////////////////////////////////
?>