- 0
Problema login panel burned
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
Question
Spikee.
Salut.
Am o problemă la panel burned, nu mă bagă cand mă loghez imi dă login failed. Mai jos aveti cod cu login.p.php si config.
<?php
if(!defined('RPG')) return;
date_default_timezone_set('Europe/Bucharest');
DB::$db['mysql'] = [
'host' => 'dsadsada',
'username' => 'dsadasdas',
'password' => 'dsadsadas',
'dbname' => 'dsadasdasdsadas'
];
Config::$data = (object) [
'site_name' => 'RTimes Panel',
'url' => 'http://rtimes.ro/panel/',
'url_forum' => '#',
];
DB::$tbl = (object) [
'a' => (object) [
'tblname' => 'users',
'id' => 'id',
'name' => 'name',
'password' => 'password',
'register' => 'RegisterDate',
'hplayed' => 'ConnectedTime',
'mplayed' => 'HoursMonth',
'status' => 'Status',
'member' => 'Member',
'skin' => 'CChar',
'laston' => 'lastOn',
'admin' => 'Admin',
'helper' => 'Helper',
'leader' => 'Leader',
'warns' => 'Warnings',
'fwarn' => 'FWarn',
'fpunish' => 'FPunish',
'rank' => 'Rank',
'level' => 'Level',
'respect' => 'Respect',
'job' => 'Job',
'email' => 'Email',
'married' => 'Propose',
'premium' => 'Premium',
'car' => 'CarLic',
'fly' => 'FlyLic',
'boat' => 'BoatLic',
'fish' => 'FishLic',
'gun' => 'GunLic',
'money' => 'Money',
'bank' => 'Bank',
'phnumber' => 'PhoneNr',
'mats' => 'Materials',
'drugs' => 'Drugs',
'coins' => 'GoldPoints',
'ban' => 'Banned',
],
'h' => (object) [
'tblname' => 'houses',
'owner' => 'Owner',
'text' => 'Discription',
'price' => 'Value',
],
'v' => (object) [
'tblname' => 'cars',
'model' => 'Model',
'price' => 'Value',
'owner' => 'Owner',
'km' => 'KM',
],
'ds' => (object) [
'tblname' => 'dsveh',
'model' => 'Model',
'price' => 'Price',
'speed' => 'MaxSpeed',
],
'b' => (object) [
'tblname' => 'bizz',
'owner' => 'Owner',
'text' => 'Message',
'price' => 'BuyPrice',
'entercost' => 'EntranceCost',
],
'sb' => (object) [
'tblname' => 'sbizz',
'owner' => 'Owner',
'text' => 'Discription',
'price' => 'BuyPrice',
'entercost' => 'EntranceCost',
],
'ban' => (object) [
'tblname' => 'banlog',
'banned' => 'player',
'admin' => 'admin',
'time' => 'day',
'reason' => 'reason',
'expire' => 'day',
],
't' => (object) [
'tblname' => 'tickets_panel',
'id' => 'ID',
'name' => 'Nickname',
'ticket' => 'Ticket',
'status' => 'Status',
'created' => 'Created',
],
'comm' => (object) [
'tblname' => 'commentaries',
'id' => 'ID',
'name' => 'Nickname',
'comment' => 'Comment',
'time' => 'Time',
'category' => 'Category',
'cat_id' => 'Cat_id',
],
'banrq' => (object) [
'tblname' => 'unban_req',
'id' => 'ID',
'name' => 'User_ID',
'status' => 'User_Status',
],
'factions' => (object) [
'tblname' => 'factions',
'id' => 'ID',
'level' => 'Level',
'app' => 'App',
],
'fac_ques' => (object) [
'tblname' => 'apply_ques',
'id' => 'ID',
'faction' => 'Faction',
'quest' => 'Questions',
'tquest' => 'TQuestions',
],
'fac_app' => (object) [
'tblname' => 'app_factions',
'id' => 'ID',
'name' => 'UserID',
'text' => 'Text',
'faction' => 'Faction',
'status' => 'Status',
'created' => 'Time',
],
'lh' => (object) [
'tblname' => 'leadhelp_req',
'id' => 'ID',
'name' => 'UserID',
'first' => 'Text1',
'second' => 'Text2',
'category' => 'Category',
'status' => 'Status',
'created' => 'Created',
'faction' => 'Faction',
],
'a_p' => (object) [
'tblname' => 'admin_panel',
'id' => 'ID',
'category' => 'Category',
'time' => 'Time',
'status' => 'Status',
],
];
<?php
if(isset($_SESSION['user'])) Redirect::to('profile');
?>
<div class="pageTitle"><h3>Sign in</h3></div>
<div id="contentMain">
<div id="contentPage">
<div class="subPageContainer">
<div class="subPageContainer">
<div class="subPageTitleLeft pageTitle">Sign in into your account</div>
</div>
<div class="normalContentBox">
<?php
if(isset($_POST['Login']))
{
if(strlen($_POST['nume']) && strlen($_POST['parola']))
{
$q = DB::prepare("SELECT `".DB::$tbl->a->id."` FROM `".DB::$tbl->a->tblname."` WHERE `".DB::$tbl->a->name."` = ? AND `".DB::$tbl->a->password."` = ?");
$q->execute(array($_POST['nume'],md5($_POST['parola'])));
if($q->rowCount())
{
echo '<font color="green"><center>You\'ve been logged with successfuly! Wait for redirect...</center></font><br><br>';
while($row = $q->fetch(PDO::FETCH_OBJ)) {
$_SESSION['user'] = $row->{DB::$tbl->a->id};
Redirect::to('profile');
}
} else {
echo '<center>Login failed</center><br><br>';
}
} else echo '<center><font color="red"><strong>Complete every field!</strong></font></center><br>';
}
?>
<form action="" method="post">
<table border="0" cellspacing="0" cellpadding="0" width="380" align="center">
<tbody>
<tr>
<td width="80">
<div class="formLabel"><span class="text">Name</span>: </div>
</td>
<td width="300" class="textarea">
<input name="nume" type="text" class="textarea" id="nume"><br><br>
</td>
</tr>
<tr>
<td>
<div class="formLabel"><span class="text">Password</span>: </div>
</td>
<td><input name="parola" type="password" class="textarea" id="parola"></td>
</tr>
<tr>
<td colspan="2">
<br>
<div align="center"><input class="loginButton" name="Login" type="submit" id="Login" value="Login"></div>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
</div>
</div>
Multumesc de ajutor! p.s nu am parole criptate.
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now