author | Dan |
Wed, 17 Oct 2007 20:23:51 -0400 | |
changeset 1 | 6f8b7c6fac02 |
parent 0 | 0417a5a0c7be |
child 3 | 88b85b9b9272 |
permissions | -rw-r--r-- |
0 | 1 |
<?php |
2 |
/* |
|
3 |
* Decir |
|
4 |
* Version 0.1 |
|
5 |
* Copyright (C) 2007 Dan Fuhry |
|
6 |
* posting.php - post topics and replies |
|
7 |
* |
|
8 |
* This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
|
9 |
* as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
|
12 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
|
13 |
*/ |
|
14 |
||
15 |
require('common.php'); |
|
16 |
require('bbcode.php'); |
|
17 |
||
18 |
// |
|
19 |
// Set mode and parameters |
|
20 |
// |
|
21 |
||
22 |
$mode = 'topic'; |
|
23 |
||
24 |
if ( $paths->getParam(1) ) |
|
25 |
{ |
|
26 |
$n = strtolower($paths->getParam(1)); |
|
27 |
if ( $n == 'reply' || $n == 'post' ) |
|
28 |
{ |
|
29 |
$mode = 'reply'; |
|
30 |
} |
|
31 |
elseif ( $n == 'quote' ) |
|
32 |
{ |
|
33 |
$mode = 'quote'; |
|
34 |
} |
|
35 |
} |
|
36 |
||
37 |
// Set the parameters for posting, then encrypt it so we don't have to do authorization checks again |
|
38 |
// Why? Because it's better than going through some session system for postings where the data is stored on the server |
|
39 |
// We already have AES encryption - might as well use it ;-) |
|
40 |
$aes = new AESCrypt(AES_BITS, AES_BLOCKSIZE); |
|
41 |
||
42 |
$do_preview = false; |
|
43 |
||
44 |
if ( isset($_GET['act']) && $_GET['act'] == 'post' ) |
|
45 |
{ |
|
46 |
if ( !is_array($_POST['do']) ) |
|
47 |
die('Hacking attempt'); |
|
48 |
||
49 |
if ( isset($_POST['do']['preview']) ) |
|
50 |
{ |
|
51 |
$do_preview = true; |
|
52 |
$parms = $_POST['authorization']; |
|
53 |
$parms2 = $aes->decrypt($parms, $session->private_key, ENC_HEX); |
|
54 |
if ( !$parms2 || substr($parms2, 0, 1) != 'a' ) |
|
55 |
{ |
|
56 |
die('Hacking attempt: ' . $parms2); |
|
57 |
} |
|
58 |
$parms2 = unserialize($parms2); |
|
59 |
$mode = 'already_taken_care_of'; |
|
60 |
} |
|
61 |
else if ( isset($_POST['do']['post']) ) |
|
62 |
{ |
|
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
63 |
$errors = Array(); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
64 |
|
0 | 65 |
// Decrypt authorization array |
66 |
$parms = $aes->decrypt($_POST['authorization'], $session->private_key, ENC_HEX); |
|
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
67 |
if ( !$parms ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
68 |
$errors[] = 'Could not decrypt authorization key.'; |
0 | 69 |
$parms = unserialize($parms); |
70 |
||
71 |
// Perform a little input validation |
|
72 |
if ( empty($_POST['post_text']) ) |
|
73 |
$errors[] = 'Please enter a post.'; |
|
74 |
if ( empty($_POST['subject']) && $parms['mode'] == 'topic' ) |
|
75 |
$errors[] = 'Please enter a topic title.'; |
|
76 |
// It's OK to trust this! The auth key is encrypted with the site's private key. |
|
77 |
if ( !$parms['authorized'] ) |
|
78 |
$errors[] = 'Invalid authorization key'; |
|
79 |
||
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
80 |
if ( sizeof($errors) < 1 ) |
0 | 81 |
{ |
82 |
// Collect other options |
|
83 |
||
84 |
// Submit post |
|
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
85 |
if ( $parms['mode'] == 'reply' || $parms['mode'] == 'quote' ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
86 |
{ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
87 |
$result = decir_submit_post($parms['topic_in'], $_POST['subject'], $_POST['post_text'], $post_id); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
88 |
if ( $result ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
89 |
{ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
90 |
// update forum stats |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
91 |
$user = $db->escape($session->username); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
92 |
$q = $db->sql_query('UPDATE '.table_prefix."decir_forums SET num_posts = num_posts+1, last_post_id = $post_id, last_post_topic = {$parms['topic_in']}, last_post_user = $session->user_id WHERE forum_id={$parms['forum_in']};"); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
93 |
if ( !$q ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
94 |
{ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
95 |
$db->_die('Decir posting.php under Submit post [reply]'); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
96 |
} |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
97 |
$url = makeUrlNS('Special', 'Forum/Topic/' . $parms['topic_in'], false, true); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
98 |
redirect($url, 'Post submitted', 'Your post has been submitted successfully.', 4); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
99 |
} |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
100 |
} |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
101 |
else if ( $parms['mode'] == 'topic' ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
102 |
{ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
103 |
$result = decir_submit_topic($parms['forum_id'], $_POST['subject'], $_POST['post_text'], $topic_id, $post_id); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
104 |
if ( $result ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
105 |
{ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
106 |
// update forum stats |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
107 |
$q = $db->sql_query('UPDATE '.table_prefix."decir_forums SET num_posts = num_posts+1, num_topics = num_topics+1, last_post_id = $post_id, last_post_topic = $topic_id, last_post_user = $session->user_id WHERE forum_id={$parms['forum_id']};"); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
108 |
if ( !$q ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
109 |
{ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
110 |
$db->_die('Decir posting.php under Submit post [topic]'); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
111 |
} |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
112 |
$url = makeUrlNS('Special', 'Forum/Topic/' . $topic_id, false, true); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
113 |
redirect($url, 'Post submitted', 'Your post has been submitted successfully.', 4); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
114 |
} |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
115 |
} |
0 | 116 |
return; |
117 |
} |
|
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
118 |
$mode = 'already_taken_care_of'; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
119 |
$parms2 = $parms; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
120 |
$parms = htmlspecialchars($_POST['authorization']); |
0 | 121 |
} |
122 |
} |
|
123 |
||
124 |
if ( $mode == 'reply' || $mode == 'quote' ) |
|
125 |
{ |
|
126 |
if ( $mode == 'reply' ) |
|
127 |
{ |
|
128 |
$message = ''; |
|
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
129 |
$subject = ''; |
0 | 130 |
// Validate topic ID |
131 |
$topic_id = intval($paths->getParam(2)); |
|
132 |
if ( empty($topic_id) ) |
|
133 |
die_friendly('Error', '<p>Invalid topic ID</p>'); |
|
134 |
$title = 'Reply to topic'; |
|
135 |
} |
|
136 |
else if ( $mode == 'quote' ) |
|
137 |
{ |
|
138 |
||
139 |
/** |
|
140 |
* @TODO: validate read permissions |
|
141 |
*/ |
|
142 |
||
143 |
$post_id = intval($paths->getParam(2)); |
|
144 |
if ( empty($post_id) ) |
|
145 |
die_friendly('Error', '<p>Invalid post ID</p>'); |
|
146 |
||
147 |
// Get post text and topic ID |
|
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
148 |
$q = $db->sql_query('SELECT p.topic_id,t.post_text,t.bbcode_uid,p.poster_name,p.post_subject FROM '.table_prefix.'decir_posts AS p |
0 | 149 |
LEFT JOIN '.table_prefix.'decir_posts_text AS t |
150 |
ON ( p.post_id = t.post_id ) |
|
151 |
WHERE p.post_id=' . $post_id . ';'); |
|
152 |
||
153 |
if ( !$q ) |
|
154 |
$db->_die(); |
|
155 |
||
156 |
if ( $db->numrows() < 1 ) |
|
157 |
die_friendly('Error', '<p>The post you requested does not exist.</p>'); |
|
158 |
||
159 |
$row = $db->fetchrow(); |
|
160 |
$db->free_result(); |
|
161 |
||
162 |
$message = '[quote="' . $row['poster_name'] . '"]' . bbcode_strip_uid( $row['post_text'], $row['bbcode_uid'] ) . '[/quote]'; |
|
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
163 |
$subject = 'Re: ' . htmlspecialchars($row['post_subject']); |
0 | 164 |
$quote_poster = $row['poster_name']; |
165 |
$topic_id = intval($row['topic_id']); |
|
166 |
||
167 |
$title = 'Reply to topic with quote'; |
|
168 |
||
169 |
} |
|
170 |
||
171 |
// Topic ID is good, verify topic status |
|
172 |
$q = $db->sql_query('SELECT topic_id,forum_id,topic_type,topic_locked,topic_moved FROM '.table_prefix.'decir_topics WHERE topic_id=' . $topic_id . ';'); |
|
173 |
||
174 |
if ( !$q ) |
|
175 |
$db->_die(); |
|
176 |
||
177 |
$row = $db->fetchrow(); |
|
178 |
$db->free_result(); |
|
179 |
||
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
180 |
$forum_perms = $session->fetch_page_acl($row['forum_id'], 'DecirForum'); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
181 |
$topic_perms = $session->fetch_page_acl($row['topic_id'], 'DecirTopic'); |
0 | 182 |
|
183 |
if ( !$forum_perms->get_permissions('decir_see_forum') ) |
|
184 |
die_friendly('Error', '<p>The forum you requested does not exist.</p>'); |
|
185 |
||
186 |
if ( !$topic_perms->get_permissions('decir_reply') ) |
|
187 |
die_friendly('Access denied', '<p>You are not allowed to post replies in this topic.</p>'); |
|
188 |
||
189 |
$forum_in = intval($row['forum_id']); |
|
190 |
$topic_in = intval($row['topic_id']); |
|
191 |
||
192 |
$parms = Array( |
|
193 |
'mode' => $mode, |
|
194 |
'forum_in' => $forum_in, |
|
195 |
'topic_in' => $topic_in, |
|
196 |
'timestamp' => time(), |
|
197 |
'authorized' => true |
|
198 |
); |
|
199 |
||
200 |
$parms = serialize($parms); |
|
201 |
$parms = $aes->encrypt($parms, $session->private_key, ENC_HEX); |
|
202 |
||
203 |
} |
|
204 |
else if ( $mode == 'topic' ) |
|
205 |
{ |
|
206 |
$message = ''; |
|
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
207 |
$subject = ''; |
0 | 208 |
// Validate topic ID |
209 |
$forum_id = intval($paths->getParam(2)); |
|
210 |
if ( empty($forum_id) ) |
|
211 |
die_friendly('Error', '<p>Invalid forum ID</p>'); |
|
212 |
$title = 'Post new topic'; |
|
213 |
||
214 |
// Topic ID is good, verify topic status |
|
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
215 |
$q = $db->sql_query('SELECT forum_id, forum_name FROM '.table_prefix.'decir_forums WHERE forum_id=' . $forum_id . ';'); |
0 | 216 |
|
217 |
if ( !$q ) |
|
218 |
$db->_die(); |
|
219 |
||
220 |
if ( $db->numrows() < 1 ) |
|
221 |
die_friendly('Error', '<p>The forum you requested does not exist.</p>'); |
|
222 |
||
223 |
$row = $db->fetchrow(); |
|
224 |
$db->free_result(); |
|
225 |
||
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
226 |
$forum_perms = $session->fetch_page_acl($row['forum_id'], 'DecirForum'); |
0 | 227 |
|
228 |
if ( !$forum_perms->get_permissions('decir_see_forum') ) |
|
229 |
die_friendly('Error', '<p>The forum you requested does not exist.</p>'); |
|
230 |
||
231 |
$parms = Array( |
|
232 |
'mode' => $mode, |
|
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
233 |
'forum_id' => $forum_id, |
0 | 234 |
'timestamp' => time(), |
235 |
'authorized' => true |
|
236 |
); |
|
237 |
||
238 |
$parms = serialize($parms); |
|
239 |
$parms = $aes->encrypt($parms, $session->private_key, ENC_HEX); |
|
240 |
||
241 |
} |
|
242 |
else if ( $mode == 'already_taken_care_of' ) |
|
243 |
{ |
|
244 |
$mode = $parms2['mode']; |
|
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
245 |
$title = ( $mode == 'topic' ) ? 'Post new topic' : ( ( $mode == 'reply' ) ? 'Reply to topic' : ( $mode == 'quote' ) ? 'Reply to topic with quote' : 'Duh...' ); |
0 | 246 |
} |
247 |
else |
|
248 |
{ |
|
249 |
die_friendly('Invalid request', '<p>Invalid action defined</p>'); |
|
250 |
} |
|
251 |
||
252 |
$template->tpl_strings['PAGE_NAME'] = $title; |
|
253 |
$template->add_header('<!-- DECIR BEGIN --> |
|
254 |
<script type="text/javascript" src="' . scriptPath . '/decir/js/bbcedit.js"></script> |
|
255 |
<script type="text/javascript" src="' . scriptPath . '/decir/js/colorpick/jquery.js"></script> |
|
256 |
<script type="text/javascript" src="' . scriptPath . '/decir/js/colorpick/farbtastic.js"></script> |
|
257 |
<link rel="stylesheet" type="text/css" href="' . scriptPath . '/decir/js/bbcedit.css" /> |
|
258 |
<link rel="stylesheet" type="text/css" href="' . scriptPath . '/decir/js/colorpick/farbtastic.css" /> |
|
259 |
<!-- DECIR END -->'); |
|
260 |
||
261 |
$template->header(); |
|
262 |
||
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
263 |
if ( isset($errors) ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
264 |
{ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
265 |
echo '<div class="error-box" style="margin: 10px 0;"> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
266 |
<b>Your post could not be submitted.</b> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
267 |
<ul> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
268 |
<li>' . implode("</li>\n <li>", $errors) . '</li> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
269 |
</ul> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
270 |
</div>'; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
271 |
} |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
272 |
|
0 | 273 |
if ( $do_preview ) |
274 |
{ |
|
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
275 |
$message = $_POST['post_text']; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
276 |
$subject = htmlspecialchars($_POST['subject']); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
277 |
$message_render = render_bbcode($message); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
278 |
$message_render = RenderMan::smilieyize($message_render); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
279 |
echo '<div style="border: 1px solid #222222; background-color: #F0F0F0; padding: 10px; max-height: 300px; clip: rect(0px,auto,auto,0px); overflow: auto; margin: 10px 0;"> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
280 |
<h2>Post preview</h2> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
281 |
<p>' . $message_render . '</p> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
282 |
</div>'; |
0 | 283 |
} |
284 |
||
285 |
$url = makeUrlNS('Special', 'Forum/New', 'act=post', true); |
|
286 |
echo '<br /> |
|
287 |
<form action="' . $url . '" method="post" enctype="multipart/form-data">'; |
|
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
288 |
echo '<div class="tblholder"> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
289 |
<table border="0" cellspacing="1" cellpadding="4">'; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
290 |
echo '<tr><td class="row2">Post subject:</td><td class="row1"><input name="subject" type="text" size="50" style="width: 100%;" value="' . $subject . '" /></td>'; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
291 |
echo '<tr><td class="row3" colspan="2">'; |
0 | 292 |
echo '<textarea name="post_text" class="bbcode" rows="20" cols="80">' . $message . '</textarea>'; |
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
293 |
echo '</td></tr>'; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
294 |
echo ' |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
295 |
<!-- This authorization code is encrypted with '.AES_BITS.'-bit AES. --> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
296 |
'; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
297 |
echo '<tr><th colspan="2" class="subhead"><input type="hidden" name="authorization" value="' . $parms . '" />'; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
298 |
echo '<input type="submit" name="do[post]" value="Submit post" style="font-weight: bold;" /> <input type="submit" name="do[preview]" value="Show preview" /></th></tr>'; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
299 |
echo '</table></div>'; |
0 | 300 |
echo '</form>'; |
301 |
||
302 |
$template->footer(); |
|
303 |
||
304 |
?> |