Example #1
0
        echo __DIR__ . config::get('classroot') . $classname . '.php';
        throw new Exception('Can\'t find file to include. /index.php/loadClass(\'' . $classname . '\')');
    }
}
spl_autoload_register('snowcms\\loadClass');
config::start_session();
//init routing
src\route::init();
src\route::add('test', config::routefunction('main', 'testJSON'));
// src\route::add('test', function(){
// 	echo $_POST['data'];
// });
src\route::add('', config::routefunction('main', 'welcome'));
src\route::add('file/(.*)', config::routefunction('file', 'getFile'));
src\route::add('register', function () {
    $ble = src\factory::getAuth();
    echo $ble->register();
});
src\route::add('login', function () {
    $ble = new aut\userauth();
    if ($ble->login()) {
        echo 'logged in';
    } else {
        echo 'nooob';
    }
});
src\route::add('userschema', function () {
    $data = factory::getSql();
    if ($data == null) {
        echo 'shut the f**k up';
    }