mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-03 02:54:21 +00:00
vacation mode but i will disable it just implemented but will be disabled
This commit is contained in:
@@ -3616,6 +3616,51 @@ class MYSQL_DB {
|
||||
$q = "DELETE from " . TB_PREFIX . "prisoners where id = '$id'";
|
||||
mysql_query($q, $this->connection);
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to vacation mode - by advocaite
|
||||
References:
|
||||
*****************************************/
|
||||
|
||||
function setvacmode($uid,$days){
|
||||
$days1 =60*60*24*$days;
|
||||
$time =time()+$days1;
|
||||
$q ="UPDATE ".TB_PREFIX."users SET vac_mode = '1' , vac_time=".$time." WHERE id=".$uid."";
|
||||
$result =mysql_query($q,$this->connection);
|
||||
}
|
||||
|
||||
function removevacationmode($uid){
|
||||
$q ="UPDATE ".TB_PREFIX."users SET vac_mode = '0' , vac_time='0' WHERE id=".$uid."";
|
||||
$result =mysql_query($q,$this->connection);
|
||||
}
|
||||
|
||||
function getvacmodexy($wref){
|
||||
$q = "SELECT id,oasistype,occupied FROM " . TB_PREFIX . "wdata where id = $wref";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
$dbarray = mysql_fetch_array($result);
|
||||
if($dbarray['occupied'] != 0 && $dbarray['oasistype'] == 0) {
|
||||
$q1 = "SELECT owner FROM " . TB_PREFIX . "vdata where wref = ".$dbarray['id']."";
|
||||
$result1 = mysql_query($q1, $this->connection);
|
||||
$dbarray1 = mysql_fetch_array($result1);
|
||||
if($dbarray1['owner'] != 0){
|
||||
$q2 = "SELECT vac_mode,vac_time FROM " . TB_PREFIX . "users where id = ".$dbarray1['owner']."";
|
||||
$result2 = mysql_query($q2, $this->connection);
|
||||
$dbarray2 = mysql_fetch_array($result2);
|
||||
if($dbarray2['vac_mode'] ==1){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to vacation mode - by advocaite
|
||||
References:
|
||||
*****************************************/
|
||||
|
||||
/***************************
|
||||
Function to get Hero Dead
|
||||
|
||||
Reference in New Issue
Block a user