Е не е възможно да не работи.Би треало да работи |-(
<?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 или друга цифра
Ако и така не стане нз нямам идей вече
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>"; } } } ?>
<?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>"; } } } ?>
<?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
С 1 си е... Не знам защо става така...
Е как да не правя като хората... Просто заменям стария код с този, който Вие ми давате.
Таблицата си ми е MEMB_STAT