Question.

Stevee

Posting Freak
Mar 29, 2011
580
35
Hiya, I was wondering on the habbo theme by heluja, how would I add a tab for housekeeping? So people that're the proper rank can access housekeeping? If you could assist me that'd be great, thank you!!


Thanks,
Stevee.
 

Legion

Gaming Lord
Staff member
Nov 23, 2011
1,808
679
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
PHP:
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;
}
}
Edit
PHP:
if(($this->getInfo($_SESSION['user']['id'], 'rank')) >= 4)
 

Stevee

Posting Freak
Mar 29, 2011
580
35
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
PHP:
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;
}
}
Edit
PHP:
if(($this->getInfo($_SESSION['user']['id'], 'rank')) >= 4)

But when I go to my housekeeping, it does this


it does that even if I type the hK url
 

Users who are viewing this thread

Top