parent
0ad4994657
commit
b72b7ce080
@ -0,0 +1,7 @@ |
||||
CustomPages looks for alternatives in this directory, and displays them if present. The user-provided custom pages must exactly be named as such : |
||||
|
||||
- index-logged.php for the general landing page before login |
||||
- index-unlogged.php for the general landing page when already logged-in |
||||
- registration.php for the registration form |
||||
- lostpassword.php for the password recovery form |
||||
- lostpassword-feedback.php for the password recovery feedback page |
||||
@ -0,0 +1,20 @@ |
||||
<?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); |
||||
} |
||||
} |
||||
} |
||||
?> |
||||
Loading…
Reference in new issue