2 /****************************************************************/
4 /****************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
9 /* This program is free software. You can redistribute it and/or*/
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /****************************************************************/
15 $fid = intval($_REQUEST['fid']);
18 $fid = intval($_GET['fid']);
20 define('AT_INCLUDE_PATH', '../../../../include/');
21 require(AT_INCLUDE_PATH.'vitals.inc.php');
23 authenticate(AT_PRIV_FORUMS);
25 $_pages['mods/_standard/forums/forum/index.php?fid='.$fid]['title'] = get_forum_name($fid);
26 $_pages['mods/_standard/forums/forum/index.php?fid='.$fid]['parent'] = 'mods/_standard/forums/forum/list.php';
27 $_pages['mods/_standard/forums/forum/index.php?fid='.$fid]['children'] = array('mods/_standard/forums/forum/new_thread.php?fid='.$fid);
29 $_pages['mods/_standard/forums/forum/new_thread.php?fid='.$fid]['title_var'] = 'new_thread';
30 $_pages['mods/_standard/forums/forum/new_thread.php?fid='.$fid]['parent'] = 'mods/_standard/forums/forum/index.php?fid='.$fid;
32 $_pages['mods/_standard/forums/forum/view.php']['title'] = $post_row['subject'];
33 $_pages['mods/_standard/forums/forum/view.php']['parent'] = 'mods/_standard/forums/forum/index.php?fid='.$fid;
35 $_pages['mods/_standard/forums/forum/lock_thread.php']['title_var'] = 'lock_thread';
36 $_pages['mods/_standard/forums/forum/lock_thread.php']['parent'] = 'mods/_standard/forums/forum/index.php?fid='.$fid;
38 if (isset($_POST['cancel'])) {
39 $msg->addFeedback('CANCELLED');
40 header('Location: '.AT_BASE_HREF.'mods/_standard/forums/forum/index.php?fid='.$fid);
42 } else if (isset($_POST['submit'])) {
43 $_POST['lock'] = intval($_POST['lock']);
44 $_POST['pid'] = intval($_POST['pid']);
45 $_POST['fid'] = intval($_POST['fid']);
47 $sql = "UPDATE ".TABLE_PREFIX."forums_threads SET locked=$_POST[lock], last_comment=last_comment, date=date WHERE post_id=$_POST[pid]";
48 $result = mysql_query($sql, $db);
50 if($_POST['lock'] == '1' || $_POST['lock'] == '2'){
51 $msg->addFeedback('THREAD_LOCKED');
52 header('Location: '.AT_BASE_HREF.'mods/_standard/forums/forum/index.php?fid='.$fid);
55 $msg->addFeedback('THREAD_UNLOCKED');
56 header('Location: '.AT_BASE_HREF.'mods/_standard/forums/forum/index.php?fid='.$fid);
61 require(AT_INCLUDE_PATH.'header.inc.php');
63 $pid = intval($_GET['pid']);
64 $fid = intval($_GET['fid']);
66 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
67 <input type="hidden" name="pid" value="<?php echo $pid?>">
68 <input type="hidden" name="fid" value="<?php echo $fid?>">
70 <div class="input-form" style="width: 40%;">
72 <?php if ($_GET['unlock']): ?>
74 <input type="radio" name="lock" value="0" id="un"><label for="un"><?php echo _AT('unlock_thread'); ?></label>
79 <input type="radio" name="lock" value="1" id="rw" <?php
80 if (($_GET['unlock'] == '') || ($_GET['unlock'] == 1)) {
81 echo ' checked="checked"';
83 ?>><label for="rw"><?php echo _AT('lock_no_read'); ?></label><br />
84 <input type="radio" name="lock" value="2" id="w" <?php
85 if ($_GET['unlock'] == 2) {
86 echo ' checked="checked"';
88 ?>><label for="w"><?php echo _AT('lock_no_post'); ?></label>
91 <div class="row buttons">
92 <input name="submit" type="submit" value="<?php echo _AT('lock_submit'); ?>" />
93 <input name="cancel" type="submit" value="<?php echo _AT('cancel'); ?>" />
98 <?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>