blob: b1b40c2f9baad815c76b728feb223fd8118c485b (
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
96
97
98
99
100
101
102
103
104
105
|
<?php
/**
* Template für die Verwaltung der Berechtigungen
*/
?>
<div class="wpsg_admin_submenu">
<div class="list-group">
<span class="list-group-head list-group-item"><?php echo __('Konfiguration', 'wpsg'); ?></span>
<?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
<a class="list-group-item <?php echo (($k == $this->view['subAction'])?'active':''); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a>
<?php } ?>
</div>
</div>
<div class="wpsg_admin_content form-horizontal">
<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 \wp_nonce_field('wpsg-admin-access'); ?>
<?php global $wpdb; $arRoles = get_option($wpdb->prefix."user_roles"); ?>
<div class="panel panel-default">
<div class="panel-heading clearfix">
<h3 class="panel-title"><?php echo __('Berechtigungen', 'wpsg'); ?></h3>
</div>
<div class="panel-body">
<table class="wpsg_access_table table" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="wpsg_col_capname"></th>
<?php foreach ($arRoles as $role_key => $r) { ?>
<th class="wpsg_col_cap"><?php echo esc_html(translate_user_role($r['name'])); ?></th>
<?php } ?>
<th></th>
</tr>
</thead>
<tbody>
<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 $wpsg_update_data = wpsg_get_update_data(); if (wpsg_isSizedInt($wpsg_update_data['returnCode'])) { ?>
<tr>
<td class="wpsg_col_capname"><?php echo __('Update-Zugang', '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'); ?>
</tbody>
</table>
</div>
</div>
<p class="submit"><input type="submit" value="<?php echo __('Berechtigungen Speichern', 'wpsg'); ?>" name="submit" id="submit" class="button-primary" /></p>
</form>
</div>
|