33 if ($index !==
false) {
34 return '<link rel="prev" href="' . $sn .
'?' . $u[$index] .
'">';
55 if ($index !==
false) {
56 return '<link rel="next" href="' . $sn .
'?' . $u[$index] .
'">';
77 $t =
XH_title($cf[
'site'][
'title'], $title);
78 $t =
'<title>' . strip_tags($t) .
'</title>' .
"\n";
79 foreach (array_keys(array_merge($cf[
'meta'], $tx[
'meta'])) as
$i) {
82 $t =
'<meta http-equiv="content-type" content="text/html;charset=UTF-8">' 86 if (error_reporting() > 0) {
90 .
'<!-- plugins: ' . $plugins .
' -->' .
"\n";
94 .
'" type="text/css">' . PHP_EOL
96 .
'<link rel="stylesheet" href="' . $pth[
'file'][
'stylesheet']
97 .
'" type="text/css">' .
"\n";
112 return isset($tx[
'site'][
'title']) ?
XH_hsc($tx[
'site'][
'title']) :
'';
127 return isset($cf[
'site'][
'title']) ?
XH_hsc($cf[
'site'][
'title']) :
'';
142 return ' onload="' . $onload .
'"';
160 function toc($start = null, $end = null, $li =
'li')
172 $end = $cf[
'menu'][
'levels'];
177 for (
$i = $s;
$i > -1;
$i--) {
178 if ($l[
$i] <= $tl && $l[
$i] >= $start && $l[
$i] <= $end) {
180 || (
$i == $s && $cf[
'show_hidden'][
'pages_toc'] ==
'true')
194 $tl += 1 + $cf[
'menu'][
'levelcatch'];
196 if ($l[
$i] <= $tl && $l[
$i] >= $start && $l[
$i] <= $end) {
205 return $li($ta, $start);
217 function li(array $ta, $st)
220 return $li->render($ta, $st);
252 || ($cf[
'show_hidden'][
'pages_toc'] ==
'true' 253 && (
$i == $s || in_array(
$i, $pages->getAncestorsOf($s,
false))))
276 return '<form id="searchbox" action="' . $sn .
'" method="get">' .
"\n" 277 .
'<input type="search" class="text" name="search" title="' 278 . $tx[
'search'][
'label'] .
'" placeholder="' . $tx[
'search'][
'label']
279 .
'" size="12">' .
"\n" 280 .
'<input type="hidden" name="function" value="search">' .
"\n" .
' ' 281 .
'<input type="submit" class="submit" value="' 282 . $tx[
'search'][
'button'] .
'">' .
"\n" 294 return ml(
'sitemap');
309 return '<a href="' .
XH_printUrl() .
'" rel="nofollow">' 310 . $tx[
'menu'][
'print'] .
'</a>';
330 if ($f ==
'search') {
331 $t .=
'&function=search&search=' . urlencode(
stsl($search));
332 } elseif ($f ==
'file') {
333 $t .=
'&file=' .
$file;
334 } elseif ($f !=
'' && $f !=
'save') {
336 } elseif (
sv(
'QUERY_STRING') !=
'') {
337 $t =
sv(
'QUERY_STRING') . $t;
340 return $sn .
'?' . $t;
354 if ($cf[
'mailform'][
'email'] !=
'') {
355 return ml(
'mailform');
372 return a($s > -1 ? $s : 0,
'&login" rel="nofollow')
373 . $tx[
'menu'][
'login'] .
'</a>';
393 $t = $tx[
'lastupdate'][
'text'] .
':';
399 $time = filemtime($pth[
'file'][
'content']) + (isset($hour) ? $hour * 3600 : 0);
400 return $t .
'<time datetime="' . date(
'c', $time) .
'">' 413 $last = count($breadcrumbs) - 1;
414 $html =
'<span vocab="http://schema.org/" typeof="BreadcrumbList">';
415 foreach ($breadcrumbs as
$i => $breadcrumb) {
416 list(
$title, $url) = $breadcrumb;
420 $html .=
'<span property="itemListElement" typeof="ListItem">';
421 $inner =
'<span property="name">' .
$title 422 .
'</span><meta property="position" content="'. (
$i + 1) .
'">';
423 if (isset($url) &&
$i < $last) {
424 $html .=
'<a property="item" typeof="WebPage" href="' . $url .
'">' 449 trigger_error(
'Function editmenu() is deprecated', E_USER_DEPRECATED);
469 if (!($edit &&
XH_ADM) && $s > -1) {
470 if (isset($_GET[
'search'])) {
472 $words = explode(
' ',
$search);
476 $o .= $heading . preg_replace(
'/#CMSimple (.*?)#/is',
'', $c[$s]);
477 return preg_replace(
'/<!--XH_ml[1-9]:.*?-->/isu',
'', $o);
479 return preg_replace(
'/<!--XH_ml[1-9]:.*?-->/isu',
'', $o);
503 $tl = $l[
$s] + 1 + $cf[
'menu'][
'levelcatch'];
505 if ($l[
$i] <= $l[$s]) {
517 if (count($ta) != 0) {
519 $level = min($cf[
'menu'][
'levels'] + 1, 6);
520 return '<h' . $level .
'>' . $tx[
'submenu'][
'heading']
521 .
'</h' . $level .
'>' 522 .
li($ta,
'submenu');
524 return sprintf($html, $tx[
'submenu'][
'heading'])
525 .
li($ta,
'submenu');
545 if ($index !==
false) {
546 return a($index,
'" rel="prev') . $tx[
'navigator'][
'previous'] .
'</a>';
564 if ($index !==
false) {
565 return a($index,
'" rel="next') . $tx[
'navigator'][
'next'] .
'</a>';
584 return '<a href="#' . $id .
'">' . $tx[
'navigator'][
'top'] .
'</a>';
602 array_unshift($r, $cf[
'language'][
'default']);
603 $i = array_search($sl, $r);
606 $langNames = explode(
';', $cf[
'language'][
'2nd_lang_names']);
607 foreach ($langNames as $value) {
608 $langName[substr($value, 0, 2)] = substr($value, 3);
612 foreach ($r as $lang) {
613 $url = $pth[
'folder'][
'base']
614 . ($lang == $cf[
'language'][
'default'] ?
'' : $lang .
'/');
615 $img = $pth[
'folder'][
'templateflags'] . $lang .
'.gif';
616 if (!file_exists($img)) {
617 $img = $pth[
'folder'][
'flags'] . $lang .
'.gif';
620 $title = isset($langName[$lang])
624 $el = file_exists($img)
625 ?
'<img src="' . $img .
'" alt="' .
$title .
'" title="' 626 .
$title .
'" class="flag">' 628 $t .=
'<a href="' . $url .
'">' . $el .
'</a> ';
643 header(
'HTTP/1.0 503 Service Unavailable');
644 header(
'Content-Type: text/html;charset=UTF-8');
645 echo
'<!DOCTYPE html><head>' 675 $linktext = $linktext ? $linktext :
'Site/CMS Info';
676 return '<a href="' . $sn .
'?' .
uenc(
'site/cms info') .
'">' 677 . $linktext .
'</a>';
toc($start=null, $end=null, $li='li')
const CMSIMPLE_XH_VERSION
XH_formatDate($timestamp)
lastupdate($br=null, $hour=null)
if(!isset($cf['folders']['content'])) if($cf['site']['timezone'] !=='' &&function_exists('date_default_timezone_set')) $sl
XH_highlightSearchWords(array $words, $text)
poweredByLink($linktext='')
XH_title($site, $subtitle)