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.
- // include secure.php to protect this file and the whole CMS!
- if(!defined("SEC_FILE")){define("SEC_FILE",'/framework/secure.php' );}
- if (defined('LEPTON_PATH')) {
- include LEPTON_PATH.SEC_FILE;
- } else {
- $oneback = "../";
- $root = $oneback;
- $level = 1;
- while (($level < 10) && (!file_exists($root.SEC_FILE))) {
- $root .= $oneback;
- $level += 1;
- }
- if (file_exists($root.SEC_FILE)) {
- include $root.SEC_FILE;
- } else {
- trigger_error(sprintf("[ <b>%s</b> ] Can't include secure.php!", $_SERVER['SCRIPT_NAME']), E_USER_ERROR);
- }
- }
- // end include secure.php
last edit: 18. May 2023 CEST 13:25:26