И аз го търся обаче го няма кода FREE ;SНякой може ли да направи като дадеш със мишката на някой герой да му показва статистика за него както е направено във сайта на openmu???
ще се опитам да го направя и до 1,2 дена ще го release
Да, знам.ако имаш файлове с md5 казва: "1", ако не слага "0".
и ас имам същия проблем като това момче малко по на горе дето пише
в конфиг давам $resettype = "reset"; след това отивам в сайта давам да ресна пиша име на героя ацц и пас, и ми изписва Character reDoR has been succesfully restarted. влизам в играта и героя си е 400 левел някакви идеи как да го опрая pls hellp Skype: quest-mu
<?php
function fix($value)
{
if($value < 0) { $value = 32768*2+$value; }
return $value;
}
function register()
{
global $md5;
global $servername;
$account = secure($_POST['account']);
$password = secure($_POST['password']);
$repassword = secure($_POST['repassword']);
$email = secure($_POST['email']);
$question = secure($_POST['squestion']);
$awnser = secure($_POST['sanswer']);
$code = secure($_POST['turing']);
$accounts = strlen($account);
$passwords = strlen($password);
$repasswords = strlen($repassword);
$questions = strlen($question);
$awnsers = strlen($awnser);
check_inject();
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$querymail = mssql_query("Select * from MEMB_INFO where mail_addr='$email'");
$mailcheck = mssql_num_rows($querymail);
$date = date('Y-m-d H:i:s');
if(empty($account) or empty($password) or empty($repassword) or empty($email) or empty($question) or empty($awnser) or empty($code)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
if($_SESSION['image_random_value'] != md5($code)){ echo"<font color='red'>Numbers from image do not match!</font><br>"; $error=1; }
if($accounts < 4) { echo"<font color='red'>Account must be at least 4 symbols</font><br>"; $error=1; }
if($passwords < 4 or $repasswords < 4) { echo"<font color='red'>Password must be at least 4 symbols</font><br>"; $error=1; }
if($questions < 4) { echo"<font color='red'>Secret Question must be at least 4 symbols</font><br>"; $error=1; }
if($awnsers < 4) { echo"<font color='red'>Secret Answer must be at least 4 symbols</font><br>"; $error=1; }
if($password != $repassword) { echo"<font color='red'>Passwords didn't match!</font><br>"; $error=1; }
if($accountcheck != 0) { echo"<font color='red'>Account is already in use!</font><br>"; $error=1; }
if($mail != 0) { echo"<font color='red'>Email is already in use!</font><br>"; $error=1; }
if($error != 1) {
echo"<font color='green'>Account $account has been succsesfuly created on $date!</font><br>";
if($md5 == 0) {
$a = mssql_query("INSERT INTO MEMB_INFO (memb___id,memb__pwd,memb_name,sno__numb,mail_addr,appl_days,modi_days,out__days,true_days,mail_chek,bloc_code,ctl1_code,fpas_ques,fpas_answ) VALUES ('$account','$password','$servername','1','$email','$date','$date','$date','$date','1','0','0','$question','$awnser')");
$b = mssql_query("INSERT INTO VI_CURR_INFO (ends_days,chek_code,used_time,memb___id,memb_name,memb_guid,sno__numb,Bill_Section,Bill_value,Bill_Hour,Surplus_Point,Surplus_Minute,Increase_Days ) VALUES ('2010','1',1234,'$account','$account',1,'7','6','3','6','6','$date','0' )");
}
else
{
$a = mssql_query("INSERT INTO MEMB_INFO (memb___id,memb__pwd,memb_name,sno__numb,mail_addr,appl_days,modi_days,out__days,true_days,mail_chek,bloc_code,ctl1_code,fpas_ques,fpas_answ) VALUES ('$account',md5($password),'$servername','1','$email','$date','$date','$date','$date','1','0','0','$question','$awnser')");
$b = mssql_query("INSERT INTO VI_CURR_INFO (ends_days,chek_code,used_time,memb___id,memb_name,memb_guid,sno__numb,Bill_Section,Bill_value,Bill_Hour,Surplus_Point,Surplus_Minute,Increase_Days ) VALUES ('2010','1',1234,'$account','$account',1,'7','6','3','6','6','$date','0' )");
}
}
}
function change_password()
{
$account = secure($_POST['login']);
$oldpassword = secure($_POST['oldpwd']);
$newpassword = secure($_POST['newpwd']);
$renewpassword = secure($_POST['renewpwd']);
$newpasswords = strlen($newpassword);
$renewpasswords = strlen($renewpassword);
check_inject();
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$querypassword = mssql_query("Select * from MEMB_INFO where memb___id='$account' and memb__pwd='$oldpassword'");
$passwordcheck = mssql_num_rows($querypassword);
if(empty($account) or empty($oldpassword) or empty($newpassword) or empty($renewpassword)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($newpasswords < 4 or $renewpasswords < 4) { echo"<font color='red'>Password must be at least 4 symbols</font><br>"; $error=1; }
elseif($newpassword != $renewpassword) { echo"<font color='red'>Passwords didn't match!</font><br>"; $error=1; }
if($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($passwordcheck <= 0) { echo"<font color='red'>Your Old Password does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
if($error != 1) {
echo"<font color='green'>Your account's password has been changed succesfully. You can now play in our server. Your new password is:</font> $newpassword<br>";
$a = mssql_query("UPDATE MEMB_INFO set memb__pwd='$newpassword' where memb___id='$account'");
}
}
function warp_character()
{
$character = secure($_POST['character']);
$account = secure($_POST['login']);
$password = secure($_POST['password']);
check_inject();
$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$querypassword = mssql_query("Select * from MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$passwordcheck = mssql_num_rows($querypassword);
$querychar = mssql_query("Select * from Character where Name='$character'");
$charcheck = mssql_num_rows($querychar);
if(empty($character) or empty($account) or empty($password)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($passwordcheck <= 0) { echo"<font color='red'>Your Password does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($charcheck <= 0) { echo"<font color='red'>Your Character does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($onlinecheck >= 1) { echo"<font color='red'>Account $account is online!Please LogOff First!</font><br>"; $error=1;}
if($error != 1) {
echo"<font color='green'>Character $character has been succesfully warped.</font><br>";
$a = mssql_query("UPDATE Character set MapNumber='0',MapPosX='130',MapPosY='130' where Name='$character'");
}
}
function lost_password()
{
$account = secure($_POST['login']);
$email = secure($_POST['email']);
$question = secure($_POST['question']);
$answer = secure($_POST['answer']);
check_inject();
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$querymail = mssql_query("Select * from MEMB_INFO where mail_addr='$email'");
$mailcheck = mssql_num_rows($querymail);
$queryquestion = mssql_query("Select * from MEMB_INFO where fpas_ques='$question'");
$questioncheck = mssql_num_rows($queryquestion);
$queryanswer = mssql_query("Select * from MEMB_INFO where fpas_answ='$answer'");
$answercheck = mssql_num_rows($queryanswer);
if(empty($account) or empty($email) or empty($question) or empty($answer)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
else
{
if($mailcheck <= 0) { echo"<font color='red'>Your E-Mail Address does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
if($questioncheck <= 0) { echo"<font color='red'>Your Secret Question does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
if($answercheck <= 0) { echo"<font color='red'>Your Secret Answer does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
if($error != 1) {
$passwordquery = mssql_query("Select memb__pwd from MEMB_INFO where memb___id='$account'");
$password = mssql_fetch_row($passwordquery);
echo"<font color='green'>Your password has been succesfully generated.Your password is:</font> $password[0] <font color='green'>Change it as fast as you can!</font><br>";
}
}
}
function clear_pk()
{
global $pkmoney;
$character = secure($_POST['character']);
$account = secure($_POST['login']);
$password = secure($_POST['password']);
check_inject();
$query = mssql_query("Select money,PkTime from Character where Name='$character'");
$row = mssql_fetch_row($query);
$moneypk = $pkmoney * $row[1];
$newmoney = $row[0]-$moneypk;
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);
$querypassword = mssql_query("Select * from MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$passwordcheck = mssql_num_rows($querypassword);
$querychar = mssql_query("Select * from Character where Name='$character'");
$charcheck = mssql_num_rows($querychar);
if(empty($character) or empty($account) or empty($password)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($passwordcheck <= 0) { echo"<font color='red'>Your Password does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($charcheck <= 0) { echo"<font color='red'>Your Character does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
else
{
if($newmoney < 0) { echo"<font color='red'>Character $character dones not have enough money to PkClear!</font><br>"; $error=1;}
if($row[1] == 0) { echo"<font color='red'>Character $character have not got any kills to clear!</font><br>"; $error=1;}
if($onlinecheck >= 1) { echo"<font color='red'>Account $account is online!Please LogOff First!</font><br>"; $error=1;}
if($error != 1)
{
echo"<font color='green'>Character $character has been succesfully Cleared.</font><br>";
$a = mssql_query("Update Character Set Money='$newmoney',PkLevel='3',PkTime='0' where name='$character'");
}
}
}
function add_stats()
{
global $maxstats;
$character = secure($_POST['character']);
$account = secure($_POST['login']);
$password = secure($_POST['password']);
$strength = secure($_POST['strength']);
$agility = secure($_POST['agility']);
$vitality = secure($_POST['vitality']);
$energy = secure($_POST['energy']);
$command = secure($_POST['command']);
$stats = $strength + $agility + $vitality + $energy + $command;
check_inject();
$query = mssql_query("Select class,LevelUpPoint,Strength,Dexterity,Vitality,Energy,LeaderShip From Character where name='$character'");
$row = mssql_fetch_row($query);
$strengthold = fix($row[2]);
$agilityold = fix($row[3]);
$vitalityold = fix($row[4]);
$energyold = fix($row[5]);
$commandold = fix($row[6]);
$strengthnew = $strengthold + $strength;
$agilitynew = $agilityold + $agility;
$vitalitynew = $vitalityold + $vitality;
$energynew = $energyold + $energy;
$commandnew = $commandold + $command;
$newleveluppoints = $row[1] - $stats;
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);
$querypassword = mssql_query("Select * from MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$passwordcheck = mssql_num_rows($querypassword);
$querychar = mssql_query("Select * from Character where Name='$character'");
$charcheck = mssql_num_rows($querychar);
if(empty($character) or empty($account) or empty($password)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($passwordcheck <= 0) { echo"<font color='red'>Your Password does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($charcheck <= 0) { echo"<font color='red'>Your Character does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
else
{
if($stats > $row[1]) { echo"<font color='red'>Character $character does not have enough points !</font><br>"; $error=1; }
elseif($strengthnew > $maxstats or $agilitynew > $maxstats or $vitalitynew > $maxstats or $energynew > $maxstats or $commandnew > $maxstats) { echo"<font color='red'>You can't add more than $maxstats stats</font><br>"; $error=1;}
if($onlinecheck >= 1) { echo"<font color='red'>Account $account is online!Please LogOff First!</font><br>"; $error=1;}
if($error != 1)
{
echo"<font color='green'>Points succesfully added.$character now have:</font><br>$strengthnew Strength , $agilitynew Agility , $vitalitynew Vitality , $energynew Energy , $commandnew Command and $newleveluppoints points left to add!";
$a = mssql_query("Update Character set LevelUpPoint='$newleveluppoints',Strength='$strengthnew',Dexterity='$agilitynew',Vitality='$vitalitynew',Energy='$energynew',LeaderShip='$commandnew' where name='$character'");
}
}
}
function reset_character()
{
global $resetmoney;
global $resettype;
global $resetpoints;
global $resetclearinv;
global $resetclearskill;
global $maxresets;
global $resetlevel;
$character = secure($_POST['character']);
$account = secure($_POST['login']);
$password = secure($_POST['password']);
check_inject();
$query = mssql_query("Select clevel,resets,money,leveluppoint from Character where Name='$character'");
$row = mssql_fetch_row($query);
$newmoney = $row[2]-$resetmoney;
$newresets = $row[1] + 1;
if($row[1] >= 1) { $newpoints = $row[1] * $resetpoints; }
$newleveluppoints = $row[3] + $resetpoints;
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);
$querypassword = mssql_query("Select * from MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$passwordcheck = mssql_num_rows($querypassword);
$querychar = mssql_query("Select * from Character where Name='$character'");
$charcheck = mssql_num_rows($querychar);
if(empty($character) or empty($account) or empty($password)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($passwordcheck <= 0) { echo"<font color='red'>Your Password does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($charcheck <= 0) { echo"<font color='red'>Your Character does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
else
{
if($newmoney < 0) { echo"<font color='red'>Character $character dones not have enough money to reset!</font><br>"; $error=1;}
if($row[0] < $resetlevel) { echo"<font color='red'>Character $character must be $resetlevel in order to reset!</font><br>"; $error=1;}
if($newresets > $maxresets) { echo"<font color='red'>Character $character is maximum resets!</font><br>"; $error=1;}
if($onlinecheck >= 1) { echo"<font color='red'>Account $account is online!Please LogOff First!</font><br>"; $error=1;}
if($error != 1)
{
echo"<font color='green'>Character $character has been succesfully restarted.</font><br>";
if($resettype == keep)
{
$a = mssql_query("Update Character Set Money='$newmoney',clevel='1',Experience='0',Resets='$newresets' where name='$character'");
}
elseif($resettype == bonus)
{
$a = mssql_query("Update Character Set Money='$newmoney',clevel='1',Experience='0',Resets='$newresets',LevelUpPoint='$newpoints' where name='$character'");
}
elseif($resettype == reset)
{
$a = mssql_query("Update Character Set Strength='25',Dexterity='25',Vitality='25',Energy='25' ,Money='$newmoney',clevel='1',Experience='0',Resets='$newresets',LevelUpPoint='$newpoints' where name='$character'");
}
if($resetclearinv == yes) { $b = mssql_query("UPDATE Character set Inventory=CONVERT(varbinary(1080), null) WHERE Name='$character'"); }
if($resetclearskill == yes) { $c = mssql_query("Update Character set magiclist= CONVERT(varbinary(60), null) WHERE Name='$character'"); }
}
}
}
function vote()
{
global $votecredits;
global $votelink;
global $votehours;
$account = secure($_POST['login']);
check_inject();
$time = 60 * 60 * $votehours;
$timenow = time();
$time2 = $timenow - $time;
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$queryvote = mssql_query("Select * from votereward where time>'$time2' and memb___id='$account'");
$votecheck = mssql_num_rows($queryvote);
if(empty($account)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($votecheck >= 1) { echo"<font color='red'>You can vote once on every $votehours hours!</font><br>"; $error=1; }
if($error != 1) {
$a = mssql_query("INSERT INTO votereward (memb___id, time ) VALUES('$account','$timenow')");
$b = mssql_query("Update MEMB_CREDITS set credits = credits+$votecredits WHERE memb___id='$account'");
echo"<font color='green'>You have succsesfully voted!</font>";
echo"<meta http-equiv=\"refresh\" content=\"0;url=$votelink\" />";
}
}
function dogrand_reset()
{
$account = secure($_SESSION['user']);
global $grandresetcredits;
if(isset($_POST['exchange']))
{
$account = secure($_SESSION['user']);
$character = secure($_POST['character']);
$resets = secure($_POST['resets']);
check_inject();
$querychar = mssql_query("Select resets,grresets from character where name='$character'");
$char = mssql_fetch_row($querychar);
$newresets = $char[0] - $resets;
$newgrresets = $char[1] + $resets;
if($newresets < 0) { echo"<br><font color='red'>Not enought resets!</font><br>"; $error = 1; }
elseif($resets < 0) { echo"<br><font color='red'>Error! You Can't put - numbers!</font><br>"; $error = 1; }
elseif($error != 1) {
$credits = $resets * $grandresetcredits;
echo"<br><font color='green'>You exchange $resets reset(s) for $credits credits</font><br>";
$a = mssql_query("Update Character set resets='$newresets',GrResets='$newgrresets' where name='$character'");
$b = mssql_query("Update MEMB_CREDITS set credits = credits+$credits WHERE memb___id='$account'");
}
}
$query = mssql_query("Select name,resets from character where AccountID='$account'");
echo"
<form action='' name='' method='POST'>
<select id='character' name='character'><optgroup label='Select a character'>
";
for($i=0;$i < mssql_num_rows($query);++$i)
{
$row = mssql_fetch_row($query);
echo"
<option value='$row[0]'>$row[0] [$row[1]]</option>
";
}
echo"</select>
<br><input type='text' size='25' id='resets' name='resets' />
<br><input type='submit' maxlength='2' value='exchange' name='exchange'>
</form>
<br>Each one sold reset is equivalent to One 'GR' in Rankings !
<br>1 Reset = $grandresetcredits Credits!
";
}
function grand_reset()
{
$account = secure($_POST['login']);
$password = secure($_POST['password']);
check_inject();
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);
$querypassword = mssql_query("Select * from MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$passwordcheck = mssql_num_rows($querypassword);
if(empty($account) or empty($password)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($passwordcheck <= 0) { echo"<font color='red'>Your Password does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($onlinecheck >= 1) { echo"<font color='red'>Account $account is online!Please LogOff First!</font><br>"; $error=1;}
if($error != 1) {
$_SESSION['user'] = $account;
dogrand_reset();
}
}
?>
<?php
function fix($value)
{
if($value < 0) { $value = 32768*2+$value; }
return $value;
}
function register()
{
global $md5;
global $servername;
$account = secure($_POST['account']);
$password = secure($_POST['password']);
$repassword = secure($_POST['repassword']);
$email = secure($_POST['email']);
$question = secure($_POST['squestion']);
$awnser = secure($_POST['sanswer']);
$code = secure($_POST['turing']);
$accounts = strlen($account);
$passwords = strlen($password);
$repasswords = strlen($repassword);
$questions = strlen($question);
$awnsers = strlen($awnser);
check_inject();
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$querymail = mssql_query("Select * from MEMB_INFO where mail_addr='$email'");
$mailcheck = mssql_num_rows($querymail);
$date = date('Y-m-d H:i:s');
if(empty($account) or empty($password) or empty($repassword) or empty($email) or empty($question) or empty($awnser) or empty($code)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
if($_SESSION['image_random_value'] != md5($code)){ echo"<font color='red'>Numbers from image do not match!</font><br>"; $error=1; }
if($accounts < 4) { echo"<font color='red'>Account must be at least 4 symbols</font><br>"; $error=1; }
if($passwords < 4 or $repasswords < 4) { echo"<font color='red'>Password must be at least 4 symbols</font><br>"; $error=1; }
if($questions < 4) { echo"<font color='red'>Secret Question must be at least 4 symbols</font><br>"; $error=1; }
if($awnsers < 4) { echo"<font color='red'>Secret Answer must be at least 4 symbols</font><br>"; $error=1; }
if($password != $repassword) { echo"<font color='red'>Passwords didn't match!</font><br>"; $error=1; }
if($accountcheck != 0) { echo"<font color='red'>Account is already in use!</font><br>"; $error=1; }
if($mail != 0) { echo"<font color='red'>Email is already in use!</font><br>"; $error=1; }
if($error != 1) {
echo"<font color='green'>Account $account has been succsesfuly created on $date!</font><br>";
if($md5 == 0) {
$a = mssql_query("INSERT INTO MEMB_INFO (memb___id,memb__pwd,memb_name,sno__numb,mail_addr,appl_days,modi_days,out__days,true_days,mail_chek,bloc_code,ctl1_code,fpas_ques,fpas_answ) VALUES ('$account','$password','$servername','1','$email','$date','$date','$date','$date','1','0','0','$question','$awnser')");
$b = mssql_query("INSERT INTO VI_CURR_INFO (ends_days,chek_code,used_time,memb___id,memb_name,memb_guid,sno__numb,Bill_Section,Bill_value,Bill_Hour,Surplus_Point,Surplus_Minute,Increase_Days ) VALUES ('2010','1',1234,'$account','$account',1,'7','6','3','6','6','$date','0' )");
}
else
{
$a = mssql_query("INSERT INTO MEMB_INFO (memb___id,memb__pwd,memb_name,sno__numb,mail_addr,appl_days,modi_days,out__days,true_days,mail_chek,bloc_code,ctl1_code,fpas_ques,fpas_answ) VALUES ('$account',md5($password),'$servername','1','$email','$date','$date','$date','$date','1','0','0','$question','$awnser')");
$b = mssql_query("INSERT INTO VI_CURR_INFO (ends_days,chek_code,used_time,memb___id,memb_name,memb_guid,sno__numb,Bill_Section,Bill_value,Bill_Hour,Surplus_Point,Surplus_Minute,Increase_Days ) VALUES ('2010','1',1234,'$account','$account',1,'7','6','3','6','6','$date','0' )");
}
}
}
function change_password()
{
$account = secure($_POST['login']);
$oldpassword = secure($_POST['oldpwd']);
$newpassword = secure($_POST['newpwd']);
$renewpassword = secure($_POST['renewpwd']);
$newpasswords = strlen($newpassword);
$renewpasswords = strlen($renewpassword);
check_inject();
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$querypassword = mssql_query("Select * from MEMB_INFO where memb___id='$account' and memb__pwd='$oldpassword'");
$passwordcheck = mssql_num_rows($querypassword);
if(empty($account) or empty($oldpassword) or empty($newpassword) or empty($renewpassword)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($newpasswords < 4 or $renewpasswords < 4) { echo"<font color='red'>Password must be at least 4 symbols</font><br>"; $error=1; }
elseif($newpassword != $renewpassword) { echo"<font color='red'>Passwords didn't match!</font><br>"; $error=1; }
if($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($passwordcheck <= 0) { echo"<font color='red'>Your Old Password does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
if($error != 1) {
echo"<font color='green'>Your account's password has been changed succesfully. You can now play in our server. Your new password is:</font> $newpassword<br>";
$a = mssql_query("UPDATE MEMB_INFO set memb__pwd='$newpassword' where memb___id='$account'");
}
}
function warp_character()
{
$character = secure($_POST['character']);
$account = secure($_POST['login']);
$password = secure($_POST['password']);
check_inject();
$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$querypassword = mssql_query("Select * from MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$passwordcheck = mssql_num_rows($querypassword);
$querychar = mssql_query("Select * from Character where Name='$character'");
$charcheck = mssql_num_rows($querychar);
if(empty($character) or empty($account) or empty($password)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($passwordcheck <= 0) { echo"<font color='red'>Your Password does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($charcheck <= 0) { echo"<font color='red'>Your Character does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($onlinecheck >= 1) { echo"<font color='red'>Account $account is online!Please LogOff First!</font><br>"; $error=1;}
if($error != 1) {
echo"<font color='green'>Character $character has been succesfully warped.</font><br>";
$a = mssql_query("UPDATE Character set MapNumber='0',MapPosX='130',MapPosY='130' where Name='$character'");
}
}
function lost_password()
{
$account = secure($_POST['login']);
$email = secure($_POST['email']);
$question = secure($_POST['question']);
$answer = secure($_POST['answer']);
check_inject();
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$querymail = mssql_query("Select * from MEMB_INFO where mail_addr='$email'");
$mailcheck = mssql_num_rows($querymail);
$queryquestion = mssql_query("Select * from MEMB_INFO where fpas_ques='$question'");
$questioncheck = mssql_num_rows($queryquestion);
$queryanswer = mssql_query("Select * from MEMB_INFO where fpas_answ='$answer'");
$answercheck = mssql_num_rows($queryanswer);
if(empty($account) or empty($email) or empty($question) or empty($answer)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
else
{
if($mailcheck <= 0) { echo"<font color='red'>Your E-Mail Address does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
if($questioncheck <= 0) { echo"<font color='red'>Your Secret Question does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
if($answercheck <= 0) { echo"<font color='red'>Your Secret Answer does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
if($error != 1) {
$passwordquery = mssql_query("Select memb__pwd from MEMB_INFO where memb___id='$account'");
$password = mssql_fetch_row($passwordquery);
echo"<font color='green'>Your password has been succesfully generated.Your password is:</font> $password[0] <font color='green'>Change it as fast as you can!</font><br>";
}
}
}
function clear_pk()
{
global $pkmoney;
$character = secure($_POST['character']);
$account = secure($_POST['login']);
$password = secure($_POST['password']);
check_inject();
$query = mssql_query("Select money,PkTime from Character where Name='$character'");
$row = mssql_fetch_row($query);
$moneypk = $pkmoney * $row[1];
$newmoney = $row[0]-$moneypk;
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);
$querypassword = mssql_query("Select * from MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$passwordcheck = mssql_num_rows($querypassword);
$querychar = mssql_query("Select * from Character where Name='$character'");
$charcheck = mssql_num_rows($querychar);
if(empty($character) or empty($account) or empty($password)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($passwordcheck <= 0) { echo"<font color='red'>Your Password does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($charcheck <= 0) { echo"<font color='red'>Your Character does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
else
{
if($newmoney < 0) { echo"<font color='red'>Character $character dones not have enough money to PkClear!</font><br>"; $error=1;}
if($row[1] == 0) { echo"<font color='red'>Character $character have not got any kills to clear!</font><br>"; $error=1;}
if($onlinecheck >= 1) { echo"<font color='red'>Account $account is online!Please LogOff First!</font><br>"; $error=1;}
if($error != 1)
{
echo"<font color='green'>Character $character has been succesfully Cleared.</font><br>";
$a = mssql_query("Update Character Set Money='$newmoney',PkLevel='3',PkTime='0' where name='$character'");
}
}
}
function add_stats()
{
global $maxstats;
$character = secure($_POST['character']);
$account = secure($_POST['login']);
$password = secure($_POST['password']);
$strength = secure($_POST['strength']);
$agility = secure($_POST['agility']);
$vitality = secure($_POST['vitality']);
$energy = secure($_POST['energy']);
$stats = $strength + $agility + $vitality + $energy;
check_inject();
$query = mssql_query("Select class,LevelUpPoint,Strength,Dexterity,Vitality,Energy From Character where name='$character'");
$row = mssql_fetch_row($query);
$strengthold = fix($row[2]);
$agilityold = fix($row[3]);
$vitalityold = fix($row[4]);
$energyold = fix($row[5]);
$strengthnew = $strengthold + $strength;
$agilitynew = $agilityold + $agility;
$vitalitynew = $vitalityold + $vitality;
$energynew = $energyold + $energy;
$newleveluppoints = $row[1] - $stats;
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);
$querypassword = mssql_query("Select * from MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$passwordcheck = mssql_num_rows($querypassword);
$querychar = mssql_query("Select * from Character where Name='$character'");
$charcheck = mssql_num_rows($querychar);
if(empty($character) or empty($account) or empty($password)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($passwordcheck <= 0) { echo"<font color='red'>Your Password does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($charcheck <= 0) { echo"<font color='red'>Your Character does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
else
{
if($stats > $row[1]) { echo"<font color='red'>Character $character does not have enough points !</font><br>"; $error=1; }
elseif($strengthnew > $maxstats or $agilitynew > $maxstats or $vitalitynew > $maxstats or $energynew > $maxstats or $commandnew > $maxstats) { echo"<font color='red'>You can't add more than $maxstats stats</font><br>"; $error=1;}
if($onlinecheck >= 1) { echo"<font color='red'>Account $account is online!Please LogOff First!</font><br>"; $error=1;}
if($error != 1)
{
echo"<font color='green'>Points succesfully added.$character now have:</font><br>$strengthnew Strength , $agilitynew Agility , $vitalitynew Vitality , $energynew Energy and $newleveluppoints points left to add!";
$a = mssql_query("Update Character set LevelUpPoint='$newleveluppoints',Strength='$strengthnew',Dexterity='$agilitynew',Vitality='$vitalitynew',Energy='$energynew' where name='$character'");
}
}
}
function reset_character()
{
global $resetmoney;
global $resettype;
global $resetpoints;
global $resetclearinv;
global $resetclearskill;
global $maxresets;
global $resetlevel;
$character = secure($_POST['character']);
$account = secure($_POST['login']);
$password = secure($_POST['password']);
check_inject();
$query = mssql_query("Select clevel,resets,money,leveluppoint from Character where Name='$character'");
$row = mssql_fetch_row($query);
$newmoney = $row[2]-$resetmoney;
$newresets = $row[1] + 1;
if($row[1] >= 1) { $newpoints = $row[1] * $resetpoints; }
$newleveluppoints = $row[3] + $resetpoints;
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);
$querypassword = mssql_query("Select * from MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$passwordcheck = mssql_num_rows($querypassword);
$querychar = mssql_query("Select * from Character where Name='$character'");
$charcheck = mssql_num_rows($querychar);
if(empty($character) or empty($account) or empty($password)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($passwordcheck <= 0) { echo"<font color='red'>Your Password does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($charcheck <= 0) { echo"<font color='red'>Your Character does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
else
{
if($newmoney < 0) { echo"<font color='red'>Character $character dones not have enough money to reset!</font><br>"; $error=1;}
if($row[0] < $resetlevel) { echo"<font color='red'>Character $character must be $resetlevel in order to reset!</font><br>"; $error=1;}
if($newresets > $maxresets) { echo"<font color='red'>Character $character is maximum resets!</font><br>"; $error=1;}
if($onlinecheck >= 1) { echo"<font color='red'>Account $account is online!Please LogOff First!</font><br>"; $error=1;}
if($error != 1)
{
echo"<font color='green'>Character $character has been succesfully restarted.</font><br>";
if($resettype == keep)
{
$a = mssql_query("Update Character Set Money='$newmoney',clevel='1',Experience='0',Resets='$newresets' where name='$character'");
}
elseif($resettype == bonus)
{
$a = mssql_query("Update Character Set Money='$newmoney',clevel='1',Experience='0',Resets='$newresets',LevelUpPoint='$newpoints' where name='$character'");
}
elseif($resettype == reset)
{
$a = mssql_query("Update Character Set Strength='25',Dexterity='25',Vitality='25',Energy='25' ,Money='$newmoney',clevel='1',Experience='0',Resets='$newresets',LevelUpPoint='$newpoints' where name='$character'");
}
if($resetclearinv == yes) { $b = mssql_query("UPDATE Character set Inventory=CONVERT(varbinary(1080), null) WHERE Name='$character'"); }
if($resetclearskill == yes) { $c = mssql_query("Update Character set magiclist= CONVERT(varbinary(60), null) WHERE Name='$character'"); }
}
}
}
function vote()
{
global $votecredits;
global $votelink;
global $votehours;
$account = secure($_POST['login']);
check_inject();
$time = 60 * 60 * $votehours;
$timenow = time();
$time2 = $timenow - $time;
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$queryvote = mssql_query("Select * from votereward where time>'$time2' and memb___id='$account'");
$votecheck = mssql_num_rows($queryvote);
if(empty($account)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($votecheck >= 1) { echo"<font color='red'>You can vote once on every $votehours hours!</font><br>"; $error=1; }
if($error != 1) {
$a = mssql_query("INSERT INTO votereward (memb___id, time ) VALUES('$account','$timenow')");
$b = mssql_query("Update MEMB_CREDITS set credits = credits+$votecredits WHERE memb___id='$account'");
echo"<font color='green'>You have succsesfully voted!</font>";
echo"<meta http-equiv=\"refresh\" content=\"0;url=$votelink\" />";
}
}
function dogrand_reset()
{
$account = secure($_SESSION['user']);
global $grandresetcredits;
if(isset($_POST['exchange']))
{
$account = secure($_SESSION['user']);
$character = secure($_POST['character']);
$resets = secure($_POST['resets']);
check_inject();
$querychar = mssql_query("Select resets,grresets from character where name='$character'");
$char = mssql_fetch_row($querychar);
$newresets = $char[0] - $resets;
$newgrresets = $char[1] + $resets;
if($newresets < 0) { echo"<br><font color='red'>Not enought resets!</font><br>"; $error = 1; }
elseif($resets < 0) { echo"<br><font color='red'>Error! You Can't put - numbers!</font><br>"; $error = 1; }
elseif($error != 1) {
$credits = $resets * $grandresetcredits;
echo"<br><font color='green'>You exchange $resets reset(s) for $credits credits</font><br>";
$a = mssql_query("Update Character set resets='$newresets',GrResets='$newgrresets' where name='$character'");
$b = mssql_query("Update MEMB_CREDITS set credits = credits+$credits WHERE memb___id='$account'");
}
}
$query = mssql_query("Select name,resets from character where AccountID='$account'");
echo"
<form action='' name='' method='POST'>
<select id='character' name='character'><optgroup label='Select a character'>
";
for($i=0;$i < mssql_num_rows($query);++$i)
{
$row = mssql_fetch_row($query);
echo"
<option value='$row[0]'>$row[0] [$row[1]]</option>
";
}
echo"</select>
<br><input type='text' size='25' id='resets' name='resets' />
<br><input type='submit' maxlength='2' value='exchange' name='exchange'>
</form>
<br>Each one sold reset is equivalent to One 'GR' in Rankings !
<br>1 Reset = $grandresetcredits Credits!
";
}
function grand_reset()
{
$account = secure($_POST['login']);
$password = secure($_POST['password']);
check_inject();
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);
$querypassword = mssql_query("Select * from MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$passwordcheck = mssql_num_rows($querypassword);
if(empty($account) or empty($password)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($passwordcheck <= 0) { echo"<font color='red'>Your Password does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($onlinecheck >= 1) { echo"<font color='red'>Account $account is online!Please LogOff First!</font><br>"; $error=1;}
if($error != 1) {
$_SESSION['user'] = $account;
dogrand_reset();
}
}
?>
Fatal error: Call to undefined function mssql_query() in C:\xampp\htdocs\modules\stats.php on line 6
help me please i got this error