Beispiel #1
0
 private function check_auth()
 {
     if ($_COOKIE['userrole'] === 'admin') {
         return TRUE;
     }
     $controller = LB::get_instance()->get_controller();
     $config = LF\lb_read_config('auth', $_COOKIE['userrole']);
     if (!$config || !in_array($controller, $config)) {
         return FALSE;
     }
     return TRUE;
 }
Beispiel #2
0
<?php

// +------------------------------------------------------------
// | LazyBug PHP Framework
// +------------------------------------------------------------
// | Version : 1.0.2
// +------------------------------------------------------------
// | Author : yuanhang.chen@gmail.com
// +------------------------------------------------------------
require 'common/setting/path.php';
require 'common/setting/file.php';
spl_autoload_register('\\Lazybug\\Framework\\lb_load_from_app');
spl_autoload_register('\\Lazybug\\Framework\\lb_load_from_system');
\Lazybug\Framework\LB::get_instance()->run();