[Req] Молба към Backo

Един път имаш "$online_check" :) направи поне "$online_check = mssql_num_rows($online_check); " на "$online_check1 = mssql_num_rows($online_check); "

И защо два пъти проверяваш стартираната сесия ;P (fubar) нали има "$username = $_SESSION['member_username'];" ;P

М/у другото мисля, че няма да работи и това :) варианта който дадох съм сигорен, че при всички ще работи и няма да има проблеми ;P

пробвах го и не работи
 
ММ не поне от мойте малки познания може грешката да идва от
elseif ($onlinecheck[0] == 1){ echo "<td><br><font size=2>Account is online, must be logged off!</font><br><br></td>"; $error=1; }
НО несъм сигорен !
 
ММ не поне от мойте малки познания може грешката да идва от

НО несъм сигорен !

Т'ва $onlinecheck[0] == 1 проверява дали $onlinecheck[0] (ConnectStat) е == (еднакво) на 1 и ако е да исписва това... странното е, че при мен работи с това и няма проблеми (think)

Дам няма да работи мноу съм прос :x аз проверявам Name не AccountID

ето пробвай това:

Code:
<?php
ob_start();
session_start();
$username = $_SESSION['member_username'];
$password = $_SESSION['member_password'];
$character = $_SESSION['character'];
include("./config.php");
include("../inc/sqlcfg.php");
secure($_POST['username']);
secure($_POST['password']);
secure($_POST['character']);
$md5 = mssql_query("SELECT * FROM misc WHERE id=4");
$md5 = mssql_fetch_array($md5);
$md5 = $md5['misc'];
if($md5 == 1)
	{
	$check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd=[dbo].[fn_md5]('$password','$username')");
	}
else
	{
	$check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd='$password'");
	}
function level_reset() {
{
$char = secure($_POST['chars']);
$char = str_replace("'" , "", $char);
$char = str_replace(";" , "", $char);
$resmoney = '0';
$reslevel = '1';
$maxres   = '2000';
$respoints = '500';

global $web;
$q= mssql_query("SELECT TOP 25 Name,AccountID from Character order by Resets desc");
$row1 = mssql_fetch_row($q);
$username_check = mssql_query("SELECT Name FROM Character WHERE Name='$char' and AccountID = '$username'"); 
$username_checked = mssql_num_rows($username_check);  
$online_check="select ConnectStat from MEMB_STAT where memb___id='$row1[1]'";
$online_check_chek=mssql_query($online_check);
$onlinecheck=mssql_fetch_row($online_check_chek);
$hero = mssql_query("SELECT * FROM Character WHERE Name='$char'"); 
$row = mssql_fetch_array($hero);
if (empty($char)) { echo "<td><br><font size=2>Please select Character!</font><br><br></td>"; $error=1; }
elseif ($onlinecheck[0] == 1){ echo "<td><br><font size=2>Account is online, must be logged off!</font><br><br></td>"; $error=1; }
elseif ($row['Money'] < $resmoney) { echo "<td><br><font size=2><b>$char</b> need [<b>$resmoney</b>] zen to Reset!</font><br><br></td>"; $error=1; }
elseif ($row['cLevel'] < $reslevel){ echo "<td><br><font size=2><b>$char</b> need level [<b>$reslevel</b>] to Reset!</font><br><br></td>"; $error=1; }
elseif ($row['Resets'] >= $maxres) { echo "<td><br><font size=2>You have reach maximum resets! Cannot reset this hero!</font><br><br></td>"; $error=1; }
if($error !=1) {
$resetup = $row['Resets'] + (1);
$money = $row['Money'] - $resmoney;
$reset_points = "UPDATE character SET [LevelUpPoint]='$respoints',[Money]='$money',cLevel='1',Experience='0',[MapNumber]='0',[MapPosX]='125',[MapPosY]='128',[Resets]='$resetup' WHERE Name='$char'";
$reset_results = mssql_query($reset_points);
echo "<td><br><font size=2><b>$char</b> has been reset!</font><br><br></td>";
} 
 }
  }
?>
 
Last edited:
А стига бе немое да бъде :D :D :D колко варианта дадох и неще... :O :eh:


