Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once "../global.php";
- if(!isset($_SESSION['doHabbo'])) {
- header("Location: ../index");
- }
- if(isset($_SESSION['dHM'])) {
- header("Location: panel");
- }
- if(isset($_POST['management'])) {
- $username = $core->clean($_POST['manageUser']);
- $password = $core->clean(md5($_POST['managePass']));
- if($username !== null && $password !== null) {
- if($users->validName($username)) {
- if($users->getUser('rank', $username) > 3) {
- if($users->validateUser($username, $password)) {
- $_SESSION['dHM'] = $username;
- header("Location: panel");
- }
- else {
- $tpl->setParam('error', '<div class="error">The username or password is incorrect.</div>');
- }
- }
- else {
- $tpl->setParam('error', '<div class="error">You are not of high enough rank to use this.</div>');
- }
- }
- else {
- $tpl->setParam('error', '<div class="error">Please enter a valid username.</div>');
- }
- }
- else {
- $tpl->setParam('error', '<div class="error">Please fill in all fields.</div>');
- }
- }
- $tpl->doTop('Management : Login');
- $tpl->getPage('index');
- $tpl->doBottom();
- $tpl->output();
- ?>
Add Comment
Please, Sign In to add comment