View file statistic.php

File size: 2.88Kb
<?php

session_start();


include "file/db.php";
include "file/config.php";
include "file/them.php";

echo "</center><div class='menu'><center>Статистика</center></div>";
print "<div class='menu'><center>Партнёры:</center></div><div class='hr'></div><div class='tab'>";
$t = mysql_query("select count(*) from `uzvers`;");
$r = mysql_result($t, 0);
echo "Всего: <b>$r</b><div class='hr'></div>";
 $d = mysql_query("select * from `uzvers` where `allmonth`>'0';");
 $e=mysql_num_rows($d);
 while ($field=mysql_fetch_array($d))
 {
  $w=$field['allmonth'];
  $all=$all+$w;
 }
 $all_zarab=$all;
 echo "Aктивных: <b>".$e."</b><br/><div class='hr'></div>\n";

 $u = mysql_query("select * from `uzvers` where `allmonth`<'0';");
 $o=mysql_num_rows($u);
 print "Не активных: <b>".floor($r-$e)."</b><br/><div class='hr'></div>";
 $m = mysql_query("select * from `uzvers` order by `id` desc limit 1;");
 $n=mysql_fetch_array($m);
 $x = mysql_query("select * from `uzvers` where `ban`='1';");
 $v=mysql_num_rows($x);
print "В Бане: <b>".$v."</b><br/><div class='hr'></div>";
echo "Последний партнёр: <b>$n[log]</b><br/><div class='hr'></div>\n";
print "</div><div class='menu'><center>Деньги:</center></div><div class='hr'></div><div class='tab'>";
$al = "<b>".($all*$dol)."</b> WMR";
$d = "<b>".($all)."</b> WMZ";
echo "На счету: $al или $d<br/><div class='hr'></div>";
$q = mysql_query("select * from `uzvers` where `opl`>'0';");
 $reg=mysql_num_rows($q);
 while ($field=mysql_fetch_array($q))
 {
  $w=$field['opl'];
  $all1=$all1+$w;
 }
 $all_zarab=$all_zarab+$all1;
 if (empty($all1))
  $all1=0;
  $all12 = "<b>".($all1*$dol)."</b> WMR";
  $d2 = "<b>".$all1."</b> WMZ";
echo "Выплачено: $all12 или $d2<br/><div class='hr'></div>";
 $all_zara = "<b>".($all_zarab*$dol)."</b> WMR";
 $c = "<b>".($all_zarab)."</b> WMZ";
echo "Всего заработанно:$c  или $all_zara<br/><div class='hr'></div>";
print "</div><div class='menu'><center>Переходы:</center></div><div class='hr'></div><div class='tab'>";
$q = mysql_query("select * from `stats` order by `id` desc limit 1;");
 $pereh=mysql_fetch_array($q);
 if (empty($pereh['ALL'])) $pereh['ALL']=0;
 if (empty($pereh['OP'])) $pereh['OP']=0;
 echo "Сегодня: <b>$pereh[ALL]</b><br /><div class='hr'></div>";
 print "Операторов: <b>$pereh[OP]</b><div class='hr'></div>";
 print "Прочих: <b>".($pereh['ALL']-$pereh['OP'])."</b><div class='hr'></div>";
 if ($pereh['OP']!=0)
 {
 $proc=round($pereh['OP']*(100/$pereh['ALL']));
 echo "В процентах: <b>$proc</b>%";
 }
echo "<div class='hr'></div><img src=\"style/".$wap_skin."/home.png\" alt=\"*\"/>";echo "<a href=\"index.php?".session_name()."=".session_id()."\">Главная</a><br/><div class='hr'></div></div>";
include "style/".$wap_skin."/foot2.php";
?>