mirror of
https://github.com/ZeroDream-CN/SakuraPanel.git
synced 2025-01-12 18:02:51 +08:00
23 lines
447 B
PHP
23 lines
447 B
PHP
|
<?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");
|
||
|
}
|
||
|
}
|
||
|
}
|