<?php include "../SiteController.php"; $obj = new SiteController($_POST['eposta'], $_POST['username'], $_POST['parola']); if ($obj->is_loggedin() != "") { $obj->redirect('../profile'); } if (isset($_POST['register-btn'])) { $result = $obj->register(); } if (isset($_POST['login-btn'])) { $result = $obj->login(); } ?> <!DOCTYPE html> <!--[if lt IE 7]> <html class="ie ie6 lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> <!--[if IE 7]> <html class="ie ie7 lt-ie9 lt-ie8" lang="en"> <![endif]--> <!--[if IE 8]> <html class="ie ie8 lt-ie9" lang="en"> <![endif]--> <!--[if IE 9]> <html class="ie ie9" lang="en"> <![endif]--> <!--[if !IE]><!--> <html lang="en" class="no-ie"> <!--<![endif]--> <head> <!-- Meta--> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"> <meta name="description" content=""> <meta name="keywords" content=""> <meta name="author" content="">
<?php //navigaatio $routes->get('/', function () { SiteController::index(); }); $routes->get('/tyontekijat', function () { EmployeeController::index(); }); $routes->get('/kirjaudu', function () { SiteController::login(); }); $routes->get('/rekisteroidy', function () { ClientController::create(); }); $routes->get('/varaa', function () { SiteController::reservation(); }); $routes->get('/palvelut', function () { ServiceController::index(); }); //service $routes->post('/palvelut/store', function () { ServiceController::store(); }); $routes->get('/palvelut/new', function () { ServiceController::create(); }); $routes->get('/palvelut/:id', function ($id) { ServiceController::show($id); });