<?
ob_start();
session_start();
include("include/config.php");
$client_name ='';
$clienteditnum='';$billtype='';
if(isset($_REQUEST['k']))
{
$k=mysql_escape_string($_REQUEST['k']);
}
if(isset($_REQUEST['clienteditnum'])){
$clienteditnum=mysql_escape_string($_REQUEST['clienteditnum']);
}
if($clienteditnum>0)
{
if(isset($_REQUEST['billtype'.$k]))
{
		$billtype=mysql_escape_string($_REQUEST['billtype'.$k]);
}
	for($i=1;$i<=$clienteditnum;$i++)
	{
		if($billtype=="Pack Billing")
		{
			if(isset($_REQUEST['packname_'.$i]))
			{
					$packname=mysql_escape_string($_REQUEST['packname_'.$i]);
			}
		}
		else
		{
			$packname='';
		}
		if(isset($_REQUEST['rate_'.$i]))
		{
				$rate=mysql_escape_string($_REQUEST['rate_'.$i]);
		}
		if(isset($_REQUEST['editid_'.$i]))
		{
				$editid=mysql_escape_string($_REQUEST['editid_'.$i]);
		}
		
		$sq_arr="update cf_rate_act set billtype='".$billtype."',packname='".$packname."',rate='".$rate."' where id = '".$editid."' ";
		$qry=mysql_query($sq_arr);
	}
}
?>