1
|
<?php
|
2
|
/**
|
3
|
*
|
4
|
* @category modules
|
5
|
* @package news
|
6
|
* @author WebsiteBaker Project
|
7
|
* @copyright 2009-2011, Website Baker Org. e.V.
|
8
|
* @link http://www.websitebaker2.org/
|
9
|
* @license http://www.gnu.org/licenses/gpl.html
|
10
|
* @platform WebsiteBaker 2.8.x
|
11
|
* @requirements PHP 5.2.2 and higher
|
12
|
* @version $Id: modify_comment.php 2 2017-07-02 15:14:29Z Manuela $
|
13
|
* @filesource $HeadURL: svn://isteam.dynxs.de/wb/2.10.x/trunk/modules/news/modify_comment.php $
|
14
|
* @lastmodified $Date: 2017-07-02 17:14:29 +0200 (Sun, 02 Jul 2017) $
|
15
|
*
|
16
|
*/
|
17
|
|
18
|
if ( !defined( 'WB_PATH' ) ){ require( dirname(dirname((__DIR__))).'/config.php' ); }
|
19
|
|
20
|
// Include WB admin wrapper script
|
21
|
require(WB_PATH.'/modules/admin.php');
|
22
|
|
23
|
$comment_id = $admin->checkIDKEY('comment_id', false, 'GET');
|
24
|
if (!$comment_id) {
|
25
|
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id );
|
26
|
}
|
27
|
|
28
|
// Get header and footer
|
29
|
$sql = 'SELECT `post_id`,`title`,`comment` FROM `'.TABLE_PREFIX.'mod_news_comments` '
|
30
|
. 'WHERE `comment_id` = \''.$comment_id.'\'';
|
31
|
$query_content = $database->query($sql);
|
32
|
$fetch_content = $query_content->fetchRow(MYSQLI_ASSOC);
|
33
|
?>
|
34
|
<div id="news-wrapper">
|
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
|
<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
|
<?php echo $admin->getFTAN(); ?>
|
44
|
<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
|
<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 100px; margin-top: 5px;" />
|
63
|
</td>
|
64
|
<td align="right">
|
65
|
<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; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php
|
68
|
echo $admin->getIDKEY($fetch_content['post_id']); ?>';" style="width: 100px; margin-top: 5px;" />
|
69
|
</td>
|
70
|
</tr>
|
71
|
</table>
|
72
|
</form>
|
73
|
</div>
|
74
|
|
75
|
<?php
|
76
|
|
77
|
// Print admin footer
|
78
|
$admin->print_footer();
|