Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /*---------------------------------------------------------\ | aEWD..
Decoded Output download
<?php
/*---------------------------------------------------------\
| aEWDMU SCRIPT |
|----------------------------------------------------------|
| Copyright 2009, EWD Studio |
|----------------------------------------------------------|
| http://www.ewd-studio.net |
\---------------------------------------------------------*/
session_start();
require('include/internal.php');
require('include/config.php');
require('requ.php');
if (logged()) {
$q = $_GET['q'];
if ($_GET['q'] == NULL) {
jump('index.php');
}
$user_login = $_SESSION['member'];
$char_level = mssql_query("SELECT cLevel,Money,Resets, LevelUpPoint from Character where AccountID='$user_login' and Name='$q'");
$check1 = mssql_fetch_array($char_level);
$creds_check = mssql_fetch_array(mssql_query("SELECT credits from memb_credits where memb___id='$user_login'"));
if (is_connected()) {
print "<div class=\"error\">You have to disconnect from game to reset character!</div>";
} elseif (((is_vip()) && ($check1['cLevel'] < $vip_reset_level || $check1['Money'] < $reset_money))) {
print "<div class=\"error\">Your character does not meet all requirements...</div>";
} elseif (((!is_vip()) && ($check1['cLevel'] < $reset_level) || ($check1['Money'] < $reset_money))) {
print "<div class=\"error\">Your character does not meet all requirements...</div>";
} elseif (((is_vip()) && ($check1['cLevel'] < $vip_reset_level || $creds_check['credits'] < $resetcredsvip))) {
print "<div class=\"error\">You do not have enough credits...</div>";
} elseif (((!is_vip()) && ($check1['cLevel'] < $reset_level || $creds_check['credits'] < $resetcreds))) {
print "<div class=\"error\">You do not have enough credits...</div>";
} else {
$resfile = 'resets/' . $q . '.res';
if (file_exists($resfile)) {
$moddate = date("F d Y H:i:s", filemtime($resfile));
}
if ((!is_vip()) && (filemtime($resfile) > time() - $interval * 3600)) {
print "<div class=\"error\">Sorry, you can not reset your character now. Last reset was on $moddate. A minimum interval of $interval hours need between every reset.</div>";
} else {
$resets = $check1['Resets'];
$lvlupp = $check1['LevelUpPoint'];
$money = $check1['Money'];
$resetsa = $resets + 1;
if (is_vip()) {
$reset = mssql_query("Update Character SET cLevel=1, Experience=0, Resets=$resetsa, MapNumber=0, MapPosX=182, MapPosY=128, LevelUpPoint=LevelUpPoint+$bonus, Money=Money-$reset_money WHERE AccountID='$user_login' and Name='$q'");
$c2 = $creds_check['credits'] - $resetcredsvip;
$takecreds = mssql_query("update memb_credits set credits='$c2' WHERE memb___id='$user_login'");
} else {
$reset = mssql_query("Update Character SET cLevel=1, Experience=0, Resets=$resetsa, MapNumber=0, MapPosX=182, MapPosY=128, LevelUpPoint=LevelUpPoint+$bonusvip, Money=Money-$reset_money WHERE AccountID='$user_login' and Name='$q'");
$c2 = $creds_check['credits'] - $resetcreds;
$takecreds = mssql_query("update memb_credits set credits='$c2' WHERE memb___id='$user_login'");
}
$logfile = 'logs/resets_logs.php';
$ip = $_SERVER['REMOTE_ADDR'];
$date = date('Y-m-d H:i');
$xdata = "Character $q Has Been Reseted. Before Reset:$resets, After Reset:$resetsa, All Those On $date By ip:$ip
";
$fp = fopen($logfile, 'ab');
fwrite($fp, $xdata);
fclose($fp);
$fp1 = fopen($resfile, 'ab');
fwrite($fp1, $xdata);
fclose($fp1);
print "<div class=\"success\"><b>Logs saved: $user_login</b>, Your character <b>$q</b> Has Been Reseted. Before Reset:$resets, After Reset:$resetsa, in $date By IP:$ip</div>";
}
}
}
$query = "Select Name,cLevel,LevelUpPoint,Resets,Money FROM Character WHERE AccountID='$user_login'";
$result = mssql_query($query);
print "<div id=\"cInfo\">";
listcreds($user_login);
print "<table width=\"480\">
<tr>
<th>#</th>
<th>Name</th>
<th>Money</th>
<th>Level</th>
<th>Resets</th>
<th>RESET ?</th>
</tr>";
while ($row = mssql_fetch_array($result)) {
$name = $row['Name'];
$level = $row['cLevel'];
$levelupp = $row['LevelUpPoint'];
$reset = $row['Resets'];
$money = $row['Money'];
$id++;
if ($q == $name) {
print "<tr>
<td><span class=\"afterrr\">$id</span></td>
<td><span class=\"afterrr\">$name</span></td>
<td><span class=\"afterrr\">$money</span></td>
<td><span class=\"afterrr\">$level</span></td>
<td><span class=\"afterrr\">$reset</span></td>";
if (is_vip() && $level >= $vip_reset_level || !is_vip() && $level >= $reset_level) {
print "<td><span class=\"afterrr\" style=\"cursor:pointer;\" onclick=\"resetchara('$name')\">RESET NOW !</span></td>";
} else {
print "<td></td>";
}
print "</tr>";
} else {
print "<tr>
<td>$id</td>
<td>$name</td>
<td>$money</td>
<td>$level</td>
<td>$reset</td>";
if (is_vip() && $level >= $vip_reset_level || !is_vip() && $level >= $reset_level) {
print "<td><span class=\"afterrr\" style=\"cursor:pointer;\" onclick=\"resetchara('$name')\">RESET NOW !</span></td>";
} else {
print "<td></td>";
}
print "</tr>";
}
}
print "
</table>
</div>";
print "<div id=\"resinfo\">";
if (is_vip()) {
print "<div id=\"require\"><br /><b>You are a VIP</b><br /><b>Requirements for reset:</b><br />Interval between 2 resets: <b>no limit</b><br />Character Level: <b>$vip_reset_level</b><br />Credits cost: <b>$resetcredsvip credits</b><br />Zen cost: <b>$reset_money</b><br />Bonus received after reset: <b>$bonusvip points</b><br />Stats after reset: <b>remain</b><br /></div>";
} else {
print "<div id=\"require\"><br /><b>You are NOT a VIP</b><br /><b>Requirements for reset:</b><br />Interval between 2 resets: <b>$interval hours</b><br />Character Level: <b>$reset_level</b><br />Credits cost: <b>$resetcreds credits</b><br />Zen cost: <b>$reset_money</b><br />Bonus received after reset: <b>$bonus points</b><br />Stats after reset: <b>remain</b><br /></div>";
}
print "</div>";
?>
Did this file decode correctly?
Original Code
<?php
/*---------------------------------------------------------\
| aEWDMU SCRIPT |
|----------------------------------------------------------|
| Copyright 2009, EWD Studio |
|----------------------------------------------------------|
| http://www.ewd-studio.net |
\---------------------------------------------------------*/
session_start();
require('include/internal.php');
require('include/config.php');
require('requ.php');
if (logged()) {
$q = $_GET['q'];
if ($_GET['q'] == NULL) {
jump('index.php');
}
$user_login = $_SESSION['member'];
$char_level = mssql_query("S\105\x4c\105C\x54\x20\x63\114e\x76\x65\x6c\054\115o\156\x65\x79,\x52e\x73et\x73\x2c\040\x4cev\145\154\x55\160P\157\151n\x74\040\x66r\x6fm \103\150\x61r\x61c\x74er\040\167\150\x65\162e\x20\x41c\143\157\165n\164\111\104\x3d'$user_login'\x20\141n\x64\040Na\x6de\075'$q'");
$check1 = mssql_fetch_array($char_level);
$creds_check = mssql_fetch_array(mssql_query("S\x45\x4cE\103\124 c\x72\145\144i\164\x73\040\x66\162\x6f\x6d m\145\x6d\x62\x5f\143\x72\145d\151\164\x73\x20\167\150\x65\162\x65\040m\145m\x62\137\x5f\137id\075'$user_login'"));
if (is_connected()) {
print "\x3c\144\151\166 \143l\141\163\163\x3d\"\x65r\x72o\x72\">\x59ou\x20\x68\141\x76\145\x20\x74\157\040dis\143\157\x6e\x6e\145\143\164\040fr\157\155\x20\147am\x65\x20to\040\162e\x73\145\164\040\143\150\x61\x72a\143t\x65\162!\x3c\057\144i\x76\x3e";
} elseif (((is_vip()) && ($check1['cLevel'] < $vip_reset_level || $check1['Money'] < $reset_money))) {
print "\x3c\x64i\166 \x63\154\141s\x73=\"\x65r\162o\162\"\x3e\x59ou\162\040\143\150\141\162\141\143\164e\x72\040\x64o\x65s\x20no\164 mee\164\x20\141\x6c\x6c \x72\145\x71\165\x69re\155ent\163\x2e\x2e\056</di\x76>";
} elseif (((!is_vip()) && ($check1['cLevel'] < $reset_level) || ($check1['Money'] < $reset_money))) {
print "\074di\166\x20\143\154a\x73\163\075\"\145\x72\162o\x72\">Yo\165\162\040\143\x68\141\x72\x61\143\164\x65\162\040\144oe\163 n\157\x74 \x6d\145e\x74\040a\154l \x72e\161\165i\x72eme\156\x74s\x2e..</d\x69\166>";
} elseif (((is_vip()) && ($check1['cLevel'] < $vip_reset_level || $creds_check['credits'] < $resetcredsvip))) {
print "\x3cd\151v \x63\154\141\163\x73\075\"er\x72or\"\x3eY\x6f\165\x20\x64o\x20n\x6f\x74\x20\150\x61\x76\145\040\145n\157\165\147\x68 \143\162\145\144\151ts\056\056\x2e\074/div\076";
} elseif (((!is_vip()) && ($check1['cLevel'] < $reset_level || $creds_check['credits'] < $resetcreds))) {
print "\x3c\144\151v \x63\154\141\163\163\075\"e\162r\x6f\x72\"\x3e\x59\157u\x20\x64\157 n\x6f\164 \x68\x61\166\145\x20\145n\157\165\147\x68\x20\143\162\145\x64\x69t\163\056..\074\057\x64\151\x76>";
} else {
$resfile = 'resets/' . $q . '.res';
if (file_exists($resfile)) {
$moddate = date("F\040\x64\x20\131\040\110:\151\072s", filemtime($resfile));
}
if ((!is_vip()) && (filemtime($resfile) > time() - $interval * 3600)) {
print "\x3c\144\x69v \143\154\141\x73s\075\"e\x72\x72or\"\x3eS\157\x72\x72\171\x2c\040you\x20c\x61\x6e \x6e\x6ft\x20\x72\x65\x73\145\164\x20\x79o\165\162\040\143\150ar\141\143\x74\x65\162 n\x6f\167\x2e \114ast\x20\162es\145t\x20wa\163 \x6fn\040$moddate.\x20\101 m\x69\x6e\x69\155\x75m\x20\x69\x6e\x74\145\162v\141l\x20o\x66\x20$interval\x20\150\157ur\163\x20\x6e\x65ed \x62e\x74\x77\x65\x65\156 \x65\166\145\162\x79\040r\145s\x65t\056<\057\x64\x69v\x3e";
} else {
$resets = $check1['Resets'];
$lvlupp = $check1['LevelUpPoint'];
$money = $check1['Money'];
$resetsa = $resets + 1;
if (is_vip()) {
$reset = mssql_query("\125\160da\x74\x65 \x43\150a\x72\141c\164e\x72\040\x53\x45\x54\x20\143\114eve\154\x3d\x31\054\x20\x45\170pe\x72\151\145\x6e\143\145=\x30,\x20Re\x73e\164\163=$resetsa\x2c\x20\x4d\141\x70Nu\155\x62e\162\x3d0\x2c M\141\160\x50\x6f\x73\130\x3d1\070\x32, M\x61\x70\x50\157\x73\x59\075\061\x32\070,\040\114\x65\166\145\154\x55\160\120\x6f\151\x6e\x74\075\x4c\145\166\145lU\160\x50\x6f\x69\156\164+$bonus\x2c \x4d\157\156\145\x79=\115\x6f\x6e\x65y\x2d$reset_money \127\x48\x45\122\105\040A\143c\x6f\x75\156t\x49\104='$user_login' a\156\144 \116a\x6d\145\x3d'$q'");
$c2 = $creds_check['credits'] - $resetcredsvip;
$takecreds = mssql_query("\x75p\144\x61t\145\040m\145\x6db_\x63\162\x65d\151\x74\x73\040\x73\x65\164\040\143\162ed\x69t\163\075'$c2'\x20W\110\105RE\040me\155\x62_\137_i\x64\x3d'$user_login'");
} else {
$reset = mssql_query("\125\160\x64\x61t\145 \x43\x68ara\x63t\145r \123\x45\124\x20\143\114\145\x76\x65\154\0751\x2c\x20Expe\162\151e\x6e\x63\145\x3d\060, \122e\x73et\163\075$resetsa\054\040\x4d\141\x70\116\x75\155\x62e\x72\x3d\x30,\040\x4d\141pP\x6f\163X=\061\070\062,\040\x4da\x70\x50o\x73\x59\x3d\x3128\x2c\040L\x65\166e\154Up\x50\157\151\x6et=L\x65\166\x65lU\x70P\157\x69n\164\x2b$bonusvip\054\040\115oney\075\115o\x6e\x65\x79\055$reset_money\040\127\x48\105\x52\x45\x20A\143\143\x6f\165\156\164\111D\075'$user_login'\040\141\156d\040N\141\155\145\075'$q'");
$c2 = $creds_check['credits'] - $resetcreds;
$takecreds = mssql_query("upda\164\145\x20\155e\155b\137\x63\162\x65\144i\x74\163\040set\040\143\162edits='$c2'\040\x57\x48\x45\x52E\040\x6d\x65\x6d\142_\137\x5f\x69d\x3d'$user_login'");
}
$logfile = 'logs/resets_logs.php';
$ip = $_SERVER['REMOTE_ADDR'];
$date = date('Y-m-d H:i');
$xdata = "\103\x68\141r\141\143\x74\145\162 $q\x20H\x61s Be\x65\156\x20\122es\145\x74\x65\144\x2e\x20\102\145f\x6f\162e \x52\145\163e\x74\072$resets\x2c\x20A\x66\164\x65\x72\x20R\x65\163e\x74\x3a$resetsa,\x20\x41\x6c\x6c\040\x54h\x6fs\145 O\x6e $date \102\x79\040i\x70:$ip \n";
$fp = fopen($logfile, 'ab');
fwrite($fp, $xdata);
fclose($fp);
$fp1 = fopen($resfile, 'ab');
fwrite($fp1, $xdata);
fclose($fp1);
print "\x3cdiv\x20c\154a\163s=\"\x73\x75c\x63\x65\163s\"\x3e\074\142\076\114\157g\x73\x20save\x64: $user_login</\142>,\x20\131\x6fu\162\x20\x63\x68\141\162\141c\x74\145\162 \074\142\076$q<\x2fb>\040\110\x61s\x20\102\x65e\156\040R\x65\x73et\x65d\x2e \102ef\157\x72\145\040\x52\145\163et\072$resets, A\x66\164\145\x72 \x52e\x73e\164:$resetsa,\040in\040$date\040B\171\x20IP:$ip\x3c\x2fd\x69v\x3e";
}
}
}
$query = "\x53\x65\x6cect \x4e\x61\155\x65\x2c\x63Lev\145l\x2cL\x65\x76\145\154\x55p\120\157i\156\164\x2c\x52e\x73\145\x74\x73,\115\x6f\156\x65y\040\106ROM\x20Ch\141r\x61\x63t\x65\162\040WH\x45\122E A\143co\165\x6e\164ID='$user_login'";
$result = mssql_query($query);
print "\x3c\x64\151\166 \151\x64\075\"c\111\x6e\x66\x6f\"\076";
listcreds($user_login);
print "\074t\141\x62le\040\167i\144\164h\x3d\"\06480\"\076\x0d\012<\x74\162\x3e
\074t\x68\076\x23<\057\x74\x68>\x0d
\074\164\150\076Na\155\x65<\x2f\x74\x68\x3e
\x0a<\164\150>\115\157\x6ee\x79\x3c\x2f\x74\x68>\015
\074\164h\x3eLe\166\145l\x3c\x2fth\x3e
\x0a\x3c\164\x68\076\122\145\x73\145t\163<\057\164h\076
\012\x3c\164\150\076\x52E\x53\x45T \077\x3c\x2f\164\150>\015
\074\057\x74r\076";
while ($row = mssql_fetch_array($result)) {
$name = $row['Name'];
$level = $row['cLevel'];
$levelupp = $row['LevelUpPoint'];
$reset = $row['Resets'];
$money = $row['Money'];
$id++;
if ($q == $name) {
print "<\x74r\x3e
<\164\x64\076<s\160a\156 cl\141\163\x73\x3d\"\x61\x66\164e\x72\x72\x72\"\x3e$id\074/\x73\160\141n\076\x3c\x2ft\144\076\x0d\012\x3c\164d\x3e\074\x73p\x61\x6e\x20cla\163\x73=\"\141fte\x72\x72\162\"\x3e$name\x3c\x2fspan\076\x3c/\x74\x64>\015
\074\164\144\x3e<\x73p\141\156 cl\x61s\163\x3d\"\x61f\x74\x65\x72\x72\162\"\076$money\x3c/\163p\141n>\x3c\x2f\164d\076\x0d\012<\164\144>\x3c\x73\160\141\156\x20cla\163\163\x3d\"\x61\146\164\145r\x72\162\"\x3e$level\x3c/\x73p\141n>\074\x2f\x74d>
\012\074\164\x64\x3e\x3cs\x70\141\x6e\040c\154a\163\x73\x3d\"\141\x66t\x65r\x72\x72\"\x3e$reset<\057sp\141n\076\074\057\164d\076";
if (is_vip() && $level >= $vip_reset_level || !is_vip() && $level >= $reset_level) {
print "<\x74\x64>\074\163\x70\141\x6e\x20\x63\x6ca\x73\x73=\"\141f\164\145rrr\"\040\163t\171\x6c\145=\"\143u\162\163\x6f\162:\x70\x6f\151nte\162;\" \x6f\156\143\x6c\x69\143\153=\"\x72e\163\x65t\x63\x68\141r\x61\x28'$name'\051\"\x3e\122\x45\x53\105\x54\x20\x4eO\x57\x20!\074/\163p\x61n\x3e\074\057\164d\x3e";
} else {
print "<\x74\x64\x3e<\x2ftd>";
}
print "\x3c/tr>";
} else {
print "\x3c\164\x72\x3e
\x0a\x3ct\144\x3e$id\074/td\076\015
\x3ct\x64>$name</\x74d\076\015\x0a<\164\144\x3e$money</\164d\076
\074t\144\x3e$level\x3c/td>\015\x0a\074td\x3e$reset</td\076";
if (is_vip() && $level >= $vip_reset_level || !is_vip() && $level >= $reset_level) {
print "<\164\144\x3e\074\163\x70an \143\x6c\x61s\x73=\"\x61\146t\x65r\162\x72\" \x73\164\x79\x6c\145=\"\143u\162\163or\x3a\x70\x6f\151\x6e\x74\x65r;\" \157ncl\151\x63\x6b=\"\x72\145s\x65\164\x63\x68\x61\162\141\x28'$name')\"\x3e\x52\105\123E\124\040N\x4f\127 \x21\x3c\x2fs\160\x61\156\x3e\x3c/\164\144\076";
} else {
print "<t\144><\057\164d\076";
}
print "\074\x2ft\x72>";
}
}
print "\x0d\012\074\057ta\142\154e>\015
\074\x2f\144iv\x3e";
print "\x3cd\x69v\x20\151d\x3d\"\162\145\x73\151nfo\">";
if (is_vip()) {
print "\074\x64iv \151\x64=\"re\x71\165i\x72\145\">\074\142\162 \057\x3e\074b>\131ou\x20a\x72\x65\x20\141 \126IP\x3c\057\142\x3e<\142r \x2f\076\x3c\x62\x3e\x52\x65\x71\165\151r\x65\x6d\145\x6e\x74s\040\146\x6fr\x20\162\x65set:\074\057b>\x3c\142\162\040\057\x3e\x49\x6et\145r\166\141\x6c betw\x65\145\156\x202 \162\x65\163\x65t\163\072\x20\074\x62\x3en\157 \x6c\x69\155i\164\x3c\x2fb>\x3c\142\162 \057\076C\150a\x72\x61c\164e\162\x20\114\145\x76\x65\154:\040\074\x62>$vip_reset_level\074/\x62\x3e\x3cb\162\040\x2f\x3eC\162\x65di\164s\x20\x63\157\163\x74:\x20<\142\076$resetcredsvip \143\x72e\x64it\x73</b>\x3c\x62r\x20\x2f\x3e\132\x65\x6e \143\157\x73\x74\072 \074\142\076$reset_money\074\057b>\074\142r \057\076\102\x6f\x6eu\163\040r\145c\x65\x69\166\x65d\040af\164\x65r\040re\163\x65\x74:\040<\x62>$bonusvip\040\160\157i\x6e\164\163\074\x2f\142\x3e<b\162\x20\x2f\x3e\123\164at\x73 af\164e\162\040\162e\163\x65\164:\x20\074\x62\x3e\x72\145\155ai\156</\x62\076<\142\162 />\x3c\x2fdiv>";
} else {
print "\074div\040\151d\075\"\x72\145qu\151r\x65\"\076\x3cb\162\040/\x3e<\142\x3e\131ou ar\145\040\x4eOT\040\141 \126I\120\074\x2f\142\076<\142\162 \057\x3e\x3c\142>Re\161u\x69\x72em\145\x6e\164\163 \x66\157\162\040\x72e\x73\145\x74\x3a<\x2f\142>\x3c\x62\x72\x20/>\111\x6e\x74\x65\162\x76al b\145t\167\145\x65\156 \x32\x20r\x65\163\145t\163:\040\074\x62>$interval\x20h\157\165r\x73\074\057\x62\x3e\x3c\142\x72\x20\x2f\076\x43\x68ar\141\x63\164\x65\162 L\145\x76el\x3a <b\x3e$reset_level\074\x2f\x62\076<\x62\162\x20\x2f>\103\162e\144i\x74s\040\143\x6f\x73\x74: <\x62\076$resetcreds\040\x63\162\x65d\x69\x74\163\x3c/b\076<\x62\162 \x2f>\x5ae\156\040\x63os\x74\x3a \074\x62>$reset_money\x3c\057b\076\074\x62r\040/\076\x42on\165s\x20re\x63\145\151\166\x65d \x61\146te\162\x20\x72\x65\x73\x65\164\x3a\040\074\142>$bonus\040\x70\x6f\151\x6et\163<\057\142><\x62\162\x20\x2f\x3e\x53\164a\x74\x73\x20\141\x66\x74\145r\x20re\163\x65\164\x3a \x3c\142>r\145m\141\x69n\074\x2fb\076\x3cb\162\x20\057\076<\057\144i\166\x3e";
}
print "\074/\144i\x76\076";
Function Calls
session_start | 1 |
Stats
MD5 | 78d7e449d7cdab46390057eb3ef2a121 |
Eval Count | 0 |
Decode Time | 65 ms |