summaryrefslogtreecommitdiff
path: root/views/admin/access.phtml
blob: 89af85df8d50c7c4c8cee413b1fd17a279eba0c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php

	/**
	 * Template für die Verwaltung der Berechtigunen
	 */

?>
<div class="wpsg_admin_submenu">
	
	<div class="head">
		<div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>			
		<div style="clear:both;"></div>
	</div>

	<ul>		
		<?php foreach ($this->view['arSubAction'] as $k => $v) { ?>		
		<li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
		<?php } ?>
	</ul>
			
</div>
		
<div class="wpsg_admin_content">
	<form name="form1" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction='.$_REQUEST['subaction'].'&noheader=1'); ?>">

		<?php global $wpdb; $arRoles = get_option($wpdb->prefix."user_roles"); ?>

		<table class="wpsg_access_table" cellpadding="0" cellspacing="0">
			<tr>
				<th class="wpsg_col_capname"></th>
				<?php foreach ($arRoles as $role_key => $r) { ?>
				<th class="wpsg_col_cap"><?php echo $r['name']; ?></th>
				<?php } ?>
				<th></th>
			</tr>
			<tr>
				<td class="wpsg_col_capname"><?php echo __('Menüpunkt sichtbar', 'wpsg'); ?></td>
				<?php foreach ($arRoles as $role_key => $r) { ?>
				<td class="wpsg_col_cap">
					<input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_menu]" value="0" />
					<input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_menu']) && $r['capabilities']['wpsg_menu'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_menu]" value="1" /> 
				</td>
				<?php } ?>
				<td></td>
			</tr>
			<tr>
				<td class="wpsg_col_capname"><?php echo __('Konfiguration', 'wpsg'); ?></td>
				<?php foreach ($arRoles as $role_key => $r) { ?>
				<td class="wpsg_col_cap">
					<input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_conf]" value="0" />
					<input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_conf']) && $r['capabilities']['wpsg_conf'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_conf]" value="1" /> 
				</td>
				<?php } ?>
				<td></td>
			</tr>
			<?php if ($this->hasMod('wpsg_mod_core')) { ?>
			<tr>
				<td class="wpsg_col_capname"><?php echo __('Lizenzverwaltung', 'wpsg'); ?></td>
				<?php foreach ($arRoles as $role_key => $r) { ?>
				<td class="wpsg_col_cap">
					<input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_lizence]" value="0" />
					<input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_lizence']) && $r['capabilities']['wpsg_lizence'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_lizence]" value="1" /> 
				</td>
				<?php } ?>
				<td></td>
			</tr>	
			<?php } ?>
			<tr>
				<td class="wpsg_col_capname"><?php echo __('Bestellverwaltung', 'wpsg'); ?></td>
				<?php foreach ($arRoles as $role_key => $r) { ?>
				<td class="wpsg_col_cap">
					<input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_order]" value="0" />
					<input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_order']) && $r['capabilities']['wpsg_order'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_order]" value="1" /> 
				</td>
				<?php } ?>
				<td></td>
			</tr>		
			<tr>
				<td class="wpsg_col_capname"><?php echo __('Produktverwaltung', 'wpsg'); ?></td>
				<?php foreach ($arRoles as $role_key => $r) { ?>
				<td class="wpsg_col_cap">
					<input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_produkt]" value="0" />
					<input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_produkt']) && $r['capabilities']['wpsg_produkt'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_produkt]" value="1" /> 
				</td>
				<?php } ?>
				<td></td>
			</tr>			
			<?php $this->callMods('admin_setcapabilities'); ?>
		</table>
		
		<br />
		<input type="submit" value="<?php echo __('Berechtigungen Speichern', 'wpsg'); ?>" name="submit" id="submit" class="button-primary" />		
  
  	</form>
</div>