mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-30 23:27:14 +00:00
4f98e14c29
+Added the "Forum" link to the game menu (above Game Rules), player without an alliance, will be able to access to public forums only +All players can now open public forums (even without an alliance), post to them, edit and delete them +Added the possility to add alliances and players to the "Who can view this forum" list, the graphic was present but there wasn't the database and code support (conditions aren't coded yet) +General fixes NOTE: To play this version without reinstalling the server, you have to run this simple query: ALTER TABLE s1_forum_cat ADD (`display_to_alliances` text, `display_to_users` text)
49 lines
1.8 KiB
Smarty
49 lines
1.8 KiB
Smarty
<?php
|
|
############################################################
|
|
## DO NOT REMOVE THIS NOTICE ##
|
|
## MADE BY TTMTT ##
|
|
## FIX BY RONIX ##
|
|
## TRAVIANZ ##
|
|
############################################################
|
|
if($session->access == BANNED){
|
|
header("Location: banned.php");
|
|
exit;
|
|
}
|
|
|
|
$topicID = $_GET['idt'];
|
|
$showTopic = reset($database->ShowTopic($topicID));
|
|
$forumData = reset($database->ForumCatEdit($showTopic['cat']));
|
|
$title = stripslashes($showTopic['title']);
|
|
?>
|
|
<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 $topicID; ?>">
|
|
<input type="hidden" name="edittopic" value="1">
|
|
<table cellpadding="1" cellspacing="1" id="edit_topic"><thead>
|
|
<tr>
|
|
<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>
|
|
<td>Move topic</td>
|
|
<td><select class="dropdown" name="fid">
|
|
<?php
|
|
$show_cat = $database->ForumCat($forumData['alliance']);
|
|
foreach($show_cat as $cats) {
|
|
//If the forum has no alliance, show only his public forums
|
|
if($forumData['alliance'] == 0 && $forumData['owner'] != $cats['owner']) continue;
|
|
|
|
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"> OK </button></p></form>
|