<?php session_start();  //Developed by ITechScripts
require 'include/configurations.php'; // ITECHBIDS Configuration File


if(isset($_POST['btn_Modify'])) {
	$siteval=$_POST['txtSiteval'];
	$statid=$_POST['statid'];
	$count=count($statid);
	for($i=0;$i<$count;$i++) {
		$up_sql="update site_statistics set site_val='$siteval[$i]' where stat_id=$statid[$i]";
		$up_res=mysql_query($up_sql);
	}
}
?>

<style type="text/css">
<!--
.style1 {
	color: #666666;
	font-weight: bold;
}
-->
</style>
<html>
<head>
<title>ITECH HYIP::: Admin Area</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
	require 'include/header.php';
?>
<br>
<table border="0" align="center" width="80%" cellpadding="5" cellspacing="2">
<form name="frmStatistics" action="<? $_SERVER['PHP_SELF']?>" method="post">
<tr ><td colspan="2" class="ct" height="25">Site Statistics</td></tr>
<?
	$stat_sql="select * from site_statistics";
	$stat_res=mysql_query($stat_sql);
	while($stat_row=mysql_fetch_array($stat_res)) {
?>
<tr ><td class="ct" height="25"><?=$stat_row['site_stat']?></td>
<td class="ct" height="25">
<?
	if($stat_row['stat_id']==1 || $stat_row['stat_id']==6) {
?>
<input type="text" class="bluetext"name="txtSiteval[]" value="<?=$stat_row['site_val']?>" >
<input type="hidden" name="statid[]" value="<?=$stat_row['stat_id']?>">
<?
	}
	else echo $stat_row['stat_id'];
?>

</td>
</tr>
<?
}
?>
<tr><td colspan="2" align="center"><input type="submit" class="button"   name="btn_Modify" value=" Modify " ></td></tr>
</form>
</table>
<?
	require 'include/footer.php';
?>
</body>
</html>
