| 9 | | $charset = "UTF-8"; |
| 10 | | |
| 11 | | // developers only |
| 12 | | $show_todo_strings = false; |
| 13 | | |
| 14 | | // $include_paths = array("/www/my-php-project/"); |
| 15 | | // $exclude_paths = array("/www/my-php-project/tmp/"); |
| 16 | | $syntaxhiglight = true; |
| 17 | | $usecache = false; |
| 18 | | //// $datadir is default to ini_get("xcache.coveragedump_directory") |
| 19 | | // $datadir = ''; |
| 20 | | |
| 21 | | function ob_filter_path_nicer($o) |
| 22 | | { |
| 23 | | $sep = DIRECTORY_SEPARATOR; |
| 24 | | $o = str_replace($_SERVER['DOCUMENT_ROOT'], "{DOCROOT}" . (substr($d, -1) == $sep ? $sep : ""), $o); |
| 25 | | $xcachedir = realpath(dirname(__FILE__) . "$sep..$sep"); |
| 26 | | $o = str_replace($xcachedir . $sep, "{XCache}$sep", $o); |
| 27 | | if ($sep == '/') { |
| 28 | | $o = str_replace("/home/", "{H}/", $o); |
| 29 | | } |
| 30 | | return $o; |
| 31 | | } |
| 32 | | |
| 33 | | // implement your auth here if needed |
| 34 | | // {{{ home made login example |
| 35 | | // this is an example only, it's won't work for you without your implemention. |
| 36 | | function check_admin_auth() |
| 37 | | { |
| 38 | | require("/path/to/user-login-and-permission-lib.php"); |
| 39 | | session_start(); |
| 40 | | |
| 41 | | if (!user_logined()) { |
| 42 | | if (!ask_the_user_to_login()) { |
| 43 | | exit; |
| 44 | | } |
| 45 | | } |
| 46 | | |
| 47 | | user_load_permissions(); |
| 48 | | if (!user_is_admin()) { |
| 49 | | die("Permission denied"); |
| 50 | | } |
| 51 | | |
| 52 | | return true; |
| 53 | | } |
| 54 | | |
| 55 | | // uncomment: |
| 56 | | // check_admin_auth() |
| 57 | | // }}} |
| 58 | | |
| 59 | | ?> |