Inheritance: extends AyeAye\Api\Controller
コード例 #1
0
 /**
  * login-funktio ottaa yhteyden User malliin ja yrittää kirjautua saamillaan parametreilla,jos kirjautuminen
  * onnistuu tallennetaan käyttäjän id sessioon, jos ei käyttäjä palautetaan virhe-ilmotuksen kanssa etusivulle
  */
 public static function login()
 {
     $params = $_POST;
     if (self::get_user_logged_in()) {
         HelloWorldController::index();
     } else {
         $user = User::authenticate($params);
         if (!$user) {
             $error = "Kirjautuminen epäonnistui";
             View::make('home.html', array('error' => $error));
         } else {
             $_SESSION['user'] = $user->id;
             HelloWorldController::index();
         }
     }
 }
コード例 #2
0
ファイル: routes.php プロジェクト: alekrikk/Tsoha-Bootstrap
<?php

$routes->get('/', function () {
    HelloWorldController::index();
});
$routes->get('/hiekkalaatikko', function () {
    HelloWorldController::sandbox();
});
$routes->get('/askareet', function () {
    HelloWorldController::askareiden_listaus();
});
$routes->get('/askareen_muokkaus', function () {
    HelloWorldController::askareen_muokkaus();
});
$routes->get('/kirjautuminen', function () {
    HelloWorldController::kirjautuminen();
});
コード例 #3
0
ファイル: routes.php プロジェクト: rotsten/Varasto
$routes->get('/', function () {
    HelloWorldController::index();
});
$routes->get('handle_reg()', function () {
    HelloWorldController::handle_reg();
});
$routes->get('Suunnitelmat/Login', function () {
    HelloWorldController::login();
});
$routes->get('/hiekkalaatikko', function () {
    HelloWorldController::sandbox();
});
$routes->get('/Suunnitelmat/Tuotesivu', function () {
    HelloWorldController::tuote_show();
});
$routes->get('/Suunnitelmat/Tuotelistaus', function () {
    HelloWorldController::tuote_list();
});
$routes->get('/Suunnitelmat/Kayttajienlistaus', function () {
    HelloWorldController::kayttaja_list();
});
$routes->get('/Suunnitelmat/Varastotilanteenmuutos', function () {
    HelloWorldController::varasto_show();
});
$routes->get('/Suunnitelmat/Varastonlistaus', function () {
    HelloWorldController::varasto_list();
});
$routes->get('/Suunnitelmat/Aloitussivu', function () {
    HelloWorldController::handle_reg();
});
コード例 #4
0
ファイル: routes.php プロジェクト: nopomi/abinet
    UserController::logout();
});
$routes->get('/mydegrees', 'check_logged_in', function () {
    DegreeController::myDegrees();
});
$routes->get('/degrees', function () {
    DegreeController::index();
});
$routes->get('/degrees/new', function () {
    DegreeController::create();
});
$routes->post('/degrees/new', function () {
    DegreeController::store();
});
$routes->get('/degree', function () {
    HelloWorldController::degree();
});
$routes->get('/degree/:id/update', function ($id) {
    DegreeController::edit($id);
});
$routes->post('/degree/:id/update', function ($id) {
    DegreeController::update($id);
});
$routes->post('/degree/:id/delete', function ($id) {
    DegreeController::delete($id);
});
$routes->post('/favorite/:id/new', function ($id) {
    FavoriteController::store($id);
});
$routes->post('/favorite/:id/delete', function ($id) {
    FavoriteController::delete($id);
コード例 #5
0
});
// Rekisteröitymislomakkeen esittäminen
$routes->get('/register', function () {
    UserController::register();
});
// Rekisteröitymisen käsittely
$routes->post('/register', function () {
    UserController::handle_register();
});
// Suunnitelmasivut
$routes->get('/games', 'check_logged_in', function () {
    HelloWorldController::games();
});
$routes->get('/courses', 'check_logged_in', function () {
    HelloWorldController::courses();
});
$routes->get('/sign_in', function () {
    HelloWorldController::sign_in();
});
$routes->get('/hiekkalaatikko', function () {
    HelloWorldController::sandbox();
});
$routes->get('/courses/1', function () {
    HelloWorldController::course_info();
});
$routes->get('/games/edit/1', function () {
    HelloWorldController::game_edit();
});
$routes->get('/courses/edit/1', function () {
    HelloWorldController::course_edit();
});
コード例 #6
0
ファイル: routes.php プロジェクト: rubinju/Todolist
<?php

