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_group.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_group.php $
15
 * @lastmodified    $Date: 2011-06-25 19:18:50 +0200 (Sat, 25 Jun 2011) $
16
 *
17
 */
18

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

    
21
// $admin_header = true;
22
// Tells script to update when this page was last updated
23
$update_when_modified = false;
24
// show the info banner
25
$print_info_banner = true;
26
// Include WB admin wrapper script
27
require(WB_PATH.'/modules/admin.php');
28
/* */
29
$group_id = intval($admin->checkIDKEY('group_id', false, 'GET'));
30
if (!$group_id) {
31
	$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));
32
}
33

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

    
38
?>
39

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

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

    
44
<input type="hidden" name="section_id" value="<?php echo $section_id; ?>" />
45
<input type="hidden" name="page_id" value="<?php echo $page_id; ?>" />
46
<input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
47
<?php echo $admin->getFTAN(); ?>
48
<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%">
49
<tr>
50
	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
51
	<td>
52
		<input type="text" name="title" value="<?php echo (htmlspecialchars($fetch_content['title'])); ?>" style="width: 98%;" maxlength="255" />
53
	</td>
54
</tr>
55
<tr>
56
	<td><?php echo $TEXT['IMAGE']; ?>:</td>
57
	<?php if(file_exists(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg')) { ?>
58
	<td>
59
		<a href="<?php echo WB_URL.MEDIA_DIRECTORY; ?>/.news/image<?php echo $group_id; ?>.jpg" target="_blank">View</a>
60
		&nbsp;
61
		<input type="checkbox" name="delete_image" id="delete_image" value="true" />
62
		<label for="delete_image">Delete</label>
63
	</td>
64
	<?php } else { ?>
65
	<td>
66
		<input type="file" name="image" />
67
	</td>
68
	<?php } ?>
69
</tr>
70
<tr>
71
	<td><?php echo $TEXT['ACTIVE']; ?>:</td>
72
	<td>
73
		<input type="radio" name="active" id="active_true" value="1" <?php if($fetch_content['active'] == 1) { echo ' checked="checked"'; } ?> />
74
		<a href="#" onclick="javascript: document.getElementById('active_true').checked = true;">
75
		<?php echo $TEXT['YES']; ?>
76
		</a>
77
		-
78
		<input type="radio" name="active" id="active_false" value="0" <?php if($fetch_content['active'] == 0) { echo ' checked="checked"'; } ?> />
79
		<a href="#" onclick="javascript: document.getElementById('active_false').checked = true;">
80
		<?php echo $TEXT['NO']; ?>
81
		</a>
82
	</td>
83
</tr>
84
</table>
85

    
86
<table cellpadding="0" cellspacing="0" border="0" width="100%">
87
<tr>
88
	<td align="left">
89
		<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 100px; margin-top: 5px;" />
90
	</td>
91
	<td align="right">
92
		<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;" />
93
	</td>
94
</tr>
95
</table>
96
</form>
97

    
98
<?php
99

    
100
// Print admin footer
101
$admin->print_footer();
(17-17/31)