58350fa9614b22f09e9789e9da7a9999bc5e82fd
4 * This function tell other modules what users have access
12 function adm_check_user() {
15 $username = ( !isset($_SESSION['username']) ?
'' : $_SESSION['username'] );
16 /* This needs to be first, for all non_options pages */
17 if (strpos('options.php', $PHP_SELF)) {
19 } else if (file_exists(SM_PATH
. 'plugins/administrator/admins')) {
20 $auths = file(SM_PATH
. 'plugins/administrator/admins');
21 $auth = in_array("$username\n", $auths);
22 } else if (file_exists(SM_PATH
. 'config/admins')) {
23 $auths = file(SM_PATH
. 'config/admins');
24 $auth = in_array("$username\n", $auths);
25 } else if ($adm_id = fileowner(SM_PATH
. 'config/config.php')) {
26 $adm = posix_getpwuid( $adm_id );
27 $auth = ($username == $adm['name']);