Васе на някои колоната им е AccountID а на други memb___id xD странно xD проверете в MEMB_STAT каква ви е колоната и ако пак има проблем кажете
 
PHP:
<?php
ob_start();
session_start();
$username = $_SESSION['member_username'];
$password = $_SESSION['member_password'];
$character = $_SESSION['character'];
include ("./config.php");
include ("../inc/sqlcfg.php");
secure($_POST['username']);
secure($_POST['password']);
secure($_POST['character']);
$md5 = mssql_query("SELECT * FROM misc WHERE id=4");
$md5 = mssql_fetch_array($md5);
$md5 = $md5['misc'];
if ($md5 == 1)
{
    $check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd=[dbo].[fn_md5]('$password','$username')");
}
else
{
    $check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd='$password'");
}
function level_reset()
{
    {
        $char = secure($_POST['chars']);
        $char = str_replace("'", "", $char);
        $char = str_replace(";", "", $char);
        $resmoney = '100000000';
        $reslevel = '400';
        $maxres = '999';
        $respoints = '500';
        global $web;
        $username_check = mssql_query("SELECT Name FROM Character WHERE Name='$char' and AccountID = '$username'");
        $username_checked = mssql_num_rows($username_check);
        $online_check = mssql_query("SELECT * FROM MEMB_STAT WHERE memb___id='$username'");
        $online_checked = mssql_fetch_array($online_check);
        if ($online_checked['ConnectStat'] == "1")
        {
            echo "В игра си";
        }
        else
        {
            $hero = mssql_query("SELECT * FROM Character WHERE Name='$char'");
            $row = mssql_fetch_array($hero);
            if (empty($char))
            {
                echo "<td><br><font size=2>Please select Character!</font><br><br></td>";
                $error = 1;
            } elseif ($online_checked['ConnectStat'] != 0)
            {
                echo "<td><br><font size=2>Account is online, must be logged off!</font><br><br></td>";
                $error = 1;
            } elseif ($row['Money'] < $resmoney)
            {
                echo "<td><br><font size=2><b>$char</b> need <b>$resmoney</b> zen to Reset!</font><br><br></td>";
                $error = 1;
            } elseif ($row['cLevel'] < $reslevel)
            {
                echo "<td><br><font size=2><b>$char</b> need level <b>$reslevel</b> to Reset!</font><br><br></td>";
                $error = 1;
            } elseif ($row['Resets'] >= $maxres)
            {
                echo "<td><br><font size=2>You have reach maximum resets! Cannot reset this hero!</font><br><br></td>";
                $error = 1;
            }
            if ($error != 1)
            {
                $newstats = $respoints * ($row['Resets']);
                $resetup = $row['Resets'] + (1);
                $money = $row['Money'] - $resmoney;
                $reset_points = "UPDATE [MuOnline].[dbo].[Character] SET [cLevel]='1',[Experience]='0',[LevelUpPoint]=' +100',[Money]='$money',[MapNumber]='0',[MapPosX]='125',[MapPosY]='128',[Resets]='$resetup' WHERE Name='$char'";
                $reset_results = mssql_query($reset_points);
                echo "<td><br><font size=2><b>$char</b> have [<b>$newstats</b>] level up points!</font><br><br></td>";
            }
        }
    }
}
?>
 
