-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
152 lines (130 loc) · 5.24 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
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
151
152
<?php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
$layout_context = 'public';
require_once("static/includes/sessions.php");
require_once("static/includes/functions.php");
if(isset($_SESSION["username"])){
$access = "logged_in";
}
require_once("static/includes/dbsetup.php");
include "static/includes/layouts/open.php";
if (isset($_GET["subject"])){
$selected_subject_id = $_GET["subject"];
if(!is_numeric($selected_subject_id)){
redirect_to("index.php");
}
$selected_subject_id = mysqli_real_escape_string($conn,$selected_subject_id);
$query = "SELECT * FROM subjects WHERE id = {$selected_subject_id} LIMIT 1";
$result = mysqli_query($conn,$query);
if( (!$result) || mysqli_num_rows($result) < 1){
redirect_to("index.php");
}
$selected_page_id = null;
} // TESTED - OK
elseif (isset($_GET["page"])){
$selected_page_id = $_GET["page"];
if(!is_numeric($selected_page_id)){
redirect_to("index.php");
}
$selected_page_id = mysqli_real_escape_string($conn,$selected_page_id);
$query = "SELECT * FROM pages WHERE id = {$selected_page_id} LIMIT 1";
$result = mysqli_query($conn,$query);
if( (!$result) || mysqli_num_rows($result) < 1){
redirect_to("index.php");
}
$selected_subject_id = null;
}
else{
$selected_page_id = null;
$selected_subject_id = null;
}
?>
<div id="index-banner" class="parallax-container">
<div class="section no-pad-bot">
<div class="container">
<br><br>
<h1 class="header center blue-text text-darken-1" style="visibility:hidden;">IQRA</h1>
<div class="row center">
<h5 class="header col s12 white-text darken-2">There comes a time when you have to choose between turning the page and closing the book</h5>
</div>
<div class="row center">
<a href="display_all.php" id="download-button" class="btn-large waves-effect waves-light blue lighten-1">Open the book</a>
</div>
<br><br>
</div>
</div>
<div class="parallax"><img src="static/images/bg33.jpg" alt="Unsplashed background img 1"></div>
</div>
<div class="container">
<div class="section">
<!-- Icon Section -->
<div class="row">
<div class="col s12 m4">
<div class="icon-block">
<h2 class="center brown-text"><i class="material-icons">flash_on</i></h2>
<h5 class="center">Find Interesting Stuff</h5>
<p class="light">How many times have you felt overwhelmed by the plethora of information out there?! Well, too many times apparently.
We offer you one thing and that's simplicity. Here you will not find any things that distract you from the stuff
that you really care about.
</p>
</div>
</div>
<div class="col s12 m4">
<div class="icon-block">
<h2 class="center brown-text"><i class="material-icons">group</i></h2>
<h5 class="center">User Focused</h5>
<p class="light">We don't put you on a hook and hope that you sit in front of the computer screen or stare at your mobile
phones for the whole day. We want you to be content, and urges you to give some time to yourself, even if that means less engagement for
us. That's the user experience we're talking about.
</p>
</div>
</div>
<div class="col s12 m4">
<div class="icon-block">
<h2 class="center brown-text"><i class="material-icons">settings</i></h2>
<h5 class="center">Easy to work with</h5>
<p class="light">Half of the world is computer illiterate and we don't want them to be taken aback by the glitter of today's web,
that sends them in a endless spiral. We want them to feel comfortable.Maybe read too.
</p>
</div>
</div>
</div>
</div>
</div>
<div class="parallax-container valign-wrapper">
<div class="section no-pad-bot">
<div class="container">
<div class="row center">
<h5 class="header col s12 light">In a good book the best is between the lines.</h5>
</div>
</div>
</div>
<div class="parallax"><img src="static/images/bg1.jpg" alt="Unsplashed background img 2"></div>
</div>
<div class="container">
<div class="section">
<div class="row">
<div class="col s12 center">
<h3><i class="mdi-content-send brown-text"></i></h3>
<h4>Rekindle that fire</h4>
<p class="left-align light">There are perhaps no days of our childhood we lived so fully as those we spent with a favorite book.
Somewhere between the lines, we lost that touch and kept down that book. We want you to start it all over again. Keep reading.
</p>
</div>
</div>
</div>
</div>
<div class="parallax-container valign-wrapper">
<div class="section no-pad-bot">
<div class="container">
<div class="row center">
<h5 class="header col s12 light">A book is a device to ignite the imagination.</h5>
</div>
</div>
</div>
<div class="parallax"><img src="static/images/bg2.jpg" alt="Unsplashed background img 3"></div>
</div>
<?php
include "static/includes/layouts/close.php";
?>