Commit | Line | Data |
---|---|---|
1 | <?php | |
2 | ||
3 | function adm_check_user() { | |
4 | ||
5 | GLOBAL $username; | |
6 | ||
7 | $auth = FALSE; | |
8 | ||
9 | if ( file_exists( '../plugins/administrator/admins' ) ) { | |
10 | $auths = file( '../plugins/administrator/admins' ); | |
11 | $auth = in_array( $username, $auths ); | |
12 | }else if ( $adm_id = fileowner('../config/config.php') ) { | |
13 | $adm = posix_getpwuid( $adm_id ); | |
14 | if ( $username == $adm['name'] ) { | |
15 | $auth = TRUE; | |
16 | } | |
17 | } | |
18 | ||
19 | return( $auth ); | |
20 | ||
21 | } | |
22 | ||
23 | ?> |