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 1383 2011-01-15 14:09:11Z FrankH $
14
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/modules/news/modify_group.php $
15
 * @lastmodified    $Date: 2011-01-15 15:09:11 +0100 (Sat, 15 Jan 2011) $
16
 *
17
 */
18

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

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

    
24
$group_id = $admin->checkIDKEY('group_id', false, 'GET');
25
if (!$group_id) {
26
	$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL);
27
	exit();
28
}
29

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

    
34
?>
35

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

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

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

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

    
94
<?php
95

    
96
// Print admin footer
97
$admin->print_footer();
98

    
99
?>
(17-17/31)