mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
Alliance forum fixes part 1
Fixed the majority of security issues: +Fixed a bug that permitted to edit, delete and create a forum in any alliance, without any permissions +Fixed a bug that permitted to edit, create and delete any kind of thread, with any kind of permission +Fixed a bug that permitted to edit, modify and delete every kind of post, without any kind of permission +Fixed a bug that din't permit to create posts and threads +Fixed a bug that permitted to create forum and threads with empty name/topic +Fixed a bug that permitted to move a thread to an invalid forum +Fixed a bug that permitted to create an invalid type of forum +Fixed a bug that didn't permit to move forums, to the top and the bottom of their forum type (in reality, it wasn't even coded) +Added a sorting column for supporting the "move to top/bottom" functionality +Minor improvements and bug fixing/code indentation/removal of redundant code NOTE: For playing this version, you HAVE to add a new column to the table "s1_forum_cat", you can simply do that by running this query (where "s1_" is the prefix of your server): ALTER TABLE s1_forum_cat ADD `sorting` int(11) NOT NULL AFTER `id`
This commit is contained in:
+43
-34
@@ -41,22 +41,23 @@ if (!$autoloader_found) {
|
||||
class Alliance {
|
||||
|
||||
public $gotInvite = false;
|
||||
public $inviteArray = array();
|
||||
public $allianceArray = array();
|
||||
public $userPermArray = array();
|
||||
public $inviteArray = [];
|
||||
public $allianceArray = [];
|
||||
public $userPermArray = [];
|
||||
|
||||
public function procAlliance($get) {
|
||||
global $session, $database;
|
||||
|
||||
if($session->alliance != 0) {
|
||||
if($session->alliance > 0) {
|
||||
$this->allianceArray = $database->getAlliance($session->alliance);
|
||||
// Permissions Array
|
||||
// [id] => id [uid] => uid [alliance] => alliance [opt1] => X [opt2] => X [opt3] => X [opt4] => X [opt5] => X [opt6] => X [opt7] => X [opt8] => X
|
||||
$this->userPermArray = $database->getAlliPermissions($session->uid, $session->alliance);
|
||||
} else {
|
||||
$this->inviteArray = $database->getInvitation($session->uid);
|
||||
$this->gotInvite = count($this->inviteArray) == 0 ? false : true;
|
||||
$this->gotInvite = count($this->inviteArray) > 0;
|
||||
}
|
||||
|
||||
if(isset($get['a'])) {
|
||||
switch($get['a']) {
|
||||
case 2:
|
||||
@@ -65,8 +66,6 @@ class Alliance {
|
||||
case 3:
|
||||
$this->acceptInvite($get);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(isset($get['o'])) {
|
||||
@@ -74,20 +73,37 @@ class Alliance {
|
||||
case 4:
|
||||
$this->delInvite($get);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirects to the option menu if some errors were generated
|
||||
* Determines if a player can act with the forum (edit/delete/create things, etc.)
|
||||
*
|
||||
* @param array $datas The array which contains: [aid, alliance, forum_perm, admin, owner]
|
||||
* @return bool Returns true if you are able to act, false otherwise
|
||||
*/
|
||||
|
||||
public function redirect()
|
||||
public static function canAct($datas, $mode = 0){
|
||||
global $database, $session;
|
||||
|
||||
return ($database->CheckEditRes($datas['aid']) == 1 && ((($database->isAllianceOwner($session->uid) == $datas['alliance'] ||
|
||||
($datas['forum_perm'] == 1 && $session->alliance == $datas['alliance'])) &&
|
||||
($mode || (isset($datas['admin']) && !empty($datas['admin']) && $datas['admin'] == "switch_admin"))) ||
|
||||
$datas['owner'] == $session->uid));
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirects to the forum selection
|
||||
*
|
||||
* @param array $get Contains the values of a GET request
|
||||
*/
|
||||
|
||||
public function redirect($get)
|
||||
{
|
||||
header("location: allianz.php?s=5");
|
||||
exit;
|
||||
header("Location: allianz.php?s=2".(isset($get['fid']) && !empty($get['fid']) ? "&fid=".$get['fid']."" : "").
|
||||
(isset($get['admin']) && !empty($get['admin']) ? "&admin=switch_admin" : ""));
|
||||
exit;
|
||||
}
|
||||
|
||||
public function procAlliForm($post) {
|
||||
@@ -99,27 +115,20 @@ class Alliance {
|
||||
}
|
||||
|
||||
}
|
||||
if(isset($post['dipl']) && isset($post['a_name'])) {
|
||||
$this->changediplomacy($post);
|
||||
}
|
||||
|
||||
if(isset($post['dipl']) && isset($post['a_name'])) $this->changediplomacy($post);
|
||||
|
||||
if(isset($post['s'])) {
|
||||
if(isset($post['o'])) {
|
||||
switch($post['o']) {
|
||||
case 1:
|
||||
if(isset($_POST['a'])) {
|
||||
$this->changeUserPermissions($post);
|
||||
}
|
||||
if(isset($_POST['a'])) $this->changeUserPermissions($post);
|
||||
break;
|
||||
case 2:
|
||||
if(isset($_POST['a_user'])) {
|
||||
$this->kickAlliUser($post);
|
||||
}
|
||||
if(isset($_POST['a_user'])) $this->kickAlliUser($post);
|
||||
break;
|
||||
case 4:
|
||||
if(isset($_POST['a']) && $_POST['a'] == 4) {
|
||||
$this->sendInvite($post);
|
||||
}
|
||||
if(isset($_POST['a']) && $_POST['a'] == 4) $this->sendInvite($post);
|
||||
break;
|
||||
case 3:
|
||||
$this->updateAlliProfile($post);
|
||||
@@ -446,16 +455,16 @@ class Alliance {
|
||||
public function Vote($post) {
|
||||
global $database, $session;
|
||||
if($session->access != BANNED){
|
||||
if($database->checkSurvey($post['tid']) && !$database->checkVote($post['tid'], $session->uid)){
|
||||
$survey = $database->getSurvey($post['tid']);
|
||||
$text = ''.$survey['voted'].','.$session->uid.',';
|
||||
$database->Vote($post['tid'], $post['vote'], $text);
|
||||
}
|
||||
header("Location: allianz.php?s=2&fid2=".$post['fid2']."&pid=".$post['pid']."&tid=".$post['tid']);
|
||||
exit;
|
||||
if($database->checkSurvey($post['tid']) && !$database->checkVote($post['tid'], $session->uid)){
|
||||
$survey = $database->getSurvey($post['tid']);
|
||||
$text = ''.$survey['voted'].','.$session->uid.',';
|
||||
$database->Vote($post['tid'], $post['vote'], $text);
|
||||
}
|
||||
header("Location: allianz.php?s=2&fid2=".$post['fid2']."&tid=".$post['tid']);
|
||||
exit;
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
exit;
|
||||
header("Location: banned.php");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
/*****************************************
|
||||
|
||||
+25
-21
@@ -2373,7 +2373,7 @@ class MYSQLi_DB implements IDbConnection {
|
||||
function ForumCat($id) {
|
||||
list($id) = $this->escape_input($id);
|
||||
|
||||
$q = "SELECT * from " . TB_PREFIX . "forum_cat where alliance = '$id' ORDER BY id";
|
||||
$q = "SELECT * from " . TB_PREFIX . "forum_cat where alliance = '$id' ORDER BY sorting DESC, id";
|
||||
$result = mysqli_query($this->dblink,$q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
@@ -2413,11 +2413,7 @@ class MYSQLi_DB implements IDbConnection {
|
||||
|
||||
$q = "SELECT Count(*) as Total from " . TB_PREFIX . "forum_topic where cat = $id";
|
||||
$result = mysqli_fetch_array(mysqli_query($this->dblink,$q), MYSQLI_ASSOC);
|
||||
if ($result['Total']) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return $result['Total'] > 0;
|
||||
}
|
||||
|
||||
// no need to cache this method
|
||||
@@ -2426,11 +2422,7 @@ class MYSQLi_DB implements IDbConnection {
|
||||
|
||||
$q = "SELECT Count(*) as Total from " . TB_PREFIX . "forum_edit where alliance = $alli";
|
||||
$result = mysqli_fetch_array(mysqli_query($this->dblink,$q), MYSQLI_ASSOC);
|
||||
if ($result['Total']) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return $result['Total'] > 0;
|
||||
}
|
||||
|
||||
// no need to cache this method
|
||||
@@ -2510,6 +2502,18 @@ class MYSQLi_DB implements IDbConnection {
|
||||
}
|
||||
}
|
||||
|
||||
function MoveForum($id, $area, $ally, $mode){
|
||||
list($id, $area, $ally, $mode) = $this->escape_input((int) $id, (int) $area, (int) $ally, $mode);
|
||||
|
||||
$q = "UPDATE
|
||||
".TB_PREFIX."forum_cat
|
||||
SET
|
||||
sorting = (SELECT * FROM(SELECT ".(!$mode ? "MIN" : "MAX")."(sorting) FROM ".TB_PREFIX."forum_cat WHERE forum_area = $area AND alliance = $ally AND id != $id) f) ".(!$mode ? "-" : "+")." 1
|
||||
WHERE
|
||||
id = $id";
|
||||
return mysqli_query($this->dblink, $q);
|
||||
}
|
||||
|
||||
function UpdateEditTopic($id, $title, $cat) {
|
||||
list($id, $title, $cat) = $this->escape_input((int) $id, $title, $cat);
|
||||
|
||||
@@ -2517,17 +2521,17 @@ class MYSQLi_DB implements IDbConnection {
|
||||
return mysqli_query($this->dblink,$q);
|
||||
}
|
||||
|
||||
function UpdateEditForum($id, $name, $des) {
|
||||
list($id, $name, $des) = $this->escape_input((int) $id, $name, $des);
|
||||
function UpdateEditForum($id, $name, $des, $ally) {
|
||||
list($id, $name, $des, $ally) = $this->escape_input((int) $id, $name, $des, (int) $ally);
|
||||
|
||||
$q = "UPDATE " . TB_PREFIX . "forum_cat set forum_name = '$name', forum_des = '$des' where id = $id";
|
||||
$q = "UPDATE " . TB_PREFIX . "forum_cat SET forum_name = '$name', forum_des = '$des' WHERE id = $id AND alliance = $ally";
|
||||
return mysqli_query($this->dblink,$q);
|
||||
}
|
||||
|
||||
function StickTopic($id, $mode) {
|
||||
list($id, $mode) = $this->escape_input((int) $id, $mode);
|
||||
list($id, $mode) = $this->escape_input((int) $id, (int) $mode);
|
||||
|
||||
$q = "UPDATE " . TB_PREFIX . "forum_topic set stick = '$mode' where id = $id";
|
||||
$q = "UPDATE " . TB_PREFIX . "forum_topic SET stick = $mode WHERE id = $id";
|
||||
return mysqli_query($this->dblink,$q);
|
||||
}
|
||||
|
||||
@@ -2579,7 +2583,7 @@ class MYSQLi_DB implements IDbConnection {
|
||||
function CreatForum($owner, $alli, $name, $des, $area) {
|
||||
list($owner, $alli, $name, $des, $area) = $this->escape_input($owner, $alli, $name, $des, $area);
|
||||
|
||||
$q = "INSERT into " . TB_PREFIX . "forum_cat values (0,'$owner','$alli','$name','$des','$area')";
|
||||
$q = "INSERT into " . TB_PREFIX . "forum_cat values (0, 0,'$owner','$alli','$name','$des','$area')";
|
||||
mysqli_query($this->dblink,$q);
|
||||
return mysqli_insert_id($this->dblink);
|
||||
}
|
||||
@@ -2719,7 +2723,8 @@ class MYSQLi_DB implements IDbConnection {
|
||||
list($id, $post, $alliance, $player, $coor, $report) = $this->escape_input((int) $id, $post, (int) $alliance, (int) $player, (int) $coor, (int) $report);
|
||||
|
||||
$q = "UPDATE " . TB_PREFIX . "forum_topic set post = '$post', alliance0 = $alliance, player0 = $player, coor0 = $coor, report0 = $report where id = $id";
|
||||
return mysqli_query($this->dblink,$q);
|
||||
|
||||
return mysqli_query($this->dblink, $q);
|
||||
}
|
||||
|
||||
function EditUpdatePost($id, $post, $alliance, $player, $coor, $report) {
|
||||
@@ -2840,9 +2845,8 @@ class MYSQLi_DB implements IDbConnection {
|
||||
if(mysqli_num_rows($result)) {
|
||||
$result = mysqli_fetch_assoc($result);
|
||||
$result = $result['id'];
|
||||
} else {
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
else $result = false;
|
||||
|
||||
self::$allianceOwnerCheckCache[$id] = $result;
|
||||
return self::$allianceOwnerCheckCache[$id];
|
||||
|
||||
@@ -88,6 +88,7 @@ define("OFFERED_CONFED_TO","offered a confederation to");
|
||||
define("ALLY_TOO_MUCH_PACTS","Either You cannot offer more pacts of this kind or this alliance has reached the limit for this kind of patcs");
|
||||
define("ALLY_PERMISSIONS_UPDATED","Permissions updated");
|
||||
define("ALLY_FORUM_LINK_UPDATED", "Forum link updated");
|
||||
define("NO_FORUMS_YET","There are no forums yet.");
|
||||
define("ALLY_USER_KICKED"," has been kicked from the alliance");
|
||||
define("NOT_OPENED_YET","Server not started yet.");
|
||||
define("REGISTER_CLOSED","The register is closed. You can't register to this server.");
|
||||
|
||||
@@ -1,386 +1,322 @@
|
||||
<?php
|
||||
############################################################
|
||||
## DO NOT REMOVE THIS NOTICE ##
|
||||
## MADE BY TTMTT ##
|
||||
## FIX BY RONIX ##
|
||||
## TRAVIANZ ##
|
||||
############################################################
|
||||
if($session->access!=BANNED) {
|
||||
$topic_id = $_GET['pod'];
|
||||
$post_id = $_GET['pod'];
|
||||
$topics = $database->ShowTopic( $topic_id );
|
||||
$posts = $database->ShowPostEdit( $post_id );
|
||||
foreach ( $topics as $top ) {
|
||||
$title = stripslashes( $top['title'] );
|
||||
}
|
||||
foreach ( $posts as $pos ) {
|
||||
$poss = stripslashes( $pos['post'] );
|
||||
$poss = preg_replace( '/\[message\]/', '', $poss );
|
||||
$poss = preg_replace( '/\[\/message\]/', '', $poss );
|
||||
$alliance0 = $pos['alliance0'];
|
||||
$player0 = $pos['player0'];
|
||||
$owner = $pos['owner'];
|
||||
$coor0 = $pos['coor0'];
|
||||
$report0 = $pos['report0'];
|
||||
}
|
||||
// ###########################################################
|
||||
// # DO NOT REMOVE THIS NOTICE ##
|
||||
// # MADE BY TTMTT ##
|
||||
// # FIX BY RONIX ##
|
||||
// # TRAVIANZ ##
|
||||
// ###########################################################
|
||||
if($session->access == BANNED){
|
||||
header("Location: banned.php");
|
||||
exit();
|
||||
}
|
||||
|
||||
if ( $owner == $session->uid ) {
|
||||
?>
|
||||
<form method="post" name="post"
|
||||
action="allianz.php?s=2&fid2=<?php echo $_GET['fid2']; ?>&pid=<?php echo $_GET['pid']; ?>&tid=<?php echo $_GET['idt']; ?>">
|
||||
<input type="hidden" name="s" value="2">
|
||||
<input type="hidden" name="pod" value="<?php echo $_GET['pod']; ?>">
|
||||
<input type="hidden" name="alliance0" value="<?php echo $alliance0; ?>">
|
||||
<input type="hidden" name="player0" value="<?php echo $player0; ?>">
|
||||
<input type="hidden" name="coor0" value="<?php echo $coor0; ?>">
|
||||
<input type="hidden" name="report0" value="<?php echo $report0; ?>">
|
||||
<input type="hidden" name="editpost" value="1">
|
||||
<table cellpadding="1" cellspacing="1" id="edit_post">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Edit answer</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Thread</th>
|
||||
<td><?php echo $title; ?></td>
|
||||
$topic_id = $_GET['tid'];
|
||||
$post_id = $_GET['pod'];
|
||||
$topics = reset($database->ShowTopic($topic_id));
|
||||
$posts = $database->ShowPostEdit($post_id);
|
||||
|
||||
</tr>
|
||||
//Check if we're modifying a valid post
|
||||
if(empty($topics) || empty($posts)) $alliance->redirect($_GET);
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
$title = stripslashes($topics['title']);
|
||||
|
||||
<div bbArea="text" id="text_container" name="text_container">
|
||||
<div id="text_toolbar" name="text_toolbar">
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="b">
|
||||
<div title="bold" alt="bold" class="bbButton bbBold"></div>
|
||||
</a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="i">
|
||||
<div title="italic" alt="italic" class="bbButton bbItalic"></div>
|
||||
</a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="u">
|
||||
<div title="underlined" alt="underlined" class="bbButton bbUnderscore"></div>
|
||||
</a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="alliance0">
|
||||
<div title="Alliance" alt="Alliance" class="bbButton bbAlliance"></div>
|
||||
</a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="player0">
|
||||
<div title="Player" alt="Player" class="bbButton bbPlayer"></div>
|
||||
</a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="coor0">
|
||||
<div title="Coordinates" alt="Coordinates" class="bbButton bbCoordinate"></div>
|
||||
</a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="report0">
|
||||
<div title="Report" alt="Report" class="bbButton bbReport"></div>
|
||||
</a>
|
||||
<a href="javascript:void(0);" bbWin="resources" id="text_resourceButton">
|
||||
<div title="Resources" alt="Resources" class="bbButton bbResource"></div>
|
||||
</a>
|
||||
<a href="javascript:void(0);" bbWin="smilies" id="text_smilieButton">
|
||||
<div title="Smilies" alt="Smilies" class="bbButton bbSmilie"></div>
|
||||
</a>
|
||||
<a href="javascript:void(0);" bbWin="troops" id="text_troopButton">
|
||||
<div title="Troops" alt="Troops" class="bbButton bbTroop"></div>
|
||||
</a>
|
||||
<a href="javascript:void(0);" id="text_previewButton" bbArea="text">
|
||||
<div title="Preview" alt="Preview" class="bbButton bbPreview"></div>
|
||||
</a>
|
||||
foreach($posts as $pos){
|
||||
$poss = stripslashes($pos['post']);
|
||||
$poss = preg_replace('/\[message\]/', '', $poss);
|
||||
$poss = preg_replace('/\[\/message\]/', '', $poss);
|
||||
$alliance0 = $pos['alliance0'];
|
||||
$player0 = $pos['player0'];
|
||||
$owner = $pos['owner'];
|
||||
$coor0 = $pos['coor0'];
|
||||
$report0 = $pos['report0'];
|
||||
}
|
||||
?>
|
||||
<form method="post" name="post"
|
||||
action="allianz.php?s=2&fid2=<?php echo $topics['cat']; ?>&tid=<?php echo $topics['id']; ?>">
|
||||
<input type="hidden" name="s" value="2"> <input type="hidden"
|
||||
name="pod" value="<?php echo $_GET['pod']; ?>"> <input type="hidden"
|
||||
name="alliance0" value="<?php echo $alliance0; ?>"> <input
|
||||
type="hidden" name="player0" value="<?php echo $player0; ?>"> <input
|
||||
type="hidden" name="coor0" value="<?php echo $coor0; ?>"> <input
|
||||
type="hidden" name="report0" value="<?php echo $report0; ?>"> <input
|
||||
type="hidden" name="editpost" value="1">
|
||||
<table cellpadding="1" cellspacing="1" id="edit_post">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Edit answer</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Thread</th>
|
||||
<td><?php echo $title; ?></td>
|
||||
|
||||
<div class="clear"></div>
|
||||
<div id="text_toolbarWindows">
|
||||
<div id="text_resources" name="text_resources">
|
||||
<a href="javascript:void(0);" bbType="o" bbTag="lumber"><img src="img/x.gif"
|
||||
class="r1"
|
||||
title="Wood"
|
||||
alt="Wood"/></a>
|
||||
<a href="javascript:void(0);" bbType="o" bbTag="clay"><img src="img/x.gif"
|
||||
class="r2"
|
||||
title="Clay"
|
||||
alt="Clay"/></a>
|
||||
<a href="javascript:void(0);" bbType="o" bbTag="iron"><img src="img/x.gif"
|
||||
class="r3"
|
||||
title="Iron"
|
||||
alt="Iron"/></a>
|
||||
<a href="javascript:void(0);" bbType="o" bbTag="crop"><img src="img/x.gif"
|
||||
class="r4"
|
||||
title="Crop"
|
||||
alt="Crop"/></a>
|
||||
</div>
|
||||
<div id="text_smilies" name="text_smilies"><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*aha*"><img class="smiley aha"
|
||||
src="img/x.gif"
|
||||
alt="*aha*"
|
||||
title="*aha*"/></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*angry*"><img
|
||||
class="smiley angry" src="img/x.gif" alt="*angry*" title="*angry*"/></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*cool*"><img
|
||||
class="smiley cool" src="img/x.gif" alt="*cool*"
|
||||
title="*cool*"/></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*cry*"><img class="smiley cry"
|
||||
src="img/x.gif"
|
||||
alt="*cry*"
|
||||
title="*cry*"/></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*cute*"><img
|
||||
class="smiley cute" src="img/x.gif" alt="*cute*"
|
||||
title="*cute*"/></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*depressed*"><img
|
||||
class="smiley depressed" src="img/x.gif" alt="*depressed*"
|
||||
title="*depressed*"/></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*eek*"><img class="smiley eek"
|
||||
src="img/x.gif"
|
||||
alt="*eek*"
|
||||
title="*eek*"/></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*ehem*"><img
|
||||
class="smiley ehem" src="img/x.gif" alt="*ehem*"
|
||||
title="*ehem*"/></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*emotional*"><img
|
||||
class="smiley emotional" src="img/x.gif" alt="*emotional*"
|
||||
title="*emotional*"/></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag=":D"><img class="smiley grin"
|
||||
src="img/x.gif" alt=":D"
|
||||
title=":D"/></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag=":)"><img
|
||||
class="smiley happy" src="img/x.gif" alt=":)" title=":)"/></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*hit*"><img
|
||||
class="smiley hit" src="img/x.gif" alt="*hit*" title="*hit*"/></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*hmm*"><img
|
||||
class="smiley hmm" src="img/x.gif" alt="*hmm*" title="*hmm*"/></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*hmpf*"><img
|
||||
class="smiley hmpf" src="img/x.gif" alt="*hmpf*"
|
||||
title="*hmpf*"/></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*hrhr*"><img class="smiley hrhr"
|
||||
src="img/x.gif"
|
||||
alt="*hrhr*"
|
||||
title="*hrhr*"/></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*huh*"><img
|
||||
class="smiley huh" src="img/x.gif" alt="*huh*" title="*huh*"/></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*lazy*"><img
|
||||
class="smiley lazy" src="img/x.gif" alt="*lazy*"
|
||||
title="*lazy*"/></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*love*"><img class="smiley love"
|
||||
src="img/x.gif"
|
||||
alt="*love*"
|
||||
title="*love*"/></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*nocomment*"><img
|
||||
class="smiley nocomment" src="img/x.gif" alt="*nocomment*"
|
||||
title="*nocomment*"/></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*noemotion*"><img
|
||||
class="smiley noemotion" src="img/x.gif" alt="*noemotion*"
|
||||
title="*noemotion*"/></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*notamused*"><img
|
||||
class="smiley notamused" src="img/x.gif" alt="*notamused*"
|
||||
title="*notamused*"/></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*pout*"><img class="smiley pout"
|
||||
src="img/x.gif"
|
||||
alt="*pout*"
|
||||
title="*pout*"/></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*redface*"><img
|
||||
class="smiley redface" src="img/x.gif" alt="*redface*"
|
||||
title="*redface*"/></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*rolleyes*"><img
|
||||
class="smiley rolleyes" src="img/x.gif" alt="*rolleyes*"
|
||||
title="*rolleyes*"/></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag=":("><img class="smiley sad"
|
||||
src="img/x.gif" alt=":("
|
||||
title=":("/></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*shy*"><img
|
||||
class="smiley shy" src="img/x.gif" alt="*shy*" title="*shy*"/></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*smile*"><img
|
||||
class="smiley smile" src="img/x.gif" alt="*smile*" title="*smile*"/></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*tongue*"><img
|
||||
class="smiley tongue" src="img/x.gif" alt="*tongue*"
|
||||
title="*tongue*"/></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*veryangry*"><img
|
||||
class="smiley veryangry" src="img/x.gif" alt="*veryangry*"
|
||||
title="*veryangry*"/></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*veryhappy*"><img
|
||||
class="smiley veryhappy" src="img/x.gif" alt="*veryhappy*"
|
||||
title="*veryhappy*"/></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag=";)"><img class="smiley wink"
|
||||
src="img/x.gif" alt=";)"
|
||||
title=";)"/></a></div>
|
||||
<div id="text_troops" name="text_troops"><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid1"><img class="unit u1"
|
||||
src="img/x.gif"
|
||||
title="Legionnaire"
|
||||
alt="Legionnaire"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid2"><img class="unit u2"
|
||||
src="img/x.gif"
|
||||
title="Praetorian"
|
||||
alt="Praetorian"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid3"><img class="unit u3"
|
||||
src="img/x.gif"
|
||||
title="Imperian"
|
||||
alt="Imperian"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid4"><img class="unit u4"
|
||||
src="img/x.gif"
|
||||
title="Equites Legati"
|
||||
alt="Equites Legati"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid5"><img class="unit u5"
|
||||
src="img/x.gif"
|
||||
title="Equites Imperatoris"
|
||||
alt="Equites Imperatoris"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid6"><img class="unit u6"
|
||||
src="img/x.gif"
|
||||
title="Equites Caesaris"
|
||||
alt="Equites Caesaris"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid7"><img class="unit u7"
|
||||
src="img/x.gif"
|
||||
title="Ram"
|
||||
alt="Ram"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid8"><img class="unit u8"
|
||||
src="img/x.gif"
|
||||
title="Fire Catapult"
|
||||
alt="Fire Catapult"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid9"><img class="unit u9"
|
||||
src="img/x.gif"
|
||||
title="Senator"
|
||||
alt="Senator"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid10"><img
|
||||
class="unit u10" src="img/x.gif" title="Settler" alt="Settler"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid11"><img
|
||||
class="unit u11" src="img/x.gif" title="Maceman" alt="Maceman"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid12"><img
|
||||
class="unit u12" src="img/x.gif" title="Spearman"
|
||||
alt="Spearman"/></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid13"><img class="unit u13"
|
||||
src="img/x.gif"
|
||||
title="Axeman"
|
||||
alt="Axeman"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid14"><img
|
||||
class="unit u14" src="img/x.gif" title="Scout" alt="Scout"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid15"><img
|
||||
class="unit u15" src="img/x.gif" title="Paladin" alt="Paladin"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid16"><img
|
||||
class="unit u16" src="img/x.gif" title="Teutonic Knight"
|
||||
alt="Teutonic Knight"/></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid17"><img class="unit u17"
|
||||
src="img/x.gif"
|
||||
title="Ram"
|
||||
alt="Ram"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid18"><img
|
||||
class="unit u18" src="img/x.gif" title="Catapult"
|
||||
alt="Catapult"/></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid19"><img class="unit u19"
|
||||
src="img/x.gif"
|
||||
title="Chieftain"
|
||||
alt="Chieftain"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid20"><img
|
||||
class="unit u20" src="img/x.gif" title="Settler" alt="Settler"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid21"><img
|
||||
class="unit u21" src="img/x.gif" title="Phalanx" alt="Phalanx"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid22"><img
|
||||
class="unit u22" src="img/x.gif" title="Swordsman" alt="Swordsman"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid23"><img
|
||||
class="unit u23" src="img/x.gif" title="Pathfinder"
|
||||
alt="Pathfinder"/></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid24"><img class="unit u24"
|
||||
src="img/x.gif"
|
||||
title="Theutates Thunder"
|
||||
alt="Theutates Thunder"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid25"><img
|
||||
class="unit u25" src="img/x.gif" title="Druidrider"
|
||||
alt="Druidrider"/></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid26"><img class="unit u26"
|
||||
src="img/x.gif"
|
||||
title="Haeduan"
|
||||
alt="Haeduan"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid27"><img
|
||||
class="unit u27" src="img/x.gif" title="Battering Ram"
|
||||
alt="Battering Ram"/></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid28"><img class="unit u28"
|
||||
src="img/x.gif"
|
||||
title="Trebuchet"
|
||||
alt="Trebuchet"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid29"><img
|
||||
class="unit u29" src="img/x.gif" title="Chief" alt="Chief"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid30"><img
|
||||
class="unit u30" src="img/x.gif" title="Settler" alt="Settler"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid31"><img
|
||||
class="unit u31" src="img/x.gif" title="Rat" alt="Rat"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid32"><img
|
||||
class="unit u32" src="img/x.gif" title="Spider" alt="Spider"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid33"><img
|
||||
class="unit u33" src="img/x.gif" title="Snake" alt="Snake"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid34"><img
|
||||
class="unit u34" src="img/x.gif" title="Bat" alt="Bat"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid35"><img
|
||||
class="unit u35" src="img/x.gif" title="Wild Boar" alt="Wild Boar"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid36"><img
|
||||
class="unit u36" src="img/x.gif" title="Wolf" alt="Wolf"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid37"><img
|
||||
class="unit u37" src="img/x.gif" title="Bear" alt="Bear"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid38"><img
|
||||
class="unit u38" src="img/x.gif" title="Crocodile" alt="Crocodile"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid39"><img
|
||||
class="unit u39" src="img/x.gif" title="Tiger" alt="Tiger"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid40"><img
|
||||
class="unit u40" src="img/x.gif" title="Elephant"
|
||||
alt="Elephant"/></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid41"><img class="unit u41"
|
||||
src="img/x.gif"
|
||||
title="Pikeman"
|
||||
alt="Pikeman"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid42"><img
|
||||
class="unit u42" src="img/x.gif" title="Thorned Warrior"
|
||||
alt="Thorned Warrior"/></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid43"><img class="unit u43"
|
||||
src="img/x.gif"
|
||||
title="Guardsman"
|
||||
alt="Guardsman"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid44"><img
|
||||
class="unit u44" src="img/x.gif" title="Birds of Prey"
|
||||
alt="Birds of Prey"/></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid45"><img class="unit u45"
|
||||
src="img/x.gif"
|
||||
title="Axerider"
|
||||
alt="Axerider"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid46"><img
|
||||
class="unit u46" src="img/x.gif" title="Natarian Knight"
|
||||
alt="Natarian Knight"/></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid47"><img class="unit u47"
|
||||
src="img/x.gif"
|
||||
title="War Elephant"
|
||||
alt="War Elephant"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid48"><img
|
||||
class="unit u48" src="img/x.gif" title="Ballista"
|
||||
alt="Ballista"/></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid49"><img class="unit u49"
|
||||
src="img/x.gif"
|
||||
title="Natarian Emperor"
|
||||
alt="Natarian Emperor"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid50"><img
|
||||
class="unit u50" src="img/x.gif" title="Settler" alt="Settler"/></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="hero"><img
|
||||
class="unit uhero" src="img/x.gif" title="Hero" alt="Hero"/></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line bbLine"></div>
|
||||
</tr>
|
||||
|
||||
<textarea id="text" name="text"><?php echo $poss; ?></textarea>
|
||||
<div id="text_preview" name="text_preview"></div>
|
||||
</div>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
|
||||
<script>
|
||||
<div bbArea="text" id="text_container" name="text_container">
|
||||
<div id="text_toolbar" name="text_toolbar">
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="b">
|
||||
<div title="bold" alt="bold" class="bbButton bbBold"></div>
|
||||
</a> <a href="javascript:void(0);" bbType="d" bbTag="i">
|
||||
<div title="italic" alt="italic" class="bbButton bbItalic"></div>
|
||||
</a> <a href="javascript:void(0);" bbType="d" bbTag="u">
|
||||
<div title="underlined" alt="underlined"
|
||||
class="bbButton bbUnderscore"></div>
|
||||
</a> <a href="javascript:void(0);" bbType="d" bbTag="alliance0">
|
||||
<div title="Alliance" alt="Alliance" class="bbButton bbAlliance"></div>
|
||||
</a> <a href="javascript:void(0);" bbType="d" bbTag="player0">
|
||||
<div title="Player" alt="Player" class="bbButton bbPlayer"></div>
|
||||
</a> <a href="javascript:void(0);" bbType="d" bbTag="coor0">
|
||||
<div title="Coordinates" alt="Coordinates"
|
||||
class="bbButton bbCoordinate"></div>
|
||||
</a> <a href="javascript:void(0);" bbType="d" bbTag="report0">
|
||||
<div title="Report" alt="Report" class="bbButton bbReport"></div>
|
||||
</a> <a href="javascript:void(0);" bbWin="resources"
|
||||
id="text_resourceButton">
|
||||
<div title="Resources" alt="Resources"
|
||||
class="bbButton bbResource"></div>
|
||||
</a> <a href="javascript:void(0);" bbWin="smilies"
|
||||
id="text_smilieButton">
|
||||
<div title="Smilies" alt="Smilies" class="bbButton bbSmilie"></div>
|
||||
</a> <a href="javascript:void(0);" bbWin="troops"
|
||||
id="text_troopButton">
|
||||
<div title="Troops" alt="Troops" class="bbButton bbTroop"></div>
|
||||
</a> <a href="javascript:void(0);" id="text_previewButton"
|
||||
bbArea="text">
|
||||
<div title="Preview" alt="Preview" class="bbButton bbPreview"></div>
|
||||
</a>
|
||||
|
||||
<div class="clear"></div>
|
||||
<div id="text_toolbarWindows">
|
||||
<div id="text_resources" name="text_resources">
|
||||
<a href="javascript:void(0);" bbType="o" bbTag="lumber"><img
|
||||
src="img/x.gif" class="r1" title="Wood" alt="Wood" /></a> <a
|
||||
href="javascript:void(0);" bbType="o" bbTag="clay"><img
|
||||
src="img/x.gif" class="r2" title="Clay" alt="Clay" /></a> <a
|
||||
href="javascript:void(0);" bbType="o" bbTag="iron"><img
|
||||
src="img/x.gif" class="r3" title="Iron" alt="Iron" /></a> <a
|
||||
href="javascript:void(0);" bbType="o" bbTag="crop"><img
|
||||
src="img/x.gif" class="r4" title="Crop" alt="Crop" /></a>
|
||||
</div>
|
||||
<div id="text_smilies" name="text_smilies">
|
||||
<a href="javascript:void(0);" bbType="s" bbTag="*aha*"><img
|
||||
class="smiley aha" src="img/x.gif" alt="*aha*" title="*aha*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*angry*"><img
|
||||
class="smiley angry" src="img/x.gif" alt="*angry*"
|
||||
title="*angry*" /></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*cool*"><img class="smiley cool" src="img/x.gif"
|
||||
alt="*cool*" title="*cool*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*cry*"><img
|
||||
class="smiley cry" src="img/x.gif" alt="*cry*" title="*cry*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*cute*"><img
|
||||
class="smiley cute" src="img/x.gif" alt="*cute*"
|
||||
title="*cute*" /></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*depressed*"><img class="smiley depressed"
|
||||
src="img/x.gif" alt="*depressed*" title="*depressed*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*eek*"><img
|
||||
class="smiley eek" src="img/x.gif" alt="*eek*" title="*eek*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*ehem*"><img
|
||||
class="smiley ehem" src="img/x.gif" alt="*ehem*"
|
||||
title="*ehem*" /></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*emotional*"><img class="smiley emotional"
|
||||
src="img/x.gif" alt="*emotional*" title="*emotional*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag=":D"><img
|
||||
class="smiley grin" src="img/x.gif" alt=":D" title=":D" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag=":)"><img
|
||||
class="smiley happy" src="img/x.gif" alt=":)" title=":)" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*hit*"><img
|
||||
class="smiley hit" src="img/x.gif" alt="*hit*" title="*hit*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*hmm*"><img
|
||||
class="smiley hmm" src="img/x.gif" alt="*hmm*" title="*hmm*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*hmpf*"><img
|
||||
class="smiley hmpf" src="img/x.gif" alt="*hmpf*"
|
||||
title="*hmpf*" /></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*hrhr*"><img class="smiley hrhr" src="img/x.gif"
|
||||
alt="*hrhr*" title="*hrhr*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*huh*"><img
|
||||
class="smiley huh" src="img/x.gif" alt="*huh*" title="*huh*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*lazy*"><img
|
||||
class="smiley lazy" src="img/x.gif" alt="*lazy*"
|
||||
title="*lazy*" /></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*love*"><img class="smiley love" src="img/x.gif"
|
||||
alt="*love*" title="*love*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*nocomment*"><img
|
||||
class="smiley nocomment" src="img/x.gif" alt="*nocomment*"
|
||||
title="*nocomment*" /></a><a href="javascript:void(0);"
|
||||
bbType="s" bbTag="*noemotion*"><img class="smiley noemotion"
|
||||
src="img/x.gif" alt="*noemotion*" title="*noemotion*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*notamused*"><img
|
||||
class="smiley notamused" src="img/x.gif" alt="*notamused*"
|
||||
title="*notamused*" /></a><a href="javascript:void(0);"
|
||||
bbType="s" bbTag="*pout*"><img class="smiley pout"
|
||||
src="img/x.gif" alt="*pout*" title="*pout*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*redface*"><img
|
||||
class="smiley redface" src="img/x.gif" alt="*redface*"
|
||||
title="*redface*" /></a><a href="javascript:void(0);"
|
||||
bbType="s" bbTag="*rolleyes*"><img class="smiley rolleyes"
|
||||
src="img/x.gif" alt="*rolleyes*" title="*rolleyes*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag=":("><img
|
||||
class="smiley sad" src="img/x.gif" alt=":(" title=":(" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*shy*"><img
|
||||
class="smiley shy" src="img/x.gif" alt="*shy*" title="*shy*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*smile*"><img
|
||||
class="smiley smile" src="img/x.gif" alt="*smile*"
|
||||
title="*smile*" /></a><a href="javascript:void(0);" bbType="s"
|
||||
bbTag="*tongue*"><img class="smiley tongue" src="img/x.gif"
|
||||
alt="*tongue*" title="*tongue*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag="*veryangry*"><img
|
||||
class="smiley veryangry" src="img/x.gif" alt="*veryangry*"
|
||||
title="*veryangry*" /></a><a href="javascript:void(0);"
|
||||
bbType="s" bbTag="*veryhappy*"><img class="smiley veryhappy"
|
||||
src="img/x.gif" alt="*veryhappy*" title="*veryhappy*" /></a><a
|
||||
href="javascript:void(0);" bbType="s" bbTag=";)"><img
|
||||
class="smiley wink" src="img/x.gif" alt=";)" title=";)" /></a>
|
||||
</div>
|
||||
<div id="text_troops" name="text_troops">
|
||||
<a href="javascript:void(0);" bbType="o" bbTag="tid1"><img
|
||||
class="unit u1" src="img/x.gif" title="Legionnaire"
|
||||
alt="Legionnaire" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid2"><img class="unit u2" src="img/x.gif"
|
||||
title="Praetorian" alt="Praetorian" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid3"><img
|
||||
class="unit u3" src="img/x.gif" title="Imperian"
|
||||
alt="Imperian" /></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid4"><img class="unit u4" src="img/x.gif"
|
||||
title="Equites Legati" alt="Equites Legati" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid5"><img
|
||||
class="unit u5" src="img/x.gif" title="Equites Imperatoris"
|
||||
alt="Equites Imperatoris" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid6"><img class="unit u6" src="img/x.gif"
|
||||
title="Equites Caesaris" alt="Equites Caesaris" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid7"><img
|
||||
class="unit u7" src="img/x.gif" title="Ram" alt="Ram" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid8"><img
|
||||
class="unit u8" src="img/x.gif" title="Fire Catapult"
|
||||
alt="Fire Catapult" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid9"><img class="unit u9" src="img/x.gif"
|
||||
title="Senator" alt="Senator" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid10"><img
|
||||
class="unit u10" src="img/x.gif" title="Settler" alt="Settler" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid11"><img
|
||||
class="unit u11" src="img/x.gif" title="Maceman" alt="Maceman" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid12"><img
|
||||
class="unit u12" src="img/x.gif" title="Spearman"
|
||||
alt="Spearman" /></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid13"><img class="unit u13" src="img/x.gif"
|
||||
title="Axeman" alt="Axeman" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid14"><img
|
||||
class="unit u14" src="img/x.gif" title="Scout" alt="Scout" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid15"><img
|
||||
class="unit u15" src="img/x.gif" title="Paladin" alt="Paladin" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid16"><img
|
||||
class="unit u16" src="img/x.gif" title="Teutonic Knight"
|
||||
alt="Teutonic Knight" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid17"><img class="unit u17" src="img/x.gif"
|
||||
title="Ram" alt="Ram" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid18"><img class="unit u18" src="img/x.gif"
|
||||
title="Catapult" alt="Catapult" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid19"><img
|
||||
class="unit u19" src="img/x.gif" title="Chieftain"
|
||||
alt="Chieftain" /></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid20"><img class="unit u20" src="img/x.gif"
|
||||
title="Settler" alt="Settler" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid21"><img
|
||||
class="unit u21" src="img/x.gif" title="Phalanx" alt="Phalanx" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid22"><img
|
||||
class="unit u22" src="img/x.gif" title="Swordsman"
|
||||
alt="Swordsman" /></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid23"><img class="unit u23" src="img/x.gif"
|
||||
title="Pathfinder" alt="Pathfinder" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid24"><img
|
||||
class="unit u24" src="img/x.gif" title="Theutates Thunder"
|
||||
alt="Theutates Thunder" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid25"><img class="unit u25" src="img/x.gif"
|
||||
title="Druidrider" alt="Druidrider" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid26"><img
|
||||
class="unit u26" src="img/x.gif" title="Haeduan" alt="Haeduan" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid27"><img
|
||||
class="unit u27" src="img/x.gif" title="Battering Ram"
|
||||
alt="Battering Ram" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid28"><img class="unit u28" src="img/x.gif"
|
||||
title="Trebuchet" alt="Trebuchet" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid29"><img
|
||||
class="unit u29" src="img/x.gif" title="Chief" alt="Chief" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid30"><img
|
||||
class="unit u30" src="img/x.gif" title="Settler" alt="Settler" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid31"><img
|
||||
class="unit u31" src="img/x.gif" title="Rat" alt="Rat" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid32"><img
|
||||
class="unit u32" src="img/x.gif" title="Spider" alt="Spider" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid33"><img
|
||||
class="unit u33" src="img/x.gif" title="Snake" alt="Snake" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid34"><img
|
||||
class="unit u34" src="img/x.gif" title="Bat" alt="Bat" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid35"><img
|
||||
class="unit u35" src="img/x.gif" title="Wild Boar"
|
||||
alt="Wild Boar" /></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid36"><img class="unit u36" src="img/x.gif"
|
||||
title="Wolf" alt="Wolf" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid37"><img class="unit u37" src="img/x.gif"
|
||||
title="Bear" alt="Bear" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid38"><img class="unit u38" src="img/x.gif"
|
||||
title="Crocodile" alt="Crocodile" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid39"><img
|
||||
class="unit u39" src="img/x.gif" title="Tiger" alt="Tiger" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid40"><img
|
||||
class="unit u40" src="img/x.gif" title="Elephant"
|
||||
alt="Elephant" /></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid41"><img class="unit u41" src="img/x.gif"
|
||||
title="Pikeman" alt="Pikeman" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid42"><img
|
||||
class="unit u42" src="img/x.gif" title="Thorned Warrior"
|
||||
alt="Thorned Warrior" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid43"><img class="unit u43" src="img/x.gif"
|
||||
title="Guardsman" alt="Guardsman" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid44"><img
|
||||
class="unit u44" src="img/x.gif" title="Birds of Prey"
|
||||
alt="Birds of Prey" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid45"><img class="unit u45" src="img/x.gif"
|
||||
title="Axerider" alt="Axerider" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid46"><img
|
||||
class="unit u46" src="img/x.gif" title="Natarian Knight"
|
||||
alt="Natarian Knight" /></a><a href="javascript:void(0);"
|
||||
bbType="o" bbTag="tid47"><img class="unit u47" src="img/x.gif"
|
||||
title="War Elephant" alt="War Elephant" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid48"><img
|
||||
class="unit u48" src="img/x.gif" title="Ballista"
|
||||
alt="Ballista" /></a><a href="javascript:void(0);" bbType="o"
|
||||
bbTag="tid49"><img class="unit u49" src="img/x.gif"
|
||||
title="Natarian Emperor" alt="Natarian Emperor" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="tid50"><img
|
||||
class="unit u50" src="img/x.gif" title="Settler" alt="Settler" /></a><a
|
||||
href="javascript:void(0);" bbType="o" bbTag="hero"><img
|
||||
class="unit uhero" src="img/x.gif" title="Hero" alt="Hero" /></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line bbLine"></div>
|
||||
|
||||
<textarea id="text" name="text"><?php echo $poss; ?></textarea>
|
||||
<div id="text_preview" name="text_preview"></div>
|
||||
</div> <script>
|
||||
var bbEditor = new BBEditor("text");
|
||||
</script>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p class="btn"><input type="image" id="fbtn_ok" value="ok" name="s1" class="dynamic_img" src="img/x.gif"
|
||||
alt="OK"/></form></p>
|
||||
<span style="color: #DD0000"><b>Warning:</b> you can't use the values <b>[message]</b> or <b>[/message]</b> in your post because it can cause problem with bbcode system.</span>
|
||||
<?php }
|
||||
}
|
||||
else{
|
||||
header("Location: banned.php");
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<p class="btn">
|
||||
<input type="image" id="fbtn_ok" value="ok" name="s1"
|
||||
class="dynamic_img" src="img/x.gif" alt="OK" />
|
||||
|
||||
</form>
|
||||
</p>
|
||||
<span style="color: #DD0000"><b>Warning:</b> you can't use the values <b>[message]</b>
|
||||
or <b>[/message]</b> in your post because it can cause problem with
|
||||
bbcode system.</span>
|
||||
@@ -1,27 +1,32 @@
|
||||
<?php
|
||||
############################################################
|
||||
## DO NOT REMOVE THIS NOTICE ##
|
||||
## MADE BY TTMTT ##
|
||||
## FIX BY RONIX ##
|
||||
## TRAVIANZ ##
|
||||
############################################################
|
||||
if($session->access!=BANNED){
|
||||
$displayarray = $database->getUserArray($session->uid,1);
|
||||
// ###########################################################
|
||||
// # DO NOT REMOVE THIS NOTICE ##
|
||||
// # MADE BY TTMTT ##
|
||||
// # FIX BY RONIX ##
|
||||
// # TRAVIANZ ##
|
||||
// ###########################################################
|
||||
if($session->access == BANNED){
|
||||
header("Location: banned.php");
|
||||
exit();
|
||||
}
|
||||
|
||||
$opt = $database->getAlliPermissions($session->uid, $aid);
|
||||
$displayarray = $database->getUserArray($session->uid, 1);
|
||||
$forumcat = $database->ForumCat(htmlspecialchars($displayarray['alliance']));
|
||||
$ally = $session->alliance;
|
||||
$public = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."forum_cat WHERE alliance = $ally AND forum_area = 1"), MYSQLI_ASSOC);
|
||||
$public1 = $public['Total'];
|
||||
$cofederation = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."forum_cat WHERE alliance = $ally AND forum_area = 2"), MYSQLI_ASSOC);
|
||||
$cofederation1 = $cofederation['Total'];
|
||||
$alliance = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."forum_cat WHERE alliance = $ally AND forum_area = 0"), MYSQLI_ASSOC);
|
||||
$alliance1 = $alliance['Total'];
|
||||
$closed = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."forum_cat WHERE alliance = $ally AND forum_area = 3"), MYSQLI_ASSOC);
|
||||
$closed1 = $closed['Total'];
|
||||
if($public1 != 0){
|
||||
$public = mysqli_fetch_array(mysqli_query($database->dblink, "SELECT Count(*) as Total FROM ".TB_PREFIX."forum_cat WHERE alliance = $ally AND forum_area = 1"), MYSQLI_ASSOC);
|
||||
$confederation = mysqli_fetch_array(mysqli_query($database->dblink, "SELECT Count(*) as Total FROM ".TB_PREFIX."forum_cat WHERE alliance = $ally AND forum_area = 2"), MYSQLI_ASSOC);
|
||||
$alliance = mysqli_fetch_array(mysqli_query($database->dblink, "SELECT Count(*) as Total FROM ".TB_PREFIX."forum_cat WHERE alliance = $ally AND forum_area = 0"), MYSQLI_ASSOC);
|
||||
$closed = mysqli_fetch_array(mysqli_query($database->dblink, "SELECT Count(*) as Total FROM ".TB_PREFIX."forum_cat WHERE alliance = $ally AND forum_area = 3"), MYSQLI_ASSOC);
|
||||
$countArray = [$alliance['Total'], $public['Total'], $confederation['Total'], $closed['Total']];
|
||||
$forumArea = ["Alliance Forum", "Public Forum", "Confederation Forum", "Closed Forum"];
|
||||
|
||||
foreach($countArray as $index => $count){
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="public"><thead>
|
||||
<table cellpadding="1" cellspacing="1" id="public">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="4">Public Forum</th>
|
||||
<th colspan="4"><?php echo $forumArea[$index]; ?></th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@@ -29,232 +34,67 @@ if($public1 != 0){
|
||||
<td>Forum name</td>
|
||||
<td> Threads </td>
|
||||
<td> Last post </td>
|
||||
</tr></thead><tbody>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach($forumcat as $arr) {
|
||||
if($arr['forum_area']==1){
|
||||
$countop = $database->CountCat($arr['id']);
|
||||
$lpost = "";
|
||||
$owner = "";
|
||||
if ($countop>0) {
|
||||
$ltopic = $database->LastTopic($arr['id']);
|
||||
foreach($ltopic as $las){}
|
||||
$lpos = $database->LastPost($las['id']);
|
||||
foreach($lpos as $pos){}
|
||||
if($database->CheckLastTopic($arr['id'])){
|
||||
if($database->CheckLastPost($las['id'])){
|
||||
$lpost = date('m/d/y H:i a',$pos['date']);
|
||||
$owner = $database->getUserArray($pos['owner'],1);
|
||||
}else{
|
||||
$lpost = date('m/d/y H:i a',$las['date']);
|
||||
$owner = $database->getUserArray($las['owner'],1);
|
||||
if($count == 0) echo "<tr><td colspan=\"4\" style=\"text-align: center\">".NO_FORUMS_YET."</td></tr>";
|
||||
|
||||
foreach($forumcat as $arr){
|
||||
if($arr['forum_area'] != $index) continue;
|
||||
|
||||
$countop = $database->CountCat($arr['id']);
|
||||
$lpost = $owner = "";
|
||||
if($countop > 0){
|
||||
$ltopic = $database->LastTopic($arr['id']);
|
||||
foreach($ltopic as $las){
|
||||
$lpos = $database->LastPost($las['id']);
|
||||
if($database->CheckLastTopic($arr['id'])){
|
||||
//If there are no posts yet, show the topic
|
||||
if($database->CheckLastPost($las['id']) == 0){
|
||||
$lpost = date('m/d/y H:i a', $las['date']);
|
||||
$owner = $database->getUserArray($las['owner'], 1);
|
||||
}else{
|
||||
foreach($lpos as $pos){
|
||||
$lpost = date('m/d/y H:i a', $pos['date']);
|
||||
$owner = $database->getUserArray($pos['owner'], 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '<tr><td class="ico">';
|
||||
if($database->CheckEditRes($aid)=="1" && ($database->isAllianceOwner($session->uid) == $arr['id'] || $arr['owner'] == $session->uid)){
|
||||
echo '<a class="up_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=-1" title="To top">
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo '<tr><td class="ico">';
|
||||
if($database->CheckEditRes($aid) == 1 && ($database->isAllianceOwner($session->uid) == $arr['alliance'] || $opt['opt5'] == 1) && isset($_GET['admin']) && !empty($_GET['admin']) && $_GET['admin'] == "switch_admin"){
|
||||
echo '<a class="up_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid='.$index.'&admin=pos&res=1" title="To top">
|
||||
<img src="img/x.gif" alt="To top" /></a><a class="edit" href="allianz.php?s=2&idf='.$arr['id'].'&admin=editforum" title="edit">
|
||||
<img src="img/x.gif" alt="edit" /></a><br />
|
||||
<a class="down_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=1" title="To bottom">
|
||||
<a class="down_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid='.$index.'&admin=pos&res=0" title="To bottom">
|
||||
<img src="img/x.gif" alt="To bottom" /></a>
|
||||
<a class="fdel" href="allianz.php?s=2&idf='.$arr['id'].'&admin=delforum" onClick="return confirm(\'confirm delete?\');" title="delete">
|
||||
<img src="img/x.gif" alt="delete" /></a>';
|
||||
}else{
|
||||
echo '<img class="folder" src="img/x.gif" title="Thread without new posts" alt="Thread without new posts">';
|
||||
}
|
||||
echo '</td><td class="tit">
|
||||
}
|
||||
else echo '<img class="folder" src="img/x.gif" title="Thread without new posts" alt="Thread without new posts">';
|
||||
|
||||
echo '</td><td class="tit">
|
||||
<a href="allianz.php?s=2&fid='.$arr['id'].'&pid='.$aid.'" title="'.stripslashes($arr['forum_name']).'">'.stripslashes($arr['forum_name']).'</a><br />'.stripslashes($arr['forum_des']).'</td>
|
||||
<td class="cou">'.$countop.'</td>
|
||||
<td class="last">'.$lpost.'</span><span><br />';
|
||||
if ($owner!="") {
|
||||
echo '<a href="spieler.php?uid='.$owner['id'].'">'.$owner['username'].'</a> <img class="latest_reply" src="img/x.gif" alt="Show last post" title="Show last post" />';
|
||||
}
|
||||
echo '</td>
|
||||
</tr>';
|
||||
|
||||
if(!empty($owner)){
|
||||
echo '<a href="spieler.php?uid='.$owner['id'].'">'.$owner['username'].'</a> <img class="latest_reply" src="img/x.gif" alt="Show last post" title="Show last post" />';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody></table>
|
||||
<?php
|
||||
}if($cofederation1 != 0){
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="confederation"><thead>
|
||||
<tr>
|
||||
<th colspan="4">Confederation Forum</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Forum name</td>
|
||||
<td> Threads </td>
|
||||
<td> Last post </td>
|
||||
</tr></thead><tbody>
|
||||
<?php
|
||||
foreach($forumcat as $arr) {
|
||||
if($arr['forum_area']==2){
|
||||
$countop = $database->CountCat($arr['id']);
|
||||
$lpost = "";
|
||||
$owner = "";
|
||||
if ($countop>0) {
|
||||
$ltopic = $database->LastTopic($arr['id']);
|
||||
foreach($ltopic as $las){}
|
||||
$lpos = $database->LastPost($las['id']);
|
||||
foreach($lpos as $pos){}
|
||||
if($database->CheckLastTopic($arr['id'])){
|
||||
if($database->CheckLastPost($las['id'])){
|
||||
$lpost = date('m/d/y H:i a',$pos['date']);
|
||||
$owner = $database->getUserArray($pos['owner'],1);
|
||||
}else{
|
||||
$lpost = date('m/d/y H:i a',$las['date']);
|
||||
$owner = $database->getUserArray($las['owner'],1);
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '<tr><td class="ico">';
|
||||
if($database->CheckEditRes($aid)=="1" && ($database->isAllianceOwner($session->uid) == $arr['id'] || $arr['owner'] == $session->uid)){
|
||||
echo '<a class="up_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=-1" title="To top"><img src="img/x.gif" alt="To top" /></a><a class="edit" href="allianz.php?s=2&idf='.$arr['id'].'&admin=editforum" title="edit"><img src="img/x.gif" alt="edit" /></a><br /><a class="down_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=1" title="To bottom"><img src="img/x.gif" alt="To bottom" /></a><a class="fdel" href="allianz.php?s=2&idf='.$arr['id'].'&admin=delforum" onClick="return confirm(\'confirm delete?\');" title="delete"><img src="img/x.gif" alt="delete" /></a>';
|
||||
}else{
|
||||
echo '<img class="folder" src="img/x.gif" title="Thread without new posts" alt="Thread without new posts">';
|
||||
}
|
||||
echo '</td><td class="tit">
|
||||
<a href="allianz.php?s=2&fid='.$arr['id'].'&pid='.$aid.'" title="'.stripslashes($arr['forum_name']).'">'.stripslashes($arr['forum_name']).'</a><br />'.stripslashes($arr['forum_des']).'</td>
|
||||
<td class="cou">'.$countop.'</td>
|
||||
<td class="last">'.$lpost.'</span><span><br />';
|
||||
if ($owner!="") {
|
||||
echo '<a href="spieler.php?uid='.$owner['id'].'">'.$owner['username'].'</a> <img class="latest_reply" src="img/x.gif" alt="Show last post" title="Show last post" />';
|
||||
}
|
||||
echo '</td>
|
||||
echo '</td>
|
||||
</tr>';
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody></table>
|
||||
<?php
|
||||
}if($alliance1 != 0){
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="alliance"><thead>
|
||||
<tr>
|
||||
<th colspan="4">Alliance Forum</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Forum name</td>
|
||||
<td> Threads </td>
|
||||
<td> Last post </td>
|
||||
</tr></thead><tbody>
|
||||
<?php
|
||||
foreach($forumcat as $arr) {
|
||||
if($arr['forum_area']==0){
|
||||
$countop = $database->CountCat($arr['id']);
|
||||
$lpost = "";
|
||||
$owner = "";
|
||||
if ($countop>0) {
|
||||
$ltopic = $database->LastTopic($arr['id']);
|
||||
foreach($ltopic as $las){}
|
||||
$lpos = $database->LastPost($las['id']);
|
||||
foreach($lpos as $pos){}
|
||||
if($database->CheckLastTopic($arr['id'])){
|
||||
if($database->CheckLastPost($las['id'])){
|
||||
$lpost = date('m/d/y H:i a',$pos['date']);
|
||||
$owner = $database->getUserArray($pos['owner'],1);
|
||||
}else{
|
||||
$lpost = date('m/d/y H:i a',$las['date']);
|
||||
$owner = $database->getUserArray($las['owner'],1);
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '<tr><td class="ico">';
|
||||
if($database->CheckEditRes($aid)=="1" && ($database->isAllianceOwner($session->uid) == $arr['id'] || $arr['owner'] == $session->uid)){
|
||||
echo '<a class="up_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=-1" title="To top"><img src="img/x.gif" alt="To top" /></a><a class="edit" href="allianz.php?s=2&idf='.$arr['id'].'&admin=editforum" title="edit"><img src="img/x.gif" alt="edit" /></a><br /><a class="down_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=1" title="To bottom"><img src="img/x.gif" alt="To bottom" /></a><a class="fdel" href="allianz.php?s=2&idf='.$arr['id'].'&admin=delforum" onClick="return confirm(\'confirm delete?\');" title="delete"><img src="img/x.gif" alt="delete" /></a>';
|
||||
}else{
|
||||
echo '<img class="folder" src="img/x.gif" title="Thread without new posts" alt="Thread without new posts">';
|
||||
}
|
||||
echo '</td><td class="tit"><a href="allianz.php?s=2&fid='.$arr['id'].'&pid='.$aid.'" title="'.stripslashes($arr['forum_name']).'">'.stripslashes($arr['forum_name']).'</a><br />'.stripslashes($arr['forum_des']).'</td>
|
||||
<td class="cou">'.$countop.'</td>
|
||||
<td class="last">'.$lpost.'</span><span><br />';
|
||||
if ($owner!="") {
|
||||
echo '<a href="spieler.php?uid='.$owner['id'].'">'.$owner['username'].'</a> <img class="latest_reply" src="img/x.gif" alt="Show last post" title="Show last post" />';
|
||||
}
|
||||
echo '</td>
|
||||
</tr>';
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody></table>
|
||||
<?php
|
||||
}
|
||||
if($closed1 != 0){
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="closed"><thead>
|
||||
<tr>
|
||||
<th colspan="4">Closed Forum</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Forum name</td>
|
||||
<td> Threads </td>
|
||||
<td> Last post </td>
|
||||
</tr></thead><tbody>
|
||||
<?php
|
||||
foreach($forumcat as $arr) {
|
||||
if($arr['forum_area']==3){
|
||||
$countop = $database->CountCat($arr['id']);
|
||||
$lpost = "";
|
||||
$owner = "";
|
||||
if ($countop>0) {
|
||||
$ltopic = $database->LastTopic($arr['id']);
|
||||
foreach($ltopic as $las){}
|
||||
$lpos = $database->LastPost($las['id']);
|
||||
foreach($lpos as $pos){}
|
||||
if($database->CheckLastTopic($arr['id'])){
|
||||
if($database->CheckLastPost($las['id'])){
|
||||
$lpost = date('m/d/y H:i a',$pos['date']);
|
||||
$owner = $database->getUserArray($pos['owner'],1);
|
||||
}else{
|
||||
$lpost = date('m/d/y H:i a',$las['date']);
|
||||
$owner = $database->getUserArray($las['owner'],1);
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '<tr><td class="ico">';
|
||||
if($database->CheckEditRes($aid)=="1" && ($database->isAllianceOwner($session->uid) == $arr['id'] || $arr['owner'] == $session->uid)){
|
||||
echo '<a class="up_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=-1" title="To top"><img src="img/x.gif" alt="To top" /></a><a class="edit" href="allianz.php?s=2&idf='.$arr['id'].'&admin=editforum" title="edit"><img src="img/x.gif" alt="edit" /></a><br /><a class="down_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=1" title="To bottom"><img src="img/x.gif" alt="To bottom" /></a><a class="fdel" href="allianz.php?s=2&idf='.$arr['id'].'&admin=delforum" onClick="return confirm(\'confirm delete?\');" title="delete"><img src="img/x.gif" alt="delete" /></a>';
|
||||
}else{
|
||||
echo '<img class="folder" src="img/x.gif" title="Thread without new posts" alt="Thread without new posts">';
|
||||
}
|
||||
echo '</td><td class="tit"><a href="allianz.php?s=2&fid='.$arr['id'].'&pid='.$aid.'" title="'.stripslashes($arr['forum_name']).'">'.stripslashes($arr['forum_name']).'</a><br />'.stripslashes($arr['forum_des']).'</td>
|
||||
<td class="cou">'.$countop.'</td>
|
||||
<td class="last">'.$lpost.'</span><span><br />';
|
||||
if ($owner!="") {
|
||||
echo '<a href="spieler.php?uid='.$owner['id'].'">'.$owner['username'].'</a> <img class="latest_reply" src="img/x.gif" alt="Show last post" title="Show last post" />';
|
||||
}
|
||||
echo '</td>
|
||||
</tr>';
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody></table>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } ?>
|
||||
<p>
|
||||
<?php
|
||||
if(isset($opt['opt5']) && $opt['opt5'] == 1){
|
||||
echo '<a href="allianz.php?s=2&admin=newforum"><img id="fbtn_newforum" class="dynamic_img" src="img/x.gif" alt="New forum" /></a>
|
||||
<a href="allianz.php?s='.$ids.((isset($_GET['admin']) && !empty($_GET['admin']) && $_GET['admin'] == "switch_admin") ? "" : "&admin=switch_admin").'" title="Toggle Admin mode"><img class="switch_admin dynamic_img" src="img/x.gif" alt="Toggle Admin mode" /></a>';
|
||||
}
|
||||
?>
|
||||
<p>
|
||||
<?php
|
||||
$opt = $database->getAlliPermissions($session->uid, $aid);
|
||||
if($opt['opt5'] == 1){
|
||||
echo '<a href="allianz.php?s=2&admin=newforum"><img id="fbtn_newforum" class="dynamic_img" src="img/x.gif" alt="New forum" /></a>
|
||||
<a href="allianz.php?s='.$ids.'&admin=switch_admin" title="Toggle Admin mode"><img class="switch_admin dynamic_img" src="img/x.gif" alt="Toggle Admin mode" /></a>';
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<?php }else{
|
||||
header("Location: banned.php");
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
@@ -5,48 +5,41 @@
|
||||
## FIX BY RONIX ##
|
||||
## TRAVIANZ ##
|
||||
############################################################
|
||||
if($session->access!=BANNED){
|
||||
$topic_id = $_GET['idt'];
|
||||
$show_topic = $database->ShowTopic($topic_id);
|
||||
foreach($show_topic as $topi) {
|
||||
$title = stripslashes($topi['title']);
|
||||
if($session->access == BANNED){
|
||||
header("Location: banned.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$topicID = $_GET['idt'];
|
||||
$showTopic = reset($database->ShowTopic($topicID));
|
||||
$title = stripslashes($showTopic['title']);
|
||||
?>
|
||||
<form method="post" action="allianz.php?s=2&fid=<?php echo $_GET['idf']; ?>&pid=<?php echo $aid; ?>">
|
||||
<form method="post" action="allianz.php?s=2&fid=<?php echo $_GET['fid']; ?>">
|
||||
<input type="hidden" name="s" value="2">
|
||||
<input type="hidden" name="tid" value="<?php echo $topic_id; ?>">
|
||||
<input type="hidden" name="tid" value="<?php echo $topicID; ?>">
|
||||
<input type="hidden" name="edittopic" value="1">
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="edit_topic"><thead>
|
||||
<tr>
|
||||
<th colspan="2">Edit topic</td>
|
||||
<td colspan="2">Edit topic</td>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
<tr>
|
||||
<th>Thread</th>
|
||||
|
||||
<td><input class="text" type="Text" name="thema" value="<?php echo $title; ?>" maxlength="35"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Move topic</td>
|
||||
<td>Move topic</td>
|
||||
<td><select class="dropdown" name="fid">
|
||||
<?php
|
||||
$show_cat = $database->ForumCat($session->alliance);
|
||||
foreach($show_cat as $cats) {
|
||||
if($cats['id'] == $_GET['idf']){
|
||||
echo '<option value="'.$cats['id'].'" selected>'.stripslashes($cats['forum_name']).'</option>';
|
||||
}else{
|
||||
echo '<option value="'.$cats['id'].'">'.stripslashes($cats['forum_name']).'</option>';
|
||||
}
|
||||
if($cats['id'] == $_GET['fid']) echo '<option value="'.$cats['id'].'" selected>'.stripslashes($cats['forum_name']).'</option>';
|
||||
else echo '<option value="'.$cats['id'].'">'.stripslashes($cats['forum_name']).'</option>';
|
||||
}
|
||||
?>
|
||||
</select></td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
||||
<p class="btn"><button id="fbtn_ok" value="ok" name="s1" class="trav_buttons" alt="OK" /> Ok </button></form></p>
|
||||
<?php }else{
|
||||
header("Location: banned.php");
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<p class="btn"><button id="fbtn_ok" value="ok" name="s1" class="trav_buttons"> OK </button></p></form>
|
||||
|
||||
@@ -5,14 +5,22 @@
|
||||
## FIX BY RONIX ##
|
||||
## TRAVIANZ ##
|
||||
############################################################
|
||||
if($session->access!=BANNED){
|
||||
if($session->access == BANNED){
|
||||
header("Location: banned.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$cat_id = $_GET['fid'];
|
||||
$CatName = stripslashes($database->ForumCatName($cat_id));
|
||||
|
||||
//Check if we're viewing a valid forum
|
||||
if(empty($CatName)) $alliance->redirect($_GET);
|
||||
|
||||
$opt = $database->getAlliPermissions($session->uid, $aid);
|
||||
$ChckTopic = $database->CheckCatTopic($cat_id);
|
||||
$Topics = $database->ForumCatTopic($cat_id);
|
||||
$TopicsStick = $database->ForumCatTopicStick($cat_id);
|
||||
$Topics = array_merge($database->ForumCatTopic($cat_id), $database->ForumCatTopicStick($cat_id));
|
||||
?>
|
||||
<h4><a href="allianz.php?s=2">Alliance</a> -> <a href="allianz.php?s=2&pid=<?php echo $_GET['pid']; ?>&fid=<?php echo $cat_id; ?>"><?php echo $CatName; ?></a></h4><table cellpadding="1" cellspacing="1" id="topics"><thead>
|
||||
<h4><a href="allianz.php?s=2">Alliance</a> -> <a href="allianz.php?s=2&fid=<?php echo $cat_id; ?>"><?php echo $CatName; ?></a></h4><table cellpadding="1" cellspacing="1" id="topics"><thead>
|
||||
<tr>
|
||||
<th colspan="4"><?php echo $CatName; ?></th>
|
||||
</tr>
|
||||
@@ -24,7 +32,10 @@ $TopicsStick = $database->ForumCatTopicStick($cat_id);
|
||||
</tr></thead><tbody>
|
||||
<?php
|
||||
if($ChckTopic){
|
||||
foreach($TopicsStick as $arrs) {
|
||||
foreach($Topics as $arrs) {
|
||||
$checkArray = ['aid' => $aid, 'alliance' => $arrs['alliance'], 'forum_perm' => $opt['opt5'],
|
||||
'owner' => $arrs['owner'], 'admin' => $_GET['admin']];
|
||||
|
||||
$CountPosts = $database->CountPost($arrs['id']);
|
||||
$lposts = $database->LastPost($arrs['id']);
|
||||
foreach($lposts as $post) {
|
||||
@@ -38,56 +49,28 @@ if($ChckTopic){
|
||||
}
|
||||
|
||||
echo '<tr><td class="ico">';
|
||||
if($database->CheckEditRes($aid)=="1" && ($database->isAllianceOwner($session->uid) == $arrs['id'] || $arrs['owner'] == $session->uid)){
|
||||
if(Alliance::canAct($checkArray))
|
||||
{
|
||||
if($database->CheckCloseTopic($arrs['id']) == 1){
|
||||
$locks = '<a class="unlock" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=unlock" title="open topic"><img src="img/x.gif" alt="open topic" /></a>';
|
||||
}else{
|
||||
$locks = '<a class="lock" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=lock" title="close topic"><img src="img/x.gif" alt="close topic" /></a>';
|
||||
}
|
||||
echo ''.$locks.'<a class="edit" href="?s=2&idf='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=edittopic" title="edit"><img src="img/x.gif" alt="edit" /></a><br /><a class="unpin" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=unpin" title="stick topic"><img src="img/x.gif" alt="stick topic" /></a><a class="fdel" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=deltopic" title="delete"><img src="img/x.gif" alt="delete" onClick="return confirm(\'confirm delete?\');" /></a>';
|
||||
}elseif($arrs['close']=="1"){
|
||||
echo '<img class="folder_sticky_lock" src="img/x.gif" alt="Closed Thread without new posts" title="Closed Thread without new posts" />';
|
||||
}else{
|
||||
echo '<img class="folder_sticky" src="img/x.gif" alt="Important Thread without new posts" title="Important Thread without new posts" />';
|
||||
}
|
||||
echo '</td>
|
||||
<td class="tit"><a href="allianz.php?s=2&fid2='.$arrs['cat'].'&pid='.$aid.'&tid='.$arrs['id'].'">'.stripslashes($arrs['title']).'</a><br></td>
|
||||
<td class="cou">'.$CountPosts.'</td>
|
||||
<td class="last">'.$post_dates.'<br /><a href="spieler.php?uid='.$arrs['owner'].'">'.$owner_topics['username'].'</a> <a href="allianz.php?s=2&fid2='.$arrs['cat'].'&pid='.$aid.'&tid='.$arrs['id'].'&seite=max"><img class="latest_reply" src="img/x.gif" alt="Show last post" title="Show last post" /></a>
|
||||
</td></tr>';
|
||||
|
||||
}
|
||||
|
||||
foreach($Topics as $arr) {
|
||||
$CountPost = $database->CountPost($arr['id']);
|
||||
$lpost = $database->LastPost($arr['id']);
|
||||
foreach($lpost as $pos) {
|
||||
}
|
||||
if($database->CheckLastPost($arr['id'])){
|
||||
$post_date = date('m/d/y, H:i a',$pos['date']);
|
||||
$owner_topic = $database->getUserArray($pos['owner'],1);
|
||||
}else{
|
||||
$post_date = date('m/d/y, H:i a',$arr['date']);
|
||||
$owner_topic = $database->getUserArray($arr['owner'],1);
|
||||
}
|
||||
|
||||
echo '<tr><td class="ico">';
|
||||
if($database->CheckEditRes($aid)=="1" && ($database->isAllianceOwner($session->uid) == $arr['id'] || $arr['owner'] == $session->uid)){
|
||||
if($database->CheckCloseTopic($arr['id']) == 1){
|
||||
$lock = '<a class="unlock" href="?s=2&fid='.$_GET['fid'].'&idt='.$arr['id'].'&admin=unlock" title="open topic"><img src="img/x.gif" alt="open topic" /></a>';
|
||||
if($arrs['stick'] == 1){
|
||||
$pin = '<a class="unpin" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=unpin" title="Unstick topic"><img src="img/x.gif" alt="Unstick topic" /></a>';
|
||||
}else{
|
||||
$lock = '<a class="lock" href="?s=2&fid='.$_GET['fid'].'&idt='.$arr['id'].'&admin=lock" title="close topic"><img src="img/x.gif" alt="close topic" /></a>';
|
||||
$pin = '<a class="pin" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=pin" title="Stick topic"><img src="img/x.gif" alt="Stick topic" /></a>';
|
||||
}
|
||||
echo ''.$lock.'<a class="edit" href="?s=2&idf='.$_GET['fid'].'&idt='.$arr['id'].'&admin=edittopic" title="edit"><img src="img/x.gif" alt="edit" /></a><br /><a class="pin" href="?s=2&fid='.$_GET['fid'].'&idt='.$arr['id'].'&admin=pin" title="stick topic"><img src="img/x.gif" alt="stick topic" /></a><a class="fdel" href="?s=2&fid='.$_GET['fid'].'&idt='.$arr['id'].'&admin=deltopic" title="delete"><img src="img/x.gif" alt="delete" onClick="return confirm(\'confirm delete?\');" /></a>';
|
||||
}elseif($arr['close']=="1"){
|
||||
echo '<img class="folder_lock" src="img/x.gif" alt="Closed Thread without new posts" title="Closed Thread without new posts" />';
|
||||
echo $locks.'<a class="edit" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=edittopic" title="edit"><img src="img/x.gif" alt="edit" /></a><br />'.$pin.'<a class="fdel" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=deltopic" title="delete"><img src="img/x.gif" alt="delete" onClick="return confirm(\'confirm delete?\');" /></a>';
|
||||
}elseif($arrs['close'] == 1){
|
||||
echo '<img class="folder_'.($arrs['stick'] == 1 ? 'sticky_' : 'lock').'lock" src="img/x.gif" alt="Closed Thread without new posts" title="Closed Thread without new posts" />';
|
||||
}else{
|
||||
echo '<img class="folder" src="img/x.gif" title="Thread without new posts" alt="Thread without new posts">';
|
||||
echo '<img class="folder'.($arrs['stick'] == 1 ? '_sticky' : '').'" src="img/x.gif" alt="'.($arrs['stick'] == 1 ? 'Important ' : '').'Thread without new posts" title="'.($arrs['stick'] == 1 ? 'Important ' : '').'Thread without new posts" />';
|
||||
}
|
||||
echo '</td>
|
||||
<td class="tit"><a href="allianz.php?s=2&fid2='.$arr['cat'].'&pid='.$aid.'&tid='.$arr['id'].'">'.stripslashes($arr['title']).'</a><br></td>
|
||||
<td class="cou">'.$CountPost.'</td>
|
||||
<td class="last">'.$post_date.'<br /><a href="spieler.php?uid='.$arr['owner'].'">'.$owner_topic['username'].'</a> <a href="allianz.php?s=2&aid='.$aid.'&tid='.$arr['id'].'&seite=max"><img class="latest_reply" src="img/x.gif" alt="Show last post" title="Show last post" /></a>
|
||||
<td class="tit"><a href="allianz.php?s=2&fid2='.$arrs['cat'].'&tid='.$arrs['id'].'">'.stripslashes($arrs['title']).'</a><br></td>
|
||||
<td class="cou">'.$CountPosts.'</td>
|
||||
<td class="last">'.$post_dates.'<br /><a href="spieler.php?uid='.$arrs['owner'].'">'.$owner_topics['username'].'</a> <a href="allianz.php?s=2&fid2='.$arrs['cat'].'&pid='.$aid.'&tid='.$arrs['id'].'"><img class="latest_reply" src="img/x.gif" alt="Show last post" title="Show last post" /></a>
|
||||
</td></tr>';
|
||||
|
||||
}
|
||||
@@ -100,14 +83,8 @@ echo '<tr>
|
||||
</tbody></table><p>
|
||||
<a href="allianz.php?s=2&pid=<?php echo $aid; ?>&fid=<?php echo $cat_id; ?>&ac=newtopic"><img id="fbtn_post" class="dynamic_img" src="img/x.gif" alt="Post new thread" /></a>
|
||||
<?php
|
||||
$opt = $database->getAlliPermissions($session->uid, $aid);
|
||||
if(isset($opt['opt5']) && $opt['opt5']== 1){
|
||||
echo '<a href="allianz.php?s=2&fid='.$cat_id.'&seite=1&admin=switch_admin" title="Toggle Admin mode"><img class="switch_admin dynamic_img" src="img/x.gif" alt="Toggle Admin mode" /></a>';
|
||||
echo '<a href="allianz.php?s=2&fid='.$cat_id.((isset($_GET['admin']) && !empty($_GET['admin']) && $_GET['admin'] == "switch_admin") ? "" : "&admin=switch_admin").'" title="Toggle Admin mode"><img class="switch_admin dynamic_img" src="img/x.gif" alt="Toggle Admin mode" /></a>';
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<?php }else{
|
||||
header("Location: banned.php");
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
@@ -5,11 +5,14 @@
|
||||
## FIX BY RONIX ##
|
||||
## TRAVIANZ ##
|
||||
############################################################
|
||||
if($session->access!=BANNED){
|
||||
if($session->access == BANNED){
|
||||
header("Location: banned.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<form method="post" name="post" action="allianz.php?s=2&fid=<?php echo $_GET['fid']; ?>&pid=<?php echo $_GET['pid']; ?>">
|
||||
<form method="post" name="post" action="allianz.php?s=2&fid=<?php echo $_GET['fid']; ?>">
|
||||
<input type="hidden" name="newtopic" value="1">
|
||||
<input type="hidden" name="pid" value="<?php echo $_GET['pid']; ?>">
|
||||
<input type="hidden" name="fid" value="<?php echo $_GET['fid']; ?>">
|
||||
<input type="hidden" name="ac" value="newtopic">
|
||||
|
||||
@@ -108,7 +111,7 @@ Option 8: <input class="text" type="text" name="option_8" maxlength="100" style=
|
||||
<tr>
|
||||
<th>ends on</th>
|
||||
<td>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function voteEnd() {
|
||||
if (document.post.umfrage_ende.checked == true){
|
||||
@@ -136,9 +139,4 @@ Option 8: <input class="text" type="text" name="option_8" maxlength="100" style=
|
||||
|
||||
|
||||
<p class="btn"><input type="image" id="fbtn_ok" value="ok" name="s1" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
<span style="color: #DD0000"><b>Warning:</b> you can't use the values <b>[message]</b> or <b>[/message]</b> in your post because it can cause problem with bbcode system.</span>
|
||||
<?php }else{
|
||||
header("Location: banned.php");
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<span style="color: #DD0000"><b>Warning:</b> you can't use the values <b>[message]</b> or <b>[/message]</b> in your post because it can cause problem with bbcode system.</span>
|
||||
@@ -1,178 +1,192 @@
|
||||
<?php
|
||||
############################################################
|
||||
## DO NOT REMOVE THIS NOTICE ##
|
||||
## MADE BY TTMTT ##
|
||||
## FIX BY RONIX ##
|
||||
## TRAVIANZ ##
|
||||
############################################################
|
||||
if($session->access!=BANNED){
|
||||
// ###########################################################
|
||||
// # DO NOT REMOVE THIS NOTICE ##
|
||||
// # MADE BY TTMTT ##
|
||||
// # FIX BY RONIX ##
|
||||
// # TRAVIANZ ##
|
||||
// ###########################################################
|
||||
if($session->access == BANNED){
|
||||
header("Location: banned.php");
|
||||
exit();
|
||||
}
|
||||
|
||||
$tid = $_GET['tid'];
|
||||
$opt = $database->getAlliPermissions($session->uid, $aid);
|
||||
$topics = $database->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);
|
||||
foreach($topics as $arr){
|
||||
$cat_id = $arr['cat'];
|
||||
$owner = $database->getUserArray($arr['owner'], 1);
|
||||
$CatName = stripslashes($database->ForumCatName($cat_id));
|
||||
$allianceinfo = $database->getAlliance($owner['alliance']);
|
||||
}
|
||||
$date = date('m/d/y H:i a',$arr['date']);
|
||||
$date = date('m/d/y H:i a', $arr['date']);
|
||||
$varray = $database->getProfileVillages($arr['owner']);
|
||||
|
||||
$totalpop = 0;
|
||||
foreach($varray as $vil) {
|
||||
$totalpop += $vil['pop'];
|
||||
}
|
||||
foreach($varray as $vil) $totalpop += $vil['pop'];
|
||||
|
||||
$countAu = $database->CountTopic($arr['owner']);
|
||||
$displayarray = $database->getUserArray($arr['owner'],1);
|
||||
if($displayarray['tribe'] == 1) {
|
||||
$trip = "Fire";
|
||||
}else if($displayarray['tribe'] == 2) {
|
||||
$trip = "Water";
|
||||
}else if($displayarray['tribe'] == 3) {
|
||||
$trip = "Earth";
|
||||
}else if($displayarray['tribe'] == 4) {
|
||||
$trip = "Air";
|
||||
}else if($displayarray['tribe'] == 5) {
|
||||
$trip = "Lightning";
|
||||
}
|
||||
$tribeArray = [ROMANS, TEUTONS, GAULS];
|
||||
$displayarray = $database->getUserArray($arr['owner'], 1);
|
||||
$trip = $tribeArray[$displayarray['tribe'] - 1];
|
||||
|
||||
$input = $arr['post'];
|
||||
$alliance = $arr['alliance0'];
|
||||
$player = $arr['player0'];
|
||||
$coor = $arr['coor0'];
|
||||
$report = $arr['report0'];
|
||||
$bbcoded = $input;
|
||||
include("GameEngine/BBCode.php");
|
||||
include ("GameEngine/BBCode.php");
|
||||
$bbcode_topic = stripslashes(nl2br($bbcoded));
|
||||
?>
|
||||
<h4><a href="allianz.php?s=2&pid=<?php echo $arr['alliance']; ?>">Alliance</a> -> <a href="allianz.php?s=2&pid=<?php echo $arr['alliance']; ?>&fid=<?php echo $arr['cat']; ?>"><?php echo $CatName; ?></a></h4><table cellpadding="1" cellspacing="1" id="posts"><thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php echo stripslashes($arr['title']); ?></th>
|
||||
<h4>
|
||||
<a href="allianz.php?s=2">Alliance</a> -> <a
|
||||
href="allianz.php?s=2&fid=<?php echo $arr['cat']; ?>"><?php echo $CatName; ?></a>
|
||||
</h4>
|
||||
<table cellpadding="1" cellspacing="1" id="posts">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php echo stripslashes($arr['title']); ?></th>
|
||||
|
||||
</tr><tr>
|
||||
<td>Author</td>
|
||||
<td>Message</td>
|
||||
</tr></thead><tbody>
|
||||
<tr><td class="pinfo"><a class="name" href="spieler.php?uid=<?php echo $arr['owner']; ?>"><?php echo $owner['username']; ?></a><br /><a href="allianz.php?aid=<?php echo $allianceinfo['id']; ?>"><?php echo $allianceinfo['tag']; ?></a><br />
|
||||
Posts: <?php echo $countAu; ?><br />
|
||||
<br />
|
||||
Pop.: <?php echo $totalpop; ?><br />
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Author</td>
|
||||
<td>Message</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="pinfo"><a class="name"
|
||||
href="spieler.php?uid=<?php echo $arr['owner']; ?>"><?php echo $owner['username']; ?></a><br />
|
||||
<a href="allianz.php?aid=<?php echo $allianceinfo['id']; ?>"><?php echo $allianceinfo['tag']; ?></a><br />
|
||||
Posts: <?php echo $countAu; ?><br /> <br />
|
||||
Pop: <?php echo $totalpop; ?><br />
|
||||
Villages: <?php echo count($varray);?><br />
|
||||
<?php echo $trip; ?>
|
||||
</td>
|
||||
<td class="pcontent"><div class="posted">created: <?php echo $date; ?></div>
|
||||
<td class="pcontent"><div class="posted">created: <?php echo $date; ?></div>
|
||||
<?php
|
||||
if($database->CheckEditRes($aid)=="1" && ($database->isAllianceOwner($session->uid) == $arr['id'] || $arr['owner'] == $session->uid)){
|
||||
echo '<div class="admin"><a class="edit" href="allianz.php?s=2&pid='.$arr['alliance'].'&fid2='.$_GET['fid2'].'&idf='.$arr['cat'].'&idt='.$arr['id'].'&admin=editans"><img src="img/x.gif" title="edit" alt="edit" /></a><a class="fdel" href="?s=2&pid='.$arr['alliance'].'&tid='.$arr['id'].'&admin=deltopic" onClick="return confirm(\'confirm delete?\');"><img src="img/x.gif" title="delete" alt="delete" /></a></div><br />';
|
||||
$checkArray = ['aid' => $aid, 'alliance' => $arr['alliance'], 'forum_perm' => $opt['opt5'],
|
||||
'owner' => $arr['owner'], 'admin' => $_GET['admin']];
|
||||
|
||||
if(Alliance::canAct($checkArray)){
|
||||
echo '<div class="admin"><a class="edit" href="allianz.php?s=2&idt='.$arr['id'].'&admin=editans"><img src="img/x.gif" title="edit" alt="edit" /></a><a class="fdel" href="?s=2&fid='.$arr['cat'].'&idt='.$arr['id'].'&admin=deltopic" onClick="return confirm(\'confirm delete?\');"><img src="img/x.gif" title="delete" alt="delete" /></a></div><br />';
|
||||
}
|
||||
?>
|
||||
<div class="clear dotted"></div><div class="text"><?php echo $bbcode_topic; ?></div></td>
|
||||
</tr>
|
||||
<?php if($database->checkSurvey($arr['id'])){
|
||||
$survey = $database->getSurvey($arr['id']);
|
||||
if(!$database->checkVote($arr['id'], $session->uid) && ($survey['ends'] > time() || $survey['ends'] == 0)){
|
||||
?>
|
||||
<tr><td colspan="2"><div><center>Survey: <?php echo $survey['title']; ?></center></div>
|
||||
<div class="clear dotted"></div>
|
||||
<form method="post" name="post" action="allianz.php?s=2&fid2=<?php echo $_GET['fid2']; ?>&pid=<?php echo $_GET['pid']; ?>&tid=<?php echo $_GET['tid']; ?>">
|
||||
<table width="100%" border="0" align="left" cellPadding="0" style="border-collapse: collapse">
|
||||
<div class="text"><?php echo $bbcode_topic; ?></div></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
if($database->checkSurvey($arr['id'])){
|
||||
$survey = $database->getSurvey($arr['id']);
|
||||
if(!$database->checkVote($arr['id'], $session->uid) && ($survey['ends'] > time() || $survey['ends'] == 0)){
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="2"><div style="text-align: center">Survey: <?php echo $survey['title']; ?></div>
|
||||
<div class="clear dotted"></div>
|
||||
<form method="post" name="post"
|
||||
action="allianz.php?s=2&tid=<?php echo $_GET['tid']; ?>">
|
||||
<table width="100%" border="0" align="left" cellPadding="0"
|
||||
style="border-collapse: collapse">
|
||||
<?php
|
||||
for($i=1;$i<=8;$i++){
|
||||
if (!empty($survey['option'.$i])) {
|
||||
?>
|
||||
for($i = 1; $i <= 8; $i++){
|
||||
if(!empty($survey['option'.$i])){
|
||||
?>
|
||||
<tr>
|
||||
<td width="5%">
|
||||
<input class="radio" type="radio" name="vote" value="<?php echo $i; ?>" /></td>
|
||||
<td width="95%">
|
||||
<td width="5%"><input class="radio" type="radio" name="vote"
|
||||
value="<?php echo $i; ?>" /></td>
|
||||
<td width="95%">
|
||||
<?php echo $survey['option'.$i]; ?>
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<div class="text">
|
||||
<input type="hidden" name="fid2" value="<?php echo $_GET['fid2']; ?>" />
|
||||
<input type="hidden" name="pid" value="<?php echo $_GET['pid']; ?>" />
|
||||
<input type="hidden" name="tid" value="<?php echo $_GET['tid']; ?>" />
|
||||
<p class="btn"><input type="image" id="fbtn_vote" value="ok" name="s1" class="dynamic_img" src="img/x.gif" alt="Vote" /></form></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</table>
|
||||
<div class="text">
|
||||
<input type="hidden" name="fid2"
|
||||
value="<?php echo $_GET['fid2']; ?>" /> <input type="hidden"
|
||||
name="tid" value="<?php echo $_GET['tid']; ?>" />
|
||||
<p class="btn">
|
||||
<input type="image" id="fbtn_vote" value="ok" name="s1"
|
||||
class="dynamic_img" src="img/x.gif" alt="Vote" />
|
||||
|
||||
</form>
|
||||
</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<?php }else{ ?>
|
||||
<tr><td class="pcontent" colspan="2"><div><center>Survey: <?php echo $survey['title']; ?></center></div>
|
||||
<div class="clear dotted"></div><div class="text">
|
||||
<tr>
|
||||
<td class="pcontent" colspan="2">
|
||||
<div style="text-align: center">Survey: <?php echo $survey['title']; ?></div>
|
||||
<div class="clear dotted"></div>
|
||||
<div class="text">
|
||||
<?php
|
||||
$sum = $database->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;
|
||||
}
|
||||
?>
|
||||
<?php echo $survey['option'.$i]." "; ?><img src="<?php echo GP_LOCATE; ?>/img/f/c4.gif" width="<?php echo $width; ?>" /><?php echo " ".$survey['vote'.$i]; ?></br>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
$sum = $database->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;
|
||||
?>
|
||||
<?php echo $survey['option'.$i]." "; ?><img
|
||||
src="<?php echo GP_LOCATE; ?>/img/f/c4.gif"
|
||||
width="<?php echo $width; ?>" /><?php echo " ".$survey['vote'.$i]; ?></br>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<?php }} ?>
|
||||
<?php
|
||||
foreach($posts as $po) {
|
||||
|
||||
$date = date('m/d/y H:i a',$po['date']);
|
||||
foreach($posts as $po){
|
||||
$topic = reset($database->ShowTopic($po['topic']));
|
||||
$checkArray = ['aid' => $aid, 'alliance' => $topic['alliance'], 'forum_perm' => $opt['opt5'],
|
||||
'owner' => $po['owner'], 'admin' => $_GET['admin']];
|
||||
|
||||
$date = date('m/d/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);
|
||||
if($displayarray['tribe'] == 1) {
|
||||
$trip = "Roman";
|
||||
}else if($displayarray['tribe'] == 2) {
|
||||
$trip = "Teutons";
|
||||
}else if($displayarray['tribe'] == 3) {
|
||||
$trip = "Gauls";
|
||||
}
|
||||
$owner = $database->getUserArray($po['owner'],1);
|
||||
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'];
|
||||
$alliance = $po['alliance0'];
|
||||
$player = $po['player0'];
|
||||
$coor = $po['coor0'];
|
||||
$report = $po['report0'];
|
||||
include("GameEngine/BBCode.php");
|
||||
include ("GameEngine/BBCode.php");
|
||||
$bbcode_post = stripslashes(nl2br($bbcoded));
|
||||
|
||||
echo '<tr><td class="pinfo"><a class="name" href="spieler.php?uid='.$po['owner'].'">'.$owner['username'].'</a><br /><a href="allianz.php?aid='.$allianceinfo['id'].'">'.$allianceinfo['tag'].'</a><br />
|
||||
|
||||
echo '<tr><td class="pinfo"><a class="name" href="spieler.php?uid='.$po['owner'].'">'.$owner['username'].'</a><br /><a href="allianz.php?aid='.$allianceinfo['id'].'">'.$allianceinfo['tag'].'</a><br />
|
||||
Posts: '.$countAu.'<br />
|
||||
<br />
|
||||
Inhbs.: '.$totalpop.'<br />
|
||||
Pop: '.$totalpop.'<br />
|
||||
Villages: '.count($varray).'<br />
|
||||
'.$trip.'
|
||||
</td>
|
||||
<td class="pcontent"><div class="posted">created: '.$date.'</div>';
|
||||
if($database->CheckEditRes($aid)=="1" && ($database->isAllianceOwner($session->uid) == $po['id'] || $po['owner'] == $session->uid)){
|
||||
echo '<div class="admin"><a class="edit" href="allianz.php?s=2&pid='.$arr['alliance'].'&fid2='.$_GET['fid2'].'&idt='.$_GET['tid'].'&pod='.$po['id'].'&admin=editpost"><img src="img/x.gif" title="edit" alt="edit" /></a><a class="fdel" href="?s=2&pid='.$arr['alliance'].'&pod='.$po['id'].'&tid='.$_GET['tid'].'&admin=delpost" onClick="return confirm(\'confirm delete?\');"><img src="img/x.gif" title="delete" alt="delete" /></a></div><br />';
|
||||
if(Alliance::canAct($checkArray)){
|
||||
echo '<div class="admin"><a class="edit" href="allianz.php?s=2&fid='.$topic['cat'].'&tid='.$_GET['tid'].'&pod='.$po['id'].'&admin=editpost"><img src="img/x.gif" title="edit" alt="edit" /></a><a class="fdel" href="?s=2&pod='.$po['id'].'&tid='.$_GET['tid'].'&fid2='.$topic['cat'].'&admin=delpost" onClick="return confirm(\'confirm delete?\');"><img src="img/x.gif" title="delete" alt="delete" /></a></div><br />';
|
||||
}
|
||||
echo '<div class="clear dotted"></div><div class="text">'.$bbcode_post.'</div></td>
|
||||
echo '<div class="clear dotted"></div><div class="text">'.$bbcode_post.'</div></td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody></table><div style="margin-top: 15px;">
|
||||
<?php
|
||||
if(empty($arr['close'])){
|
||||
echo '<a href="allianz.php?s=2&fid2='.$arr['cat'].'&pid='.$arr['alliance'].'&tid='.$arr['id'].'&ac=newpost"><img id="fbtn_reply" class="dynamic_img"src="img/x.gif" alt="Replies" /></a>';
|
||||
}
|
||||
if($opt['opt5'] == 1){
|
||||
echo '<a href="allianz.php?s=2&fid2='.$arr['cat'].'&pid='.$aid.'&tid='.$arr['id'].'&admin=switch_admin" title="Toggle Admin mode"><img class="switch_admin dynamic_img" src="img/x.gif" alt="Toggle Admin mode" /></a>';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
exit;
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="margin-top: 15px;">
|
||||
<?php
|
||||
if(empty($arr['close'])){
|
||||
echo '<a href="allianz.php?s=2&tid='.$arr['id'].'&ac=newpost"><img id="fbtn_reply" class="dynamic_img"src="img/x.gif" alt="Replies" /></a>';
|
||||
}
|
||||
?>
|
||||
if($opt['opt5'] == 1){
|
||||
echo '<a href="allianz.php?s=2&tid='.$arr['id'].((isset($_GET['admin']) && !empty($_GET['admin']) && $_GET['admin'] == "switch_admin") ? "" : "&admin=switch_admin").'" title="Toggle Admin mode"><img class="switch_admin dynamic_img" src="img/x.gif" alt="Toggle Admin mode" /></a>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -1,17 +1,23 @@
|
||||
<?php
|
||||
//////////////// made by TTMTT ////////////////
|
||||
if($session->access!=BANNED){
|
||||
$tid = $_GET['tid'];
|
||||
$topics = $database->ShowTopic($tid);
|
||||
foreach($topics as $arr) {
|
||||
$title = stripslashes($arr['title']);
|
||||
if($session->access == BANNED){
|
||||
header("Location: banned.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$tid = $_GET['tid'];
|
||||
$topic = reset($database->ShowTopic($tid));
|
||||
|
||||
//Check if we're creating a post for a valid topic
|
||||
if(empty($topic)) $alliance->redirect($_GET);
|
||||
|
||||
$title = stripslashes($topic['title']);
|
||||
|
||||
?>
|
||||
<form method="post" name="post" action="allianz.php?s=2&fid2=<?php echo $_GET['fid2']; ?>&pid=<?php echo $_GET['pid']; ?>&tid=<?php echo $_GET['tid']; ?>">
|
||||
<form method="post" name="post" action="allianz.php?s=2&fid2=<?php echo $topic['cat']; ?>&tid=<?php echo $_GET['tid']; ?>">
|
||||
<input type="hidden" name="s" value="2">
|
||||
<input type="hidden" name="pid" value="<?php echo $_GET['pid']; ?>">
|
||||
<input type="hidden" name="tid" value="<?php echo $_GET['tid']; ?>">
|
||||
<input type="hidden" name="fid2" value="<?php echo $_GET['fid2']; ?>">
|
||||
<input type="hidden" name="fid2" value="<?php echo $topic['cat']; ?>">
|
||||
<input type="hidden" name="newpost" value="1">
|
||||
|
||||
<input type="hidden" name="checkstr" value="c0d"><table cellpadding="1" cellspacing="1" id="new_post"><thead>
|
||||
@@ -70,9 +76,4 @@ foreach($topics as $arr) {
|
||||
</tbody></table>
|
||||
|
||||
<p class="btn"><input type="image" id="fbtn_ok" value="ok" name="s1" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
<span style="color: #DD0000"><b>Warning:</b> you can't use the values <b>[message]</b> or <b>[/message]</b> in your post because it can cause problem with bbcode system.</span>
|
||||
<?php }else{
|
||||
header("Location: banned.php");
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<span style="color: #DD0000"><b>Warning:</b> you can't use the values <b>[message]</b> or <b>[/message]</b> in your post because it can cause problem with bbcode system.</span>
|
||||
@@ -5,12 +5,17 @@
|
||||
## FIX BY RONIX ##
|
||||
## TRAVIANZ ##
|
||||
############################################################
|
||||
if($session->access!=BANNED){
|
||||
$forum_data = $database->ForumCatEdit($_GET['idf']);
|
||||
foreach($forum_data as $cats) {
|
||||
$cat_name = stripslashes($cats['forum_name']);
|
||||
$cat_des = stripslashes($cats['forum_des']);
|
||||
if($session->access == BANNED){
|
||||
header("Location: banned.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$forumData = reset($database->ForumCatEdit($_GET['idf']));
|
||||
if(empty($forumData) || $forumData['alliance'] != $session->alliance) $alliance->redirect($_GET);
|
||||
|
||||
$cat_name = stripslashes($forumData['forum_name']);
|
||||
$cat_des = stripslashes($forumData['forum_des']);
|
||||
|
||||
?>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
|
||||
@@ -108,9 +113,4 @@ foreach($forum_data as $cats) {
|
||||
<th>Description</th>
|
||||
<td><input class="text" type="text" name="u2" value="<?php echo $cat_des; ?>" maxlength="38"></td>
|
||||
</tr>
|
||||
</table><p class="btn"><input type="image" value="ok" name="s1" id="fbtn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
<?php }else{
|
||||
header("Location: banned.php");
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
</table><p class="btn"><input type="image" value="ok" name="s1" id="fbtn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
@@ -5,9 +5,17 @@
|
||||
## FIX BY RONIX ##
|
||||
## TRAVIANZ ##
|
||||
############################################################
|
||||
if($session->access!=BANNED){
|
||||
if($session->access == BANNED){
|
||||
header("Location: banned.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$topic_id = $_GET['idt'];
|
||||
$topics = $database->ShowTopic($topic_id);
|
||||
|
||||
//Check if we're editing a valid answer (topic)
|
||||
if(empty($topics)) $alliance->redirect($_GET);
|
||||
|
||||
foreach($topics as $top) {
|
||||
$title = stripslashes($top['title']);
|
||||
$ans = stripslashes($top['post']);
|
||||
@@ -19,7 +27,7 @@ foreach($topics as $top) {
|
||||
$report0 = $top['report0'];
|
||||
}
|
||||
?>
|
||||
<form method="post" name="post" action="allianz.php?s=2&fid2=<?php echo $_GET['pid']; ?>&pid=<?php echo $_GET['pid']; ?>&tid=<?php echo $_GET['idt']; ?>">
|
||||
<form method="post" name="post" action="allianz.php?s=2&fid2=<?php echo $_GET['fid2']; ?>&tid=<?php echo $_GET['idt']; ?>">
|
||||
<input type="hidden" name="s" value="2">
|
||||
<input type="hidden" name="tid" value="<?php echo $_GET['idt']; ?>">
|
||||
<input type="hidden" name="alliance0" value="<?php echo $alliance0; ?>">
|
||||
@@ -35,9 +43,7 @@ foreach($topics as $top) {
|
||||
<tr>
|
||||
<th>Thread</th>
|
||||
<td><?php echo $title; ?></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
</td><td>
|
||||
@@ -80,9 +86,4 @@ foreach($topics as $top) {
|
||||
</tbody></table>
|
||||
|
||||
<p class="btn"><input type="image" id="fbtn_ok" value="ok" name="s1" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
<span style="color: #DD0000"><b>Warning:</b> you can't use the values <b>[message]</b> or <b>[/message]</b> in your post because it can cause problem with bbcode system.</span>
|
||||
<?php }else{
|
||||
header("Location: banned.php");
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<span style="color: #DD0000"><b>Warning:</b> you can't use the values <b>[message]</b> or <b>[/message]</b> in your post because it can cause problem with bbcode system.</span>
|
||||
+380
-327
@@ -1,80 +1,91 @@
|
||||
<?php
|
||||
############################################################
|
||||
## DO NOT REMOVE THIS NOTICE ##
|
||||
## MADE BY TTMTT ##
|
||||
## FIX BY RONIX ##
|
||||
## TRAVIANZ ##
|
||||
############################################################
|
||||
// ###########################################################
|
||||
// # DO NOT REMOVE THIS NOTICE ##
|
||||
// # MADE BY TTMTT ##
|
||||
// # FIX BY RONIX ##
|
||||
// # TRAVIANZ ##
|
||||
// ###########################################################
|
||||
|
||||
if(isset($aid)) {
|
||||
$aid = $aid;
|
||||
}else if(isset($_GET['fid'])){
|
||||
$aid = $database->ForumCatAlliance($_GET['fid']);
|
||||
}else if(isset($_GET['fid2'])){
|
||||
$aid = $database->ForumCatAlliance($_GET['fid2']);
|
||||
}else{
|
||||
$aid = $session->alliance;
|
||||
if(!isset($aid)){
|
||||
if(isset($_GET['fid']) && !empty($_GET['fid'])) $aid = $database->ForumCatAlliance($_GET['fid']);
|
||||
else if(isset($_GET['fid2']) && !empty($_GET['fid2'])) $aid = $database->ForumCatAlliance($_GET['fid2']);
|
||||
else $aid = $session->alliance;
|
||||
}
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$opt = $database->getAlliPermissions($session->uid, $aid);
|
||||
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
|
||||
include("alli_menu.tpl");
|
||||
include ("alli_menu.tpl");
|
||||
$ids = $_GET['s'];
|
||||
|
||||
if(isset($_POST['new'])){
|
||||
if(isset($_POST['new']) && $opt['opt5'] == 1 &&
|
||||
isset($_POST['u1']) && !empty($_POST['u1']) &&
|
||||
isset($_POST['u2']) && !empty($_POST['u2']) &&
|
||||
isset($_POST['bid']) && $_POST['bid'] >= 0 && $_POST['bid'] <= 3)
|
||||
{
|
||||
$forum_name = $_POST['u1'];
|
||||
$forum_des = $_POST['u2'];
|
||||
$forum_owner = $session->uid;
|
||||
$forum_area = $_POST['bid'];
|
||||
|
||||
$database->CreatForum($forum_owner,$aid,$forum_name,$forum_des,$forum_area);
|
||||
$database->CreatForum($forum_owner, $aid, $forum_name, $forum_des, $forum_area);
|
||||
}
|
||||
if(isset($_POST['edittopic'])){
|
||||
|
||||
if(isset($_POST['edittopic']) && $opt['opt5'] == 1 &&
|
||||
isset($_POST['fid']) && !empty($_POST['fid']) &&
|
||||
isset($_POST['tid']) && !empty($_POST['tid']) &&
|
||||
isset($_POST['thema']) && !empty($_POST['thema']) &&
|
||||
$database->ForumCatAlliance($_POST['fid']) == $session->alliance)
|
||||
{
|
||||
$topic_name = $_POST['thema'];
|
||||
$topic_cat = $_POST['fid'];
|
||||
$topic_id = $_POST['tid'];
|
||||
|
||||
$database->UpdateEditTopic($topic_id,$topic_name,$topic_cat);
|
||||
$database->UpdateEditTopic($topic_id, $topic_name, $topic_cat);
|
||||
}
|
||||
if(isset($_POST['editforum'])){
|
||||
|
||||
if(isset($_POST['editforum']) && $opt['opt5'] == 1 &&
|
||||
isset($_POST['fid']) && !empty($_POST['fid']) &&
|
||||
isset($_POST['u1']) && !empty($_POST['u1']) &&
|
||||
isset($_POST['u2']) && !empty($_POST['u2']) &&
|
||||
$database->ForumCatAlliance($_POST['fid']) == $session->alliance)
|
||||
{
|
||||
$forum_name = $_POST['u1'];
|
||||
$$forum_name = htmlspecialchars($forum_name);
|
||||
$forum_name = htmlspecialchars($forum_name);
|
||||
$forum_des = $_POST['u2'];
|
||||
$forum_des = htmlspecialchars($forum_des);
|
||||
$forum_id = $_POST['fid'];
|
||||
|
||||
$database->UpdateEditForum($forum_id,$forum_name,$forum_des);
|
||||
$database->UpdateEditForum($forum_id, $forum_name, $forum_des, $session->alliance);
|
||||
}
|
||||
if(isset($_POST['newtopic'])){
|
||||
|
||||
if(isset($_POST['newtopic']) && isset($_POST['thema']) && isset($_POST['text']) && isset($_POST['fid'])
|
||||
&& !empty($_POST['thema']) && !empty($_POST['text']) && !empty($_POST['fid'])){
|
||||
$title = $_POST['thema'];
|
||||
$text = $_POST['text'];
|
||||
$cat = $_POST['fid'];
|
||||
$owner = $session->uid;
|
||||
$alli = $_POST['pid'];
|
||||
|
||||
if($text != ""){
|
||||
if(!preg_match('/\[message\]/',$text) && !preg_match('/\[\/message\]/',$text)){
|
||||
$alli = $database->ForumCatAlliance($cat);
|
||||
|
||||
if(!empty($text)){
|
||||
if(!preg_match('/\[message\]/', $text) && !preg_match('/\[\/message\]/', $text)){
|
||||
$text = "[message]".$text."[/message]";
|
||||
$alliance = $player = $coor = $report = 0;
|
||||
for($i=0;$i<=$alliance;$i++){
|
||||
if(preg_match('/\[alliance'.$i.'\]/',$text) && preg_match('/\[\/alliance'.$i.'\]/',$text)){
|
||||
$alliances = $player = $coor = $report = 0;
|
||||
for($i = 0; $i <= $alliances; $i++){
|
||||
if(preg_match('/\[alliance'.$i.'\]/', $text) && preg_match('/\[\/alliance'.$i.'\]/', $text)){
|
||||
$alliance1 = preg_replace('/\[message\](.*?)\[\/alliance'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[alliance'.$i.'\]/',$alliance1) && preg_match('/\[\/alliance'.$i.'\]/',$alliance1)){
|
||||
$j = $i+1;
|
||||
if(preg_match('/\[alliance'.$i.'\]/', $alliance1) && preg_match('/\[\/alliance'.$i.'\]/', $alliance1)){
|
||||
$j = $i + 1;
|
||||
$alliance2 = preg_replace('/\[\/alliance'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$alliance1 = preg_replace('/\[alliance'.$i.'\]/', '[alliance'.$j.']', $alliance1);
|
||||
$alliance1 = preg_replace('/\[\/alliance'.$i.'\]/', '[/alliance'.$j.']', $alliance1);
|
||||
$text = $alliance2."[/alliance".$i."]".$alliance1;
|
||||
$alliance += 1;
|
||||
$alliances += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=$player;$i++){
|
||||
if(preg_match('/\[player'.$i.'\]/',$text) && preg_match('/\[\/player'.$i.'\]/',$text)){
|
||||
for($i = 0; $i <= $player; $i++){
|
||||
if(preg_match('/\[player'.$i.'\]/', $text) && preg_match('/\[\/player'.$i.'\]/', $text)){
|
||||
$player1 = preg_replace('/\[message\](.*?)\[\/player'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[player'.$i.'\]/',$player1) && preg_match('/\[\/player'.$i.'\]/',$player1)){
|
||||
$j = $i+1;
|
||||
if(preg_match('/\[player'.$i.'\]/', $player1) && preg_match('/\[\/player'.$i.'\]/', $player1)){
|
||||
$j = $i + 1;
|
||||
$player2 = preg_replace('/\[\/player'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$player1 = preg_replace('/\[player'.$i.'\]/', '[player'.$j.']', $player1);
|
||||
$player1 = preg_replace('/\[\/player'.$i.'\]/', '[/player'.$j.']', $player1);
|
||||
@@ -83,11 +94,11 @@ if(isset($_POST['newtopic'])){
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=$coor;$i++){
|
||||
if(preg_match('/\[coor'.$i.'\]/',$text) && preg_match('/\[\/coor'.$i.'\]/',$text)){
|
||||
for($i = 0; $i <= $coor; $i++){
|
||||
if(preg_match('/\[coor'.$i.'\]/', $text) && preg_match('/\[\/coor'.$i.'\]/', $text)){
|
||||
$coor1 = preg_replace('/\[message\](.*?)\[\/coor'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[coor'.$i.'\]/',$coor1) && preg_match('/\[\/coor'.$i.'\]/',$coor1)){
|
||||
$j = $i+1;
|
||||
if(preg_match('/\[coor'.$i.'\]/', $coor1) && preg_match('/\[\/coor'.$i.'\]/', $coor1)){
|
||||
$j = $i + 1;
|
||||
$coor2 = preg_replace('/\[\/coor'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$coor1 = preg_replace('/\[coor'.$i.'\]/', '[coor'.$j.']', $coor1);
|
||||
$coor1 = preg_replace('/\[\/coor'.$i.'\]/', '[/coor'.$j.']', $coor1);
|
||||
@@ -96,11 +107,11 @@ if(isset($_POST['newtopic'])){
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=$report;$i++){
|
||||
if(preg_match('/\[report'.$i.'\]/',$text) && preg_match('/\[\/report'.$i.'\]/',$text)){
|
||||
for($i = 0; $i <= $report; $i++){
|
||||
if(preg_match('/\[report'.$i.'\]/', $text) && preg_match('/\[\/report'.$i.'\]/', $text)){
|
||||
$report1 = preg_replace('/\[message\](.*?)\[\/report'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[report'.$i.'\]/',$report1) && preg_match('/\[\/report'.$i.'\]/',$report1)){
|
||||
$j = $i+1;
|
||||
if(preg_match('/\[report'.$i.'\]/', $report1) && preg_match('/\[\/report'.$i.'\]/', $report1)){
|
||||
$j = $i + 1;
|
||||
$report2 = preg_replace('/\[\/report'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$report1 = preg_replace('/\[report'.$i.'\]/', '[report'.$j.']', $report1);
|
||||
$report1 = preg_replace('/\[\/report'.$i.'\]/', '[/report'.$j.']', $report1);
|
||||
@@ -109,333 +120,375 @@ if(isset($_POST['newtopic'])){
|
||||
}
|
||||
}
|
||||
}
|
||||
$survey = 0;
|
||||
$ends='';
|
||||
if(isset($_POST['umfrage'])) {
|
||||
$survey = false;
|
||||
$ends = '';
|
||||
if(isset($_POST['umfrage'])){
|
||||
if(isset($_POST['umfrage_ende'])){
|
||||
$ends_date = $_POST['month']."/".$_POST['day']."/".$_POST['year'];
|
||||
if($_POST['meridiem'] == 1){
|
||||
$_POST['hour'] += 12;
|
||||
}
|
||||
if($_POST['meridiem'] == 1) $_POST['hour'] += 12;
|
||||
$ends_time = $_POST['hour'].":".$_POST['minute'];
|
||||
$ends = strtotime($ends_date)-strtotime(date('m/d/Y'))+strtotime($ends_time);
|
||||
}
|
||||
for($i=1;$i<=8;$i++){
|
||||
if(isset($_POST['option_'.$i]) && $_POST['option_'.$i]!= ""){
|
||||
$survey = 1;
|
||||
}
|
||||
$ends = strtotime($ends_date) - strtotime(date('m/d/Y')) + strtotime($ends_time);
|
||||
}
|
||||
|
||||
for($i = 1; $i <= 8; $i++) if(isset($_POST['option_'.$i]) && !empty($_POST['option_'.$i])) $survey = true;
|
||||
}
|
||||
$topic_id = $database->CreatTopic($title,$text,$cat,$owner,$alli,$ends,$alliance,$player,$coor,$report);
|
||||
if($survey == 1){
|
||||
$topic_id = $database->CreatTopic($title, $text, $cat, $owner, $alli, $ends, $alliances, $player, $coor, $report);
|
||||
if($survey){
|
||||
$database->createSurvey($topic_id, $_POST['umfrage_thema'], $_POST['option_1'], $_POST['option_2'], $_POST['option_3'], $_POST['option_4'], $_POST['option_5'], $_POST['option_6'], $_POST['option_7'], $_POST['option_8'], $ends);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST['newpost'])){
|
||||
$text = $_POST['text'];
|
||||
$tids = $_POST['tid'];
|
||||
$fid2 = $_POST['fid2'];
|
||||
$owner = $session->uid;
|
||||
if($text != ""){
|
||||
if(!preg_match('/\[message\]/',$text) && !preg_match('/\[\/message\]/',$text)){
|
||||
$text = "[message]".$text."[/message]";
|
||||
$alliance = $player = $coor = $report = 0;
|
||||
for($i=0;$i<=$alliance;$i++){
|
||||
if(preg_match('/\[alliance'.$i.'\]/',$text) && preg_match('/\[\/alliance'.$i.'\]/',$text)){
|
||||
$alliance1 = preg_replace('/\[message\](.*?)\[\/alliance'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[alliance'.$i.'\]/',$alliance1) && preg_match('/\[\/alliance'.$i.'\]/',$alliance1)){
|
||||
$j = $i+1;
|
||||
$alliance2 = preg_replace('/\[\/alliance'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$alliance1 = preg_replace('/\[alliance'.$i.'\]/', '[alliance'.$j.']', $alliance1);
|
||||
$alliance1 = preg_replace('/\[\/alliance'.$i.'\]/', '[/alliance'.$j.']', $alliance1);
|
||||
$text = $alliance2."[/alliance".$i."]".$alliance1;
|
||||
$alliance += 1;
|
||||
if(!empty($text)){
|
||||
if(!preg_match('/\[message\]/', $text) && !preg_match('/\[\/message\]/', $text)){
|
||||
$text = "[message]".$text."[/message]";
|
||||
$alliances = $player = $coor = $report = 0;
|
||||
for($i = 0; $i <= $alliances; $i++){
|
||||
if(preg_match('/\[alliance'.$i.'\]/', $text) && preg_match('/\[\/alliance'.$i.'\]/', $text)){
|
||||
$alliance1 = preg_replace('/\[message\](.*?)\[\/alliance'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[alliance'.$i.'\]/', $alliance1) && preg_match('/\[\/alliance'.$i.'\]/', $alliance1)){
|
||||
$j = $i + 1;
|
||||
$alliance2 = preg_replace('/\[\/alliance'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$alliance1 = preg_replace('/\[alliance'.$i.'\]/', '[alliance'.$j.']', $alliance1);
|
||||
$alliance1 = preg_replace('/\[\/alliance'.$i.'\]/', '[/alliance'.$j.']', $alliance1);
|
||||
$text = $alliance2."[/alliance".$i."]".$alliance1;
|
||||
$alliances += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i = 0; $i <= $player; $i++){
|
||||
if(preg_match('/\[player'.$i.'\]/', $text) && preg_match('/\[\/player'.$i.'\]/', $text)){
|
||||
$player1 = preg_replace('/\[message\](.*?)\[\/player'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[player'.$i.'\]/', $player1) && preg_match('/\[\/player'.$i.'\]/', $player1)){
|
||||
$j = $i + 1;
|
||||
$player2 = preg_replace('/\[\/player'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$player1 = preg_replace('/\[player'.$i.'\]/', '[player'.$j.']', $player1);
|
||||
$player1 = preg_replace('/\[\/player'.$i.'\]/', '[/player'.$j.']', $player1);
|
||||
$text = $player2."[/player".$i."]".$player1;
|
||||
$player += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i = 0; $i <= $coor; $i++){
|
||||
if(preg_match('/\[coor'.$i.'\]/', $text) && preg_match('/\[\/coor'.$i.'\]/', $text)){
|
||||
$coor1 = preg_replace('/\[message\](.*?)\[\/coor'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[coor'.$i.'\]/', $coor1) && preg_match('/\[\/coor'.$i.'\]/', $coor1)){
|
||||
$j = $i + 1;
|
||||
$coor2 = preg_replace('/\[\/coor'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$coor1 = preg_replace('/\[coor'.$i.'\]/', '[coor'.$j.']', $coor1);
|
||||
$coor1 = preg_replace('/\[\/coor'.$i.'\]/', '[/coor'.$j.']', $coor1);
|
||||
$text = $coor2."[/coor".$i."]".$coor1;
|
||||
$coor += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i = 0; $i <= $report; $i++){
|
||||
if(preg_match('/\[report'.$i.'\]/', $text) && preg_match('/\[\/report'.$i.'\]/', $text)){
|
||||
$report1 = preg_replace('/\[message\](.*?)\[\/report'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[report'.$i.'\]/', $report1) && preg_match('/\[\/report'.$i.'\]/', $report1)){
|
||||
$j = $i + 1;
|
||||
$report2 = preg_replace('/\[\/report'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$report1 = preg_replace('/\[report'.$i.'\]/', '[report'.$j.']', $report1);
|
||||
$report1 = preg_replace('/\[\/report'.$i.'\]/', '[/report'.$j.']', $report1);
|
||||
$text = $report2."[/report".$i."]".$report1;
|
||||
$report += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
$database->UpdatePostDate($tids);
|
||||
$database->CreatPost($text, $tids, $owner, $alliances, $player, $coor, $report, $fid2);
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=$player;$i++){
|
||||
if(preg_match('/\[player'.$i.'\]/',$text) && preg_match('/\[\/player'.$i.'\]/',$text)){
|
||||
$player1 = preg_replace('/\[message\](.*?)\[\/player'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[player'.$i.'\]/',$player1) && preg_match('/\[\/player'.$i.'\]/',$player1)){
|
||||
$j = $i+1;
|
||||
$player2 = preg_replace('/\[\/player'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$player1 = preg_replace('/\[player'.$i.'\]/', '[player'.$j.']', $player1);
|
||||
$player1 = preg_replace('/\[\/player'.$i.'\]/', '[/player'.$j.']', $player1);
|
||||
$text = $player2."[/player".$i."]".$player1;
|
||||
$player += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=$coor;$i++){
|
||||
if(preg_match('/\[coor'.$i.'\]/',$text) && preg_match('/\[\/coor'.$i.'\]/',$text)){
|
||||
$coor1 = preg_replace('/\[message\](.*?)\[\/coor'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[coor'.$i.'\]/',$coor1) && preg_match('/\[\/coor'.$i.'\]/',$coor1)){
|
||||
$j = $i+1;
|
||||
$coor2 = preg_replace('/\[\/coor'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$coor1 = preg_replace('/\[coor'.$i.'\]/', '[coor'.$j.']', $coor1);
|
||||
$coor1 = preg_replace('/\[\/coor'.$i.'\]/', '[/coor'.$j.']', $coor1);
|
||||
$text = $coor2."[/coor".$i."]".$coor1;
|
||||
$coor += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=$report;$i++){
|
||||
if(preg_match('/\[report'.$i.'\]/',$text) && preg_match('/\[\/report'.$i.'\]/',$text)){
|
||||
$report1 = preg_replace('/\[message\](.*?)\[\/report'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[report'.$i.'\]/',$report1) && preg_match('/\[\/report'.$i.'\]/',$report1)){
|
||||
$j = $i+1;
|
||||
$report2 = preg_replace('/\[\/report'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$report1 = preg_replace('/\[report'.$i.'\]/', '[report'.$j.']', $report1);
|
||||
$report1 = preg_replace('/\[\/report'.$i.'\]/', '[/report'.$j.']', $report1);
|
||||
$text = $report2."[/report".$i."]".$report1;
|
||||
$report += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
$database->UpdatePostDate($tids);
|
||||
$database->CreatPost($text,$tids,$owner,$alliance,$player,$coor,$report,$fid2);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($_POST['editans'])){
|
||||
|
||||
if(isset($_POST['editans']) && isset($_POST['text']) && !empty($_POST['text'])
|
||||
&& isset($_POST['tid']) && !empty($_POST['tid']) &&
|
||||
Alliance::canAct(['aid' => $aid, 'alliance' => ($topic = reset($database->ShowTopic($_POST['tid'])))['alliance'],
|
||||
'forum_perm' => $opt['opt5'], 'admin' => $_GET['admin'], 'owner' => $topic['owner']], 1)){
|
||||
|
||||
$text = $_POST['text'];
|
||||
$text = preg_replace('/\[message\]/', '', $text);
|
||||
$text = preg_replace('/\[\/message\]/', '', $text);
|
||||
for($i=1;$i<=$_POST['alliance0'];$i++){
|
||||
$text = preg_replace('/\[alliance'.$i.'\]/', '[alliance0]', $text);
|
||||
$text = preg_replace('/\[\/alliance'.$i.'\]/', '[/alliance0]', $text);
|
||||
}
|
||||
for($i=0;$i<=$_POST['player0'];$i++){
|
||||
$text = preg_replace('/\[player'.$i.'\]/', '[player0]', $text);
|
||||
$text = preg_replace('/\[\/player'.$i.'\]/', '[/player0]', $text);
|
||||
}
|
||||
for($i=0;$i<=$_POST['coor0'];$i++){
|
||||
$text = preg_replace('/\[coor'.$i.'\]/', '[coor0]', $text);
|
||||
$text = preg_replace('/\[\/coor'.$i.'\]/', '[/coor0]', $text);
|
||||
}
|
||||
for($i=0;$i<=$_POST['report0'];$i++){
|
||||
$text = preg_replace('/\[report'.$i.'\]/', '[report0]', $text);
|
||||
$text = preg_replace('/\[\/report'.$i.'\]/', '[/report0]', $text);
|
||||
}
|
||||
$topic_id = $_POST['tid'];
|
||||
|
||||
if($text != ""){
|
||||
if(!preg_match('/\[message\]/',$text) && !preg_match('/\[\/message\]/',$text)){
|
||||
$text = "[message]".$text."[/message]";
|
||||
$alliance = $player = $coor = $report = 0;
|
||||
for($i=0;$i<=$alliance;$i++){
|
||||
if(preg_match('/\[alliance'.$i.'\]/',$text) && preg_match('/\[\/alliance'.$i.'\]/',$text)){
|
||||
$alliance1 = preg_replace('/\[message\](.*?)\[\/alliance'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[alliance'.$i.'\]/',$alliance1) && preg_match('/\[\/alliance'.$i.'\]/',$alliance1)){
|
||||
$j = $i+1;
|
||||
$alliance2 = preg_replace('/\[\/alliance'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$alliance1 = preg_replace('/\[alliance'.$i.'\]/', '[alliance'.$j.']', $alliance1);
|
||||
$alliance1 = preg_replace('/\[\/alliance'.$i.'\]/', '[/alliance'.$j.']', $alliance1);
|
||||
$text = $alliance2."[/alliance".$i."]".$alliance1;
|
||||
$alliance += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=$player;$i++){
|
||||
if(preg_match('/\[player'.$i.'\]/',$text) && preg_match('/\[\/player'.$i.'\]/',$text)){
|
||||
$player1 = preg_replace('/\[message\](.*?)\[\/player'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[player'.$i.'\]/',$player1) && preg_match('/\[\/player'.$i.'\]/',$player1)){
|
||||
$j = $i+1;
|
||||
$player2 = preg_replace('/\[\/player'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$player1 = preg_replace('/\[player'.$i.'\]/', '[player'.$j.']', $player1);
|
||||
$player1 = preg_replace('/\[\/player'.$i.'\]/', '[/player'.$j.']', $player1);
|
||||
$text = $player2."[/player".$i."]".$player1;
|
||||
$player += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=$coor;$i++){
|
||||
if(preg_match('/\[coor'.$i.'\]/',$text) && preg_match('/\[\/coor'.$i.'\]/',$text)){
|
||||
$coor1 = preg_replace('/\[message\](.*?)\[\/coor'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[coor'.$i.'\]/',$coor1) && preg_match('/\[\/coor'.$i.'\]/',$coor1)){
|
||||
$j = $i+1;
|
||||
$coor2 = preg_replace('/\[\/coor'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$coor1 = preg_replace('/\[coor'.$i.'\]/', '[coor'.$j.']', $coor1);
|
||||
$coor1 = preg_replace('/\[\/coor'.$i.'\]/', '[/coor'.$j.']', $coor1);
|
||||
$text = $coor2."[/coor".$i."]".$coor1;
|
||||
$coor += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=$report;$i++){
|
||||
if(preg_match('/\[report'.$i.'\]/',$text) && preg_match('/\[\/report'.$i.'\]/',$text)){
|
||||
$report1 = preg_replace('/\[message\](.*?)\[\/report'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[report'.$i.'\]/',$report1) && preg_match('/\[\/report'.$i.'\]/',$report1)){
|
||||
$j = $i+1;
|
||||
$report2 = preg_replace('/\[\/report'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$report1 = preg_replace('/\[report'.$i.'\]/', '[report'.$j.']', $report1);
|
||||
$report1 = preg_replace('/\[\/report'.$i.'\]/', '[/report'.$j.']', $report1);
|
||||
$text = $report2."[/report".$i."]".$report1;
|
||||
$report += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
$database->EditUpdateTopic($topic_id,$text,$alliance,$player,$coor,$report);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($_POST['editpost'])){
|
||||
$text = $_POST['text'];
|
||||
$text = preg_replace('/\[message\]/', '', $text);
|
||||
$text = preg_replace('/\[\/message\]/', '', $text);
|
||||
for($i=1;$i<=$_POST['alliance0'];$i++){
|
||||
$text = preg_replace('/\[alliance'.$i.'\]/', '[alliance0]', $text);
|
||||
$text = preg_replace('/\[\/alliance'.$i.'\]/', '[/alliance0]', $text);
|
||||
for($i = 0; $i <= $_POST['alliance0']; $i++){
|
||||
$text = preg_replace('/\[alliance'.$i.'\]/', '[alliance0]', $text);
|
||||
$text = preg_replace('/\[\/alliance'.$i.'\]/', '[/alliance0]', $text);
|
||||
}
|
||||
for($i=0;$i<=$_POST['player0'];$i++){
|
||||
$text = preg_replace('/\[player'.$i.'\]/', '[player0]', $text);
|
||||
$text = preg_replace('/\[\/player'.$i.'\]/', '[/player0]', $text);
|
||||
for($i = 0; $i <= $_POST['player0']; $i++){
|
||||
$text = preg_replace('/\[player'.$i.'\]/', '[player0]', $text);
|
||||
$text = preg_replace('/\[\/player'.$i.'\]/', '[/player0]', $text);
|
||||
}
|
||||
for($i=0;$i<=$_POST['coor0'];$i++){
|
||||
$text = preg_replace('/\[coor'.$i.'\]/', '[coor0]', $text);
|
||||
$text = preg_replace('/\[\/coor'.$i.'\]/', '[/coor0]', $text);
|
||||
for($i = 0; $i <= $_POST['coor0']; $i++){
|
||||
$text = preg_replace('/\[coor'.$i.'\]/', '[coor0]', $text);
|
||||
$text = preg_replace('/\[\/coor'.$i.'\]/', '[/coor0]', $text);
|
||||
}
|
||||
if (isset($text['report0'])) {
|
||||
for ( $i = 0; $i <= $text['report0']; $i ++ ) {
|
||||
$text = preg_replace( '/\[report' . $i . '\]/', '[report0]', $text );
|
||||
$text = preg_replace( '/\[\/report' . $i . '\]/', '[/report0]', $text );
|
||||
}
|
||||
}
|
||||
for($i = 0; $i <= $_POST['report0']; $i++){
|
||||
$text = preg_replace('/\[report'.$i.'\]/', '[report0]', $text);
|
||||
$text = preg_replace('/\[\/report'.$i.'\]/', '[/report0]', $text);
|
||||
}
|
||||
|
||||
if(!preg_match('/\[message\]/', $text) && !preg_match('/\[\/message\]/', $text)){
|
||||
$text = "[message]".$text."[/message]";
|
||||
$alliances = $player = $coor = $report = 0;
|
||||
for($i = 0; $i <= $alliances; $i++){
|
||||
if(preg_match('/\[alliance'.$i.'\]/', $text) && preg_match('/\[\/alliance'.$i.'\]/', $text)){
|
||||
$alliance1 = preg_replace('/\[message\](.*?)\[\/alliance'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[alliance'.$i.'\]/', $alliance1) && preg_match('/\[\/alliance'.$i.'\]/', $alliance1)){
|
||||
$j = $i + 1;
|
||||
$alliance2 = preg_replace('/\[\/alliance'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$alliance1 = preg_replace('/\[alliance'.$i.'\]/', '[alliance'.$j.']', $alliance1);
|
||||
$alliance1 = preg_replace('/\[\/alliance'.$i.'\]/', '[/alliance'.$j.']', $alliance1);
|
||||
$text = $alliance2."[/alliance".$i."]".$alliance1;
|
||||
$alliances += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i = 0; $i <= $player; $i++){
|
||||
if(preg_match('/\[player'.$i.'\]/', $text) && preg_match('/\[\/player'.$i.'\]/', $text)){
|
||||
$player1 = preg_replace('/\[message\](.*?)\[\/player'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[player'.$i.'\]/', $player1) && preg_match('/\[\/player'.$i.'\]/', $player1)){
|
||||
$j = $i + 1;
|
||||
$player2 = preg_replace('/\[\/player'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$player1 = preg_replace('/\[player'.$i.'\]/', '[player'.$j.']', $player1);
|
||||
$player1 = preg_replace('/\[\/player'.$i.'\]/', '[/player'.$j.']', $player1);
|
||||
$text = $player2."[/player".$i."]".$player1;
|
||||
$player += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i = 0; $i <= $coor; $i++){
|
||||
if(preg_match('/\[coor'.$i.'\]/', $text) && preg_match('/\[\/coor'.$i.'\]/', $text)){
|
||||
$coor1 = preg_replace('/\[message\](.*?)\[\/coor'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[coor'.$i.'\]/', $coor1) && preg_match('/\[\/coor'.$i.'\]/', $coor1)){
|
||||
$j = $i + 1;
|
||||
$coor2 = preg_replace('/\[\/coor'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$coor1 = preg_replace('/\[coor'.$i.'\]/', '[coor'.$j.']', $coor1);
|
||||
$coor1 = preg_replace('/\[\/coor'.$i.'\]/', '[/coor'.$j.']', $coor1);
|
||||
$text = $coor2."[/coor".$i."]".$coor1;
|
||||
$coor += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i = 0; $i <= $report; $i++){
|
||||
if(preg_match('/\[report'.$i.'\]/', $text) && preg_match('/\[\/report'.$i.'\]/', $text)){
|
||||
$report1 = preg_replace('/\[message\](.*?)\[\/report'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[report'.$i.'\]/', $report1) && preg_match('/\[\/report'.$i.'\]/', $report1)){
|
||||
$j = $i + 1;
|
||||
$report2 = preg_replace('/\[\/report'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$report1 = preg_replace('/\[report'.$i.'\]/', '[report'.$j.']', $report1);
|
||||
$report1 = preg_replace('/\[\/report'.$i.'\]/', '[/report'.$j.']', $report1);
|
||||
$text = $report2."[/report".$i."]".$report1;
|
||||
$report += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$database->EditUpdateTopic($topic_id, $text, $alliances, $player, $coor, $report);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST['editpost']) && isset($_POST['text']) && !empty($_POST['text']) &&
|
||||
isset($_POST['pod']) && !empty($_POST['pod']) &&
|
||||
Alliance::canAct(['aid' => $aid,
|
||||
'alliance' => reset($database->ShowTopic(($post = reset($database->ShowPostEdit($_POST['pod'])))['topic']))['alliance'],
|
||||
'forum_perm' => $opt['opt5'], 'owner' => $post['owner'], 'admin' => $_GET['admin']], 1))
|
||||
{
|
||||
|
||||
$text = $_POST['text'];
|
||||
$posts_id = $_POST['pod'];
|
||||
if($text != ""){
|
||||
if(!preg_match('/\[message\]/',$text) && !preg_match('/\[\/message\]/',$text)){
|
||||
|
||||
$text = preg_replace('/\[message\]/', '', $text);
|
||||
$text = preg_replace('/\[\/message\]/', '', $text);
|
||||
for($i = 0; $i <= $_POST['alliance0']; $i++){
|
||||
$text = preg_replace('/\[alliance'.$i.'\]/', '[alliance0]', $text);
|
||||
$text = preg_replace('/\[\/alliance'.$i.'\]/', '[/alliance0]', $text);
|
||||
}
|
||||
for($i = 0; $i <= $_POST['player0']; $i++){
|
||||
$text = preg_replace('/\[player'.$i.'\]/', '[player0]', $text);
|
||||
$text = preg_replace('/\[\/player'.$i.'\]/', '[/player0]', $text);
|
||||
}
|
||||
for($i = 0; $i <= $_POST['coor0']; $i++){
|
||||
$text = preg_replace('/\[coor'.$i.'\]/', '[coor0]', $text);
|
||||
$text = preg_replace('/\[\/coor'.$i.'\]/', '[/coor0]', $text);
|
||||
}
|
||||
if(isset($text['report0'])){
|
||||
for($i = 0; $i <= $text['report0']; $i++){
|
||||
$text = preg_replace('/\[report'.$i.'\]/', '[report0]', $text);
|
||||
$text = preg_replace('/\[\/report'.$i.'\]/', '[/report0]', $text);
|
||||
}
|
||||
}
|
||||
|
||||
if(!preg_match('/\[message\]/', $text) && !preg_match('/\[\/message\]/', $text)){
|
||||
$text = "[message]".$text."[/message]";
|
||||
$alliance = $player = $coor = $report = 0;
|
||||
for($i=0;$i<=$alliance;$i++){
|
||||
if(preg_match('/\[alliance'.$i.'\]/',$text) && preg_match('/\[\/alliance'.$i.'\]/',$text)){
|
||||
$alliance1 = preg_replace('/\[message\](.*?)\[\/alliance'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[alliance'.$i.'\]/',$alliance1) && preg_match('/\[\/alliance'.$i.'\]/',$alliance1)){
|
||||
$j = $i+1;
|
||||
$alliance2 = preg_replace('/\[\/alliance'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$alliance1 = preg_replace('/\[alliance'.$i.'\]/', '[alliance'.$j.']', $alliance1);
|
||||
$alliance1 = preg_replace('/\[\/alliance'.$i.'\]/', '[/alliance'.$j.']', $alliance1);
|
||||
$text = $alliance2."[/alliance".$i."]".$alliance1;
|
||||
$alliance += 1;
|
||||
for($i = 0; $i <= $alliance; $i++){
|
||||
if(preg_match('/\[alliance'.$i.'\]/', $text) && preg_match('/\[\/alliance'.$i.'\]/', $text)){
|
||||
$alliance1 = preg_replace('/\[message\](.*?)\[\/alliance'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[alliance'.$i.'\]/', $alliance1) && preg_match('/\[\/alliance'.$i.'\]/', $alliance1)){
|
||||
$j = $i + 1;
|
||||
$alliance2 = preg_replace('/\[\/alliance'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$alliance1 = preg_replace('/\[alliance'.$i.'\]/', '[alliance'.$j.']', $alliance1);
|
||||
$alliance1 = preg_replace('/\[\/alliance'.$i.'\]/', '[/alliance'.$j.']', $alliance1);
|
||||
$text = $alliance2."[/alliance".$i."]".$alliance1;
|
||||
$alliance += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i = 0; $i <= $player; $i++){
|
||||
if(preg_match('/\[player'.$i.'\]/', $text) && preg_match('/\[\/player'.$i.'\]/', $text)){
|
||||
$player1 = preg_replace('/\[message\](.*?)\[\/player'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[player'.$i.'\]/', $player1) && preg_match('/\[\/player'.$i.'\]/', $player1)){
|
||||
$j = $i + 1;
|
||||
$player2 = preg_replace('/\[\/player'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$player1 = preg_replace('/\[player'.$i.'\]/', '[player'.$j.']', $player1);
|
||||
$player1 = preg_replace('/\[\/player'.$i.'\]/', '[/player'.$j.']', $player1);
|
||||
$text = $player2."[/player".$i."]".$player1;
|
||||
$player += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i = 0; $i <= $coor; $i++){
|
||||
if(preg_match('/\[coor'.$i.'\]/', $text) && preg_match('/\[\/coor'.$i.'\]/', $text)){
|
||||
$coor1 = preg_replace('/\[message\](.*?)\[\/coor'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[coor'.$i.'\]/', $coor1) && preg_match('/\[\/coor'.$i.'\]/', $coor1)){
|
||||
$j = $i + 1;
|
||||
$coor2 = preg_replace('/\[\/coor'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$coor1 = preg_replace('/\[coor'.$i.'\]/', '[coor'.$j.']', $coor1);
|
||||
$coor1 = preg_replace('/\[\/coor'.$i.'\]/', '[/coor'.$j.']', $coor1);
|
||||
$text = $coor2."[/coor".$i."]".$coor1;
|
||||
$coor += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=$player;$i++){
|
||||
if(preg_match('/\[player'.$i.'\]/',$text) && preg_match('/\[\/player'.$i.'\]/',$text)){
|
||||
$player1 = preg_replace('/\[message\](.*?)\[\/player'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[player'.$i.'\]/',$player1) && preg_match('/\[\/player'.$i.'\]/',$player1)){
|
||||
$j = $i+1;
|
||||
$player2 = preg_replace('/\[\/player'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$player1 = preg_replace('/\[player'.$i.'\]/', '[player'.$j.']', $player1);
|
||||
$player1 = preg_replace('/\[\/player'.$i.'\]/', '[/player'.$j.']', $player1);
|
||||
$text = $player2."[/player".$i."]".$player1;
|
||||
$player += 1;
|
||||
for($i = 0; $i <= $report; $i++){
|
||||
if(preg_match('/\[report'.$i.'\]/', $text) && preg_match('/\[\/report'.$i.'\]/', $text)){
|
||||
$report1 = preg_replace('/\[message\](.*?)\[\/report'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[report'.$i.'\]/', $report1) && preg_match('/\[\/report'.$i.'\]/', $report1)){
|
||||
$j = $i + 1;
|
||||
$report2 = preg_replace('/\[\/report'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$report1 = preg_replace('/\[report'.$i.'\]/', '[report'.$j.']', $report1);
|
||||
$report1 = preg_replace('/\[\/report'.$i.'\]/', '[/report'.$j.']', $report1);
|
||||
$text = $report2."[/report".$i."]".$report1;
|
||||
$report += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=$coor;$i++){
|
||||
if(preg_match('/\[coor'.$i.'\]/',$text) && preg_match('/\[\/coor'.$i.'\]/',$text)){
|
||||
$coor1 = preg_replace('/\[message\](.*?)\[\/coor'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[coor'.$i.'\]/',$coor1) && preg_match('/\[\/coor'.$i.'\]/',$coor1)){
|
||||
$j = $i+1;
|
||||
$coor2 = preg_replace('/\[\/coor'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$coor1 = preg_replace('/\[coor'.$i.'\]/', '[coor'.$j.']', $coor1);
|
||||
$coor1 = preg_replace('/\[\/coor'.$i.'\]/', '[/coor'.$j.']', $coor1);
|
||||
$text = $coor2."[/coor".$i."]".$coor1;
|
||||
$coor += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=$report;$i++){
|
||||
if(preg_match('/\[report'.$i.'\]/',$text) && preg_match('/\[\/report'.$i.'\]/',$text)){
|
||||
$report1 = preg_replace('/\[message\](.*?)\[\/report'.$i.'\]/is', '', $text);
|
||||
if(preg_match('/\[report'.$i.'\]/',$report1) && preg_match('/\[\/report'.$i.'\]/',$report1)){
|
||||
$j = $i+1;
|
||||
$report2 = preg_replace('/\[\/report'.$i.'\](.*?)\[\/message\]/is', '', $text);
|
||||
$report1 = preg_replace('/\[report'.$i.'\]/', '[report'.$j.']', $report1);
|
||||
$report1 = preg_replace('/\[\/report'.$i.'\]/', '[/report'.$j.']', $report1);
|
||||
$text = $report2."[/report".$i."]".$report1;
|
||||
$report += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
$database->EditUpdatePost($posts_id,$text,$alliance,$player,$coor,$report);
|
||||
}
|
||||
$database->EditUpdatePost($posts_id, $text, $alliance, $player, $coor, $report);
|
||||
}
|
||||
}
|
||||
if(!isset($_GET['admin'])) {
|
||||
$_GET['admin'] = null;
|
||||
}
|
||||
if($_GET['admin']== "switch_admin"){
|
||||
if($opt['opt5'] == 1){
|
||||
if($database->CheckResultEdit($aid) != 1){
|
||||
$database->CreatResultEdit($aid,1);
|
||||
}else{
|
||||
if($database->CheckEditRes($aid) == 1){
|
||||
$database->UpdateResultEdit($aid,'');
|
||||
}else{
|
||||
$database->UpdateResultEdit($aid,1);
|
||||
}
|
||||
|
||||
if(!isset($_GET['admin'])) $_GET['admin'] = null;
|
||||
if($_GET['admin'] == "switch_admin"){
|
||||
if($opt['opt5'] == 1){
|
||||
if($database->CheckResultEdit($aid) != 1) $database->CreatResultEdit($aid, 1);
|
||||
/*else
|
||||
{
|
||||
if($database->CheckEditRes($aid) == 1) $database->UpdateResultEdit($aid, 0);
|
||||
else $database->UpdateResultEdit($aid, 1);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
if($_GET['admin'] == "pos" && isset($_GET['res']) && isset($_GET['bid']) && isset($_GET['fid']) && !empty($_GET['fid']) && $opt['opt5'] == 1){
|
||||
$database->moveForum($_GET['fid'], $_GET['bid'], $session->alliance, $_GET['res']); //Move the forum to the top/bottom of the list
|
||||
$alliance->redirect($_GET);
|
||||
}
|
||||
if($_GET['admin']== "pin"){
|
||||
$database->StickTopic($_GET['idt'],1); // stick topic
|
||||
elseif(isset($_GET['admin']) && !empty($_GET['admin']) && isset($_GET['idt']) && !empty($_GET['idt'])){
|
||||
|
||||
//Get the post informations
|
||||
$topicID = $_GET['idt'];
|
||||
$post = reset($database->ShowTopic($topicID));
|
||||
$checkArray = ['aid' => $aid, 'alliance' => $post['alliance'], 'forum_perm' => $opt['opt5'], 'admin' => $_GET['admin'], 'owner' => $post['owner']];
|
||||
|
||||
//Exit if we've the rights to modify it
|
||||
if(!Alliance::canAct($checkArray, 1)) $alliance->redirect($_GET);
|
||||
|
||||
//We've the rights to modify it, check what we have to modify
|
||||
switch($_GET['admin']){
|
||||
case "pin":
|
||||
$database->StickTopic($topicID, 1); //Stick topic
|
||||
break;
|
||||
|
||||
case "unpin":
|
||||
$database->StickTopic($topicID, 0); //Unstick topic
|
||||
break;
|
||||
|
||||
case "lock":
|
||||
$database->LockTopic($topicID, 1); //Lock a topic
|
||||
break;
|
||||
|
||||
case "unlock":
|
||||
$database->LockTopic($topicID, 0); //Unlock a topic
|
||||
break;
|
||||
|
||||
case "deltopic":
|
||||
$database->DeleteTopic($topicID); //Delete topic
|
||||
$database->DeleteSurvey($topicID); //Delete survey
|
||||
break;
|
||||
|
||||
case "edittopic":
|
||||
include("Forum/forum_3.tpl"); //Edit topic
|
||||
break;
|
||||
|
||||
case "editans":
|
||||
include("Forum/forum_9.tpl");
|
||||
break;
|
||||
}
|
||||
|
||||
if($_GET['admin'] != "edittopic" && $_GET['admin'] != "editans") $alliance->redirect($_GET);
|
||||
}
|
||||
if($_GET['admin']== "unpin"){
|
||||
$database->StickTopic($_GET['idt'],''); // unstick topic
|
||||
}
|
||||
if($_GET['admin']== "delforum"){
|
||||
elseif($_GET['admin'] == "delforum" && $opt['opt5'] == 1 &&
|
||||
!empty($catToDelete = reset($database->ForumCatEdit($_GET['idf']))) &&
|
||||
$catToDelete['alliance'] == $session->alliance)
|
||||
{
|
||||
$database->DeleteCat($_GET['idf']); // delete forum
|
||||
$alliance->redirect($_GET);
|
||||
}
|
||||
if($_GET['admin']== "deltopic"){
|
||||
$database->DeleteTopic($_GET['idt']); // delete topic
|
||||
$database->DeleteSurvey($_GET['idt']); // delete survey
|
||||
elseif($_GET['admin'] == "delpost" && isset($_GET['pod']) && !empty($_GET['pod']) &&
|
||||
isset($_GET['tid']) && !empty($_GET['tid']) &&
|
||||
isset($_GET['fid2']) && !empty($_GET['fid2']) &&
|
||||
Alliance::canAct(['aid' => $aid, 'alliance' => reset($database->ShowTopic($_GET['tid']))['alliance'], 'forum_perm' => $opt['opt5'],
|
||||
'owner' => reset($database->ShowPostEdit($_GET['pod']))['owner'], 'admin' => $_GET['admin']], 1))
|
||||
{
|
||||
$database->DeletePost($_GET['pod']); //Delete post
|
||||
header("Location: allianz.php?s=2&fid2=".$_GET['fid2']."&tid=".$_GET['tid']);
|
||||
exit;
|
||||
}
|
||||
if($_GET['admin']== "delpost"){
|
||||
$database->DeletePost($_GET['pod']); // stick topic
|
||||
elseif($_GET['admin'] == "newforum" && $opt['opt5'] == 1) include("Forum/forum_1.tpl"); // new forum
|
||||
elseif($_GET['admin'] == "editpost" && isset($_GET['pod']) && !empty($_GET['pod']) &&
|
||||
isset($_GET['tid']) && !empty($_GET['tid']) &&
|
||||
isset($_GET['fid']) && !empty($_GET['fid']) &&
|
||||
Alliance::canAct(['aid' => $aid, 'alliance' => reset($database->ShowTopic($_GET['tid']))['alliance'], 'forum_perm' => $opt['opt5'],
|
||||
'owner' => reset($database->ShowPostEdit($_GET['pod']))['owner'], 'admin' => $_GET['admin']], 1)) //Edit post
|
||||
{
|
||||
include("Forum/forum_10.tpl");
|
||||
}
|
||||
if($_GET['admin']== "lock"){
|
||||
$database->LockTopic($_GET['idt'],1); // lock topic
|
||||
elseif(isset($_GET['fid'])){
|
||||
if(isset($_GET['ac'])) include("Forum/forum_5.tpl"); //New topic
|
||||
else include("Forum/forum_4.tpl"); //Show topics
|
||||
}
|
||||
if($_GET['admin']== "unlock"){
|
||||
$database->LockTopic($_GET['idt'],''); // unlock topic
|
||||
}
|
||||
if($_GET['admin']== "newforum"){
|
||||
include("Forum/forum_1.tpl"); // new forum
|
||||
}elseif(isset($_GET['fid'])){
|
||||
if(isset($_GET['ac'])){
|
||||
include("Forum/forum_5.tpl"); // new topic
|
||||
}else{
|
||||
include("Forum/forum_4.tpl"); // topic cat
|
||||
}
|
||||
}elseif($_GET['admin'] == "editforum"){
|
||||
include("Forum/forum_8.tpl"); // edit topic
|
||||
}elseif($_GET['admin'] == "editans"){
|
||||
include("Forum/forum_9.tpl"); // edit answer
|
||||
}elseif($_GET['admin'] == "editpost"){
|
||||
include("Forum/forum_10.tpl"); // edit answer
|
||||
}elseif($_GET['admin'] == "edittopic"){
|
||||
include("Forum/forum_3.tpl"); // edit topic
|
||||
}elseif(isset($_GET['tid'])){
|
||||
if(isset($_GET['ac'])){
|
||||
include("Forum/forum_7.tpl"); // new post
|
||||
}else{
|
||||
include("Forum/forum_6.tpl"); // showtopic
|
||||
}
|
||||
elseif($_GET['admin'] == "editforum" && $opt['opt5'] == 1) include("Forum/forum_8.tpl"); // edit forum
|
||||
elseif(isset($_GET['tid'])){
|
||||
if(isset($_GET['ac'])) include ("Forum/forum_7.tpl"); //New post
|
||||
else include ("Forum/forum_6.tpl"); //Showtopic
|
||||
}else{
|
||||
if($database->CheckForum($aid)){
|
||||
include("Forum/forum_2.tpl");
|
||||
}else if($opt['opt5'] == 1){
|
||||
if($session->access==BANNED){
|
||||
if($database->CheckForum($aid)) include("Forum/forum_2.tpl");
|
||||
else if($opt['opt5'] == 1){
|
||||
if($session->access == BANNED){
|
||||
echo '<p class="error">Forum is not created yet</p><p>
|
||||
<a href="banned.php"><img id="fbtn_newforum" class="dynamic_img" src="img/x.gif" alt="New forum" /></a></p>';
|
||||
}else{
|
||||
}else{
|
||||
echo '<p class="error">Forum is not created yet</p><p>
|
||||
<a href="allianz.php?s=2&admin=newforum"><img id="fbtn_newforum" class="dynamic_img" src="img/x.gif" alt="New forum" /></a></p>';
|
||||
}}else{
|
||||
echo '<p class="error">Forum is not created yet</p>';
|
||||
}
|
||||
}
|
||||
}
|
||||
else echo '<p class="error">Forum is not created yet</p>';
|
||||
}
|
||||
?>
|
||||
+8
-13
@@ -37,7 +37,7 @@ if(isset($_GET['fid'])){
|
||||
$fid = preg_replace("/[^0-9]/","",$_GET['fid']);
|
||||
$forum = mysqli_query($database->dblink,"SELECT * FROM " . TB_PREFIX . "forum_cat WHERE id = ".(int) $fid."");
|
||||
$forum_type = mysqli_fetch_array($forum);
|
||||
if($forum_type['forum_name'] != "" && $forum_type['forum_area'] == 0){
|
||||
if(!empty($forum_type['forum_name']) && $forum_type['forum_area'] == 0){
|
||||
if($forum_type['alliance'] != $session->alliance){
|
||||
header("Location: ".$_SERVER['PHP_SELF']);
|
||||
exit;
|
||||
@@ -48,7 +48,7 @@ if(isset($_GET['fid'])){
|
||||
$forum = mysqli_query($database->dblink,"SELECT * FROM " . TB_PREFIX . "forum_cat WHERE id = ".(int) $fid."");
|
||||
if (!empty($forum)) {
|
||||
$forum_type = mysqli_fetch_array($forum);
|
||||
if($forum_type['forum_name'] != "" && $forum_type['forum_area'] != 1){
|
||||
if(!empty($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']);
|
||||
@@ -71,7 +71,7 @@ if(isset($_GET['fid'])){
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($_GET['aid']) or isset($_GET['fid']) or isset($_GET['fid2']) or $session->alliance!=0){
|
||||
if(isset($_GET['aid']) || isset($_GET['fid']) || isset($_GET['fid2']) || $session->alliance > 0){
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
@@ -204,19 +204,14 @@ if(isset($_GET['aid']) or isset($_GET['fid']) or isset($_GET['fid2']) or $sessio
|
||||
$userPermissions = $database->getAlliPermissions($session->uid, $session->alliance, 0);
|
||||
include ("Templates/menu.tpl");
|
||||
|
||||
if(isset($_GET['s']) && $_GET['s'] == 2) {
|
||||
echo '<div id="content" class="forum">';
|
||||
} else {
|
||||
echo '<div id="content" class="alliance">';
|
||||
}
|
||||
if(isset($_GET['s']) && $_GET['s'] == 2) echo '<div id="content" class="forum">';
|
||||
else echo '<div id="content" class="alliance">';
|
||||
|
||||
if(isset($_GET['s'])) {
|
||||
if($_GET['s'] != 5 or $session->sit == 0){
|
||||
if($_GET['s'] != 5 || $session->sit == 0){
|
||||
switch($_GET['s']) {
|
||||
case 2:
|
||||
if(isset($_POST['vote'])){
|
||||
$alliance->Vote($_POST);
|
||||
}
|
||||
if(isset($_POST['vote'])) $alliance->Vote($_POST);
|
||||
include ("Templates/Alliance/forum.tpl");
|
||||
break;
|
||||
case 3:
|
||||
@@ -275,7 +270,7 @@ $userPermissions = $database->getAlliPermissions($session->uid, $session->allian
|
||||
break;
|
||||
case 6:
|
||||
if($userPermissions['opt6'] == 0) $alliance->redirect();
|
||||
if(isset($_POST['dipl']) and isset($_POST['a_name'])) $alliance->procAlliForm($_POST);
|
||||
if(isset($_POST['dipl']) && isset($_POST['a_name'])) $alliance->procAlliForm($_POST);
|
||||
include("Templates/Alliance/chgdiplo.tpl");
|
||||
break;
|
||||
case 11:
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
-- 18.05.2018 -> added a new column
|
||||
ALTER TABLE s1_forum_cat ADD `sorting` int(11) NOT NULL AFTER `id`
|
||||
|
||||
-- 16.05.2018 -> dropped four columns
|
||||
ALTER TABLE `s1_raidlist` DROP `t7`, DROP `t8`, DROP `t9`, DROP `t10`;
|
||||
|
||||
|
||||
@@ -745,6 +745,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%fdata` (
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `%PREFIX%forum_cat` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`sorting` int(11) NOT NULL,
|
||||
`owner` varchar(255) DEFAULT NULL,
|
||||
`alliance` int(11) NOT NULL,
|
||||
`forum_name` varchar(255) DEFAULT NULL,
|
||||
|
||||
Reference in New Issue
Block a user