-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b12a4d3
commit efb4119
Showing
14 changed files
with
115 additions
and
82 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<?php $Checksum['CoreSettings'] = '6a7e19f4cb2b923c5b6d023ad71c79ad0cf7b22d6b0b27e494cc099530905369030fe278301e6dd94df30c5c6f44951044ee6397c73c9d57d1809a5baf2f26ea'; $Checksum['CoreDeveloper'] = 'd8ac0d6566de0980d2853e6b8e403e533cc2b8dd3b37e54f2f2883300302973f887aefee47c12bd8c28533c6ca741bb82a018288c782a623f990698dd4455f88'; | ||
<?php $Checksum['CoreSettings'] = '1016dd99a95446af7cbfc00b99ec8102c86d76da54515cbed96cccfa9c43d4167db5be5b234ddf82c4162d138545d5a0944b53c55f3ce3f1510b95c2eba2b25d'; $Checksum['CoreDeveloper'] = 'd8ac0d6566de0980d2853e6b8e403e533cc2b8dd3b37e54f2f2883300302973f887aefee47c12bd8c28533c6ca741bb82a018288c782a623f990698dd4455f88'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
use Saturn\HookManager\Actions; | ||
use Saturn\PluginManager\PluginManifest; | ||
require_once __DIR__ . '/Include/Security.php'; | ||
?><!DOCTYPE html> | ||
<html lang="<?= WEBSITE_LANGUAGE; ?>"> | ||
<head> | ||
<title><?= __CP('Pages'); ?> - <?= WEBSITE_NAME ?> <?= __CP('ControlPanel'); ?></title> | ||
<?php require_once __DIR__ . '/Include/Header.php'; ?> | ||
</head> | ||
<body class="body"> | ||
<?php require_once __DIR__ . '/Include/Navigation.php'; ?> | ||
<main class="main"> | ||
<h1 class="text-header-nopt"><?= __CP('Pages'); ?></h1> | ||
<?php $Actions = new Actions(); $Actions->Run('ControlPanel.PagesListStart'); ?> | ||
<div class="grid grid-cols-1 gap-2"> | ||
<?php | ||
$DBMS = new \Saturn\DatabaseManager\DBMS(); | ||
$Pages = $DBMS->Query('SELECT * FROM `'.DB_PREFIX.'pages` WHERE 1'); | ||
if ($Pages->num_rows != 0) { | ||
$Pages = $Pages->fetch_all(MYSQLI_ASSOC); | ||
foreach ($Pages as $Page) { | ||
?> | ||
<a class="grid-item-link grid-padding relative" href="<?= SATURN_ROOT; ?><?= CPURL_PANEL; ?><?= CPURL_EDIT; ?>/<?= $Page['id']; ?>"> | ||
<h2 class="text-3xl font-bold"><?= $Page['title']; ?></h2> | ||
<p class="pb-2"> | ||
<strong><?= $Page['url']; ?></strong> | ||
</p> | ||
</a> | ||
<?php }} else { ?> | ||
<p><?= __CP('NoPages'); ?></p> | ||
<?php } ?> | ||
</div> | ||
<?php $Actions = new Actions(); $Actions->Run('ControlPanel.PagesListEnd'); ?> | ||
</main> | ||
|
||
<script src="<?= SATURN_ROOT; ?>/Plugins/ControlPanel/Assets/JS/Console.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
use Saturn\DatabaseManager\DBMS; | ||
$DBMS = new DBMS(); | ||
$Page = $DBMS->Query("SELECT * FROM `".DB_PREFIX."pages` WHERE `url` = '".$DBMS->Escape($_SERVER['REQUEST_URI'])."';"); | ||
$PageData = $Page->fetch_object(); | ||
?><!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title><?= $PageData->title; ?></title> | ||
</head> | ||
<body> | ||
<?= $PageData->content; ?> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace Saturn\RouteManager; | ||
|
||
use Saturn\DatabaseManager\DBMS; | ||
use Saturn\HTTP\Router; | ||
|
||
class RoutePages | ||
{ | ||
public Router $Router; | ||
|
||
public function __construct(Router $Router) | ||
{ | ||
$this->Router = $Router; | ||
} | ||
|
||
public function Register(): void | ||
{ | ||
$DBMS = new DBMS(); | ||
$Page = $DBMS->Query("SELECT * FROM `".DB_PREFIX."pages` WHERE `url` = '".$DBMS->Escape($_SERVER['REQUEST_URI'])."';"); | ||
|
||
if ($Page !== NULL && $Page->num_rows !== 0) { | ||
$this->Router->GET($DBMS->Escape($_SERVER['REQUEST_URI']), 'DefaultViews/Page.php'); | ||
} elseif ($DBMS->Escape($_SERVER['REQUEST_URI']) === '/') { | ||
require_once __DIR__ . '/../../DefaultViews/NoHomepage.php'; | ||
exit; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters