author | Dan |
Wed, 14 Nov 2007 19:26:21 -0500 | |
changeset 10 | 36bc382ed459 |
parent 6 | 3f66ec435f08 |
permissions | -rw-r--r-- |
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
1 |
<?php |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
2 |
/* |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
3 |
* Decir |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
4 |
* Version 0.1 |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
5 |
* Copyright (C) 2007 Dan Fuhry |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
6 |
* edit.php - edit posts that already exist |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
7 |
* |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
8 |
* This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
9 |
* as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
10 |
* |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
11 |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
12 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
13 |
*/ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
14 |
|
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
15 |
require('common.php'); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
16 |
require('bbcode.php'); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
17 |
|
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
18 |
$pid = $paths->getParam(1); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
19 |
if ( strval(intval($pid)) !== $pid ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
20 |
{ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
21 |
die_friendly('Error', '<p>Invalid post ID</p>'); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
22 |
} |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
23 |
|
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
24 |
$pid = intval($pid); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
25 |
|
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
26 |
// Obtain post info |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
27 |
$q = $db->sql_query('SELECT p.post_id, p.post_subject, t.post_text, t.bbcode_uid, p.poster_id FROM '.table_prefix."decir_posts AS p |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
28 |
LEFT JOIN ".table_prefix."decir_posts_text AS t |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
29 |
ON (t.post_id = p.post_id) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
30 |
WHERE p.post_id = $pid;"); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
31 |
if ( !$q ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
32 |
$db->_die('Decir edit.php'); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
33 |
|
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
34 |
if ( $db->numrows() < 1 ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
35 |
{ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
36 |
die_friendly('Error', '<p>The post you requested does not exist.</p>'); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
37 |
} |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
38 |
|
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
39 |
$row = $db->fetchrow(); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
40 |
$db->free_result(); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
41 |
|
3
88b85b9b9272
What can I say? More progress. Mostly bugfixes and ACL stuff now. Which reminds me - don't use this release, there are quite a few access bugs in it right now.
Dan
parents:
1
diff
changeset
|
42 |
$own_post = ( $row['poster_id'] == $session->user_id && $session->user_logged_in ); |
88b85b9b9272
What can I say? More progress. Mostly bugfixes and ACL stuff now. Which reminds me - don't use this release, there are quite a few access bugs in it right now.
Dan
parents:
1
diff
changeset
|
43 |
$acl_type = ( $own_post ) ? 'decir_edit_own' : 'decir_edit_other'; |
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
44 |
|
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
45 |
$post_perms = $session->fetch_page_acl(strval($pid), 'DecirPost'); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
46 |
if ( !$post_perms->get_permissions($acl_type) ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
47 |
{ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
48 |
die_friendly('Error', '<p>You do not have permission to edit this post.</p>'); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
49 |
} |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
50 |
|
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
51 |
$show_preview = false; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
52 |
$form_submit_url = makeUrlNS('Special', 'Forum/Edit/' . $pid, 'act=submit', true); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
53 |
$post_text = htmlspecialchars(bbcode_strip_uid($row['post_text'], $row['bbcode_uid'])); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
54 |
$post_subject = htmlspecialchars($row['post_subject']); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
55 |
$edit_reason = ''; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
56 |
|
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
57 |
if ( isset($_GET['act']) && $_GET['act'] == 'submit' ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
58 |
{ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
59 |
if ( isset($_POST['do']['preview']) ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
60 |
{ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
61 |
$show_preview = true; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
62 |
$post_text = htmlspecialchars($_POST['post_text']); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
63 |
$post_subject = htmlspecialchars($_POST['post_subject']); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
64 |
$edit_reason = htmlspecialchars($_POST['edit_reason']); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
65 |
$message_render = render_bbcode($post_text); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
66 |
$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:
diff
changeset
|
67 |
} |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
68 |
else if ( isset($_POST['do']['save']) ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
69 |
{ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
70 |
// Save changes |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
71 |
if ( isset($_POST['do']['delete']) ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
72 |
{ |
3
88b85b9b9272
What can I say? More progress. Mostly bugfixes and ACL stuff now. Which reminds me - don't use this release, there are quite a few access bugs in it right now.
Dan
parents:
1
diff
changeset
|
73 |
// Check permissions (of course!) |
88b85b9b9272
What can I say? More progress. Mostly bugfixes and ACL stuff now. Which reminds me - don't use this release, there are quite a few access bugs in it right now.
Dan
parents:
1
diff
changeset
|
74 |
$acl_type = ( $own_post |
88b85b9b9272
What can I say? More progress. Mostly bugfixes and ACL stuff now. Which reminds me - don't use this release, there are quite a few access bugs in it right now.
Dan
parents:
1
diff
changeset
|
75 |
? ( $_POST['delete_method'] == 'hard' ? 'decir_delete_own_post_hard' : 'decir_delete_own_post_soft' ) |
88b85b9b9272
What can I say? More progress. Mostly bugfixes and ACL stuff now. Which reminds me - don't use this release, there are quite a few access bugs in it right now.
Dan
parents:
1
diff
changeset
|
76 |
: ( $_POST['delete_method'] == 'hard' ? 'decir_delete_other_post_hard' : 'decir_delete_other_post_soft' ) |
88b85b9b9272
What can I say? More progress. Mostly bugfixes and ACL stuff now. Which reminds me - don't use this release, there are quite a few access bugs in it right now.
Dan
parents:
1
diff
changeset
|
77 |
); |
88b85b9b9272
What can I say? More progress. Mostly bugfixes and ACL stuff now. Which reminds me - don't use this release, there are quite a few access bugs in it right now.
Dan
parents:
1
diff
changeset
|
78 |
if ( !$post_perms->get_permissions($acl_type) ) |
88b85b9b9272
What can I say? More progress. Mostly bugfixes and ACL stuff now. Which reminds me - don't use this release, there are quite a few access bugs in it right now.
Dan
parents:
1
diff
changeset
|
79 |
{ |
88b85b9b9272
What can I say? More progress. Mostly bugfixes and ACL stuff now. Which reminds me - don't use this release, there are quite a few access bugs in it right now.
Dan
parents:
1
diff
changeset
|
80 |
die_friendly('Error', '<p>You do not have access to perform this type of deletion on this post.</p>'); |
88b85b9b9272
What can I say? More progress. Mostly bugfixes and ACL stuff now. Which reminds me - don't use this release, there are quite a few access bugs in it right now.
Dan
parents:
1
diff
changeset
|
81 |
} |
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
82 |
// Nuke it |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
83 |
$result = decir_delete_post($pid, $_POST['edit_reason']); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
84 |
if ( $result ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
85 |
{ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
86 |
$url = makeUrlNS('Special', 'Forum/Post/' . $pid, false, true) . '#post' . $pid; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
87 |
redirect($url, 'Post deleted', 'The selected post has been deleted.', 4); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
88 |
} |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
89 |
} |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
90 |
$post_text = trim(htmlspecialchars($_POST['post_text'])); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
91 |
$post_subject = trim(htmlspecialchars($_POST['post_subject'])); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
92 |
$edit_reason = trim(htmlspecialchars($_POST['edit_reason'])); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
93 |
$errors = array(); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
94 |
|
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
95 |
if ( empty($post_text) ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
96 |
$errors[] = 'Please enter some post text.'; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
97 |
|
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
98 |
$result = decir_edit_post($pid, $post_subject, $post_text, $edit_reason); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
99 |
if ( $result ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
100 |
{ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
101 |
$url = makeUrlNS('Special', 'Forum/Post/' . $pid, false, true) . '#post' . $pid; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
102 |
redirect($url, 'Post successful', 'Your changes to this post have been saved.', 4); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
103 |
} |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
104 |
} |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
105 |
else if ( isset($_POST['do']['noop']) ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
106 |
{ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
107 |
$url = makeUrlNS('Special', 'Forum/Post/' . $pid, false, true) . '#post' . $pid; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
108 |
redirect($url, '', '', 0); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
109 |
} |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
110 |
} |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
111 |
|
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
112 |
// add JS for editor |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
113 |
$template->add_header('<!-- DECIR BEGIN --> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
114 |
<script type="text/javascript" src="' . scriptPath . '/decir/js/bbcedit.js"></script> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
115 |
<script type="text/javascript" src="' . scriptPath . '/decir/js/colorpick/jquery.js"></script> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
116 |
<script type="text/javascript" src="' . scriptPath . '/decir/js/colorpick/farbtastic.js"></script> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
117 |
<link rel="stylesheet" type="text/css" href="' . scriptPath . '/decir/js/bbcedit.css" /> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
118 |
<link rel="stylesheet" type="text/css" href="' . scriptPath . '/decir/js/colorpick/farbtastic.css" /> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
119 |
<!-- DECIR END -->'); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
120 |
|
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
121 |
$template->header(); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
122 |
|
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
123 |
if ( $show_preview ) |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
124 |
{ |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
125 |
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:
diff
changeset
|
126 |
<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:
diff
changeset
|
127 |
<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:
diff
changeset
|
128 |
</div>'; |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
129 |
} |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
130 |
|
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
131 |
?> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
132 |
<form action="<?php echo $form_submit_url; ?>" method="post" enctype="multipart/form-data"> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
133 |
<div class="tblholder"> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
134 |
<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:
diff
changeset
|
135 |
<tr> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
136 |
<th colspan="2">Editing post: <?php echo $post_subject; ?></th> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
137 |
</tr> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
138 |
<tr> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
139 |
<td class="row2">Delete post:</td> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
140 |
<td class="row1"><label><input type="checkbox" name="do[delete]" /> To delete this post, check this box and click Save.</label><br /><small>If this is the first post in the thread, the entire thread will be deleted.</small></td> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
141 |
</tr> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
142 |
<tr> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
143 |
<td class="row2">Post subject:</td> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
144 |
<td class="row1"><input type="text" name="post_subject" value="<?php echo $post_subject; ?>" style="width: 100%;" /></td> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
145 |
</tr> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
146 |
<tr> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
147 |
<td class="row2">Reason for editing:</td> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
148 |
<td class="row1"><input type="text" name="edit_reason" value="<?php echo $edit_reason; ?>" style="width: 100%;" /></td> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
149 |
</tr> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
150 |
<tr> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
151 |
<td class="row3" colspan="2"> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
152 |
<textarea name="post_text" class="bbcode" rows="20" cols="80"><?php echo $post_text; ?></textarea> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
153 |
</td> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
154 |
</tr> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
155 |
<tr> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
156 |
<th class="subhead" colspan="2"> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
157 |
<input type="submit" name="do[save]" value="Save changes" /> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
158 |
<input type="submit" name="do[preview]" value="Show preview" /> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
159 |
<input type="submit" name="do[noop]" value="Cancel" /> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
160 |
</th> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
161 |
</tr> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
162 |
</table> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
163 |
</div> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
164 |
</form> |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
165 |
<?php |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
166 |
|
6 | 167 |
decir_show_footers(); |
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
168 |
$template->footer(); |
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
169 |
|
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
diff
changeset
|
170 |
?> |