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

Е не е възможно да не работи.Би треало да работи |-(
Възможен Проблем със Дата базите |-(
 
Е не е възможно да не работи.Би треало да работи |-(

Отвори MEMB_STAT и виж ConnectStat как ти го дава при теб съмнявам са те е различно :) дали с 1 или друга цифра
 
Ако и така не стане нз нямам идей вече :D

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 * from MEMB_STAT where ConnectStat='0' and memb___id='$username'";
$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>";
} 
 }
  }
?>
 
Отвори MEMB_STAT и виж ConnectStat как ти го дава при теб съмнявам са те е различно :) дали с 1 или друга цифра

С 1 си е... Не знам защо става така...
 
Ако и така не стане нз нямам идей вече :D

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 * from MEMB_STAT where ConnectStat='0' and memb___id='$username'";
$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>";
} 
 }
  }
?>

нее (tmi)(tmi);(
 
Последен опит от мен :s Казвай ако ти исписва нещо !

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 * from MEMB_STAT where ConnectStat='0' and memb___id='$username'");
$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>";
} 
 }
  }
?>
 
Последен опит от мен :s Казвай ако ти исписва нещо !

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 * from MEMB_STAT where ConnectStat='0' and memb___id='$username'");
$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>";
} 
 }
  }
?>

Успешно се ресвам...
 
В такъв случай трябва да е така.И отново ако можеш да реснеш |-(

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 * from MEMB_STAT where ConnectStat='1' and memb___id='$username'");
$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>";
} 
 }
  }
?>
 
В такъв случай трябва да е така.И отново ако можеш да реснеш |-(

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 * from MEMB_STAT where ConnectStat='1' and memb___id='$username'");
$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>";
} 
 }
  }
?>

Познай ;(
 
Пак ли ресна да му се невиди ?
Съжалявам опитах по няколко начина ама явно не се получава. :s
 
  • Like
Reactions: Babaka
Пак ли ресна да му се невиди ?
Съжалявам опитах по няколко начина ама явно не се получава. :s

Мерси, че се опита
 
от тази тема ако схванеш как става ще си го оправиш , дадоха някви гешни работи но не рабоха и малко като си редактирах скрипта и се получи перфектно http://darksteam.net/showthread.php?t=7613
 
С 1 си е... Не знам защо става така...

Виж сега при последният скрипт който съм ти дал съм направил:

$resmoney = '0';
$reslevel = '1';

парите и левела да е на 0, че ме мързи да адвам постоянно да не е от това да рестартваш постоянно? Иначе си проверява за героят дали е налиния смисал акаунта дали е на линия :)
 
<?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 = '0';
$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>";
}
}
}
?>


би тряяло да е така :)
 
@banned Не работи.
@Backo Промених го, но пак се ресвам.
@LasTPr0 Не работи.
 
ае пич виж нещу ти не правиш като хората..
 
Е как да не правя като хората... Просто заменям стария код с този, който Вие ми давате.

Таблицата си ми е MEMB_STAT
 
Е как да не правя като хората... Просто заменям стария код с този, който Вие ми давате.

Таблицата си ми е MEMB_STAT

При всички други работи само при теб не (think)
Направи снимка на таблицата да видим какво има в нея :)