ShowTopic($tid); //Check if we're viewing a valid thread if(empty($topics)) $alliance->redirect($_GET); $posts = $database->ShowPost($tid); foreach($topics as $arr){ $cat_id = $arr['cat']; $owner = $database->getUserArray($arr['owner'], 1); $forumData = reset($database->ForumCatEdit($cat_id)); $CatName = stripslashes($forumData['forum_name']); $allianceinfo = $database->getAlliance($owner['alliance']); } $date = date('d.m.y H:i a', $arr['date']); $varray = $database->getProfileVillages($arr['owner']); $totalpop = 0; foreach($varray as $vil) $totalpop += $vil['pop']; $countAu = $database->CountTopic($arr['owner']); $tribeArray = [TRIBE1, TRIBE2, TRIBE3]; $displayarray = $database->getUserArray($arr['owner'], 1); $trip = $tribeArray[$displayarray['tribe'] - 1]; $input = $arr['post']; $bbcoded = $input; include ("GameEngine/BBCode.php"); $bbcode_topic = stripslashes(nl2br($bbcoded)); ?>

->

checkSurvey($arr['id'])){ $survey = $database->getSurvey($arr['id']); if(!$database->checkVote($arr['id'], $session->uid) && ($survey['ends'] > time() || $survey['ends'] == 0)){ ?> ShowTopic($po['topic'])); $checkArray = ['aid' => $aid, 'alliance' => $topic['alliance'], 'forum_perm' => $opt['opt5'], 'owner' => $po['owner'], 'admin' => $_GET['admin'], 'forum_owner' => $forumData['owner']]; $date = date('d.m.y H:i a', $po['date']); $countAu = $database->CountTopic($po['owner']); $varray = $database->getProfileVillages($po['owner']); $totalpop = 0; foreach($varray as $vil) $totalpop += $vil['pop']; $displayarray = $database->getUserArray($po['owner'], 1); $trip = $tribeArray[$displayarray['tribe'] - 1]; $owner = $database->getUserArray($po['owner'], 1); $allianceinfo = $database->getAlliance($owner['alliance']); $input = $po['post']; include ("GameEngine/BBCode.php"); $bbcode_post = stripslashes(nl2br($bbcoded)); echo ''; } ?>


Posts:

Pop:
Villages:
created:
$aid, 'alliance' => $arr['alliance'], 'forum_perm' => $opt['opt5'], 'owner' => $arr['owner'], 'admin' => $_GET['admin'], 'forum_owner' => $forumData['owner']]; if(Alliance::canAct($checkArray)){ echo '
'.EDIT.''.DELETE.'

'; } ?>
Survey:

Survey:
getVoteSum($arr['id']); for($i = 1; $i <= 8; $i++){ if($survey['option'.$i] != ""){ if($sum > 0) $width = 100 * ($survey['vote'.$i] / $sum); else $width = 0; ?>
'.$owner['username'].'
'.$allianceinfo['tag'].'
Posts: '.$countAu.'

Pop: '.$totalpop.'
Villages: '.count($varray).'
'.$trip.'
created: '.$date.'
'; if(Alliance::canAct($checkArray)){ echo '
'.EDIT.''.DELETE.'

'; } echo '
'.$bbcode_post.'
'.TZ_REPLIES.''; echo 'Toggle Admin mode'; } ?>