12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- if(session_id() == '' || !isset($_SESSION)) {
- session_start();
- }
-
- if(_debug) {
- if(!isset($_SESSION[_sid])) {
- $_SESSION[_sid] = dev_debug_session();
- }
- if(!isset($_SESSION[_sid]['ver'])) {
- $_SESSION[_sid] = dev_debug_session();
- }
- if($_SESSION[_sid]['ver'] != _ver) {
- $_SESSION[_sid] = dev_debug_session();
- }
- }
- if(isset($_SESSION[_sid]['user'])) {
- DEFINE('_auth_status', true);
- } else {
- DEFINE('_auth_status', false);
- }
- function dev_debug_session() {
- return [
- 'ver' => _ver,
- 'user' => [
- 'username' => 'admin',
- 'access' => [1,2,3,4,5],
- 'signin' => microtime()
- ],
- 'view' => 'dashboard'
- ];
-
-
-
- }
-
- ?>
|