2024-07-04 12:08:17 +03:00
|
|
|
<?php
|
|
|
|
namespace App\Controllers;
|
|
|
|
|
|
|
|
use \App\Services\{Router, Auth, DB, Json};
|
|
|
|
use \App\Controllers\ExceptionRegister;
|
|
|
|
use \App\Core\Page;
|
|
|
|
|
|
|
|
class MainController
|
|
|
|
{
|
2024-07-05 07:26:39 +03:00
|
|
|
public static function t()
|
2024-07-04 12:08:17 +03:00
|
|
|
{
|
2024-07-05 07:26:39 +03:00
|
|
|
Page::set('t');
|
2024-07-04 12:08:17 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function i()
|
|
|
|
{
|
|
|
|
Page::set('Main');
|
2024-07-07 08:05:44 +03:00
|
|
|
|
2024-07-04 12:08:17 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
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: /');
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|