Esempio n. 1
0
    {
        DI::bind("router", function () {
            $router = new Router();
            $router->setDefaultController('site');
            $router->setDefaultAction('index');
            $router->handle();
            return $router;
        });
    }
    public function config()
    {
        EventManager::bind("config", function () {
            return array("basepath" => dirname(__FILE__), "totalreserveshours" => 24, "totalreservesday" => 30, "code" => "", "mongodb" => array(array("host" => "", "user" => "", "password" => "", "dbname" => "", "port" => 27017, "prefix" => "mongo1")), "mysqldb" => array(array("host" => "", "user" => "", "password" => "", "dbname" => "", "port" => 3306, "prefix" => "mysql1")));
        });
    }
    private function codeControl()
    {
        if (!isset($_GET["code"]) || isset($_GET["code"]) && Sm::app()->code != $_GET["code"]) {
            echo "?code=kodunuz belirtilmemiş veya code yanlış.";
            exit;
        }
    }
}
try {
    $IndexController = new IndexController();
    $IndexController->register();
    $smce = new SmceFramework();
    $smce->make();
} catch (HttpException $e) {
    echo $e->getHttpCode() . " - " . $e->getMsg();
}
Esempio n. 2
0
         $index->showEditScreen();
     }
     break;
 case 'logout':
     $index->logout();
     break;
 case 'manage':
     if ($_SESSION['user_type'] == 1) {
         $index->showManagement();
     }
     break;
 case 'register':
     $index->showRegister('show');
     break;
 case 'checkr':
     $index->register();
     break;
 case 'search':
     $index->search('autor');
     break;
 case 'searchb':
     $index->search('book');
     break;
 case 'submit':
     $index->submitComment();
     break;
 case 'showbook':
     $index->showBook();
     break;
 case 'profile':
     $index->showProfile();