mirror of
https://github.com/WerySkok/nativegallery.git
synced 2024-12-23 09:01:03 +03:00
32 lines
641 B
PHP
32 lines
641 B
PHP
|
<?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()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
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: /');
|
||
|
}
|
||
|
|
||
|
}
|