File size: 1.06Kb
<?
error_reporting(0);
session_start();
$title="Статистика\n";
include ("header.php");
include ("func/aut.php");
echo $div["ten"];
$n = $autorize['id'];
if ($_SESSION['wap']=="xml")echo '<table class="grid">';
else echo '<table title="Статистика" align="left" columns="3">';
echo '<tr>';
echo "<td><b>Оператор</b></td> <td><b>Кликов</b></td> <td><b>Заработано</b></td>";
echo '</tr>';
for ($i=1;$i<118;$i++){
#$all='0';
$oper=$i;
include ("func/spop.php");
if ($otk[$i]!=0){
$q = mysql_query("select *,INET_NTOA(`ip`) AS `ip` from statistika where (`id`=$n && DATE(`date`)=CURRENT_DATE && `oper`='$i' && `referer`!='');");
$all=mysql_num_rows($q);
}
$cost=$all*($cena[$i]/$c);
if ($all > 0)echo "<tr><td>$oper_name</td> <td align=\"center\">$all</td> <td align=\"center\">$cost</td></tr>";
$allcost = $allcost + $cost;
}
echo '</table>';
echo "<b>Всего за сегодня: $allcost У.е.</b><br/>";
echo "<a href=\"enter.php?".session_name()."=".session_id()."\">Панель</a><br/>";
echo $div["end"];
include ("footer.php");
?>