<?php require_once('../Connections/netboxManagerMitru.php'); ?>
<?
function tokenize($sext)
	{
	$hash=md5($sext."-JDA_MITRU:PBX");
	$hash=md5(substr($hash, 16, 10)."JHSDUY83JSDF873QDKMG83".substr($hash, 0, 10));
	$hash=md5("JDA".$hash);
	return $hash;
	}


mysql_select_db($database_netboxManagerMitru, $netboxManagerMitru);
$hab=$_GET["hab"];
$bw=$_GET["bw"];
$bw=$bw*1024;
$updBw="UPDATE radreply SET Value='$bw' WHERE UserName like '$hab%' AND Attribute like 'WISPr-Bandwidth-Max%'";
$xupdBw=mysql_query($updBw);
$updHuesped="UPDATE hab_check SET hab_bw='PREMIUM' WHERE hab_nrohab=$hab AND hab_activo=1";
$xupdHuesped=mysql_query($updHuesped);
?>