forked from archonproject/archon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.inc.php
executable file
·95 lines (78 loc) · 2.58 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?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);
}
$objCopyrightPhrase = Phrase::getPhrase('copyright', PACKAGE_CORE, 0, PHRASETYPE_ADMIN);
$strCopyright = $objCopyrightPhrase ? $objCopyrightPhrase->getPhraseValue() : 'Copyright ©$1 <a href="http://www.uiuc.edu/">The University of Illinois at Urbana-Champaign</a>';
$strCopyright = str_replace('$1', $_ARCHON->CopyrightYear, $strCopyright);
?>
<div id="archoninfo">
Page Generated in: <?php echo(round(microtime(true) - $_ARCHON->StartTime, 3)); ?> seconds (using <?php echo($_ARCHON->QueryLog->QueryCount); ?> queries).<br/>
<?php
if(function_exists('memory_get_usage') && function_exists('memory_get_peak_usage'))
{
?>
Using <?php echo(round(memory_get_usage()/1048576,2)); ?>MB of memory. (Peak of <?php echo(round(memory_get_peak_usage()/1048576,2)); ?>MB.)<br/>
<?php
}
?>
<br/>
Powered by <a href='<?php echo($_ARCHON->ArchonURL); ?>'>Archon</a> Version <?php echo($_ARCHON->Version); if($_ARCHON->Revision){echo(" rev-".$_ARCHON->Revision);} ?><br/>
<?php echo($strCopyright); ?>
<br/>
<?php
?>
</div>
</body>
</html>
<?php
}
$_ARCHON->Security->Session->close();
$_ARCHON->mdb2->disconnect();
?>