final public function loginHK()
{
global $template, $_CONFIG, $core;
if(isset($_POST['login']))
{
$template->form->setData();
unset($template->form->error);
if(isset($template->form->username) && isset($template->form->password))
{
if($this->nameTaken($template->form->username))
{
if($this->userValidation($template->form->username, $core->hashed($template->form->password)))
{
if(($this->getInfo($_SESSION['user']['id'], 'rank')) >= 4)
{
$_SESSION["in_hk"] = true;
header("Location:".$_CONFIG['hotel']['url']."/ase/dash");
exit;
}
else
{
$template->form->error = 'Incorrect access level.';
return;
}
}
else
{
$template->form->error = 'Incorrect password.';
return;
}
}
else
{
$template->form->error = 'User does not exist.';
return;
}
}
if(($this->getInfo($_SESSION['user']['id'], 'rank')) >= 4)
To make a tab for it just put {housekeeping} where you want the tab.
To edit what ranks can, go to
app/class.users.php
EditPHP:final public function loginHK() { global $template, $_CONFIG, $core; if(isset($_POST['login'])) { $template->form->setData(); unset($template->form->error); if(isset($template->form->username) && isset($template->form->password)) { if($this->nameTaken($template->form->username)) { if($this->userValidation($template->form->username, $core->hashed($template->form->password))) { if(($this->getInfo($_SESSION['user']['id'], 'rank')) >= 4) { $_SESSION["in_hk"] = true; header("Location:".$_CONFIG['hotel']['url']."/ase/dash"); exit; } else { $template->form->error = 'Incorrect access level.'; return; } } else { $template->form->error = 'Incorrect password.'; return; } } else { $template->form->error = 'User does not exist.'; return; } }
PHP:if(($this->getInfo($_SESSION['user']['id'], 'rank')) >= 4)