<?
include('config.php');
$sqryvar="Select sum(amount) from tb_history";
$iqryvar=mysql_query($sqryvar);
$tot1=mysql_result($iqryvar,0,0);
$totals=$tot1;
if ($totals==''){
	$totalpaid='0.00';
} else{
	$totalpaid=$tot1;
}


$sqryvar="Select sum(visits) from tb_users";
$iqryvar=mysql_query($sqryvar);
$tot1=mysql_result($iqryvar,0,0);
$clickserved=$tot1;
mysql_close($con);
?>

					


						<h3>Статистика</h3>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>За клик: <?php include('config.php');
		$sql = "SELECT * FROM tb_config WHERE item='click' and howmany='1'";
		$result = mysql_query($sql);        
		$row = mysql_fetch_array($result);
		echo $row["price"]; 
		mysql_close($con);?> Руб. </td>
</tr>
<tr>
<td>За реф клик: <?php include('config.php');
		$sql = "SELECT * FROM tb_config WHERE item='referalclick' and howmany='1'";
		$result = mysql_query($sql);        
		$row = mysql_fetch_array($result);
		echo $row["price"]; 
		mysql_close($con);?> Руб. </td>
</tr>
<tr>
<td>Премиум клик: <?php include('config.php');
		$sql = "SELECT * FROM tb_config WHERE item='premiumclick' and howmany='1'";
		$result = mysql_query($sql);        
		$row = mysql_fetch_array($result);
		echo $row["price"]; 
		mysql_close($con);?> Руб. </td>
</tr>
<tr>
<td>Прем. Реф клик: <?php include('config.php');
		$sql = "SELECT * FROM tb_config WHERE item='premiumreferalc' and howmany='1'";
		$result = mysql_query($sql);        
		$row = mysql_fetch_array($result);
		echo $row["price"]; 
		mysql_close($con);?> Руб. </td>
</tr>

<tr>
<td>Минималка: <?php include('config.php');
				$sql = "SELECT * FROM tb_config WHERE item='payment' and howmany='1'";
				$result = mysql_query($sql);        
				$row = mysql_fetch_array($result);
				echo $row["price"];
				mysql_close($con);
			?> Руб. </td>
</tr>
<tr>
<td>Online: <?php include("onlinesql.php"); ?></td>
</tr>
<tr>
<td>Выплачено: <?php echo $totalpaid?> Руб.  </td>
</tr>
<tr>
<td>Хитов: <?=$clickserved?></td>
</tr>



</tr>
</table>
<A href="http://wm-power.ru/allstat.php" color="#000000" target="_self" title="СТАТИСТИКА"> СТАТИСТИКА </A> 
