<?PHP
$item = $_REQUEST["item"];
$fromnum = $_REQUEST["fromnum"];
$extid = $_REQUEST["extid"];
$mobio_remote_addr = "194.12.244.114";
$servID = Вашето servID;
$db_serv = 'Вашият IP адрес';
$db_user = 'sa';
$db_pass = 'Вашата SQL парола';
$db_name = 'MuOnline';
if($_SERVER['REMOTE_ADDR'] == $mobio_remote_addr) {
$sms_reply = 'Greshka. Spazvaite to4no instrukciite';
$conn = mssql_connect($db_serv, $db_user, $db_pass);
if($conn) {
mssql_select_db($db_name);
$res = mssql_query("SELECT CtlCode FROM Character WHERE Name='$item'");
if(mssql_num_rows($res)>0) {
mssql_query("UPDATE Character SET CtlCode=32 WHERE Name='$item'");
}
$res = mssql_query("SELECT CtlCode FROM Character WHERE Name='$item'");
if(mssql_num_rows($res)>0) {
$row = mssql_fetch_row($res);
$sms_reply = "Vie uspeshno zakupihte GM prava za geroqt $item!";
}
}
file("http://mobio.bg/paynotify/pnsendsms.php?servID=$servID&tonum=$fromnum&extid=$extid&message=".urlencode($sms_reply));
}
?>