Project

General

Profile

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_group.php 1538 2011-12-10 15:06:15Z Luisehahne $
13
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/modules/news/modify_group.php $
14
 * @lastmodified    $Date: 2011-12-10 16:06:15 +0100 (Sat, 10 Dec 2011) $
15
 *
16
 */
17

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

    
20
// $admin_header = true;
21
// Tells script to update when this page was last updated
22
$update_when_modified = false;
23
// show the info banner
24
$print_info_banner = true;
25
// Include WB admin wrapper script
26
require(WB_PATH.'/modules/admin.php');
27
/* */
28
$group_id = intval($admin->checkIDKEY('group_id', false, 'GET'));
29
if (!$group_id) {
30
	$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], WB_URL.'/modules/news/modify_group.php?page_id='.$page_id.'&section_id='.$section_id.'&group_id='.$admin->getIDKEY($group_id));
31
}
32

    
33
// Get header and footer
34
$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_groups WHERE group_id = '$group_id'");
35
$fetch_content = $query_content->fetchRow();
36

    
37
?>
38

    
39
<h2><?php echo $TEXT['ADD'].'/'.$TEXT['MODIFY'].' '.$TEXT['GROUP']; ?></h2>
40

    
41
<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_group.php" method="post" enctype="multipart/form-data" style="margin: 0;">
42

    
43
<input type="hidden" name="section_id" value="<?php echo $section_id; ?>" />
44
<input type="hidden" name="page_id" value="<?php echo $page_id; ?>" />
45
<input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
46
<?php echo $admin->getFTAN(); ?>
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><?php echo $TEXT['IMAGE']; ?>:</td>
56
	<?php if(file_exists(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg')) { ?>
57
	<td>
58
		<a href="<?php echo WB_URL.MEDIA_DIRECTORY; ?>/.news/image<?php echo $group_id; ?>.jpg" target="_blank">View</a>
59
		&nbsp;
60
		<input type="checkbox" name="delete_image" id="delete_image" value="true" />
61
		<label for="delete_image">Delete</label>
62
	</td>
63
	<?php } else { ?>
64
	<td>
65
		<input type="file" name="image" />
66
	</td>
67
	<?php } ?>
68
</tr>
69
<tr>
70
	<td><?php echo $TEXT['ACTIVE']; ?>:</td>
71
	<td>
72
		<input type="radio" name="active" id="active_true" value="1" <?php if($fetch_content['active'] == 1) { echo ' checked="checked"'; } ?> />
73
		<a href="#" onclick="javascript: document.getElementById('active_true').checked = true;">
74
		<?php echo $TEXT['YES']; ?>
75
		</a>
76
		-
77
		<input type="radio" name="active" id="active_false" value="0" <?php if($fetch_content['active'] == 0) { echo ' checked="checked"'; } ?> />
78
		<a href="#" onclick="javascript: document.getElementById('active_false').checked = true;">
79
		<?php echo $TEXT['NO']; ?>
80
		</a>
81
	</td>
82
</tr>
83
</table>
84

    
85
<table cellpadding="0" cellspacing="0" border="0" width="100%">
86
<tr>
87
	<td align="left">
88
		<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 100px; margin-top: 5px;" />
89
	</td>
90
	<td align="right">
91
		<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 100px; margin-top: 5px;" />
92
	</td>
93
</tr>
94
</table>
95
</form>
96

    
97
<?php
98

    
99
// Print admin footer
100
$admin->print_footer();
(20-20/34)