Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_right($required, $rights = 'nothing') {
- $rechte = array();
- global $global_count;
- global $global_rights;
- global $global_needed;
- if($rights == 'nothing') $right = $global_rights[get_user_class()];
- if($rights != 'nothing') $right = $global_rights[$rights];
- for($i = $global_count[0]; $i >= 0; $i--) {
- $wert = pow(2, $i);
- if($right['rights'] >= $wert) {
- $rechte[] = $wert;
- $right['rights'] -= $wert;
- }
- }
- if(in_array($global_needed[$required]['flag'], $rechte)) {
- return true;
- } else {
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement