feel free to keep it strictly simple...

mandatory file content

Top of File

All files need the following top that contains neccessary informations:

/** * @template Template Name * @version see info.php of this template * @author Author Name * @copyright Name of copyright owner (mostly the same as author) * @license link to the license, for example: https://creativecommons.org/licenses/by/3.0/ * @license terms see info.php of this template */
last edit: 18. May 2023 CEST 15:54:15

File Header

You have to include following code in every single php file to protect the whole cms and probably your custom addons.

  1. // include secure.php to protect this file and the whole CMS!
  2. if(!defined("SEC_FILE")){define("SEC_FILE",'/framework/secure.php' );}
  3. if (defined('LEPTON_PATH')) {
  4. include LEPTON_PATH.SEC_FILE;
  5. } else {
  6. $oneback = "../";
  7. $root = $oneback;
  8. $level = 1;
  9. while (($level < 10) && (!file_exists($root.SEC_FILE))) {
  10. $root .= $oneback;
  11. $level += 1;
  12. }
  13. if (file_exists($root.SEC_FILE)) {
  14. include $root.SEC_FILE;
  15. } else {
  16. trigger_error(sprintf("[ <b>%s</b> ] Can't include secure.php!", $_SERVER['SCRIPT_NAME']), E_USER_ERROR);
  17. }
  18. }
  19. // end include secure.php
last edit: 18. May 2023 CEST 13:25:26