Server IP : 192.185.129.71 / Your IP : 3.17.156.147 Web Server : Apache System : Linux bh-ht-3.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : svymadmin ( 4072) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home4/svymadmin/public_html/vivekaexcel.edu.in/bkp/application/views/admin/staff/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<div class="table-responsive"> <table class="table table-bordered roles no-margin"> <thead> <tr> <th><?= _l('features') ?></th> <th><?= _l('capabilities') ?></th> </tr> </thead> <tbody> <?php if (isset($member)) { $is_admin = is_admin($member->staffid); } foreach (get_available_staff_permissions($funcData) as $feature => $permission) { ?> <tr data-name="<?php echo $feature; ?>"> <td> <b><?php echo $permission['name']; ?></b> </td> <td> <?php if (isset($permission['before'])) { echo $permission['before']; } ?> <?php foreach ($permission['capabilities'] as $capability => $name) { $checked = ''; $disabled = ''; if ((isset($is_admin) && $is_admin) || (is_array($name) && isset($name['not_applicable']) && $name['not_applicable']) || ( ($capability == 'view_own' || $capability == 'view' && array_key_exists('view_own', $permission['capabilities']) && array_key_exists('view', $permission['capabilities'])) && ( (isset($member) && staff_can(($capability == 'view' ? 'view_own' : 'view'), $feature, $member->staffid)) || (isset($role) && has_role_permission($role->roleid, ($capability == 'view' ? 'view_own' : 'view'), $feature)) ) ) ) { $disabled = ' disabled '; } elseif ((isset($member) && staff_can($capability, $feature, $member->staffid)) || isset($role) && has_role_permission($role->roleid, $capability, $feature)) { $checked = ' checked '; } ?> <div class="tw-ml-2"> <div class="checkbox last:tw-mb-0"> <input <?php if ($capability == 'view') { ?> data-can-view <?php } ?> <?php if ($capability == 'view_own') { ?> data-can-view-own <?php } ?> <?php if (is_array($name) && isset($name['not_applicable']) && $name['not_applicable']) { ?> data-not-applicable="true" <?php } ?> type="checkbox" <?php echo $checked; ?> class="capability" id="<?php echo $feature . '_' . $capability; ?>" name="permissions[<?php echo $feature; ?>][]" value="<?php echo $capability; ?>" <?php echo $disabled; ?>> <label for="<?php echo $feature . '_' . $capability; ?>"> <?php echo !is_array($name) ? $name : $name['name']; ?> </label> <?php if (isset($permission['help']) && array_key_exists($capability, $permission['help'])) { echo '<i class="fa-regular fa-circle-question" data-toggle="tooltip" data-title="' . $permission['help'][$capability] . '"></i>'; } ?> </div> </div> <?php } ?> <?php if (isset($permission['after'])) { echo $permission['after']; } ?> </td> </tr> <?php } ?> </tbody> </table> </div>