if(isset($_GET['aid']) && !is_numeric($_GET['aid'])) die('Hacking Attemp');
include ("GameEngine/Village.php");
include ("GameEngine/Chat.php");
$start = $generator->pageLoadTimeStart();
$alliance->procAlliance($_GET);
if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
if(isset($_GET['s'])){
header("Location: ".$_SERVER['PHP_SELF']."?s=".preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['s']));
}else if(isset($_GET['aid'])){
header("Location: ".$_SERVER['PHP_SELF']."?aid=".preg_replace("/[^a-zA-Z0-9_-]/","",$_GET['aid']));
}
else{
header("Location: ".$_SERVER['PHP_SELF']);
}
}
if(isset($_GET['s'])){
$automation->isWinner();
}
if(isset($_GET['fid'])){
$fid = preg_replace("/[^0-9]/","",$_GET['fid']);
$query = "SELECT * FROM " . TB_PREFIX . "forum_cat WHERE id = ".$fid.""; //ппц
$forum = mysqli_query($database->connection, $query); //?
$forum_type = mysqli_fetch_array($forum);
if($forum_type['forum_name'] != "" && $forum_type['forum_area'] == 0){
if($forum_type['alliance'] != $session->alliance){
header("Location: ".$_SERVER['PHP_SELF']);
}
}
}else if(isset($_GET['fid2'])){
$fid = preg_replace("/[^0-9]/","",$_GET['fid2']);
$q = "SELECT * FROM " . TB_PREFIX . "forum_cat WHERE id = ".$fid.""; //ппц
$forum = mysqli_query($database->connection, $q); //?
$forum_type = mysqli_fetch_array($forum);
if($forum_type['forum_name'] != "" && $forum_type['forum_area'] != 1){
if($forum_type['forum_area'] == 0){
if($forum_type['alliance'] != $session->alliance){
header("Location: ".$_SERVER['PHP_SELF']);
}
}else if($forum_type['forum_area'] == 2){
if($forum_type['alliance'] != $session->alliance){
}else if($forum_type['forum_area'] == 3){
}
}else{
header("Location: ".$_SERVER['PHP_SELF']);
}
}
}
if($forum_type['alliance'] != $session->alliance){
header("Location: ".$_SERVER['PHP_SELF']);
}