Webshop (Кредиты за Ресеты)~~

Автор , 2008 Июль 12, 11:24

« назад - далее »

0 Пользователи и 1 гость просматривают эту тему.

Есть такой Скрипт... При каждом ресете дают кредиты в Вебшопе ...

Идем в:
C:AppServer(EasyPhp)wwwincludescharacter_functions.phpи ищем строку do_reset
И увидем такое:
function do_reset()
{
if ((isset($_COOKIE['pass'])) && (isset($_COOKIE['user']))); {

$charactername = stripslashes($_POST['reset_character']);
$loginid = stripslashes($_COOKIE['user']);


$charactername = str_replace("'","",$charactername);
$charactername = str_replace(";","",$charactername);
$loginid = clean_var($loginid);

require("config.php");
require_once "sql_inject.php";
include_once('sql_check.php');
check_inject();

$bDestroy_session = TRUE;
$url_redirect = 'index.php';
$sqlinject = new sql_inject('./log_file_sql.log',$bDestroy_session,$url_redirect);


$sql_username_check = mssql_query("SELECT memb___id FROM MEMB_INFO WHERE memb___id='$loginid'");
$username_check = mssql_num_rows($sql_username_check);

$sql_name_check = mssql_query("SELECT Name FROM Character WHERE Name='$charactername' and AccountID = '$loginid'");
$name_check = mssql_num_rows($sql_name_check);

$sql_online_check = mssql_query("SELECT ConnectStat FROM MEMB_STAT WHERE memb___id='$loginid'");
$row2 = mssql_fetch_row($sql_online_check);

$result = mssql_query("Select Clevel,Resets,Money,LevelUpPoint,class From Character where Name='$charactername'");
$row = mssql_fetch_row($result);
$resetup=$row[1] + (1);
$resetmoeny=$row[2]-($muweb['resetmoney']);
$resetpt=$row[3] + ($muweb['resetpoints']);
$resetpt1=$muweb['resetpoints'] * ($row[1] + 1);

if (empty($charactername) || empty($loginid)){
echo "<img> Error: Some Fields Were Left Blank!";}


elseif ($username_check <= 0){
echo "<img> Error: Account $loginid Does Not Exist!"; }

elseif ($name_check <= 0){
echo "<img> Error: Character $charactername Does Not Exist!"; }


elseif ($row2[0] != 0){
echo "<img> Error: Character $charactername Is Online, Must Be Logged Off!"; }

elseif ($resetmoeny < 0){
echo "<img> Error: $charactername Need $muweb[resetmoney] Zen To Reset!"; }

elseif ($row[0] <muweb>test($sql_reset_script);
$sqlinject->test($sql_reset_script2);
$sql_reset_exec = mssql_query($sql_reset_script);
$sql_reset_exec2 = mssql_query($sql_reset_script2);

echo "<img> $charactername SuccessFully Reseted!";
}}}

