Jump to content
  • 0

Problema parole criptate...


VeLo

Question

Problema intalnita (descriere): Pai  am descarcat panel-ul reinforce si acel panel nu are MD5 hash.. si vreau sa-l fac cu MD5 hash. Help me PLEASE.
Ero(area / rile) / warning-(ul / urile): --
Liniile de cod / sursa / script-ul(obligatoriu): 

<?php
if(!defined('rpg'))
	die('Nope.');
?>
<title>Login - ReInForce.ro</title>
<body class="login_wrapper">
	<div class="form-box login_box" id="login-box">
		<div class="header bg-red" style="font-size: 1.3em;">Welcome to ReInForce RPG! <br> Please type your account below.</div>
		<form action="" method="post">
		<fieldset>
		<div class="body bg-gray">
			<?php
			$count[0] = 0;
			$count[1] = 0;
			if(isset($_SESSION['user'])) header('Location: ' . $_PAGE_URL . 'profile/'.$_SESSION['user'].'');
			if(isset($_POST['submit'])) {
				if(!$_POST['username_'] || !$_POST['password_']) {
					echo '<div class="alert alert-danger alert-dissmisible" style="margin-left: 0px">Invalid username or password.<br>Please try again.</div>';
				} else {
					$q = Config::$g_con->prepare('SELECT * FROM `players` WHERE `Name` = ? AND `password` = ?');
					$q->execute(array($_POST['username_'],$_POST['password_']));
					if($q->rowCount()) $count[0]++;
					
					$dd = Config::$g_con->prepare('SELECT * FROM `players` WHERE `AName` = ? AND `password` = ?');
					$dd->execute(array($_POST['username_'],$_POST['password_']));
					if($dd->rowCount()) $count[1]++;
					
					if($count[0] > 0 || $count[1] > 0)
					{
						if($count[0] > 0 && $count[1] == 0) $row = $q->fetch(PDO::FETCH_OBJ);
						if($count[0] == 0 && $count[1] > 0) $row = $dd->fetch(PDO::FETCH_OBJ);
						if($count[0] > 0 && $count[1] > 0) $row = $dd->fetch(PDO::FETCH_OBJ);
						$_SESSION['user'] = $row->ID;
						echo '<div class="alert alert-success" style="margin-left: 0px">You have successfully logged in. You will be redirected in <b>3</b> seconds.</div>';
						echo '<meta http-equiv="refresh" content=" 3;' . Config::$_PAGE_URL . 'profile/'.$_SESSION['user'].'">';
					}
					else echo '<div class="alert alert-danger alert-dissmisible" style="margin-left: 0px">Invalid username or password.<br>Please try again.</div>';
				}
			}
			?>
			<div class="form-group">
				<input name="username_" type="text" class="form-control" placeholder="Username">
			</div>
			<div class="form-group">
				<input name="password_" type="password" class="form-control" placeholder="Password">
			</div>
		</div>
		<div class="footer">                                                               
			<button type="submit" name="submit" class="btn bg-red btn-block">Log in</button>  
		</div>
		</fieldset>
		</form>
	</div>
</body>


Imagini / Video (optional): 
Ati incercat sa rezolvati singur?:  Da am mditat, dar degeaba..

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Nu este o problema de scriptng, cauta pe net, foloseste un panel care nu are md5 sau fa gmul fara md5

Edited by Mister

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.