1 <?php require(dirname(__FILE__) . '/vitals.inc.php'); ?>
\r
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
\r
3 <html lang="<?php if ($missing_lang) { echo 'en'; } else { echo $req_lang; } ?>">
\r
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
\r
6 <title><?php get_text('atutor_documentation'); ?></title>
\r
7 <base target="body" />
\r
9 body { font-family: Verdana,Arial,sans-serif; font-size: x-small; margin: 0px; padding: 0px; background: #fafafa; margin-left: -5px; }
\r
10 ul, ol { list-style: none; padding-left: 0px; margin-left: -15px; }
\r
11 li { margin-left: 19pt; padding-top: 2px; }
\r
12 a { background-repeat: no-repeat; background-position: 0px 1px; padding-left: 12px; text-decoration: none; }
\r
13 a.tree { background-image: url('folder.gif'); }
\r
14 a.leaf { background-image: url('paper.gif'); }
\r
15 a:link, a:visited { color: #006699; }
\r
16 a:hover { color: #66AECC; }
\r
21 require('../'.$section.'/pages.inc.php');
\r
22 if (($req_lang != 'en') && (file_exists('../'.$section.'/'.$req_lang.'/pages.inc.php'))) {
\r
23 require('../'.$section.'/'.$req_lang.'/pages.inc.php');
\r
26 echo '<a href="frame_toc.php?'.$section.'" target="_self">';
\r
27 get_text('back_to_contents');
\r
30 if ($_GET['query']) {
\r
31 $_GET['query'] = str_replace(',', ' ', $_GET['query']);
\r
32 $_GET['query'] = str_replace('"', '', $_GET['query']);
\r
34 if (strlen($_GET['query']) > 3) {
\r
35 $_GET['query'] = strtolower($_GET['query']);
\r
37 $search_terms = explode(' ', $_GET['query']);
\r
40 if ($req_lang == 'en') {
\r
41 $files = glob('../'.$section . '/*.php');
\r
43 $files = glob('../'.$section . '/'.$req_lang.'/*.php');
\r
45 if (is_array($files)) {
\r
46 foreach ($files as $filename) {
\r
49 $filename = basename($filename);
\r
51 if ($req_lang == 'en') {
\r
52 $contents = strtolower(file_get_contents('../'.$section.'/'.$filename));
\r
54 $contents = strtolower(file_get_contents('../'.$section. '/'.$req_lang.'/'.$filename));
\r
57 foreach ($search_terms as $term) {
\r
58 $term = trim($term);
\r
60 $count += substr_count($contents, $term);
\r
64 $results[$filename] = $count;
\r
72 foreach ($results as $file => $count)
\r
74 if (($req_lang != 'en') && (file_exists('../'.$section.'/'.$req_lang.'/'.$file)))
\r
75 $full_file = '../'.$section.'/'.$req_lang.'/'.$file;
\r
77 $full_file = '../'.$section.'/'.$file;
\r
79 echo '<li><a href="'.$full_file.'?'.$req_lang.'" class="leaf" target="body">'.$_pages[$file].'</a></li>';
\r
83 echo '<p style="padding: 8px;">';
\r
84 get_text('no_results_found');
\r
88 echo '<p style="padding: 8px;">';
\r
89 get_text('search_term_longer_3_chars');
\r