$routes->get('/hiekkalaatikko', function () {
    HelloWorldController::sandbox();
});
$routes->get('/', function () {
    TaskController::index();
});
$routes->get('/task', function () {
    TaskController::index();
});
$routes->post('/task', function () {
    TaskController::store();
});
$routes->get('/task/new', function () {
    TaskController::create();
});
// must be added after post new
$routes->get('/task/:id', function ($id) {
    TaskController::show($id);
});
$routes->get('/task/:id/edit', function ($id) {
    TaskController::edit($id);
});
$routes->post('/task/:id/edit', function ($id) {
    TaskController::update($id);
});
$routes->post('/task/:id/destroy', function ($id) {
    TaskController::destroy($id);
});
$routes->post('/task/:id/done', function ($id) {
コード例 #7
0
ファイル: routes.php プロジェクト: neodyymi/Tsoha-Bootstrap
    CourseController::list_all();
});
$routes->get('/hiekkalaatikko', function () {
    HelloWorldController::sandbox();
});
$routes->get('/suunnitelmat/round', function () {
    HelloWorldController::round_list();
});
$routes->get('/suunnitelmat/round/1', function () {
    HelloWorldController::round_show();
});
$routes->get('/suunnitelmat/round/edit/1', function () {
    HelloWorldController::round_edit();
});
$routes->get('/suunnitelmat/login', function () {
    HelloWorldController::login();
});
## Course
$routes->get('/course', function () {
    CourseController::list_all();
});
$routes->post('/course', function () {
    CourseController::store();
});
$routes->get('/course/new', function () {
    CourseController::create();
});
$routes->get('/course/:id', function ($id) {
    CourseController::show($id);
});
$routes->get('/course/:id/add', 'check_logged_in', function ($id) {
コード例 #8
0
    HelloWorldController::competition_edit();
});
$routes->get('/hiekkalaatikko/competitor', function () {
    HelloWorldController::competitor_list();
});
$routes->get('/hiekkalaatikko/competitor/1', function () {
    HelloWorldController::competitor_show();
});
$routes->get('/hiekkalaatikko/competitor/1/edit', function () {
    HelloWorldController::competitor_edit();
});
$routes->get('/hiekkalaatikko/login', function () {
    HelloWorldController::login();
});
$routes->get('/hiekkalaatikko/split_table', function () {
    HelloWorldController::split_table();
});
$routes->get('/', function () {
    FrontPageController::index();
});
$routes->get('/login', function () {
    UserController::login();
});
$routes->post('/login', function () {
    UserController::handle_login();
});
$routes->post('/logout', function () {
    UserController::logout();
});
$routes->get('/user', function () {
    UserController::index();
コード例 #9
0
ファイル: routes.php プロジェクト: heileino/Tsoha-Bootstrap
    OsallistujaController::store($kilpailu_id);
});
// tulos
$routes->post('/kilpailu/:kilpailu_id/tulokset/uusi', function ($kilpailu_id, $ajanmittauspiste_id) {
    TulosController::store($kilpailu_id, $ajanmittauspiste_id);
});
$routes->get('/kilpailu/:kilpailu_id/tulokset/uusi', function ($kilpailu_id) {
    TulosController::create($kilpailu_id);
});
$routes->get('/kilpailu/:id/tulokset', function ($id) {
    TulosController::show($id);
});
$routes->post('/kilpailu/:kilpailu_id/tulokset', function ($kilpailu_id) {
    TulosController::show_ajanottopiste_data($kilpailu_id);
});
// kilpailun suunnittelunäkymiä
$routes->get('/kilpailu/1/tulokset', function () {
    HelloWorldController::kilpailu_lopputulosesittely();
});
$routes->get('/kilpailu/1', function () {
    HelloWorldController::kilpailu_muokkaus();
});
$routes->get('/kilpailijat/', function () {
    HelloWorldController::kilpailijat_lista();
});
$routes->get('/kilpailija/valiaika1', function () {
    HelloWorldController::kilpailija_valiaika1();
});
$routes->get('/kilpailu/lahtolista', function () {
    HelloWorldController::kilpailu_lahtolista();
});
コード例 #10
0
ファイル: routes.php プロジェクト: pinjaliina/aanestys
});
$routes->get('/poll/:id/delete', function ($id) {
    PollController::delete($id);
});
$routes->post('/poll/adduser/:uid', function ($uid) {
    PollController::addUser($uid);
});
$routes->get('/poll/:id/:uid/removeuser', function ($id, $uid) {
    PollController::removeUser($id, $uid);
});
$routes->get('/poll/:id/:uid/vote', function ($id, $uid) {
    PollController::vote($id, $uid);
});
$routes->post('/poll/:id/:uid/vote', function ($id, $uid) {
    PollController::saveVote($id, $uid);
});
$routes->get('/helloworld', function () {
    HelloWorldController::index();
});
$routes->get('/hiekkalaatikko', function () {
    HelloWorldController::sandbox();
});
$routes->get('/poll_list', function () {
    HelloWorldController::poll_list();
});
$routes->get('/poll_show', function () {
    HelloWorldController::poll_show();
});
$routes->get('/poll_edit', function () {
    HelloWorldController::poll_edit();
});
コード例 #11
0
ファイル: routes.php プロジェクト: smre/Tsoha-Bootstrap
}
$routes->get('/', 'check_logged_in', function () {
    // HelloWorldController::index();
    TodoController::index();
});
$routes->get('/hiekkalaatikko', function () {
    HelloWorldController::sandbox();
});
$routes->get("/reminders", 'check_logged_in', function () {
    TodoController::index();
});
$routes->get("/edit_reminder", 'check_logged_in', function () {
    HelloWorldController::editReminder();
});
$routes->get("/register", function () {
    HelloWorldController::register();
});
$routes->post('/reminders', 'check_logged_in', function () {
    TodoController::store();
});
$routes->get('/reminders/class/:name', 'check_logged_in', function ($name) {
    ClassController::index($name);
});
$routes->get('/:id/edit_reminder', 'check_logged_in', function ($id) {
    TodoController::edit($id);
});
$routes->post('/:id/edit_reminder', 'check_logged_in', function ($id) {
    TodoController::update($id);
});
$routes->post('/:id/delete_reminder', 'check_logged_in', function ($id) {
    TodoController::destroy($id);
コード例 #12
0
ファイル: routes.php プロジェクト: Zonsu/Tsoha-Bootstrap
    SiteController::logout();
});
$routes->post('/userlogin', function () {
    ClientController::client_login();
});
//client
$routes->post('/asiakkaat/store', function () {
    ClientController::store();
});
$routes->get('/asiakkaat/omattiedot', function () {
    ClientController::show();
});
// VANHAT VERSIOT TÄSTÄ ALESPÄIN
$routes->get('/hiekkalaatikko', function () {
    HelloWorldController::sandbox();
});
$routes->get('/etusivu', function () {
    HelloWorldController::etusivu();
});
$routes->get('/palvelu', function () {
    HelloWorldController::service_list();
});
$routes->get('/tyontekija/', function () {
    HelloWorldController::employee_list();
});
$routes->get('/tyontekija/1', function () {
    HelloWorldController::employee_show();
});
$routes->get('/tyontekija/1/edit', function () {
    HelloWorldController::employee_edit();
});
コード例 #13
0
ファイル: routes.php プロジェクト: hegemonni/Tsoha-Bootstrap
    HelloWorldController::index();
});
$routes->get('/request', function () {
    RequestController::request();
});
$routes->get('/userrequests', function () {
    RequestController::userrequests();
});
$routes->get('/data', function () {
    HelloWorldController::data();
});
$routes->get('/about', function () {
    HelloWorldController::about();
});
$routes->get('/links', function () {
    HelloWorldController::links();
});
$routes->get('/login', function () {
    UserController::login();
});
$routes->post('/login', function () {
    UserController::handle_login();
});
$routes->get('/request/:id/edit', function ($id) {
    RequestController::edit($id);
});
$routes->post('/request/:id/edit', function ($id) {
    RequestController::update($id);
});
$routes->post('/request/:id/destroy', function ($id) {
    RequestController::destroy($id);
コード例 #14
0
ファイル: routes.php プロジェクト: Terppa/Tsoha-Bootstrap
<?php

$routes->get('/', function () {
    PokemonController::index();
});
$routes->get('/hiekkalaatikko', function () {
    HelloWorldController::sandbox();
});
$routes->get('/Pokemons', function () {
    PokemonController::index();
});
$routes->post('/Pokemons', function () {
    PokemonController::store();
});
$routes->get('/Pokemons/new', function () {
    PokemonController::create();
});
$routes->get('/pokemons', function () {
    HelloWorldController::pokemon_list();
});
$routes->get('/Pokemons/:id', function ($id) {
    PokemonController::show($id);
});
$routes->get('/login', function () {
    HelloWorldController::login();
});
$routes->get('/pokemons/2', function () {
    HelloWorldController::update_monster();
});
コード例 #15
0
<?php

function check_logged_in()
{
    UserController::check_logged_in();
}
$routes->get('/hiekkalaatikko', function () {
    HelloWorldController::sandbox();
});
//etusivu
$routes->get('/', function () {
    HelloWorldController::home();
});
//tuotteisiin liittyviä toimintoja
$routes->post('/tuote', 'check_logged_in', function () {
    TuoteController::store();
});
$routes->get('/tuote/uusi', 'check_logged_in', function () {
    TuoteController::create();
});
$routes->get('/tuote/:id', function ($id) {
    TuoteController::show($id);
});
$routes->get('/tuotteet', function () {
    TuoteController::tuotelista();
});
$routes->get('/tuote/:id/edit', 'check_logged_in', function ($id) {
    TuoteController::edit($id);
});
$routes->post('/tuote/:id/edit', 'check_logged_in', function ($id) {
    TuoteController::update($id);
コード例 #16
0
ファイル: routes.php プロジェクト: banjohirvi/Tsoha-Bootstrap
});
$routes->get('/survey', function () {
    SurveyController::index();
});
$routes->post('/survey', function () {
    SurveyController::store();
});
$routes->get('/survey/new', function () {
    SurveyController::create();
});
$routes->get('/survey/:id', function ($id) {
    SurveyController::displaySurvey($id);
});
$routes->get('/survey/:id/edit', function ($id) {
    SurveyController::edit($id);
});
$routes->post('/survey/:id/edit', function ($id) {
    SurveyController::update($id);
});
$routes->post('/survey/:id/delete', function ($id) {
    SurveyController::delete($id);
});
$routes->get('/surveylists', function () {
    HelloWorldController::list_surveylists();
});
$routes->get('/surveylists/1', function () {
    HelloWorldController::show_surveylist();
});
$routes->get('/surveylists/1/answer', function () {
    HelloWorldController::answer_surveys();
});
コード例 #17
0
ファイル: routes.php プロジェクト: hyttijan/Tsoha-Bootstrap
});
$routes->get('/kirjaudu', function () {
    UserController::login();
});
$routes->post('/kirjaudu', function () {
    UserController::login();
});
$routes->get('/kirjauduulos', function () {
    UserController::logout();
});
$routes->get('/keskustelu-:id', function ($id) {
    TopicController::messages($id);
});
$routes->post('/keskustelu-:id', function ($id) {
    TopicController::addMessage($id);
});
$routes->get('/hiekkalaatikko-:id', function ($id) {
    HelloWorldController::sandbox($id);
});
$routes->get('/rekisterointi', function () {
    HelloWorldController::rekisterointi();
});
$routes->post('/rekisterointi', function () {
    UserController::register();
});
$routes->get('/luokeskustelu', function () {
    HelloWorldController::luokeskustelu();
});
$routes->post('/luokeskustelu', function () {
    TopicController::createTopic();
});
コード例 #18
0
ファイル: routes.php プロジェクト: Hecarrah/Tsoha-Bootstrap
});
$routes->post('/user/:id/destroy', function ($id) {
    userController::destroy($id);
});
$routes->get('/group', function () {
    groupController::index();
});
$routes->post('/group', function () {
    groupController::store();
});
$routes->get('/group/new', function () {
    groupController::create();
});
$routes->get('/group/:id', function ($id) {
    groupController::show($id);
});
$routes->get('/group/:id/edit', function ($id) {
    groupController::edit($id);
});
$routes->post('/group/:id/edit', function ($id) {
    groupController::update($id);
});
$routes->post('/group/:id/destroy', function ($id) {
    groupController::destroy($id);
});
$routes->get('/hiekkalaatikko', function () {
    HelloWorldController::sandbox();
});
$routes->get('/memoedit', function () {
    HelloWorldController::memo_edit();
});
コード例 #19
0
ファイル: routes.php プロジェクト: sasumaki/Tsoha-Bootstrap
$routes->get('/drafts/new', function () {
    DraftController::create();
});
$routes->get('/drafts/:id', function ($id) {
    DraftController::show($id);
});
$routes->post('/drafts', function () {
    DraftController::store();
    yhteyscontroller::store();
});
$routes->get('/drafts/:id/edit', function ($id) {
    DraftController::edit($id);
});
$routes->post('/drafts/:id/edit', function ($id) {
    DraftController::update($id);
});
$routes->post('/drafts/:id/destroy', function ($id) {
    DraftController::destroy($id);
});
$routes->get('/lista', function () {
    HelloWorldController::lista();
});
$routes->get('/show', function () {
    HelloWorldController::show();
});
$routes->get('/login', function () {
    HelloWorldController::login();
});
$routes->get('/modify', function () {
    HelloWorldController::modify();
});
コード例 #20
0
ファイル: routes.php プロジェクト: Djiffit/Pepefoorumi
});
$routes->get('/aiheet/', function () {
    KeskustelualueenHallitsija::luoAliFoorumit();
});
$routes->get('/aiheet/:id', function ($id) {
    KeskustelualueenHallitsija::luoAliFoorumi($id);
});
$routes->get('/langat/:id', function ($id) {
    KeskustelualueenHallitsija::luoLanka($id);
});
$routes->get('/langat', function () {
    HelloWorldController::langat();
});
$routes->get('/langat/kokeilu', function () {
    HelloWorldController::kokeilu();
});
$routes->post('/login/', function () {
    TilinHallitsija::tunnuksetPeliin();
});
$routes->get('/login/', function () {
    TilinHallitsija::loginSivu();
});
$routes->get('/suosikit/', function () {
    TilinHallitsija::suosikinLuoja();
});
$routes->post('/suosikit/', function () {
    TilinHallitsija::suosikinPoistaja();
});
$routes->get('/tili/muokkaa', function () {
    HelloWorldController::muokkaa();
});