diff --git a/Admin/Templates/maintenence.tpl b/Admin/Templates/maintenence.tpl new file mode 100644 index 00000000..ce256a5d --- /dev/null +++ b/Admin/Templates/maintenence.tpl @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Server Maintenence
DescriptionExecute
Close Server for Maintenece, This will ban all players (Access 2) till you can fix bugs, or a crap version of a ceasefire lol
Bring Server Back for Maintenece, This will unban all players (By Banning Reason)
Clean Banlist Data (TRUNCATE)
\ No newline at end of file diff --git a/Admin/Templates/maintenenceBan.tpl b/Admin/Templates/maintenenceBan.tpl new file mode 100644 index 00000000..73c33d9b --- /dev/null +++ b/Admin/Templates/maintenenceBan.tpl @@ -0,0 +1,42 @@ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Close Server (Ban Everyone)
DurationStarting
">
Default: 1 Hour
Value: Hours (0.5) for 30 mins
Default: Now +
+
\ No newline at end of file diff --git a/Admin/Templates/maintenenceUnban.tpl b/Admin/Templates/maintenenceUnban.tpl new file mode 100644 index 00000000..b342cece --- /dev/null +++ b/Admin/Templates/maintenenceUnban.tpl @@ -0,0 +1,91 @@ +search_banned(); +?> +
+ + +
+ + + + + + + + + + + + + + + + +
Open Server (Unban Players by Reason)
Unban "Reason"Action
+
+ + + + + + + + + + + + + + + getUserField($bannedUsers[$i]['uid'],'username',0)=='') + { + + $name = $bannedUsers[$i]['name']; + $link = "[".$name."]"; + + } + else + { + $name = $database->getUserField($bannedUsers[$i]['uid'],'username',0); + $link = ''.$name.''; + + } + if($bannedUsers[$i]['end']) + { + $end = date("d.m.y H:i",$bannedUsers[$i]['end']); + } + else + { + $end = '*'; + } + echo ' + + + + + + '; + } + } + else + { + echo ''; + } + ?> + +
Bannned Players ()
UsernameStart Ban / End BanReason
'.$link.''.date("d.m.y H:i",$bannedUsers[$i]['time']).' - '.$end.''.$bannedUsers[$i]['reason'].'cancel
No Players are Banned
\ No newline at end of file diff --git a/Admin/admin.php b/Admin/admin.php index aec2e2c2..ec566b5e 100644 --- a/Admin/admin.php +++ b/Admin/admin.php @@ -107,6 +107,7 @@ $timeformat = new timeFormatGenerator;
Ban Ban/Unban Players + Server Maintenence Clean Banlist Data
Gold diff --git a/GameEngine/Admin/Mods/mainteneceBan.php b/GameEngine/Admin/Mods/mainteneceBan.php new file mode 100644 index 00000000..8ed20b06 --- /dev/null +++ b/GameEngine/Admin/Mods/mainteneceBan.php @@ -0,0 +1,51 @@ +Access Denied: You are not Admin!"); + +$users = mysql_num_rows(mysql_query("SELECT * FROM ".TB_PREFIX."users")); + +$duration = $_POST['duration'] * 3600; +$start = $_POST['start']; +$startts = strtotime($start); +$endts = $startts + $duration; +$reason = $_POST['reason']; +$admin = $session; +$active = '1'; +$access = '2'; + +$sql = "SELECT id FROM ".TB_PREFIX."users ORDER BY ID DESC LIMIT 1"; +$loops = mysql_result(mysql_query($sql), 0); + +for($i = 0; $i < $loops + 1; $i++) +{ + $query = "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$i." AND access = ".$access.""; + $result = mysql_query($query); + while($row = mysql_fetch_assoc($result)) + { + ##mysql_query("INSERT INTO ".TB_PREFIX."banlist ".$row['id'].", ".$row['username'].", ".$reason.", ".$startts.", ".$endts.", ".$admin.", ".$active.""); + mysql_query("INSERT INTO ".TB_PREFIX."banlist (`uid`, `name`, `reason`, `time`, `end`, `admin`, `active`) VALUES (".$row['id'].", '".$row['username']."' , '$reason', '$startts', '$endts', '$admin', '1')"); + } +} + +header("Location: ../../../Admin/admin.php?p=ban"); +?> \ No newline at end of file diff --git a/GameEngine/Admin/Mods/mainteneceUnban.php b/GameEngine/Admin/Mods/mainteneceUnban.php new file mode 100644 index 00000000..303d0213 --- /dev/null +++ b/GameEngine/Admin/Mods/mainteneceUnban.php @@ -0,0 +1,47 @@ +Access Denied: You are not Admin!"); + +$users = mysql_num_rows(mysql_query("SELECT * FROM ".TB_PREFIX."users")); + +$reason = $_POST['unbanreason']; +$admin = $session; +$active = '0'; +$access = '2'; +$actualend = time(); + +$sql = "SELECT id FROM ".TB_PREFIX."users ORDER BY ID DESC LIMIT 1"; +$loops = mysql_result(mysql_query($sql), 0); + +for($i = 0; $i < $loops + 1; $i++) +{ + $query = "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$i." AND access = ".$access.""; + $result = mysql_query($query); + while($row = mysql_fetch_assoc($result)) + { + mysql_query("UPDATE ".TB_PREFIX."banlist SET active = '".$active."', end = '".$actualend."' WHERE reason = '".$reason."'"); + } +} + +header("Location: ../../../Admin/admin.php?p=ban"); +?> \ No newline at end of file diff --git a/Templates/Ajax/quest_core.tpl b/Templates/Ajax/quest_core.tpl index 574cb6c8..be16dc51 100644 --- a/Templates/Ajax/quest_core.tpl +++ b/Templates/Ajax/quest_core.tpl @@ -918,9 +918,8 @@ $database->updateUserField($_SESSION['username'],'quest','24',0); $_SESSION['qst']= 24; ?> {"markup":"\n\t\t

\"\" Tasks<\/h1>
Your reward: 25 Gold.' ;}else{echo 'All tasks achieved!';}?>”<\/i>
<\/span><\/div>\n\t\t
<\/div>\n\t\t","number":-25,"reward":false,"qgsrc":"q_luserinfo['tribe'];?>","msrc":"i2","altstep":0} +Continue with the next task.<\/a> Continue with the next task.<\/a> -//1 } elseif($_SESSION['qst']==90){ $time=time();?>