function cp_check_perm($perm) { $ci =& get_instance(); if ($ci->dx_auth->is_logged_in()) { if ($ci->dx_auth->get_permission_value($perm)) { return TRUE; } else { $perms = get_permissions_array(); if (isset($perms[$perm])) { $err_text = lang("No rights for", "admin") . ': <b>' . $perms[$perm] . '</b>.'; echo '<script type="text/javascript"> $(\'page\').set(\'html\',\'<div id="notice" style="width: 500px;">' . $err_text . '</div>\'); </script>'; } else { return TRUE; } die; } } else { die(lang("Error checking permissions", "admin")); } }
function get_permissions_table() { return get_permissions_array(); }