Заменяем всё это этим :
function do_reset()
{
if ((isset($_COOKIE['pass'])) && (isset($_COOKIE['user']))); {

$charactername = stripslashes($_POST['reset_character']);
$loginid = stripslashes($_COOKIE['user']);


$charactername = str_replace("'","",$charactername);
$charactername = str_replace(";","",$charactername);
$loginid = clean_var($loginid);

require("config.php");
require_once "sql_inject.php";
include_once('sql_check.php');
check_inject();

$bDestroy_session = TRUE;
$url_redirect = 'index.php';
$sqlinject = new sql_inject('./log_file_sql.log',$bDestroy_session,$url_redirect);


$sql_username_check = mssql_query("SELECT memb___id FROM MEMB_INFO WHERE memb___id='$loginid'");
$username_check = mssql_num_rows($sql_username_check);

$sql_name_check = mssql_query("SELECT Name FROM Character WHERE Name='$charactername' and AccountID = '$loginid'");
$name_check = mssql_num_rows($sql_name_check);



$broikrediti='50';



$sql_online_check = mssql_query("SELECT ConnectStat FROM MEMB_STAT WHERE memb___id='$loginid'");
$row2 = mssql_fetch_row($sql_online_check);
$kredit= mssql_query("select credits from memb_credits where memb___id='$loginid'");
$krediti = mssql_fetch_row($kredit);
$result = mssql_query("Select Clevel,Resets,Money,LevelUpPoint,class From Character where Name='$charactername'");
$row = mssql_fetch_row($result);
$resetup=$row[1] + (1);
$resetmoeny=$row[2]-($muweb['resetmoney']);
$resetpt=$row[3] + ($muweb['resetpoints']);
$resetpt1=$muweb['resetpoints'] * ($row[1] + 1);
$novikrediti=$krediti[0] + ($broikrediti);
$dobavikrediti="Update memb_credits set credits='$novikrediti' where memb___id='$loginid'";


if (empty($charactername) || empty($loginid)){
echo "<img> Error: Some Fields Were Left Blank!";}


elseif ($username_check <= 0){
echo "<img> Error: Account $loginid Does Not Exist!"; }

elseif ($name_check <= 0){
echo "<img> Error: Character $charactername Does Not Exist!"; }


elseif ($row2[0] != 0){
echo "<img> Error: Character $charactername Is Online, Must Be Logged Off!"; }

elseif ($resetmoeny < 0){
echo "<img> Error: $charactername Need $muweb[resetmoney] Zen To Reset!"; }

elseif ($row[0] <muweb> $muweb['resetslimit']){
echo "<img> Error: Resets limit is set to $muweb[resetslimit]!"; }




else {

if(($muweb['resetmode']=='keep') AND ($muweb['levelupmode']=='normal')){
$sql_reset_script="Update character set [clevel]='1',[experience]='0',[money]='$resetmoeny',[LevelUpPoint]='$resetpt',[resets]='$resetup' where name='$charactername'";}
elseif(($muweb['resetmode']=='reset') AND ($muweb['levelupmode']=='extra')){
$sql_reset_script="Update character set [strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[clevel]='1',[experience]='0',[money]='$resetmoeny',[LevelUpPoint]='$resetpt1',[resets]='$resetup' where name='$charactername'";}
elseif(($muweb['resetmode']=='keep') AND ($muweb['levelupmode']=='extra')){
$sql_reset_script="Update character set [clevel]='1',[experience]='0',[money]='$resetmoeny',[LevelUpPoint]='$resetpt1',[resets]='$resetup' where name='$charactername'";}
elseif(($muweb['resetmode']=='reset') AND ($muweb['levelupmode']=='normal')){
$sql_reset_script="Update character set [strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[clevel]='1',[experience]='0',[money]='$resetmoeny',[LevelUpPoint]='$resetpt',[resets]='$resetup' where name='$charactername'";}
if($muweb['clean_inventory']=='yes' && $muweb['clean_skills']=='yes'){
$sql_reset_script2="UPDATE character Set [inventory]=CONVERT(varbinary(1080), null),[magiclist]= CONVERT(varbinary(180), null) Where name='$charactername'";}
elseif($muweb['clean_inventory']=='no' && $muweb['clean_skills']=='no'){
$sql_reset_script2="Select name from character where name='$charactername'";}
elseif($muweb['clean_inventory']=='yes' && $muweb['clean_skills']=='no'){
$sql_reset_script2="UPDATE character Set [inventory]=CONVERT(varbinary(1080), null) Where name='$charactername'";}
elseif($muweb['clean_inventory']=='no' && $muweb['clean_skills']=='yes'){
$sql_reset_script2="UPDATE character Set [magiclist]= CONVERT(varbinary(180), null) Where name='$charactername'";}

$sqlinject->test($sql_reset_script);
$sqlinject->test($sql_reset_script2);
$sql_reset_exec = mssql_query($sql_reset_script);
$sql_reset_exec2 = mssql_query($sql_reset_script2);
$sql_reset_exec3 = mssql_query($dobavikrediti);



echo "<img> $charactername SuccessFully Reseted!";

$logfile = 'logs/resets_logs.php';
$ip = $_SERVER['REMOTE_ADDR'];
$date = date('Y-m-d H:i');
$data = "Character $_POST[reset_character] Has Been <font>Reseted</font>, Before Reset:$row[1](resets), After Reset:$resetup(resets), All Those On $date By ip:$ip n";

$fp = fopen($logfile, 'a');
fputs($fp, $data);
fclose($fp);
}}}

ВНИМАНИЕ !!! ЭТО ТОЛЬКО ДЛЯ MuWeb 0.6 !!!
[/color]

Теперь Для MuWeb 0.8 !!! ->

Идем в :
C:AppServer(EasyPhp)wwwincludesCaracter.class
И заменяем этот фаил, этим:
СКАЧАТЬ !
[/url][/color]

Похожие темы (5)

Сообщений: 15
Просмотров: 14395

Сообщений: 32
Просмотров: 16743

Сообщений: 4
Просмотров: 3467

Сообщений: 11
Просмотров: 5318