Jump to content
  • 0

problema panel


Narcis

Question

Salut am o problema la panel mai exact la login 

scriu user si pass si nu ma logheaza pe panel.

am adaugat niste poze din panel cu problema

site www.rzc.ro/panel

cum as putea sa rezolv problema?

asta este codul de la login.p.php

<?php
if(!defined('rpg'))
	die('Nope.');
?>
<title>Login - Blumix</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 Blumix! <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 `users` WHERE `name` = ? AND `password` = ?');
		                $q->execute(array($_POST['username_'],hash( 'md5', $_POST['password_'])));
					$count = 0;
					if($q->rowCount())
					{
						$row = $q->fetch(PDO::FETCH_OBJ);
						$d = Config::$g_con->prepare('SELECT * FROM `suspended` WHERE `user` = ?');
						$d->execute(array($row->id));
						while($rowd = $d->fetch(PDO::FETCH_OBJ)) {
							if((strtotime($rowd->stime) - strtotime(date('Y-m-d'))) > 0)
							{
								$count++;
								echo '<div class="alert alert-danger alert-dissmisible" style="margin-left: 0px">This account is suspended until <b>'.$rowd->stime.'</b> by reason: <b>'.$rowd->reason.'</b>.</div>';
							}
						}
						if(!$q->rowCount() || $count == 0)
						{
							$_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>

 

login.png

login 1.png

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   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...

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.