You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
465 B
21 lines
465 B
|
15 years ago
|
<?php
|
||
|
|
// Custom Pages lib
|
||
|
|
// Used to implement the loading of custom pages
|
||
|
|
// 2011, Jean-Karim Bockstael <jeankarim@cblue.be>
|
||
|
|
|
||
|
|
class CustomPages {
|
||
|
|
|
||
|
|
public static function displayPage($page_name) {
|
||
|
|
$pages_dir = api_get_path(SYS_PATH).'custompages/';
|
||
|
|
$file_name = $pages_dir.$page_name.'.php';
|
||
|
|
if (file_exists($file_name)) {
|
||
|
|
include($file_name);
|
||
|
|
exit;
|
||
|
|
}
|
||
|
|
else {
|
||
|
|
error_log('CustomPages::displayPage : could not read file '.$file_name);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
?>
|