![]() |
|
|
#1 (permalink) |
|
|
<small>Made by GeryDeft</small>
<?php if (isset($_SESSION['sesadmin'])) { $msconnect=odbc_connect(*); if (empty($_GET['acti'])){ $cucc="SELECT strAccountID,strCharid1,strCharid2,strCharid3 FROM ACCOUNT_CHAR WHERE strAccountID='".$_SESSION['sesuser']."'"; $msresul=odbc_exec($msconnect,$cucc) or die(odbc_error()); print('Choose your character wich you want to restat:<br>'); while (odbc_fetch_row($msresul)) { $hi1=odbc_result($msresul, 2); $hi2=odbc_result($msresul, 3); $hi3=odbc_result($msresul, 4); print('<a href=./index.php?act=user&actu=selfrestat&acti='.$hi1.'>' .$hi1.'</a><br>'); print('<a href=./index.php?act=user&actu=selfrestat&acti='.$hi2.'>' .$hi2.'</a><br>'); print('<a href=./index.php?act=user&actu=selfrestat&acti='.$hi3.'>' .$hi3.'</a><br>'); } }else{ $cuccx="SELECT strAccountID,strCharid1,strCharid2,strCharid3 FROM ACCOUNT_CHAR where strAccountID='".$_SESSION['sesuser']."'"; $msresulx=odbc_exec($msconnect,$cuccx) or die(odbc_error()); $hi22=odbc_result($msresulx, 2); $hi32=odbc_result($msresulx, 3); $hi42=odbc_result($msresulx, 4); $hi222=str_replace(" ","",$hi22); $hi322=str_replace(" ","",$hi32); $hi422=str_replace(" ","",$hi42); if (($hi222==$_GET['acti']) or ($hi322==$_GET['acti']) or ($hi422==$_GET['acti'])){ //if i turn this off the result:sql injection vuln! $cucc2="SELECT strUserID,race,strong,sta,dex,intel,cha,points,lev el FROM userdata where strUserID='".$_GET['acti']."'"; $msresul2=odbc_exec($msconnect,$cucc2) or die(odbc_error()); while (odbc_fetch_row($msresul2)) { $race=odbc_result($msresul2, 2); $str=odbc_result($msresul2, 3); $sta=odbc_result($msresul2, 4); $dex=odbc_result($msresul2, 5); $int=odbc_result($msresul2, 6); $mp=odbc_result($msresul2, 7); $lvl=odbc_result($msresul2, 9); $rest=odbc_result($msresul2, 8); } print(' <form action="" method=post> <table> <tr><td>STR:<td><input type=text value='.$str.' name=nstr> <tr><td>HP:<td><input type=text value='.$sta.' name=nsta> <tr><td>DEX:<td><input type=text value='.$dex.' name=ndex> <tr><td>INT:<td><input type=text value='.$int.' name=nint> <tr><td>MP:<td><input type=text value='.$mp.' name=nmp> <tr><td>REST:<td><input type=text value='.$rest.' name=nrest> <tr><td align=center colspan=2><input type=submit value=" DO "> </table> </form>'); $nstr=$_POST['nstr']; $nsta=$_POST['nsta']; $ndex=$_POST['ndex']; $nint=$_POST['nint']; $nmp=$_POST['nmp']; $nrest=$_POST['nrest']; $sum=$str+$sta+$dex+$int+$mp+$rest; if (isset($_POST['nstr'])){ if ($nrest<201){ if ($_POST['nstr']<=255 and $_POST['nsta']<=255 and $_POST['ndex']<=255 and $_POST['nint']<=255 and $_POST['nmp']<=255 and $_POST['nrest']<=255){ if ($lvl==(($sum-300)/3)+1){ if (( (($race ==1) or ($race ==2) or ($race ==11)) and (($nstr>=65) and ($nsta>=65) and ($ndex>=60) and ($nint>=50) and ($nmp>=50))) OR ( (($race ==13) or ($race ==3)) and (($nstr>=50) and ($nsta>=50) and ($ndex>=70) and ($nint>=70) and ($nmp>=50)) ) OR ( ($race ==12) and ($nstr>=60) and ($nsta>=60) and ($ndex>=70) and ($nint>=50) and ($nmp>=50) ) OR (($race ==4) and ($nstr>=50) and ($nsta>=60) and ($ndex>=60) and ($nint>=70) and ($nmp>=50)) ){ $cucc3="UPDATE userdata set strong=$nstr,sta=$nsta,dex=$ndex,intel=$nint,cha=$ nmp,points=$nrest where strUserID='".$_GET['acti']."'"; odbc_exec($msconnect,$cucc3) or die(odbc_error()); print('Jobs done!'); }else{print('You must have the default stat points depends from your race.');} }else{print('You cant have more or less stats on your level.Level:'.$lvl.' Statpoints:'.$sum);} }else{print('Maximum 255.');} }else{print('You cant have more than 200 rest statpoints.');} } }else{print('<br>This is not your character.');} } } ?> functionsun içine aTIcaksınız Repimi BekLerimm |
|
![]() |
| Seçenekler | |
| Stil | |
|
|