Project

General

Profile

1
<?php
2
/**
3
 *
4
 * @category        modules
5
 * @package         news
6
 * @author          WebsiteBaker Project
7
 * @copyright       2004-2009, Ryan Djurovich
8
 * @copyright       2009-2011, Website Baker Org. e.V.
9
 * @link			http://www.websitebaker2.org/
10
 * @license         http://www.gnu.org/licenses/gpl.html
11
 * @platform        WebsiteBaker 2.8.x
12
 * @requirements    PHP 5.2.2 and higher
13
 * @version         $Id: modify_comment.php 1457 2011-06-25 17:18:50Z Luisehahne $
14
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/modules/news/modify_comment.php $
15
 * @lastmodified    $Date: 2011-06-25 19:18:50 +0200 (Sat, 25 Jun 2011) $
16
 *
17
 */
18

    
19
require('../../config.php');
20

    
21
// Include WB admin wrapper script
22
require(WB_PATH.'/modules/admin.php');
23

    
24
$comment_id = $admin->checkIDKEY('comment_id', false, 'GET');
25
if (!$comment_id) {
26
	$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'],  ADMIN_URL.'/pages/modify.php?page_id='.$page_id );
27
}
28

    
29
// Get header and footer
30
$query_content = $database->query("SELECT post_id,title,comment FROM ".TABLE_PREFIX."mod_news_comments WHERE comment_id = '$comment_id'");
31
$fetch_content = $query_content->fetchRow();
32
?>
33

    
34
<h2><?php echo $TEXT['MODIFY'].' '.$TEXT['COMMENT']; ?></h2>
35

    
36
<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_comment.php" method="post" style="margin: 0;">
37

    
38
<input type="hidden" name="section_id" value="<?php echo $section_id; ?>" />
39
<input type="hidden" name="page_id" value="<?php echo $page_id; ?>" />
40
<input type="hidden" name="post_id" value="<?php echo $fetch_content['post_id']; ?>" />
41
<input type="hidden" name="comment_id" value="<?php echo $comment_id; ?>" />
42
<?php echo $admin->getFTAN(); ?>
43
<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%">
44
<tr>
45
	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
46
	<td>
47
		<input type="text" name="title" value="<?php echo (htmlspecialchars($fetch_content['title'])); ?>" style="width: 98%;" maxlength="255" />
48
	</td>
49
</tr>
50
<tr>
51
	<td valign="top"><?php echo $TEXT['COMMENT']; ?>:</td>
52
	<td>
53
		<textarea name="comment" rows="10" cols="1" style="width: 98%; height: 150px;"><?php echo (htmlspecialchars($fetch_content['comment'])); ?></textarea>
54
	</td>
55
</tr>
56
</table>
57

    
58
<table cellpadding="0" cellspacing="0" border="0" width="100%">
59
<tr>
60
	<td align="left">
61
		<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 100px; margin-top: 5px;" />
62
	</td>
63
	<td align="right">
64
		<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php
65
			echo WB_URL; ?>/modules/news/modify_post.php?page_id=<?php
66
			echo $page_id; ?>&amp;section_id=<?php echo $section_id; ?>&amp;post_id=<?php
67
			echo $admin->getIDKEY($fetch_content['post_id']); ?>';" style="width: 100px; margin-top: 5px;" />
68
	</td>
69
</tr>
70
</table>
71
</form>
72

    
73
<?php
74

    
75
// Print admin footer
76
$admin->print_footer();
77

    
78
?>
(16-16/31)