\n";
if (func_num_args() == 0) return $usage;
// Get an argument
list($page) = func_get_args();
$page = strip_bracket($page);
$s_page = htmlspecialchars($page);
$r_page = rawurlencode($page);
$link = "$s_page"; // Read link
// Loop yourself
$root = isset($vars['page']) ? $vars['page'] : '';
$included[$root] = TRUE;
// I'm stuffed
if (isset($included[$page])) {
return "#include(): Included already: $link
\n";
} if (! is_page($page)) {
return "#include(): No such page: $s_page
\n";
} if ($count > INCLUDE_MAX) {
return "#include(): Limit exceeded: $link
\n";
} else {
++$count;
}
// One page, only one time, at a time
$included[$page] = TRUE;
// Include A page, that probably includes another pages
$get['page'] = $post['page'] = $vars['page'] = $page;
if (check_readable($page, false, false)) {
$body = convert_html(get_source($page));
} else {
$body = str_replace('$1', $page, $_msg_include_restrict);
}
$get['page'] = $post['page'] = $vars['page'] = $root;
// Add a title with edit link, before included document
$link = "$s_page";
if ($page == $menubar) {
$body = "$link
" .
"$body";
} else {
$body = "