mirror of
https://github.com/claradex/nativegallery.git
synced 2024-11-14 19:19:08 +03:00
update controllers
This commit is contained in:
parent
f7f1ed16a0
commit
6c90d8e34e
2 changed files with 33 additions and 0 deletions
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
namespace App\Controllers;
|
||||
|
||||
use \App\Services\{Router, Auth, DB, Json};
|
||||
use \App\Controllers\ExceptionRegister;
|
||||
use \App\Core\Page;
|
||||
|
||||
class MainController
|
||||
{
|
||||
public function __invoke()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static function i()
|
||||
{
|
||||
Page::set('Main');
|
||||
}
|
||||
|
||||
public static function logout()
|
||||
{
|
||||
DB::query('DELETE FROM login_tokens WHERE servicekey=:userid', array(':userid'=>$_COOKIE['NGALLERYSERVICE']));
|
||||
setcookie('NGALLERYSERVICE', '', 1);
|
||||
setcookie('NGALLERYSESS', '', 1);
|
||||
setcookie('NGALLERYSESS_', '', 1);
|
||||
setcookie('NGALLERYID', '', 1);
|
||||
header('Location: /');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Hello, World!
|
Loading…
Reference in a new issue