[Help] Един Скрипт

Archon

New Member
Joined
Apr 13, 2010
Messages
325
Reaction score
25
Може ли някой да едитне този скрипт за Disconnect да работи на Open MU Web Clone .

БЛАГОДАРЯ ПРЕДВАРИТЕЛНО !

PHP:
<script language="JavaScript" type="text/JavaScript">
//<![CDATA[
function validate(form)
{


if (form.acc.value =="") {
        form.acc.focus();
        alert("<? echo text_enter_account; ?>.");
        return false;
    }
    var filter  = /^([a-zA-Z0-9\-\_])+$/;
    if (!filter.test(form.acc.value)) {
        form.acc.focus();
        alert('<? echo text_invalid_account; ?>.');
        return false;
    }
    
    if (form.acc.value.length<4) {
        form.acc.focus();
        alert("<? echo text_notlongenough_account; ?>.");
        return false;
    }
    
if (form.pass.value =="" ) {
        form.pass.focus();
        alert("<? echo text_enter_password; ?>.");
        return false;
    }
        var filter  = /^([a-zA-Z0-9\-\_])+$/;
    if (!filter.test(form.pass.value)) {
        form.pass.focus();
        alert('<? echo text_invalid_password; ?>.');
        return false;
    }
    if (form.pass.value.length<4) {
        form.pass.focus();
        alert("<? echo text_notlongenough_password; ?>.");
        return false;
    }
    
  
}
</script>
<table width="331" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><div align="center">
<form action="" method="post" name="fixacc" id="fixacc">
                    <table align="center"  width="340" border="0" cellspacing="2" cellpadding="2">
                   <tr>
                        <td><div align="right" class="normal_text_white"><? echo text_account; ?></div></td>
                        <td colspan="4"><div align="left">
                            <input name="acc" type="text" class=input id="acc" size="14" maxlength="10" value="">
                        </div></td>
                      </tr>
                      <tr>
                        <td><div align="right" class="normal_text_white"><? echo text_password; ?></div></td>
                        <td colspan="4"><div align="left">
                            <input name="pass" type="password" class=input  id="pass" size="14" maxlength="10" value="">
                        </div></td>
                      </tr>
                      </table>
                      <table align="center">
                 <tr><td><label>
      <INPUT type="hidden" value="1" name="fix_account">
    <input type="submit" name="submit" value="Fix Account" class="button" onClick="return validate(document.fixacc);">
      </label></td></tr>
      
</FORM> </div></td>
  </tr>
</table>
<?php
If(isset($_POST['fix_account'])){
include("config.php");
$acc=clean_var($_POST[acc]);
$pass=clean_var($_POST[pass]);


 if($devilmu['md5'] == 0){
$query3=mssql_num_rows(mssql_query("select memb___id from memb_info where memb___id='$acc' and memb__pwd='$pass'"));
}
if($devilmu['md5'] == 1){
$query3=mssql_num_rows(mssql_query("select memb___id from memb_info where memb___id='$acc' and memb__pwd=[dbo].[fn_md5]('$pass','$acc')"));
}
if($query3 < 1){$error=1;
 show_error("".text_wrong_acc_pass.".");  }



If($error!=1){

function ascii2hex($ascii) {    
$hex = '';    
for ($i = 0; $i < strlen($ascii); $i++) {
$byte = strtoupper(dechex(ord($ascii{$i})));
$byte = str_repeat('0', 2 - strlen($byte)).$byte;
$hex.=$byte." ";    
}        
$hex=str_replace(" ", "", $hex);        
return $hex;
}

function hex2ascii($hex){
$ascii='';
$hex=str_replace(" ", "", $hex);
for($i=0; $i<strlen($hex); $i=$i+2) {
$ascii.=chr(hexdec(substr($hex, $i, 2)));
}
return($ascii);
}

function dc_user($host, $port, $acc){
$mystring = "C11405";
$mystring .= ascii2hex($acc);
$zeros = strlen($mystring);
for ($i;$i<=39-$zeros;$i++){
$mystring .="0";
}
 $packet = hex2ascii($mystring);
 $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
 if (!$x = @socket_connect($socket, $host, $port))
 {
 show_error("Server is Offline");
 }
 else{
 socket_write($socket, $packet, strlen($packet));
 socket_close($socket);
 show_ok("Your account is fixed. You can connect approximately in 10 seconds.");
 }
}    

dc_user("127.0.0.1", "55432", $acc);            

}
}

?>
</table>
 
И на мен ми трябва за xtyling сайта.
 
май на никой нему се занимава :D
 
Чакайте ся за диск на ацц или за Already Connect Account ... сещате се .. :Д
Щото малко немога да разбера кво точно искате (wasntme)
 
Чакайте ся за диск на ацц или за Already Connect Account ... сещате се .. :Д
Щото малко немога да разбера кво точно искате (wasntme)

Проблема е следния някои път когато някой герой напусне играт аи пробва да влезе му пише че е Онлайн и неможе пише ми че ацц то е онлайн [Already Connect Account ]
 
Говорим за едно и също :) Ето направих за XTYLING Web не съм го тест но се надявам да работи, после може да се опитам и за Опен уеба ;)
Ако има проблеми кажете ...


ПС:Ето и за Опен Уеба, тествайте и кажете дали работи !

Това слагате в modules.class.php

PHP:
function already_fix()
{

$account = secure($_POST['login']);
$password = secure($_POST['password']);

check_inject();

$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);

$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);

$querypassword = mssql_query("Select * from MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$passwordcheck = mssql_num_rows($querypassword);

if(empty($account) or empty($password)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($passwordcheck <= 0) { echo"<font color='red'>Your Password does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
else
{
if($onlinecheck  == 0) { echo"<font color='red'>Account $account is offline!Don't have need to fix!</font><br>"; $error=1;}

if($error != 1)
{
echo"<font color='green'>Account $account is successfully fixed!</font><br>";

if ($onlinecheck > 0){
$a = "Update MEMB_STAT SET connectstat='0' WHERE memb___id='$account'";}
$go = mssql_query($a);
}
}
}

Ето и модула:
 

Attachments

  • already-fix (Open Mu Web).rar
    461 bytes · Views: 7
  • Fix Already (XTYLING Web).rar
    2 KB · Views: 3
Last edited:
Говорим за едно и също :) Ето направих за XTYLING Web не съм го тест но се надявам да работи, после може да се опитам и за Опен уеба ;)
Ако има проблеми кажете ...


ПС:Ето и за Опен Уеба, тествайте и кажете дали работи !

Това слагате в modules.class.php

PHP:
function already_fix()
{

$account = secure($_POST['login']);
$password = secure($_POST['password']);

check_inject();

$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);

$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);

$querypassword = mssql_query("Select * from MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$passwordcheck = mssql_num_rows($querypassword);

if(empty($account) or empty($password)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($passwordcheck <= 0) { echo"<font color='red'>Your Password does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
else
{
if($onlinecheck  == 0) { echo"<font color='red'>Account $account is offline!Don't have need to fix!</font><br>"; $error=1;}

if($error != 1)
{
echo"<font color='green'>Account $account is successfully fixed!</font><br>";

if ($onlinecheck > 0){
$a = "Update MEMB_STAT SET connectstat='0' WHERE memb___id='$account'";}
$go = mssql_query($a);
}
}
}

Ето и модула:



Мерси сега ще го тест



Edit : всичко бачка без проблем БЛАГОДАРЯ МНОГО
 
Last edited:
Дайте по 1 "Thanks" поне де (wasntme)