Файл: test.otwap.aux.su/test/stat.php
Строк: 17
<?php
session_start();
define ("TITLE", "Статистика | WAP-казино");
include("head.php");
include("config.php");
include("bd.php");
echo '<div class="title"><div class="titletext"><b>Статистика казино</b></div></div>';
if (isset($_SESSION['auth'])){
$res = mysql_query("SELECT COUNT(*) FROM user");
$row = mysql_fetch_array($res);
echo '<div class="title"><div class="titletext"><b>Общее:</b></div></div><div class="bl"><div class="bltext">';
$coluser = intval($row[0]);
echo 'Зарегистрировано: 37'.$coluser.' чел.<br/>';
$resul = mysql_query("SELECT ball FROM user");
$reg=mysql_num_rows($resul);
$mrow = mysql_fetch_array($resul);
do
{
@$ball = $ball + $mrow['ball'];
}
while($mrow = mysql_fetch_array($resul));
$ball = htmlspecialchars(trim($ball));
echo 'Денег в системе: '.$ball.' руб.<br/>';
echo '</div></div><div class="bl"><div class="bltext"><a href="panel.php?'.session_name().'='.session_id().'">Личный кабинет</a></div></div>';
include("foot.php");
}else{
$res2 = mysql_query("SELECT COUNT(*) FROM user");
$row2 = mysql_fetch_array($res2);
echo '<div class="title"><div class="titletext"><b>Общее:</b></div></div><div class="bl"><div class="bltext">';
echo 'Зарегистрировано: '.intval($row2[0]).' чел.<br/>';
$resul2 = mysql_query("SELECT ball FROM user WHERE ball > '0'");
$mrow2 = mysql_fetch_array($resul2);
do
{
@$ball2 = $ball2 + $mrow2['ball'];
}
while($mrow2 = mysql_fetch_array($resul2));
$ball2 = htmlspecialchars(trim($ball2));
echo 'Денег в системе: '.$ball2.' руб.<br/>';
echo '</div></div><div class="bl"><div class="bltext"><a href="index.php">Назад</a></div></div>';
include("foot.php");
}
?>