0) { $loggedin = true; } $indicator = ''; $admclass = ''; if(isset($_SESSION['editor']) AND (int) $_SESSION['editor'] == 1){ $admclass = 'class="adm" '; $indicator = 'Editor'; } if(isset($_SESSION['admin']) AND (int) $_SESSION['admin'] == 1){ $admclass = 'class="adm" '; $indicator = 'Admin'; } // XXX: Kludge until this file is gone. Defines this function so rest of included // templages will work. // Determine if the user had a particular role // // User Roles // define('USER_ROLE_NORMAL', 'site_user'); define('USER_ROLE_CONTRIBUTOR', 'contributor'); define('USER_ROLE_EDITOR', 'editor'); define('USER_ROLE_ADMIN', 'admin'); define('USER_ROLE_SUPERUSER', 'super_user'); function userHasRole($roles = false, $op = 'any') { $has_any_role = false; $has_all_roles = true; if (!is_array($roles)) { $roles = array($roles); } foreach ($roles as $role) { if (isset($_SESSION[$role]) AND $_SESSION[$role]) { $has_any_role = true; } else { $has_all_roles = false; } } if ($op == 'any') { return $has_any_role; } return $has_all_roles; } ?>

Shazbat!

We couldn't find what you're looking for...
The link you followed may have been mistyped, or is outdated. Sorry for the confusion!

« JPG Home