Exemplo n.º 1
0
 static function start()
 {
     header("Content-type: text/html; charset=utf-8");
     require FRAMEWORK_PATH . 'Core/AutoLoad' . EXT;
     spl_autoload_register('\\Core\\Autoload::Load');
     //注册系统自动加载函数
     set_error_handler('\\Core\\ErrorHandler::errorHandler', E_USER_ERROR);
     //自己的错误处理函数
     //注册错误处理
     //注册异常处理
     //配置加载
     \Core\Config::setConfig(FRAMEWORK_PATH . 'Conf/', array_merge(array(CONFIG), CONFIG_EXTENSION));
     \Core\Routing::routing();
     //根据参数对应到相应的方法
     self::setGet();
     //设置GET变量
     \Core\App::startApp();
 }
Exemplo n.º 2
0
    <div class="header bg-red">Авторизация</div>
    <form method="post" id="loginForm">
        <div class="body bg-gray">
            <div class="form-group">
                <input type="email" name="email" class="form-control" placeholder="Email"/>
            </div>
            <div class="form-group">
                <input type="password" name="password" class="form-control" placeholder="Пароль"/>
            </div>
            <div class="form-group">
                <input type="checkbox" name="remember_me"/> Запомнить меня
            </div>
        </div>
        <div class="footer">
            <button type="submit" class="btn bg-red btn-block">Войти</button>
<!--            <p><a href="#">Забыл пароль</a></p>-->
        </div>
    </form>
</div>
<script type="text/javascript">
    var loginPath = "<?php 
echo \core\Routing::getPath('login');
?>
";
    var homePath = "<?php 
echo \core\Routing::getPath('home');
?>
";
</script>
<script src="/admin/assets/js/auth/index/main.js" type="text/javascript"></script>