Added full source code
This commit is contained in:
commit
33f8586698
1377 changed files with 123808 additions and 0 deletions
scripts/site/beta5/output/manual/en
68
scripts/site/beta5/output/manual/en/header.inc
Normal file
68
scripts/site/beta5/output/manual/en/header.inc
Normal file
|
@ -0,0 +1,68 @@
|
|||
<div style="margin:1px 1px 30px 1px;padding:0;width:100%">
|
||||
<?php
|
||||
|
||||
$manual = handler::$h->lib->call('getStructure', 'en');
|
||||
$txt = array('Top', 'Up', 'Previous', 'Next');
|
||||
if (!is_null(handler::$h->page)) {
|
||||
$pid = handler::$h->page['id'];
|
||||
$navLinks = handler::$h->lib->call('getNavLinks', $pid);
|
||||
for ($i=0;$i<4;$i++) {
|
||||
$t = is_null($navLinks[$i]) ? "" : "<a href='?p={$navLinks[$i]}'>";
|
||||
$t .= $txt[$i] . (is_null($navLinks[$i]) ? "" : "</a>");
|
||||
$navLinks[$i] = $t;
|
||||
}
|
||||
} else {
|
||||
$pid = null;
|
||||
$navLinks = $txt;
|
||||
}
|
||||
|
||||
$size = 15 + prefs::get('main/font_size', 2) * 3;
|
||||
?>
|
||||
<form action="?" method="POST">
|
||||
<table style="width:98%;margin:0% 0% 0% 1%">
|
||||
<tr>
|
||||
<td style="width:33%"> </td>
|
||||
<td style="width:34%;text-align:center"><?=$navLinks[0]?></td>
|
||||
<td style="width:33%"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?=$navLinks[2]?></td>
|
||||
<td style="text-align:center"><?=$navLinks[1]?></td>
|
||||
<td style="text-align:right"><?=$navLinks[3]?></td>
|
||||
</tr>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
<tr>
|
||||
<th style="text-align:right"><input type="submit" value="Search:" /></th>
|
||||
<td colspan='2'><input type="text" name="ss" value="<?=preg_replace('/"/', '"', handler::$h->searchText)?>" style="width:90%" /></td>
|
||||
</tr>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
<tr><td colspan="3"><h3 style="margin:0;padding:0">Contents</h3></td></tr>
|
||||
</table>
|
||||
<div id="manual">
|
||||
<?
|
||||
|
||||
function dumpManualStructure(&$sections, $depth) {
|
||||
$br = false;
|
||||
foreach ($sections as $id => $sd) {
|
||||
if ($br) {
|
||||
echo "<br/>";
|
||||
} else {
|
||||
$br = true;
|
||||
}
|
||||
if ($depth > 0) {
|
||||
echo str_repeat(' ', $depth * 2);
|
||||
}
|
||||
echo " <a href='?p={$sd['name']}'>" . utf8entities($sd['title']) . "</a>";
|
||||
if (count($sd['subs'])) {
|
||||
echo "<br/>";
|
||||
dumpManualStructure($sd['subs'], $depth + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dumpManualStructure($manual, 0);
|
||||
|
||||
?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
5
scripts/site/beta5/output/manual/en/notfound.inc
Normal file
5
scripts/site/beta5/output/manual/en/notfound.inc
Normal file
|
@ -0,0 +1,5 @@
|
|||
<h1>Page not found!</h1>
|
||||
<p>
|
||||
The page you were looking for could not be found in the manual. Maybe the manual
|
||||
has been updated in the meantime.
|
||||
</p>
|
108
scripts/site/beta5/output/manual/en/page.inc
Normal file
108
scripts/site/beta5/output/manual/en/page.inc
Normal file
|
@ -0,0 +1,108 @@
|
|||
<?php
|
||||
|
||||
|
||||
function drawContents (&$list) {
|
||||
$st = input::$IE ? "margin:0px 0px 0px 20px" : "margin:0px 0px 0px -15px";
|
||||
|
||||
$kl = array_keys($list);
|
||||
foreach ($kl as $k) {
|
||||
echo "<li><a href='#{$list[$k]['name']}'>{$list[$k]['title']}</a>";
|
||||
if (count($list[$k]['subsections'])) {
|
||||
echo "<ul style='$st'>";
|
||||
drawContents($list[$k]['subsections']);
|
||||
echo "</ul>";
|
||||
}
|
||||
echo "</li>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function displayLinks($text) {
|
||||
$l = explode('<mlink ', $text);
|
||||
$nText = array_shift($l);
|
||||
while (count($l)) {
|
||||
$t = preg_replace('/^\s*to=[\'"]/', '', array_shift($l));
|
||||
$toName = preg_replace('/^([A-Za-z0-9_\-]+)[\'"]>(.*\n)*.*/', '\1', $t);
|
||||
$toName = preg_replace('/\s/', '', $toName);
|
||||
$t = preg_replace('/^[A-Za-z0-9_\-]+[\'"]>/', '', $t);
|
||||
|
||||
$secId = handler::$h->lib->call('getSectionId', handler::$h->lang, $toName);
|
||||
$link = "";
|
||||
if (!is_null($secId)) {
|
||||
$pageId = handler::$h->lib->call('getPageId', $secId);
|
||||
if (!is_null($pageId)) {
|
||||
$lt = handler::$h->lib->call('readSectionRecord', $secId);
|
||||
if ($pageId == handler::$h->page['id']) {
|
||||
$link = "<a href='#{$lt['name']}'>";
|
||||
} else {
|
||||
$pg = handler::$h->lib->call('readSectionRecord', $pageId);
|
||||
$link = "<a href='?c=0&p={$pg['name']}#{$lt['name']}'>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$nText .= $link . preg_replace('/^(.*)<\/mlink>(.*\n)*.*/', '\1', $t) . ($link != '' ? "</a>" : "")
|
||||
. preg_replace('/^.*<\/mlink>/', '', $t);
|
||||
}
|
||||
|
||||
return $nText;
|
||||
}
|
||||
|
||||
|
||||
function drawSecTitle(&$section, $depth) {
|
||||
$pgLink = "";
|
||||
if ($section['linkto'] != "") {
|
||||
$pageId = handler::$h->lib->call('getPageId', $section['linkto']);
|
||||
if (!is_null($pageId)) {
|
||||
$lt = handler::$h->lib->call('readSectionRecord', $section['linkto']);
|
||||
if ($pageId == handler::$h->page['id']) {
|
||||
$pgLink = " (<a href='#{$lt['name']}'>view</a>)";
|
||||
} else {
|
||||
$pg = handler::$h->lib->call('readSectionRecord', $pageId);
|
||||
$pgLink = " (<a href='?c=0&p={$pg['name']}#{$lt['name']}'>view</a>)";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$mDepth = ($depth - 2) * 10;
|
||||
echo "<table style='width:95%;margin:0;padding:0'><tr><td style='width:85%'><a name='{$section['name']}'></a><h$depth"
|
||||
. " style='padding:0;margin:5px 0px 5px {$mDepth}px'>{$section['title']}$pgLink</h$depth>"
|
||||
. "</td><td style='text-align:right'><a href='#" . handler::$h->page['name'] . "'>Top</a></td></tr></table>";
|
||||
}
|
||||
|
||||
function drawSections (&$list, $depth = 2) {
|
||||
$kl = array_keys($list);
|
||||
foreach ($kl as $k) {
|
||||
if ($depth == 2) {
|
||||
echo "<hr/>";
|
||||
}
|
||||
drawSecTitle($list[$k], $depth);
|
||||
if ($list[$k]['contents'] != '') {
|
||||
echo "<div class='mansection'>" . displayLinks($list[$k]['contents']) . "</div>";
|
||||
}
|
||||
if (count($list[$k]['subsections'])) {
|
||||
drawSections($list[$k]['subsections'], $depth + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (is_null(handler::$h->page)) {
|
||||
include('manual_notfound.en.inc');
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<a name="<?=handler::$h->page['name']?>"></a>
|
||||
<h1 style="margin:0;padding:0"><?=handler::$h->page['title']?></h1>
|
||||
<?
|
||||
|
||||
if (count(handler::$h->page['subsections'])) {
|
||||
$st = input::$IE ? "margin:0px 0px 0px 30px" : "margin:0px 0px 0px -15px";
|
||||
echo "<div class='mansection'><b>Contents:</b><ul style='$st'>";
|
||||
drawContents(handler::$h->page['subsections']);
|
||||
echo "</ul></div>";
|
||||
drawSections(handler::$h->page['subsections']);
|
||||
}
|
||||
|
||||
?>
|
24
scripts/site/beta5/output/manual/en/search.inc
Normal file
24
scripts/site/beta5/output/manual/en/search.inc
Normal file
|
@ -0,0 +1,24 @@
|
|||
<h1>Search results for '<i><?=utf8entities($args['text'])?></i>'</h1>
|
||||
<?php
|
||||
if (empty($args['results'])) {
|
||||
echo "<p>Sorry, no results were found.</p>\n";
|
||||
} else {
|
||||
$c = count($args['results']);
|
||||
echo "<p><b>$c</b> result" . ($c > 1 ? "s were" : " was") . " found:</p>";
|
||||
echo "<div class='mansection'><ol>";
|
||||
$error = false;
|
||||
foreach ($args['results'] as $p) {
|
||||
$pData = handler::$h->lib->call('readSectionRecord', $p);
|
||||
if (is_null($pData)) {
|
||||
$error = true;
|
||||
continue;
|
||||
}
|
||||
echo "<li><a href='?p={$pData['name']}'>{$pData['title']}</a></li>";
|
||||
}
|
||||
echo "</ol>";
|
||||
if ($error) {
|
||||
echo "<b>Some results could not be displayed because of a database error.</b>";
|
||||
}
|
||||
echo "</div>";
|
||||
}
|
||||
?>
|
Reference in a new issue