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-2010, 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 4.3.4 and higher
13
 * @version         $Id: modify_comment.php 1289 2010-02-10 15:13:21Z kweitzel $
14
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/trunk/wb/modules/news/modify_comment.php $
15
 * @lastmodified    $Date: 2010-02-10 16:13:21 +0100 (Wed, 10 Feb 2010) $
16
 *
17
 */
18

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

    
21
// Get id
22
if(!isset($_GET['comment_id']) OR !is_numeric($_GET['comment_id'])) {
23
	header("Location: ".ADMIN_URL."/pages/index.php");
24
	exit(0);
25
} else {
26
	$comment_id = $_GET['comment_id'];
27
}
28

    
29
// Include WB admin wrapper script
30
require(WB_PATH.'/modules/admin.php');
31

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

    
36
?>
37

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

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

    
42
<input type="hidden" name="section_id" value="<?php echo $section_id; ?>" />
43
<input type="hidden" name="page_id" value="<?php echo $page_id; ?>" />
44
<input type="hidden" name="post_id" value="<?php echo $fetch_content['post_id']; ?>" />
45
<input type="hidden" name="comment_id" value="<?php echo $comment_id; ?>" />
46

    
47
<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%">
48
<tr>
49
	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
50
	<td>
51
		<input type="text" name="title" value="<?php echo (htmlspecialchars($fetch_content['title'])); ?>" style="width: 98%;" maxlength="255" />
52
	</td>
53
</tr>
54
<tr>
55
	<td valign="top"><?php echo $TEXT['COMMENT']; ?>:</td>
56
	<td>
57
		<textarea name="comment" rows="10" cols="1" style="width: 98%; height: 150px;"><?php echo (htmlspecialchars($fetch_content['comment'])); ?></textarea>
58
	</td>
59
</tr>
60
</table>
61

    
62
<table cellpadding="0" cellspacing="0" border="0" width="100%">
63
<tr>
64
	<td align="left">
65
		<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 100px; margin-top: 5px;" />
66
	</td>
67
	<td align="right">
68
		<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; ?>&amp;section_id=<?php echo $section_id; ?>&amp;post_id=<?php echo $fetch_content['post_id']; ?>';" style="width: 100px; margin-top: 5px;" />
69
	</td>
70
</tr>
71
</table>
72
</form>
73

    
74
<?php
75

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

    
79
?>
(16-16/31)