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 if (!defined('AT_INCLUDE_PATH')) { exit; }
17 if (!$_SESSION['valid_user']) {
18 $msg->printInfos('LOGIN_TO_POST');
24 if (isset($_POST['submit'])) {
25 // $subject = htmlentities_utf8($_POST['subject']);
26 // $body = htmlentities_utf8($_POST['body']);
27 $parent_id = $_POST['parent_id'];
28 $parent_name = $_POST['parent_name'];
29 //post reply is set when there is an error occuring.
30 if ($_POST['reply']!=''){
31 $saved_post['body'] = $_POST['replytext'];
32 $reply_hidden = '<input name="reply" type="hidden" value="'.AT_print($_REQUEST['reply'], 'input.text').'" />';
34 } else if (isset($_GET['reply']) && $_GET['reply'] != '') {
35 $subject = $saved_post['subject'];
36 $reply_hidden = '<input name="reply" type="hidden" value="'.AT_print($_REQUEST['reply'], 'input.text').'" />';
38 if (substr($subject, 0, 3) != 'Re:') {
39 $subject = 'Re: '.$subject;
45 <form action="mods/_standard/forums/forum/new_thread.php" method="post" name="form">
46 <input name="parent_id" type="hidden" value="<?php echo $parent_id; ?>" />
47 <input name="fid" type="hidden" value="<?php echo $fid; ?>" />
48 <input name="page" type="hidden" value="<?php echo $_GET['page']; ?>" />
49 <input name="parent_name" type="hidden" value="<?php echo urlencode($parent_name); ?>" />
50 <?php echo $reply_hidden; //print hidden reply field if it exists. ?>
54 <div class="input-form">
55 <fieldset class="group_form"><legend class="group_form"><?php echo _AT('post_message'); ?></legend>
57 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="subject"><?php echo _AT('subject'); ?></label><br />
58 <input type="text" maxlength="80" name="subject" size="36" value="<?php echo AT_print($subject, 'input.text'); ?>" id="subject" />
62 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="body"><?php echo _AT('body'); ?></label><br />
63 <textarea cols="45" name="body" rows="10" id="body"><?php echo AT_print($_POST['body'], 'input.text'); ?></textarea>
65 <small class="spacer"><br />· <?php echo _AT('forum_links'); ?><br />
66 · <?php echo _AT('forum_email_links'); ?><br />
67 · <?php echo _AT('forum_html_disabled'); ?></small>
70 <?php if (isset($_REQUEST['reply'])): ?>
72 <label for="body"><?php echo _AT('forum_reply_to'); ?></label><br />
73 <textarea cols="45" name="replytext" rows="5"><?php echo $saved_post['body']; ?></textarea>
79 <a href="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES); ?>#jumpcodes" title="<?php echo _AT('jump_codes'); ?>"><img src="images/clr.gif" height="1" width="1" alt="<?php echo _AT('jump_codes'); ?>" border="0" /></a><?php require(AT_INCLUDE_PATH.'html/code_picker.inc.php'); ?>
81 <a name="jumpcodes"></a>
84 <?php if (!$subscribed): ?>
86 <input type="checkbox" name="subscribe" value="1" id="sub" />
87 <label for="sub"><?php echo _AT('thread_subscribe'); ?></label>
91 <?php echo _AT('thread_already_subscribed'); ?>
95 <div class="row buttons">
96 <input name="submit" accesskey="s" type="submit" value=" <?php echo _AT('post'); ?>" />
97 <?php if ($new_thread == TRUE) : ?>
98 <input name="cancel" type="submit" value="<?php echo _AT('cancel'); ?>" />