Current Path : /data/web/virtuals/51568/virtual/www/subdom/srps/www/ |
Current File : /data/web/virtuals/51568/virtual/www/subdom/srps/www/index.php |
<?php use app\Application; use app\controllers\{ SiteController, XMLController, UserController, AkceController, VypisyController, }; /* kdyz bych chtel dat kontrolery do podslozek, tak cestu k nim nastavim zde v use napr: app\controlers\auth ... */ use app\controllers\{ AuthController }; require_once __DIR__ . '/../vendor/autoload.php'; $dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/..', '.env'); $dotenv->load(); $config = [ // 'userClass' => \app\models\User::class, 'db' => [ 'dsn' => $_ENV['DB_DSN'], 'user' => $_ENV['DB_USER'], 'password' => $_ENV['DB_PASSWORD'], ], ]; $app = new Application(dirname(__DIR__) . "/src", $config); $router = $app->router; $router->get('/', [SiteController::class, 'home']); $router->get('/akce', [AkceController::class, 'seznamAkci']); $router->get('/akce-detail', [AkceController::class, 'akceDetail']); $router->post('/akce-detail-save', [AkceController::class, 'akceDetailSave']); $router->get('/akce-vybery-tridy', [AkceController::class, 'akceVyberyTridy']); $router->get('/akce-vybery-zaci', [AkceController::class, 'akceVyberyZaci']); $router->get('/akce-zaci-cash', [AkceController::class, 'akceZaciCashDlg']); $router->post('/akce-zaci-cash', [AkceController::class, 'akceZaciCashDlg']); $router->get('/akce-zaci-pohyby', [AkceController::class, 'akceZaciPohybyDlg']); $router->post('/akce-zaci-cash-edit', [AkceController::class, 'akceZaciCashEditDlg']); $router->post('/pohyb-edit-save', [AkceController::class, 'pohybEditSave']); $router->post('/pohyb-delete', [AkceController::class, 'pohybDelete']); $router->post('/akce-tridy-tisk/{trida}',[AkceController::class, 'akceTridyTisk']); $router->get('/vypisy', [VypisyController::class, 'vypisy']); $router->get('/vypisy-seznam', [VypisyController::class, 'vypisySeznam']); $router->get('/vypisy-novy-dlg', [VypisyController::class, 'vypisyNovyDlg']); $router->post('/vypisy-novy-dlg', [VypisyController::class, 'vypisyNovyDlg']); $router->get('/vypis-xml-polozky', [VypisyController::class, 'xmlPolozky']); $router->get('/vypisy-smaz-dlg', [VypisyController::class, 'vypisySmazDlg']); $router->get('/vypisy-smaz', [VypisyController::class, 'vypisySmaz']); $router->get('/vypisy-sparovat-dlg', [VypisyController::class, 'vypisySparovatDlg']); $router->get('/vypisy-sparovat-dlg-zaci', [VypisyController::class, 'vypisySparovatDlgZaci']); $router->post('/vypisy-sparovat', [VypisyController::class, 'vypisySparovat']); $router->get('/parse', [XMLController::class, 'parse']); $app->run();