1
0
mirror of https://github.com/e107inc/e107.git synced 2025-02-24 16:52:43 +01:00
php-e107/e107_files/shortcode/admin_help.sc
2006-12-02 04:36:16 +00:00

31 lines
814 B
Scala

if (ADMIN) {
global $ns, $pref;
if (!($handle=opendir(e_LANGUAGEDIR.e_LANGUAGE."/admin/help/"))) {
$handle=opendir(e_LANGUAGEDIR."English/admin/help/");
}
ob_start();
$text = "";
while(false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && $file != "CVS") {
if (strpos(e_SELF, $file) !== FALSE) {
if (is_readable(e_LANGUAGEDIR.e_LANGUAGE."/admin/help/".$file)) {
include_once(e_LANGUAGEDIR.e_LANGUAGE."/admin/help/".$file);
} else if (is_readable(e_LANGUAGEDIR."English/admin/help/".$file)) {
include_once(e_LANGUAGEDIR."English/admin/help/".$file);
}
}
}
}
closedir($handle);
$plugpath = getcwd()."/help.php";
if(file_exists($plugpath))
{
@require_once($plugpath);
}
$help_text = ob_get_contents();
ob_end_clean();
return $help_text;
}