Project

General

Profile

1 1108 Ruebenwurz
<?php
2 1280 Luisehahne
/**
3
 *
4
 * @category        modules
5
 * @package         news
6
 * @author          WebsiteBaker Project
7
 * @copyright       2004-2009, Ryan Djurovich
8 1349 Luisehahne
 * @copyright       2009-2011, Website Baker Org. e.V.
9 1280 Luisehahne
 * @link			http://www.websitebaker2.org/
10
 * @license         http://www.gnu.org/licenses/gpl.html
11
 * @platform        WebsiteBaker 2.8.x
12 1374 Luisehahne
 * @requirements    PHP 5.2.2 and higher
13 1280 Luisehahne
 * @version         $Id$
14
 * @filesource		$HeadURL$
15
 * @lastmodified    $Date$
16
 *
17
 */
18 1108 Ruebenwurz
19
require('../../config.php');
20
21
// Include WB admin wrapper script
22
require(WB_PATH.'/modules/admin.php');
23
24 1383 FrankH
$comment_id = $admin->checkIDKEY('comment_id', false, 'GET');
25
if (!$comment_id) {
26
	$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL);
27
	exit();
28
}
29
30 1108 Ruebenwurz
// Get header and footer
31
$query_content = $database->query("SELECT post_id,title,comment FROM ".TABLE_PREFIX."mod_news_comments WHERE comment_id = '$comment_id'");
32
$fetch_content = $query_content->fetchRow();
33
?>
34
35
<h2><?php echo $TEXT['MODIFY'].' '.$TEXT['COMMENT']; ?></h2>
36
37
<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_comment.php" method="post" style="margin: 0;">
38
39 1157 Luisehahne
<input type="hidden" name="section_id" value="<?php echo $section_id; ?>" />
40
<input type="hidden" name="page_id" value="<?php echo $page_id; ?>" />
41
<input type="hidden" name="post_id" value="<?php echo $fetch_content['post_id']; ?>" />
42
<input type="hidden" name="comment_id" value="<?php echo $comment_id; ?>" />
43 1383 FrankH
<?php echo $admin->getFTAN(); ?>
44 1108 Ruebenwurz
<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%">
45
<tr>
46
	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
47
	<td>
48
		<input type="text" name="title" value="<?php echo (htmlspecialchars($fetch_content['title'])); ?>" style="width: 98%;" maxlength="255" />
49
	</td>
50
</tr>
51
<tr>
52
	<td valign="top"><?php echo $TEXT['COMMENT']; ?>:</td>
53
	<td>
54
		<textarea name="comment" rows="10" cols="1" style="width: 98%; height: 150px;"><?php echo (htmlspecialchars($fetch_content['comment'])); ?></textarea>
55
	</td>
56
</tr>
57
</table>
58
59
<table cellpadding="0" cellspacing="0" border="0" width="100%">
60
<tr>
61
	<td align="left">
62 1157 Luisehahne
		<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 100px; margin-top: 5px;" />
63 1108 Ruebenwurz
	</td>
64
	<td align="right">
65 1383 FrankH
		<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php
66
			echo WB_URL; ?>/modules/news/modify_post.php?page_id=<?php
67
			echo $page_id; ?>&amp;section_id=<?php echo $section_id; ?>&amp;post_id=<?php
68
			echo $admin->getIDKEY($fetch_content['post_id']); ?>';" style="width: 100px; margin-top: 5px;" />
69 1108 Ruebenwurz
	</td>
70
</tr>
71
</table>
72 1157 Luisehahne
</form>
73 1108 Ruebenwurz
74
<?php
75
76
// Print admin footer
77
$admin->print_footer();
78
79 562 Ruebenwurz
?>