mirror of
https://github.com/ZeroDream-CN/SakuraPanel.git
synced 2026-05-18 03:09:52 +08:00
Initial commit
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user