PHP:
<?php
ob_start();
session_start();
$username = $_SESSION['member_username'];
$password = $_SESSION['member_password'];
$character = $_SESSION['character'];
include ("./config.php");
include ("../inc/sqlcfg.php");
secure($_POST['username']);
secure($_POST['password']);
secure($_POST['character']);
$md5 = mssql_query("SELECT * FROM misc WHERE id=4");
$md5 = mssql_fetch_array($md5);
$md5 = $md5['misc'];
if ($md5 == 1)
{
    $check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd=[dbo].[fn_md5]('$password','$username')");
}
else
{
    $check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd='$password'");
}
function level_reset()
{
    {
        $char = secure($_POST['chars']);
        $char = str_replace("'", "", $char);
        $char = str_replace(";", "", $char);
        $resmoney = '100000000';
        $reslevel = '400';
        $maxres = '999';
        $respoints = '500';
        global $web;
        $username_check = mssql_query("SELECT Name FROM Character WHERE Name='$char' and AccountID = '$username'");
        $username_checked = mssql_num_rows($username_check);
        $online_check = mssql_query("SELECT * FROM MEMB_STAT WHERE memb___id='$username'");
        $online_checked = mssql_fetch_array($online_check);
        if ($online_checked['ConnectStat'] == "1")
        {
            echo "В игра си";
        }
        else
        {
            $hero = mssql_query("SELECT * FROM Character WHERE Name='$char'");
            $row = mssql_fetch_array($hero);
            if (empty($char))
            {
                echo "<td><br><font size=2>Please select Character!</font><br><br></td>";
                $error = 1;
            } elseif ($online_checked['ConnectStat'] != 0)
            {
                echo "<td><br><font size=2>Account is online, must be logged off!</font><br><br></td>";
                $error = 1;
            } elseif ($row['Money'] < $resmoney)
            {
                echo "<td><br><font size=2><b>$char</b> need <b>$resmoney</b> zen to Reset!</font><br><br></td>";
                $error = 1;
            } elseif ($row['cLevel'] < $reslevel)
            {
                echo "<td><br><font size=2><b>$char</b> need level <b>$reslevel</b> to Reset!</font><br><br></td>";
                $error = 1;
            } elseif ($row['Resets'] >= $maxres)
            {
                echo "<td><br><font size=2>You have reach maximum resets! Cannot reset this hero!</font><br><br></td>";
                $error = 1;
            }
            if ($error != 1)
            {
                $newstats = $respoints * ($row['Resets']);
                $resetup = $row['Resets'] + (1);
                $money = $row['Money'] - $resmoney;
                $reset_points = "UPDATE [MuOnline].[dbo].[Character] SET [cLevel]='1',[Experience]='0',[LevelUpPoint]=' +100',[Money]='$money',[MapNumber]='0',[MapPosX]='125',[MapPosY]='128',[Resets]='$resetup' WHERE Name='$char'";
                $reset_results = mssql_query($reset_points);
                echo "<td><br><font size=2><b>$char</b> have [<b>$newstats</b>] level up points!</font><br><br></td>";
            }
        }
    }
}
?>
Дава ми че нямам зен :(
А при на васко пак същото !
 
А имаш ли 100000000 zen?

Смени го на 1ца само за пробата.
 
PHP:
<?php
ob_start();
session_start();
$username = $_SESSION['member_username'];
$password = $_SESSION['member_password'];
$character = $_SESSION['character'];
include ("./config.php");
include ("../inc/sqlcfg.php");
secure($_POST['username']);
secure($_POST['password']);
secure($_POST['character']);
$md5 = mssql_query("SELECT * FROM misc WHERE id=4");
$md5 = mssql_fetch_array($md5);
$md5 = $md5['misc'];
if ($md5 == 1)
{
    $check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd=[dbo].[fn_md5]('$password','$username')");
}
else
{
    $check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd='$password'");
}
function level_reset()
{
    {
        $char = secure($_POST['chars']);
        $char = str_replace("'", "", $char);
        $char = str_replace(";", "", $char);
        $resmoney = '100000000';
        $reslevel = '400';
        $maxres = '999';
        $respoints = '500';
        global $web;
        $username_check = mssql_query("SELECT Name FROM Character WHERE Name='$char' and AccountID = '$username'");
        $username_checked = mssql_num_rows($username_check);
        $online_check = mssql_query("SELECT * FROM MEMB_STAT WHERE memb___id='$username'");
        $online_checked = mssql_fetch_array($online_check);
        if ($online_checked['ConnectStat'] == "1")
        {
            echo "В игра си";
        }
        else
        {
            $hero = mssql_query("SELECT * FROM Character WHERE Name='$char'");
            $row = mssql_fetch_array($hero);
            echo $row['Money']." - $resmoney";
            if (empty($char))
            {
                echo "<td><br><font size=2>Please select Character!</font><br><br></td>";
                $error = 1;
            } elseif ($online_checked['ConnectStat'] != 0)
            {
                echo "<td><br><font size=2>Account is online, must be logged off!</font><br><br></td>";
                $error = 1;
            } elseif ($row['Money'] < $resmoney)
            {
                echo "<td><br><font size=2><b>$char</b> need <b>$resmoney</b> zen to Reset!</font><br><br></td>";
                $error = 1;
            } elseif ($row['cLevel'] < $reslevel)
            {
                echo "<td><br><font size=2><b>$char</b> need level <b>$reslevel</b> to Reset!</font><br><br></td>";
                $error = 1;
            } elseif ($row['Resets'] >= $maxres)
            {
                echo "<td><br><font size=2>You have reach maximum resets! Cannot reset this hero!</font><br><br></td>";
                $error = 1;
            }
            if ($error != 1)
            {
                $newstats = $respoints * ($row['Resets']);
                $resetup = $row['Resets'] + (1);
                $money = $row['Money'] - $resmoney;
                $reset_points = "UPDATE [MuOnline].[dbo].[Character] SET [cLevel]='1',[Experience]='0',[LevelUpPoint]=' +100',[Money]='$money',[MapNumber]='0',[MapPosX]='125',[MapPosY]='128',[Resets]='$resetup' WHERE Name='$char'";
                $reset_results = mssql_query($reset_points);
                echo "<td><br><font size=2><b>$char</b> have [<b>$newstats</b>] level up points!</font><br><br></td>";
            }
        }
    }
}
?>

Трябва да ти изкара броя на парите които имаш - броя на парите които иска за рес.
 
PHP:
<?php
ob_start();
session_start();
$username = $_SESSION['member_username'];
$password = $_SESSION['member_password'];
$character = $_SESSION['character'];
include("./config.php");
include("../inc/sqlcfg.php");
secure($_POST['username']);
secure($_POST['password']);
secure($_POST['character']);
$md5 = mssql_query("SELECT * FROM misc WHERE id=4");
$md5 = mssql_fetch_array($md5);
$md5 = $md5['misc'];
if($md5 == 1)
	{
	$check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd=[dbo].[fn_md5]('$password','$username')");
	}
else
	{
	$check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd='$password'");
	}
function level_reset() {
{
$char = secure($_POST['chars']);
$char = str_replace("'" , "", $char);
$char = str_replace(";" , "", $char);
$resmoney = '0';
$reslevel = '1';
$maxres   = '2000';
$respoints = '500';

global $web;
$q= mssql_query("SELECT TOP 25 Name,AccountID from Character order by Resets desc");
$row1 = mssql_fetch_row($q);
$username_check = mssql_query("SELECT Name FROM Character WHERE Name='$char' and AccountID = '$username'"); 
$username_checked = mssql_num_rows($username_check);  

$online_query = mssql_query("SELECT * From MEBM_STAT where memb___id='$char' and Connectstat='1'");
$online_result = mssql_num_rows($online_query);

$hero = mssql_query("SELECT * FROM Character WHERE Name='$char'"); 
$row = mssql_fetch_array($hero);
if (empty($char)) { echo "<td><br><font size=2>Please select Character!</font><br><br></td>"; $error=1; }
elseif ($online_result == 1){ echo "<td><br><font size=2>Account is online, must be logged off!</font><br><br></td>"; $error=1; }
elseif ($row['Money'] < $resmoney) { echo "<td><br><font size=2><b>$char</b> need [<b>$resmoney</b>] zen to Reset!</font><br><br></td>"; $error=1; }
elseif ($row['cLevel'] < $reslevel){ echo "<td><br><font size=2><b>$char</b> need level [<b>$reslevel</b>] to Reset!</font><br><br></td>"; $error=1; }
elseif ($row['Resets'] >= $maxres) { echo "<td><br><font size=2>You have reach maximum resets! Cannot reset this hero!</font><br><br></td>"; $error=1; }
if($error !=1) {
$resetup = $row['Resets'] + (1);
$money = $row['Money'] - $resmoney;
$reset_points = "UPDATE character SET [LevelUpPoint]='$respoints',[Money]='$money',cLevel='1',Experience='0',[MapNumber]='0',[MapPosX]='125',[MapPosY]='128',[Resets]='$resetup' WHERE Name='$char'";
$reset_results = mssql_query($reset_points);
echo "<td><br><font size=2><b>$char</b> has been reset!</font><br><br></td>";
} 
 }
  }
?>

еи ся вече ако не стане :x
 
Last edited:
ПОказва ги но пак става
На второто дава
Fatal error: Call to undefined function mssql_numb_rows() in C:\xampp\htdocs\modules\clear_reset_do.php on line 40
 
ПОказва ги но пак става
На второто дава

поправих го обурках место mssql_num_rows съм написал mssql_numb_rows копни го пак :) цялото!
 
