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: 
 *		    http://creativecommons.org/licenses/by/3.0/
 *  @license terms  see info.php of this template
 */

 

 

 

Include class secure

All php-files need to include the class secure. This prevents direct file access as well as inclusion of further security feature.


Please use this code:

// include class.secure.php to protect this file and the whole CMS!
if(!defined("SEC_FILE")){define("SEC_FILE",'/framework/class.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("[ %s ] Can't include class.secure.php!", $_SERVER['SCRIPT_NAME']), E_USER_ERROR);
	}
}
// end include class.secure.php