mirror of
https://github.com/claradex/nativegallery.git
synced 2025-06-05 05:47:00 +03:00
Update AdminController.php
This commit is contained in:
parent
bc4b47e98a
commit
5c086b7e93
1 changed files with 13 additions and 15 deletions
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Controllers;
|
namespace App\Controllers;
|
||||||
|
|
||||||
use \App\Services\{Router, Auth, DB, Json};
|
use \App\Services\{Router, Auth, DB, Json};
|
||||||
|
@ -32,23 +33,20 @@ class AdminController
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function index()
|
public static function index()
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
Page::set('Admin/Index');
|
Page::set('Admin/Index');
|
||||||
}
|
}
|
||||||
public static function loadContent() {
|
public static function loadContent()
|
||||||
|
{
|
||||||
$fileName = $_GET['type'];
|
$fileName = $_GET['type'];
|
||||||
|
|
||||||
|
|
||||||
$filePath = $_SERVER['DOCUMENT_ROOT'].'/views/pages/Admin/' . $fileName.'.php';
|
|
||||||
|
|
||||||
if (file_exists($filePath)) {
|
|
||||||
Page::set('Admin/' . self::$file);
|
|
||||||
} else {
|
|
||||||
Page::set('Admin/General');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
$filePath = $_SERVER['DOCUMENT_ROOT'] . '/views/pages/Admin/' . $fileName . '.php';
|
||||||
|
|
||||||
|
if (file_exists($filePath)) {
|
||||||
|
Page::set('Admin/' . self::$file);
|
||||||
|
} else {
|
||||||
|
Page::set('Admin/General');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue