Files
TravianZ/Templates/Alliance/Forum/forum_3.tpl
T
iopietro e5d823cda0 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`
2018-05-18 00:28:48 +02:00

46 lines
1.6 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));
$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($session->alliance);
foreach($show_cat as $cats) {
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>