forked from DukeOnlineDiscourse/OD_Database
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
48 lines (42 loc) · 1.6 KB
/
index.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
$homeArray=array('pages/home.php',array(''),array('styles/home.css'));
$pages = array(
'genSearch'=>array('searchHandlers/genSearchHandler.php',
array("js/searchHandlers/thickbox-compressed.js", "js/searchHandlers/toolTips.min.js","js/searchHandlers/genSearchHandler.js"),
array("styles/searchHandlers/thickbox.css","styles/searchHandlers/search.css")),
''=>$homeArray,'home'=>$homeArray);
/*$curPage = 'home';*/
if(isset($_GET['page']))
$curPage = $_GET['page'];
if(array_key_exists($curPage,$pages)) {
$mainContentFile = $pages[$curPage][0];
$jsFiles = $pages[$curPage][1];
$csFiles= $pages[$curPage][2];
}else{
header('Location: home');
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Online Discourse Search Engine</title>
<script type="text/javascript"src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<?
foreach ($csFiles as $csFile){
if($csFile!="")
echo "<link rel=\"stylesheet\" href=\"".$csFile."\" type=\"text/css\"/>";
}
foreach ($jsFiles as $jsFile){
if($jsFile!="")
echo "<script type=\"text/javascript\" src=\"".$jsFile."\"></script>";
}
?>
</head>
<body>
<div id="content">
<?
include $mainContentFile; ?>
</div>
</body>
</html>