mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
vacation mode but i will disable it just implemented but will be disabled
This commit is contained in:
@@ -30,6 +30,14 @@ class Profile {
|
||||
header("Location: banned.php");
|
||||
}
|
||||
break;
|
||||
case "p4":
|
||||
// Vacation mode - by advocaite and Shadow
|
||||
if($session->access!=BANNED){
|
||||
$this->setvactionmode($post);
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(isset($post['s'])) {
|
||||
@@ -93,6 +101,37 @@ class Profile {
|
||||
$database->gpack($database->RemoveXSS($session->uid),$database->RemoveXSS($post['custom_url']));
|
||||
header("Location: spieler.php?uid=".$session->uid);
|
||||
}
|
||||
|
||||
/*******************************************************
|
||||
Function to vacation mode - by advocaite and Shadow
|
||||
References:
|
||||
********************************************************/
|
||||
|
||||
private function setvactionmode($post){
|
||||
global $database,$session,$form;
|
||||
$set =false;
|
||||
if($post['vac'] && $post['vac_days'] >=2 && $post['vac_days'] <=14) {
|
||||
$database->setvacmode($post['uid'],$post['vac_days']);
|
||||
$set =true;
|
||||
}
|
||||
else {
|
||||
echo "Minimum days is 2";die();exit();
|
||||
}
|
||||
if($set){
|
||||
unset($_SESSION['wid']);
|
||||
$database->activeModify(addslashes($session->username),1);
|
||||
$database->UpdateOnline("logout") or die(mysql_error());
|
||||
$session->Logout();
|
||||
header("Location: login.php");
|
||||
}else{
|
||||
header("Location: spieler.php?s=5");
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************
|
||||
Function to vacation mode - by advocaite and Shadow
|
||||
References:
|
||||
********************************************************/
|
||||
|
||||
private function updateAccount($post) {
|
||||
global $database,$session,$form;
|
||||
|
||||
Reference in New Issue
Block a user