-
Notifications
You must be signed in to change notification settings - Fork 11
/
home.php
executable file
·151 lines (131 loc) · 4.35 KB
/
home.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?php
if(array_key_exists("page", $_REQUEST) && $_REQUEST["page"]=="ajaxbook")
{
setcookie("pageid_of_book$bookID", $pageid, strtotime('+365 days'));
}
header('HTTP/1.1 200 OK', TRUE);
header("Status: 200");
include_once './config.php';
$uri = $_SERVER["REQUEST_URI"];
if(strpos($uri, ".php")===false)
{
$URLParts = explode('/', trim(strtolower($uri),"/"));
if(count($URLParts)>=1){
$_REQUEST["page"] = $URLParts[0];
} else {
$_REQUEST["page"] = "books";
}
if(count($URLParts)>=2){
$_REQUEST["id"] = $URLParts[1];
} else {
if($_REQUEST["page"]=="books"){
$_REQUEST["id"] = 0;
}
}
if($_REQUEST["page"]=="book"){
if(count($URLParts)>=3 && $URLParts[2]=="search"){
$_REQUEST["searchkeywords"] = urldecode($URLParts[3]);
} else {
if(count($URLParts)>=3){
$_REQUEST["pageid"] = $URLParts[2];
}
}
}
if(count($URLParts)>=3 && $_REQUEST["page"]=="authors"){
if($URLParts[1]=="search"){
$_REQUEST["searchkeywords"] = urldecode($URLParts[2]);
}
}
if(count($URLParts)>=4 && $_REQUEST["page"]=="books"){
if($URLParts[2]=="search"){
$_REQUEST["searchkeywords"] = urldecode($URLParts[3]);
}
}
}
if(strpos($_REQUEST["page"],"ajax") !== false) {
if($_REQUEST["page"] == "ajaxtitles") {
include 'systitles.php';
showAjaxBody();
}
if($_REQUEST["page"] == "ajaxauthors") {
include './sysauthors.php';
showAjaxBody();
}
if($_REQUEST["page"] == "ajaxbooks") {
include './sysbooks.php';
showAjaxBody();
}
if($_REQUEST["page"] == "ajaxbook") {
include 'syspage.php';
?>
<div id='dynamicarea'>
<div class='mainbar'>
<?php showMainBar(); ?>
</div>
<div class="mainarea">
<?php showBody(); ?>
</div>
</div>
<?php
}
die();
}
$pageTitle = "المكتبة الإسلامية";
if($_REQUEST["page"] == "books"){
include 'sysbooks.php';
}else if($_REQUEST["page"] == "book" && !array_key_exists("pageid", $_REQUEST)){
include 'sysbook.php';
}else if($_REQUEST["page"] == "book" && array_key_exists("pageid", $_REQUEST)){
include 'syspage.php';
}else if($_REQUEST["page"] == "authors"){
include 'sysauthors.php';
}else if($_REQUEST["page"] == "about"){
include 'sysabout.php';
}else if($_REQUEST["page"] == "author"){
include 'sysauthor.php';
}else if($_REQUEST["page"] == "title"){
include 'syspage.php';
}else if($_REQUEST["page"] == "mybooks"){
include 'sysmybooks.php';
}
?>
<!DOCTYPE html>
<html dir="rtl" lang="ar">
<head>
<meta charset="UTF-8">
<title><?=$pageTitle?></title>
<link rel="shortcut icon" href="/images/book.png">
<base href="<?=$baseURL?>">
<link rel="stylesheet" href="js/share/jquery.share.css" />
<link rel="stylesheet" type="text/css" href="css/main.css"/>
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/share/jquery.share.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</head>
<body dir="rtl">
<?php include_once("analyticstracking.php") ?>
<div class="headarea">
<div class="headlogo">
<a href='<?=$baseURL?>'><img src='/images/books.png'></a>
</div>
<div class="headbody">
<div class="headsection headtitle">
<h1><a href='<?=$baseURL?>'>المكتبة الإسلامية</a></h1>
</div>
<div class="headmenu">
<a href='/'>المكتبة</a> |
<a href='/authors'>المؤلفون</a> |
<a href='/mybooks'>مكتبتي</a> |
<a href='/about'>حول الموقع</a>
</div>
</div>
</div>
<div id='dynamicarea'>
<div class='mainbar'>
<?php showMainBar(); ?>
</div>
<div class="mainarea"><?php showBody(); ?></div>
</div>
<div class='footerarea'>طور بواسطة نورين ميديا © 2015</div>
</body>
</html>