<?php
/*
This Script is Created By NikeR for Fortumo.bg
Website:
http://escapemu.com and
http://drakemu.net
Drake Network Inc
*/
## Configoration Starts ##
$credits = '500'; // Credits to add
$db_name = 'MuOnline'; // The Database
$db_ip = ' IP'; // The Server IP Adress
$db_user = 'sa'; // MSSQL User
$db_pass = ' PASS'; // MSSQL Password
$sms_rank = '0'; // 1=on, 0=off
## Configoration Ends ##
$forumtoIPs=array('81.20.151.38','81.20.148.122');
$serverIP=$_SERVER['REMOTE_ADDR'];
$username = $_GET['message'];
if(!in_array($serverIP,$forumtoIPs)) die("Your IP isn`t in the list of permission!");
if(!$username) die("You did not enter account The SMS");
$connection = mssql_connect($db_ip, $db_user, $db_pass) or die('The Server has problem with Connection to database. Please contact with administrator!');
mssql_select_db($db_name);
$user_select = mssql_query("SELECT memb___id FROM MEMB_INFO WHERE memb___id='$username'");
if(mssql_num_rows($user_select)==0) {
$returns = "Account is incorrect or does not exist.The SMS wasn`t Send"; }
else {
$credits_select = mssql_query("SELECT credits FROM MEMB_CREDITS WHERE memb___id='$username'");
$curcreditsa = mssql_fetch_row($credits_select);
$curcredits = $curcreditsa[0] + $credits;
if(mssql_num_rows($credits_select)>0) {
mssql_query("UPDATE MEMB_CREDITS SET credits=credits+'$credits' WHERE memb___id='$username'");
if ($sms_rank == 1) {
mssql_query("UPDATE MEMB_INFO SET sms=sms+1 WHERE memb___id='$username'"); }
$returns = "Your SMS was sended successfully. You add {$credits} credits to Account {$username} .Now You Have {$curcredits} credits.";
}
else {
mssql_query("INSERT INTO MEMB_CREDITS (memb___id, credits) VALUES ('$username', '$credits')");
if ($sms_rank == 1) {
mssql_query("UPDATE MEMB_INFO SET sms=sms+1 WHERE memb___id='$username'"); }
$returns = "Your SMS was sended successfully. You add {$credits} credits to Account {$username} .Now You Have {$curcredits} credits.";
}
}
echo $returns;
?>