-
Notifications
You must be signed in to change notification settings - Fork 1
/
footer.inc.php
69 lines (58 loc) · 1.47 KB
/
footer.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
* Footer for all output documents
*
* @package Archon
* @author Chris Rishel
*/
isset($_ARCHON) or die();
if($_ARCHON->AdministrativeInterface)
{
if(file_exists("adminthemes/{$_ARCHON->AdministrativeInterface->Theme}/footer.inc.php"))
{
$cwd = getcwd();
chdir("adminthemes/{$_ARCHON->AdministrativeInterface->Theme}/");
require_once('footer.inc.php');
chdir($cwd);
}
}
else
{
if($_ARCHON->PublicInterface->DisableTheme)
{
return;
}
$output = '';
if(ob_get_level() > $_ARCHON->DefaultOBLevel)
{
$output = ob_get_clean();
$arrWords = $_ARCHON->createSearchWordArray($_ARCHON->QueryString);
$count = 0;
if(!empty($arrWords))
{
foreach($arrWords as $word)
{
if($word && $word{0} != "-")
{
$output = preg_replace("/(\A|\>)([^\<]*[^\w^=^\<^\+^\/]|)(" . preg_quote($word, '/') . ")(|[^\w^=^\>\+][^\>]*)(\<|\z)/ui", "$1$2<span class='highlight$count bold'>$3</span>$4$5", $output);
$count++;
}
}
}
}
echo($output);
if(file_exists('themes/' . $_ARCHON->PublicInterface->Theme))
{
$cwd = getcwd();
chdir('themes/' . $_ARCHON->PublicInterface->Theme);
require_once('footer.inc.php');
chdir($cwd);
}
?>
</body>
</html>
<?php
}
$_ARCHON->Security->Session->close();
$_ARCHON->mdb2->disconnect();
?>