Jump to content

Recommended Posts

Posted

Ok guys I try to run this account manager from here (L2Accout PTS)  http://www.4shared.com/file/lwOEe_ZT/l2_scripts_for_website_by_1fil.htm.

 

first of alli get this error Fatal error: Call to undefined function session_register() in index.php on line 2

 

Here index

 

<?php
session_register("kekel");
include ("security.php");
?>
<?
if ((isset($_POST['account'])) 
&& (isset($_POST['password'])) 
	&& (isset($_POST['code'])))
{


require "header.php";
require "fun.php";
require "configpw.php";
require "querypw.php";
require "functionspw.php";

$account = htmlspecialchars($_POST['account']);
$passwordINJEC = htmlspecialchars($_POST['password']);
$code = htmlspecialchars($_POST['code']);
$securitycode = $_SESSION['kekel'];
$x01 = false;
$x02 = false;
$x03 = false;
$x04 = false;
$x05 = false;
$x06 = false;

if (($account =="") || ($passwordINJEC =="") || ($code ==""))
	die("<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><h2><center>".$language[$dlang][61]."</center></h2><br /><br /><meta http-equiv="refresh" content="6; url=index.php">");

//Code Security
if (($code == $securitycode))
	{
	$x01 = true;
	$x02 = true;
	}
    else
			{	die("
					<br /><br /><br /><br />
					<table cellspacing="0" cellpadding="0" border="0" align="center" width="629px" height="402px">
					<tr><td class="TablePrincipal">
					<table width="300px" height="120px" class="Quadro" align="center">
					<tr><td>
					<table width="98%" border="0" align="right" cellpadding="0" cellspacing="0">
					<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
					<tr><td class="Msg" height="30">".$language[$dlang][20]."!<br />".$language[$dlang][21]."<br /><br />
					</td></tr>
					</table></table></table>
					<meta http-equiv="refresh" content="5; url=index.php">
			   ");	
			}  
//Account Security
if (ctype_alnum($account) ==true)
	{$x03 = true;}
else
		{	die("
					<br /><br /><br /><br />
					<table cellspacing="0" cellpadding="0" border="0" align="center" width="629px" height="402px">
					<tr><td class="TablePrincipal">
					<table width="300px" height="120px" class="Quadro" align="center">
					<tr><td>
					<table width="98%" border="0" align="right" cellpadding="0" cellspacing="0">
					<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
					<tr><td class="Msg" height="30">".$language[$dlang][7]."<br /><br />
					</td></tr>
					</table></table></table>
					<meta http-equiv="refresh" content="5; url=index.php">
			   ");	
		}
if ((strlen($account) > 3) || (strlen($account) <13))
	{$x04 = true;}
else
			{die("
					<br /><br /><br /><br />
					<table cellspacing="0" cellpadding="0" border="0" align="center" width="629px" height="402px">
					<tr><td class="TablePrincipal">
					<table width="300px" height="120px" class="Quadro" align="center">
					<tr><td>
					<table width="98%" border="0" align="right" cellpadding="0" cellspacing="0">
					<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
					<tr><td class="Msg" height="30">".$language[$dlang][13]."<br /><br />
					</td></tr>
					</table></table></table>
					<meta http-equiv="refresh" content="5; url=index.php">
			   ");	
			}
//Password Security
if (ctype_alnum($passwordINJEC) ==true)
	{$x05 = true;}
    else
			{die("
					<br /><br /><br /><br />
					<table cellspacing="0" cellpadding="0" border="0" align="center" width="629px" height="402px">
					<tr><td class="TablePrincipal">
					<table width="300px" height="120px" class="Quadro" align="center">
					<tr><td>
					<table width="98%" border="0" align="right" cellpadding="0" cellspacing="0">
					<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
					<tr><td class="Msg" height="30">".$language[$dlang][15]."<br /><br />
					</td></tr>
					</table></table></table>
					<meta http-equiv="refresh" content="5; url=index.php">
			   ");	
			}
if ((strlen($passwordINJEC) > 3) || (strlen($passwordINJEC) <17))
	{$x06 = true;}
else
		{	die("
					<br /><br /><br /><br />
					<table cellspacing="0" cellpadding="0" border="0" align="center" width="629px" height="402px">
					<tr><td class="TablePrincipal">
					<table width="300px" height="120px" class="Quadro" align="center">
					<tr><td>
					<table width="98%" border="0" align="right" cellpadding="0" cellspacing="0">
					<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
					<tr><td class="Msg" height="30">".$language[$dlang][16]."<br /><br />
					</td></tr>
					</table></table></table>
					<meta http-equiv="refresh" content="5; url=index.php">
			   ");	
		}

//Auth Account
if(($x01 ==true) && ($x02 ==true) && ($x03 ==true) && ($x04 ==true) && ($x05 ==true) && ($x06 ==true))
{
		connectdb($CONFIG['dbdbname'], $CONFIG['dbaddress'], $CONFIG['dbuser'], $CONFIG['dbpass']);
		$login=trim($account);
		$pwd = encrypt($passwordINJEC);
		$result = mssql_query("SELECT account, password FROM lin2db.dbo.user_auth WHERE account='$login'");
			while($array = mssql_fetch_array($result)) 
				{
				$login2 = $array['account'];
				$pwd2 = $array['password'];
				}
		$pwd2 = '0x' . bin2hex($pwd2);
		mssql_close() or die('Error closing link to MSSQL server');

		if (($login == $login2) && ($pwd == $pwd2))
			{

								connectdb($CONFIG['dbdbname'], $CONFIG['dbaddress'], $CONFIG['dbuser'], $CONFIG['dbpass']);
								$login2 = trim($login2);
								$result = mssql_query("SELECT user_auth.account, user_account.uid, user_auth.password, ssn.ssn, ssn.reg_date, ssn.email FROM 			(user_auth LEFT JOIN ssn ON user_auth.account = ssn.name) INNER JOIN user_account ON user_account.account = user_auth.account WHERE user_auth.account='$login2'");
								while($array = mssql_fetch_array($result)){
									$emailstring = $array['email'];
									$acc = $array['account'];
									$ssn = $array['ssn'];
									$uid = $array['uid'];
									$regdate = $array['reg_date'];}

								$ssn = base64_encode($ssn);
								$uid = base64_encode($uid);
								$acc = base64_encode($acc);
								$emailstring = base64_encode($emailstring);
								$regdate = base64_encode($regdate);
								mssql_close() or die('Error closing link to MSSQL server');
								$ysite = $CONFIG['ysite'];
								$ysite2 = $CONFIG['ysite2'];

						die("
							<br /><br /><br /><br />
							<table cellspacing="0" cellpadding="0" border="0" align="center" width="629px" height="402px">
							<tr><td class="TablePrincipal">
							<table width="300px" height="120px" class="Quadro" align="center">
							<tr><td>
							<table width="98%" border="0" align="right" cellpadding="0" cellspacing="0">
							<tr><td class="L2Server">".$language[$dlang][59]."<br /><br /><br /></td><td class="texto">[".$login."]<br /><br /><br /></td></tr>
							<tr><td class="L2Server">".$language[$dlang][62]."<br>".$language[$dlang][62]."<br>".$language[$dlang][62]."<br><a href="".$ysite."/".$ysite2."/resetpassword.php?Sd98!-@=".$ssn."&AI2s_9mY=".$uid."&AEds!8_2=".$acc."&AEDyhs1=".$emailstring."&ASD87_Ax=".$regdate."" target="_blank">".$language[$dlang][63]."</a></td><td class="texto"><a href="".$ysite."/".$ysite2."">".$language[$dlang][32]."</a></td></tr>
							</table></table></table>
			   ");	
			}
		else
			{		
				die("
					<br /><br /><br /><br />
					<table cellspacing="0" cellpadding="0" border="0" align="center" width="629px" height="402px">
					<tr><td class="TablePrincipal">
					<table width="300px" height="120px" class="Quadro" align="center">
					<tr><td>
					<table width="98%" border="0" align="right" cellpadding="0" cellspacing="0">
					<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
					<tr><td class="Msg" height="30">".$language[$dlang][21]."<br /><br />
					</td></tr>
					</table></table></table>
					<meta http-equiv="refresh" content="5; url=index.php">
			   ");	
			}


}		
else
		{		
			die("
					<br /><br /><br /><br />
					<table cellspacing="0" cellpadding="0" border="0" align="center" width="629px" height="402px">
					<tr><td class="TablePrincipal">
					<table width="300px" height="120px" class="Quadro" align="center">
					<tr><td>
					<table width="98%" border="0" align="right" cellpadding="0" cellspacing="0">
					<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
					<tr><td class="Msg" height="30">".$language[$dlang][53]."!<br />".$language[$dlang][55]."<br /><br /></td></tr>
					<tr><td class="Msg" height="30"><b>".$language[$dlang][54].".</b><br /><b>".$language[$dlang][56].".</b><br /><br /></td></tr>
					</table></table></table>
			  ");
		}
require "footer.php";
}
else{
	require "header.php";
	require "fun.php";
				echo '
				<script type="text/javascript">
				function isAlphaNumeric(value) {
				if (value.match(/^[a-zA-Z0-9] $/)) {
					return true;
				} else {
					return false;
					}
				}
				function isEmailAddress(email) {
					if (email.match(/^([a-zA-Z0-9]) ([.a-zA-Z0-9_-])*@([a-zA-Z0-9_-]) (.[a-zA-Z0-9_-] ) /)) {
						return true;
					} else {
						return false;
					}
				}
				function checkform1(nomeform) {

					if(nomeform.code.value=="") {
						alert("'.$language[$dlang][19].'");
						return false;
					}
					if(nomeform.account.value=="") {
						alert("'.$language[$dlang][6].'");
						return false;
					}
					if (!isAlphaNumeric(nomeform.account.value)) {
						alert("'.$language[$dlang][7].'");
						return false;
					}
					pwLEN =	nomeform.account.value.length;
					if (pwLEN < 4 || pwLEN > 12) {
						alert("'.$language[$dlang][13].'");
						return false;
					}
					if(nomeform.email.value=="") {
						alert("'.$language[$dlang][8].'");
						return false;
					}
					if (!isEmailAddress(nomeform.email.value)) {
						alert("'.$language[$dlang][9].'");
						return false;
					}
					pw2LEN = nomeform.email.value.length;
					if (pw2LEN < 6 || pw2LEN > 50) {
						alert("'.$language[$dlang][16].'");
						return false;
					}
				return true;
				}
				</script>
			';

			echo"	<br /><br /><br /><br />n";
			echo"	<table cellspacing="0" cellpadding="0" border="0" align="center" width="629px" height="402px">n";
			echo"	<tr><td class="TablePrincipal">n";
			echo"	<table width="300px" height="130px" class="Quadro" align="center">n";
			echo"	<tr><td>n";
			echo"	<form name="register" id="register" method="post" action="index.php" onsubmit="return checkform1(this)">n";
			echo" 	<table width="98%" border="0" align="right" cellpadding="0" cellspacing="0">n";
			echo" 	<tr><td class="L2Server">".$language[$dlang][59]."</td></tr>n"; 
			echo" 	<tr><td class="Texto"><label for="account" title="L2AccountZS">".$language[$dlang][1]."</label></td>n"; 
			echo" 	<td height="30"><label for="account" title="Account"><input type="text" class="Campo" id="account" maxlength="12" name="account" /></label></td></tr>n"; 
			echo" 	<tr><td class="Texto"><label for="password" title="L2AccountZS">".$language[$dlang][3]."</label></td>n"; 
			echo" 	<td height="30"><input type="password" class="Campo" name="password" id="password" maxlength="16" /></td></tr>n"; 
			echo" 	<tr><td class="Texto"><label for="code" title="L2AccountZS">".$language[$dlang][5]."</label></td>n"; 
			echo" 	<td height="30"><input type="text" class="CampoCode" name="code" id="code" maxlength="5" />  <img src="captcha.php" alt="Security Code" width="50" height="18" /></td></tr>n"; 
			echo" 	<tr><td colspan="2" height="30" align="center"><input type="button" class="Botao" name="lostpassword" value="".$language[$dlang][11]."" onclick="redirectPage()" /> <input type="button" class="Botao" name="register" value="".$language[$dlang][10]."" onclick="redirectPagezeta()" /> <input type="reset" class="Botao" name="reset" value="".$language[$dlang][12]."" /> <input type="submit" class="Botao" name="login" value="".$language[$dlang][58]."" /> </td></tr>n"; 
			echo" 	</table>n"; 
			echo" 	</form>n";
			echo"	</td></tr></table>n";
			echo"	</td></tr></table>n";
			require "footer.php";
}
?>

 

But I think it'sproblem with captcha. here's the captcha.php

 

<?
session_start();
$new_string;
srand((double)microtime()*1000000);
$string = md5(rand(0,9999));
$new_string = substr($string, 17, 5);
$_SESSION['kekel'] = $new_string;
$imgName = "verify.gif";
$im = ImageCreate(50, 18);
$white = ImageColorAllocate($im, 75,70,71);
$black = ImageColorAllocate($im, 125,241,245);
ImageFill($im, 0, 0, $white);
ImageString($im, 3, 4, 5, $new_string, $black);
ImagePNG($im, $imgName);
ImageDestroy($im);
$fp = fopen($imgName, "r");
$content = fread($fp, filesize($imgName));
header("Content-type: image/gif");
echo $content;
?>

 

any minds? Or someone knows another workig acm?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...