1454 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
5650 |
thomas |
4 |
* Template für die Verwaltung der Berechtigungen
|
1454 |
daniel |
5 |
*/
|
|
|
6 |
|
|
|
7 |
?>
|
|
|
8 |
<div class="wpsg_admin_submenu">
|
|
|
9 |
|
5439 |
daniel |
10 |
<div class="list-group">
|
|
|
11 |
<span class="list-group-head list-group-item"><?php echo __('Konfiguration'); ?></span>
|
|
|
12 |
<?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
|
|
|
13 |
<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>
|
1454 |
daniel |
14 |
<?php } ?>
|
5439 |
daniel |
15 |
</div>
|
|
|
16 |
|
1454 |
daniel |
17 |
</div>
|
|
|
18 |
|
5439 |
daniel |
19 |
<div class="wpsg_admin_content form-horizontal">
|
1454 |
daniel |
20 |
<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'); ?>">
|
7535 |
daniel |
21 |
|
7558 |
daniel |
22 |
<?php \wp_nonce_field('wpsg-admin-access'); ?>
|
7535 |
daniel |
23 |
|
1454 |
daniel |
24 |
<?php global $wpdb; $arRoles = get_option($wpdb->prefix."user_roles"); ?>
|
7226 |
daniel |
25 |
|
5439 |
daniel |
26 |
<div class="panel panel-default">
|
|
|
27 |
<div class="panel-heading clearfix">
|
|
|
28 |
<h3 class="panel-title"><?php echo __('Berechtigungen', 'wpsg'); ?></h3>
|
|
|
29 |
</div>
|
|
|
30 |
<div class="panel-body">
|
|
|
31 |
|
|
|
32 |
<table class="wpsg_access_table table" cellpadding="0" cellspacing="0">
|
|
|
33 |
<thead>
|
|
|
34 |
<tr>
|
|
|
35 |
<th class="wpsg_col_capname"></th>
|
|
|
36 |
<?php foreach ($arRoles as $role_key => $r) { ?>
|
|
|
37 |
<th class="wpsg_col_cap"><?php echo $r['name']; ?></th>
|
|
|
38 |
<?php } ?>
|
|
|
39 |
<th></th>
|
|
|
40 |
</tr>
|
|
|
41 |
</thead>
|
|
|
42 |
<tbody>
|
|
|
43 |
<tr>
|
|
|
44 |
<td class="wpsg_col_capname"><?php echo __('Menüpunkt sichtbar', 'wpsg'); ?></td>
|
|
|
45 |
<?php foreach ($arRoles as $role_key => $r) { ?>
|
|
|
46 |
<td class="wpsg_col_cap">
|
|
|
47 |
<input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_menu]" value="0" />
|
|
|
48 |
<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" />
|
|
|
49 |
</td>
|
|
|
50 |
<?php } ?>
|
|
|
51 |
<td></td>
|
|
|
52 |
</tr>
|
|
|
53 |
<tr>
|
|
|
54 |
<td class="wpsg_col_capname"><?php echo __('Konfiguration', 'wpsg'); ?></td>
|
|
|
55 |
<?php foreach ($arRoles as $role_key => $r) { ?>
|
|
|
56 |
<td class="wpsg_col_cap">
|
|
|
57 |
<input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_conf]" value="0" />
|
|
|
58 |
<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" />
|
|
|
59 |
</td>
|
|
|
60 |
<?php } ?>
|
|
|
61 |
<td></td>
|
|
|
62 |
</tr>
|
6488 |
daniel |
63 |
<?php $wpsg_update_data = wpsg_get_update_data(); if (wpsg_isSizedInt($wpsg_update_data['returnCode'])) { ?>
|
5439 |
daniel |
64 |
<tr>
|
|
|
65 |
<td class="wpsg_col_capname"><?php echo __('Lizenzverwaltung', 'wpsg'); ?></td>
|
|
|
66 |
<?php foreach ($arRoles as $role_key => $r) { ?>
|
|
|
67 |
<td class="wpsg_col_cap">
|
|
|
68 |
<input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_lizence]" value="0" />
|
|
|
69 |
<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" />
|
|
|
70 |
</td>
|
|
|
71 |
<?php } ?>
|
|
|
72 |
<td></td>
|
|
|
73 |
</tr>
|
|
|
74 |
<?php } ?>
|
|
|
75 |
<tr>
|
|
|
76 |
<td class="wpsg_col_capname"><?php echo __('Bestellverwaltung', 'wpsg'); ?></td>
|
|
|
77 |
<?php foreach ($arRoles as $role_key => $r) { ?>
|
|
|
78 |
<td class="wpsg_col_cap">
|
|
|
79 |
<input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_order]" value="0" />
|
|
|
80 |
<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" />
|
|
|
81 |
</td>
|
|
|
82 |
<?php } ?>
|
|
|
83 |
<td></td>
|
|
|
84 |
</tr>
|
|
|
85 |
<tr>
|
|
|
86 |
<td class="wpsg_col_capname"><?php echo __('Produktverwaltung', 'wpsg'); ?></td>
|
|
|
87 |
<?php foreach ($arRoles as $role_key => $r) { ?>
|
|
|
88 |
<td class="wpsg_col_cap">
|
|
|
89 |
<input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_produkt]" value="0" />
|
|
|
90 |
<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" />
|
|
|
91 |
</td>
|
|
|
92 |
<?php } ?>
|
|
|
93 |
<td></td>
|
|
|
94 |
</tr>
|
|
|
95 |
<?php $this->callMods('admin_setcapabilities'); ?>
|
|
|
96 |
</tbody>
|
|
|
97 |
</table>
|
|
|
98 |
|
|
|
99 |
</div>
|
|
|
100 |
</div>
|
1454 |
daniel |
101 |
|
5439 |
daniel |
102 |
<p class="submit"><input type="submit" value="<?php echo __('Berechtigungen Speichern', 'wpsg'); ?>" name="submit" id="submit" class="button-primary" /></p>
|
1454 |
daniel |
103 |
|
|
|
104 |
</form>
|
|
|
105 |
</div>
|