-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
154 lines (146 loc) · 6.73 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
153
154
<?php
// Start the session
session_start();
if (isset($_SESSION["username"])) {
if ($_SESSION['role'] === "user") {
header('Location: user');
} else if ($_SESSION['role'] === "admin") {
header('Location: admin');
}
} else if (isset($_COOKIE["username"])) {
if (isset($_COOKIE['role'])) {
if ($_COOKIE['role'] === "user") {
header('Location: user');
} else if ($_COOKIE['role'] === "admin") {
header('Location: admin');
}
}
} else if (isset($_COOKIE["super"]) || isset($_SESSION["super"])) {
header('Location: super.php');
}
$uniqueValues = json_decode(file_get_contents('script/uniqueLocations.json'), true);
$options = "";
foreach ($uniqueValues as $location) {
$options .= <<<FT
<li>$location</li>
FT;
}
$allRoutes = json_decode(file_get_contents('script/routes.json'), true);
$routes = "";
foreach ($allRoutes as $key => $value) {
$routes .= <<<FT
<li>$key</li>
FT;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0"> -->
<meta name="description" content="RouteRover is a web application that helps you find the best route to your destination.">
<meta name="keywords" content="RouteRover, Route Finder, Transport, Bus, Route, Destination, Pricing">
<meta name="author" content="RouteRover">
<meta name="robots" content="index, follow">
<meta name="googlebot" content="index, follow">
<meta name="bingbot" content="index, follow">
<meta property="og:title" content="RouteRover">
<meta property="og:description" content="RouteRover is a web application that helps you find the best route to your destination.">
<meta property="og:image" content="routerover_icon.png">
<meta property="og:url" content="https://routerover.free.nf/">
<meta property="og:site_name" content="RouteRover">
<meta name="twitter:title" content="RouteRover">
<meta name="twitter:description" content="RouteRover is a web application that helps you find the best route to your destination.">
<meta name="twitter:image" content="routerover_icon.png">
<!-- <meta name="twitter:card" content="summary_large_image"> -->
<meta name="twitter:creator" content="@RouteRover">
<meta name="twitter:site" content="@RouteRover">
<!-- <meta name="theme-color" content="#000000"> -->
<link rel="apple-touch-icon" sizes="180x180" href="favicon_io/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon_io/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon_io/favicon-16x16.png">
<link rel="manifest" href="favicon_io/site.webmanifest">
<!-- <meta http-equiv="refresh" content="5"> -->
<title> Home | RouteRover </title>
<!-- Style Sheet -->
<link rel="stylesheet" href="css/style.css">
<?php include 'src/inc.php'; ?>
</head>
<body>
<?php include 'src/inc/header.php'; ?>
<section class="main">
<div class="route-finder" id="route-finder" style="height:auto;">
<h1>R<span style="color: white;">oute</span>R<span style="color: white;">over - এ আপনাকে স্বাগতম!</span></h1>
<p class="welcome">
<!-- Want to find your Route no., Available transports and Pricing details for going to your next destination?
RouteRover is here on your service!! Get everything on your fingertips with a single click. -->
আপনি কি আপনার পরবর্তী গন্তব্যস্থলে যাওয়ার জন্য আপনার রুট নম্বর, উক্ত রুটে সচল বাস এবং বাস ভাড়া জানতে চাচ্ছেন?
তাহলে RouteRover আছে আপনার সেবায়!! শুধু একটি ক্লিকের মাধ্যমে সব কিছু আপনার হাতের মুঠোয়।
</p>
<h2>Route Finder</h2>
<form method="post" id="showFair">
<div class="input-binder">
<fieldset class="input">
<legend>যাত্রাস্থান</legend>
<input class="input-field" name="departure" list="departure" aria-label="departure" placeholder="ষোলশহর" autocomplete="off">
<ul id="departure">
<!-- options -->
<?php echo $options ?>
</ul>
</fieldset>
<fieldset class="input">
<legend>গন্তব্যস্থল</legend>
<input class="input-field" name="destination" list="destination" aria-label="destination" placeholder="বহদ্দারহাট" autocomplete="off">
<ul id="destination">
<!-- options -->
<?php echo $options ?>
</ul>
</fieldset>
</div>
<button class="btn btn-search" type="submit" value="search" name="search">Search</button>
</form>
<div id="showFairResult">
</div>
<form method="post" id="showRoute">
<fieldset class="input">
<input class="input-field" name="routes" list="routes" aria-label="routes" placeholder="রুট নং" autocomplete="off">
<ul id="routes">
<!-- options -->
<?php echo $routes ?>
</ul>
</fieldset>
<button class="showRoute" type="submit" value="search" name="searchRoute">
<i class="fa-solid fa-magnifying-glass"></i>
</button>
</form>
<div id="showRouteResult">
</div>
</div>
<div id="contact" class="contact">
<h3> Contact Form </h3>
<p>
<!-- While using our services if you face any inconvenience then please inform us. -->
আমাদের সার্ভিস ব্যবহার করার সময় আপনি যদি কোনও অসুবিধা অনুভব করেন তাহলে অনুগ্রহ করে আমাদের জানান।
</p>
<form method="post" id="contactForm">
<fieldset class="input">
<legend>Email</legend>
<input type="text" placeholder="[email protected]" id="email" name="email" autocomplete="email">
</fieldset>
<fieldset class="input">
<legend>Message</legend>
<textarea placeholder="Type here..." id="message" name="message"></textarea>
</fieldset>
<?php require_once './contact.php'; ?>
<button class="btn btn-contact" type="submit" value="contact" name="contact">Submit</button>
</form>
</div>
</div>
</section>
<?php include 'src/inc/footer.php'; ?>
<script src="script/script.js"></script>
</body>
</html>