1 |
4
|
ryan
|
<?php
|
2 |
|
|
|
3 |
36
|
stefan
|
// $Id$
|
4 |
4
|
ryan
|
|
5 |
|
|
/*
|
6 |
|
|
|
7 |
|
|
Website Baker Project <http://www.websitebaker.org/>
|
8 |
|
|
Copyright (C) 2004-2005, Ryan Djurovich
|
9 |
|
|
|
10 |
|
|
Website Baker is free software; you can redistribute it and/or modify
|
11 |
|
|
it under the terms of the GNU General Public License as published by
|
12 |
|
|
the Free Software Foundation; either version 2 of the License, or
|
13 |
|
|
(at your option) any later version.
|
14 |
|
|
|
15 |
|
|
Website Baker is distributed in the hope that it will be useful,
|
16 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
17 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
18 |
|
|
GNU General Public License for more details.
|
19 |
|
|
|
20 |
|
|
You should have received a copy of the GNU General Public License
|
21 |
|
|
along with Website Baker; if not, write to the Free Software
|
22 |
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
23 |
|
|
|
24 |
|
|
*/
|
25 |
|
|
|
26 |
|
|
require('../../config.php');
|
27 |
|
|
|
28 |
|
|
// Get id
|
29 |
|
|
if(!isset($_GET['comment_id']) OR !is_numeric($_GET['comment_id'])) {
|
30 |
|
|
header("Location: ".ADMIN_URL."/pages/index.php");
|
31 |
|
|
} else {
|
32 |
|
|
$comment_id = $_GET['comment_id'];
|
33 |
|
|
}
|
34 |
|
|
|
35 |
|
|
// Include WB admin wrapper script
|
36 |
|
|
require(WB_PATH.'/modules/admin.php');
|
37 |
|
|
|
38 |
|
|
// Get header and footer
|
39 |
|
|
$query_content = $database->query("SELECT post_id,title,comment FROM ".TABLE_PREFIX."mod_news_comments WHERE comment_id = '$comment_id'");
|
40 |
|
|
$fetch_content = $query_content->fetchRow();
|
41 |
|
|
|
42 |
|
|
?>
|
43 |
|
|
|
44 |
|
|
<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_comment.php" method="post" style="margin: 0;">
|
45 |
|
|
|
46 |
|
|
<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
|
47 |
|
|
<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
|
48 |
|
|
<input type="hidden" name="post_id" value="<?php echo $fetch_content['post_id']; ?>">
|
49 |
|
|
<input type="hidden" name="comment_id" value="<?php echo $comment_id; ?>">
|
50 |
|
|
|
51 |
|
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
52 |
|
|
<tr>
|
53 |
|
|
<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
|
54 |
|
|
<td>
|
55 |
36
|
stefan
|
<input type="text" name="title" value="<?php echo $admin->stripslashes(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
|
56 |
4
|
ryan
|
</td>
|
57 |
|
|
</tr>
|
58 |
|
|
<tr>
|
59 |
|
|
<td valign="top"><?php echo $TEXT['COMMENT']; ?>:</td>
|
60 |
|
|
<td>
|
61 |
36
|
stefan
|
<textarea name="comment" style="width: 100%; height: 150px;"><?php echo $admin->stripslashes(htmlspecialchars($fetch_content['comment'])); ?></textarea>
|
62 |
4
|
ryan
|
</td>
|
63 |
|
|
</tr>
|
64 |
|
|
</table>
|
65 |
|
|
|
66 |
|
|
<br />
|
67 |
|
|
|
68 |
|
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
69 |
|
|
<tr>
|
70 |
|
|
<td align="left">
|
71 |
|
|
<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 200px; margin-top: 5px;"></form>
|
72 |
|
|
</td>
|
73 |
|
|
<td align="right">
|
74 |
|
|
<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/news/modify_post.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&post_id=<?php echo $fetch_content['post_id']; ?>';" style="width: 100px; margin-top: 5px;" />
|
75 |
|
|
</td>
|
76 |
|
|
</tr>
|
77 |
|
|
</table>
|
78 |
|
|
|
79 |
|
|
|
80 |
|
|
<?php
|
81 |
|
|
|
82 |
|
|
// Print admin footer
|
83 |
|
|
$admin->print_footer();
|
84 |
|
|
|
85 |
|
|
?>
|