From 7dffa95fed916577e76c9920a9b485b6c1848e7c Mon Sep 17 00:00:00 2001 From: hacker_marc Date: Fri, 2 Oct 2026 07:11:57 +0000 Subject: [PATCH] Add templates.json and fix bugs --- LICENSE | 0 README.md | 0 database.db | 0 public/html_loader.php | 6 ++++-- public/index.php | 5 ++++- public/main.php | 9 ++++++++- public/templates/templates.json | 20 ++++++++++++++++++++ 7 files changed, 36 insertions(+), 4 deletions(-) mode change 100644 => 100755 LICENSE mode change 100644 => 100755 README.md mode change 100644 => 100755 database.db mode change 100644 => 100755 public/html_loader.php mode change 100644 => 100755 public/index.php mode change 100644 => 100755 public/main.php create mode 100644 public/templates/templates.json diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/database.db b/database.db old mode 100644 new mode 100755 diff --git a/public/html_loader.php b/public/html_loader.php old mode 100644 new mode 100755 index e4bd2cb..9933846 --- a/public/html_loader.php +++ b/public/html_loader.php @@ -4,7 +4,7 @@ class HTMLLoader { function __construct() { // Check if Paths variables exists - if (!defined(TEMPLATE_PATH) || !defined(TEMPLATE_CONF)) { + if (!defined("TEMPLATE_PATH") || !defined("TEMPLATE_CONF")) { die("TEMPLATE_PATH or TEMPLATE_CONF are not defined at " . __FILE__); } } @@ -17,6 +17,8 @@ class HTMLLoader { if (!array_key_exists($template, $json) && array_key_exists("error", $json)) { $this->showError('Template "' . $template . '" was not found.'); - } + }else{ + die("Error Template was not found."); + } } } \ No newline at end of file diff --git a/public/index.php b/public/index.php old mode 100644 new mode 100755 index 473bce8..830fe42 --- a/public/index.php +++ b/public/index.php @@ -1,7 +1,10 @@