PHP:
<?php
ob_start();
session_start();
$username = $_SESSION['member_username'];
$password = $_SESSION['member_password'];
$character = $_SESSION['character'];
include("./config.php");
include("../inc/sqlcfg.php");
secure($_POST['username']);
secure($_POST['password']);
secure($_POST['character']);
$md5 = mssql_query("SELECT * FROM misc WHERE id=4");
$md5 = mssql_fetch_array($md5);
$md5 = $md5['misc'];
if($md5 == 1)
	{
	$check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd=[dbo].[fn_md5]('$password','$username')");
	}
else
	{
	$check = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id='$username' AND memb__pwd='$password'");
	}
function level_reset() {
{
$char = secure($_POST['chars']);
$char = str_replace("'" , "", $char);
$char = str_replace(";" , "", $char);
$resmoney = '0';
$reslevel = '1';
$maxres   = '2000';
$respoints = '500';

global $web;
$q= mssql_query("SELECT TOP 25 Name,AccountID from Character order by Resets desc");
$row1 = mssql_fetch_row($q);
$username_check = mssql_query("SELECT Name FROM Character WHERE Name='$char' and AccountID = '$username'"); 
$username_checked = mssql_num_rows($username_check);  

$online_query = mssql_query("SELECT * From MEBM_STAT where memb___id='$character' and Connectstat='1'");
$online_result = mssql_num_rows($online_query);

$hero = mssql_query("SELECT * FROM Character WHERE Name='$char'"); 
$row = mssql_fetch_array($hero);
if (empty($char)) { echo "<td><br><font size=2>Please select Character!</font><br><br></td>"; $error=1; }
elseif ($online_result == 1){ echo "<td><br><font size=2>Account is online, must be logged off!</font><br><br></td>"; $error=1; }
elseif ($row['Money'] < $resmoney) { echo "<td><br><font size=2><b>$char</b> need [<b>$resmoney</b>] zen to Reset!</font><br><br></td>"; $error=1; }
elseif ($row['cLevel'] < $reslevel){ echo "<td><br><font size=2><b>$char</b> need level [<b>$reslevel</b>] to Reset!</font><br><br></td>"; $error=1; }
elseif ($row['Resets'] >= $maxres) { echo "<td><br><font size=2>You have reach maximum resets! Cannot reset this hero!</font><br><br></td>"; $error=1; }
if($error !=1) {
$resetup = $row['Resets'] + (1);
$money = $row['Money'] - $resmoney;
$reset_points = "UPDATE character SET [LevelUpPoint]='$respoints',[Money]='$money',cLevel='1',Experience='0',[MapNumber]='0',[MapPosX]='125',[MapPosY]='128',[Resets]='$resetup' WHERE Name='$char'";
$reset_results = mssql_query($reset_points);
echo "<td><br><font size=2><b>$char</b> has been reset!</font><br><br></td>";
} 
 }
  }
?>

еи ся вече ако не стане :x

Васе на някои колоната им е AccountID а на други memb___id xD странно xD проверете в MEMB_STAT каква ви е колоната и ако пак има проблем кажете

(xaxa) (xaxa) (xaxa) (xaxa) (xaxa) (xaxa) (xaixai) (xaixai) (xaixai) (xaixai) (xaixai) (xaixai) (xaixai) (xaixai) (xaixai) (xaixai) (xaixai) (xaixai) (xaixai)


Първо ми кажи каде ти е това $character и каде видя в memb___id да пише името на героя?