vacation mode but i will disable it just implemented but will be disabled

This commit is contained in:
Shadow
2014-03-12 08:40:43 +02:00
parent e50a8a905a
commit e641d9e9d4
10 changed files with 155 additions and 4 deletions
+39
View File
@@ -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;