'; $o .= '
'; $o .= '

' . t('Documentation Search') . ' - ' . htmlspecialchars($_REQUEST['search']) . '

'; $o .= '
'; $o .= '
'; $r = search_doc_files($_REQUEST['search']); if($r) { $o .= ''; $o .= '
'; $o .= ''; } return $o; } if(argc() > 2 && argv(argc()-2) === 'assets') { $path = ''; for($x = 1; $x < argc(); $x ++) { if(strlen($path)) $path .= '/'; $path .= argv($x); } $realpath = 'doc/' . $path; //Set the content-type header as appropriate $imageInfo = getimagesize($realpath); switch ($imageInfo[2]) { case IMAGETYPE_JPEG: header("Content-Type: image/jpeg"); break; case IMAGETYPE_GIF: header("Content-Type: image/gif"); break; case IMAGETYPE_PNG: header("Content-Type: image/png"); break; case IMAGETYPE_WEBP: header("Content-Type: image/webp"); break; default: break; } header("Content-Length: " . filesize($realpath)); // dump the picture and stop the script readfile($realpath); killme(); } $headings = [ 'about' => t('About'), 'member' => t('Members'), 'admin' => t('Administrators'), 'developer' => t('Developers'), 'tutorials' => t('Tutorials') ]; $heading = ''; if(array_key_exists(argv(1), $headings)) $heading = $headings[argv(1)]; $content = get_help_content(); $language = determine_help_language()['language']; return replace_macros(get_markup_template('help.tpl'), array( '$title' => t('$Projectname Documentation'), '$tocHeading' => t('Contents'), '$content' => $content, '$heading' => $heading, '$language' => $language )); } }