mirror of
https://github.com/ZeroDream-CN/SakuraPanel.git
synced 2025-01-12 09:52:52 +08:00
23 lines
447 B
PHP
Executable File
23 lines
447 B
PHP
Executable File
<?php
|
|
namespace SakuraPanel;
|
|
|
|
class Pages {
|
|
|
|
public function loadPage($name, $data = null)
|
|
{
|
|
if(file_exists(ROOT . "/pages/{$name}.php")) {
|
|
include(ROOT . "/pages/{$name}.php");
|
|
} else {
|
|
include(ROOT . "/pages/404.php");
|
|
}
|
|
}
|
|
|
|
public function loadModule($name, $data = null)
|
|
{
|
|
if(file_exists(ROOT . "/modules/{$name}.php")) {
|
|
include(ROOT . "/modules/{$name}.php");
|
|
} else {
|
|
include(ROOT . "/modules/404.php");
|
|
}
|
|
}
|
|
} |