Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*==========================================================================\
- | LeightCMS - Content Management System for Habbo Hotel Private Servers |
- | Compatible with PhoenixEmulator 3.0 (+ higher builds) |
- | ==========================================================================|
- | Revision: 1 Copyright (c) Livar Shekhani Build: 0.2 |
- | My thanks fly to: Jospiek, and Kryptos! |
- | ==========================================================================|
- | Attention: If any bugs occur contact Livar on RaGEZONE |
- \==========================================================================*/
- //Running some required statementS
- include 'leight.php';
- //Adding our Page and some Parameters!
- $tpl->AddParam("Login_Error", "");
- if(isset($_POST["login_username"]) && isset($_POST["login_password"]))
- {
- $username = $_POST['login_username'];
- $query = $db->prepare("SELECT * FROM `users` WHERE username = '$username'")->execute();
- if($query->num_rows() == 1)
- {
- $password = $app->passwordHash($_POST['login_password']);
- $query_login = $db->prepare("SELECT `password` FROM `users` WHERE username = '$username'")->execute();
- $correct = $query_login->result();
- if($correct == $password)
- {
- $_SESSION['Leight_Username'] = $username;
- Header("Location: me.php");
- }
- else
- {
- $tpl->AddParam('Login_Error', 'Invalid password combination!');
- }
- }
- else
- {
- $tpl->AddParam('Login_Error', 'Username does not exist!');
- }
- }
- //Add our Page
- $tpl->AddTemplate('page-frontpage');
- ?>
Add Comment
Please, Sign In to add comment