mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-02-16 10:40:57 +00:00
first commit
This commit is contained in:
25
core/init/admin_sector.php
Executable file
25
core/init/admin_sector.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
require_once BASEPATH . 'core/init/db.php';
|
||||
|
||||
// Изначальная папка нам может понадобится для CKEditor
|
||||
$g_config['extrapacker']['non_admin_dir'] = $g_config['extrapacker']['dir'];
|
||||
|
||||
// Проверяем вход в админку и авторизацию
|
||||
$isAdminSector = (stripos(strtolower(GetQuery()), 'admin/') === 0 || GetQuery() === 'admin');
|
||||
if ($isAdminSector)
|
||||
{
|
||||
// Меняем папку куда будут складироваться css/js админки
|
||||
$g_config['extrapacker']['dir'] = 'extrapacker_admin';
|
||||
$g_config['extrapacker']['packCss'] = false;
|
||||
$g_config['mainTpl'] = 'admin/main_tpl';
|
||||
|
||||
$g_adminAuth = new AdminModel();
|
||||
$g_adminAuth->ChkLogin();
|
||||
define('IS_ADMIN_AUTH', $g_adminAuth->IsAuth());
|
||||
}
|
||||
else
|
||||
{
|
||||
define('IS_ADMIN_AUTH', false);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user