Example #1
0
 public static function load($module_name, array $params = NULL, $route_name = NULL)
 {
     $module = new module($module_name, $params, $route_name);
     return $module->render();
 }
Example #2
0
                    //=============================================================
                    require_once "{$app_logic_path}/security/login.class.php";
                    $login = new login();
                    //=============================================================
                    // If login.inc.php exists include it
                    //=============================================================
                    if (file_exists("{$_SESSION['file_path']}/login.inc.php")) {
                        require_once "{$_SESSION['file_path']}/login.inc.php";
                    }
                    //=============================================================
                    // If previous URL given go there after login
                    //=============================================================
                    if (isset($_SESSION['login_url'])) {
                        $url_prefix = !empty($_SERVER['HTTPS']) ? 'https://' : 'http://';
                        header("Location: {$url_prefix}" . $_SESSION['login_url']);
                        unset($_SESSION['login_url']);
                        die;
                    }
                    $page = new module();
                    break;
            }
        } else {
            $page = new module();
        }
        break;
}
//============================================================
// Render Page
//============================================================
$page->render();