forked from archonproject/archon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.inc.php
executable file
·48 lines (38 loc) · 1.18 KB
/
header.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
<?php
/**
* Header file for all output documents
*
* @package Archon
* @author Chris Rishel
*/
isset($_ARCHON) or die();
if($_ARCHON->AdministrativeInterface)
{
if(file_exists("adminthemes/{$_ARCHON->AdministrativeInterface->Theme}/header.inc.php"))
{
$cwd = getcwd();
chdir("adminthemes/{$_ARCHON->AdministrativeInterface->Theme}/");
require_once('header.inc.php');
chdir($cwd);
}
}
else
{
$_ARCHON->QueryString = $_REQUEST['q'];
//$_ARCHON->QueryStringURL = urlencode(preg_replace("/(.*?)([\s]-[\d\w]*)(.*?)/iu", "\$1\$3", $_ARCHON->QueryString));
$_ARCHON->QueryStringURL = urlencode($_ARCHON->QueryString);
if(!$_ARCHON->PublicInterface->DisableTheme)
{
$arrWords = $_ARCHON->createSearchWordArray($_ARCHON->QueryString);
if(file_exists('themes/' . $_ARCHON->PublicInterface->Theme))
{
$cwd = getcwd();
chdir('themes/' . $_ARCHON->PublicInterface->Theme);
require_once('header.inc.php');
chdir($cwd);
}
// For search highlighting
ob_start();
ob_implicit_flush();
}
}