-
Notifications
You must be signed in to change notification settings - Fork 0
/
manager.php
159 lines (145 loc) · 7.03 KB
/
manager.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
155
156
157
158
159
<!DOCTYPE html>
<html lang="en">
<head>
<title>Ride List</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--===============================================================================================-->
<link rel="icon" type="image/png" href="images/icons/car (2).png"/>
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/animate/animate.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/css-hamburgers/hamburgers.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="css/util.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<!--===============================================================================================-->
<style>
/* Add CSS styles for positioning the image */
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh; /* Make the container fill the viewport height */
}
table {
border-collapse: collapse;
width: 120%; /* Adjust the width as needed */
border: 1px solid #000; /* Border style */
}
th, td {
border: 1px solid #000; /* Border style for table cells */
padding: 8px; /* Add padding for cell content */
text-align: center; /* Center align cell content */
}
th {
background-color: #f2f2f2; /* Background color for table header */
}
.info-box {
border: 1px solid #ccc;
padding: 20px;
width: 120%; /* Match the width of the table */
}
/* Container to group the table and info box */
.table-container {
display: flex;
justify-content: space-between;
align-items: flex-start;
}
</style>
</head>
<body>
<div id="loading-overlay">
<div id="loading-icon"></div>
<div id="loading-text">Please Wait while System is fetching all ride details....
<i class="fa fa-search-plus" aria-hidden="true"></i>
</div>
</div>
<div class="limiter">
<div class="container-login100">
<div class="wrap-login100">
<span class="login100-form-title">
<h1>Manager Dashboard</h1>
</span>
<div id="navbar">
<button class="btn btn-success" onclick="loadTable('table-ordered-ride.php')">Ordered Rides</button>
<button class="btn btn-success" onclick="loadTable('table-accepted-ride.php')">Accepted Rides</button>
<button class="btn btn-success" onclick="loadTable('table-completed-ride.php')">Completed Rides</button>
<button class="btn btn-success" onclick="loadTable('table-final-fare.php')">Fare Generate</button>
<a href="logout.php"><button class ="btn btn-danger">Log Out Sytem</button></a>
<!-- Add more buttons for other tables as needed -->
</div>
<div id="reloadtable" class="table-container">
</div>
<script>
function loadTable(tableUrl) {
var container = document.getElementById("reloadtable");
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
container.innerHTML = xhr.responseText;
}
};
xhr.open("GET", tableUrl, true);
xhr.send();
}
loadTable(tableUrl);
setInterval(loadTable, 5000);
</script>
<div class="info-box">
<!--<p><b>Available Number of Cars: </b>10 <b>Available Number of Drivers: </b>8</p> -->
<div class="container-login100-form-btn2">
<a target="_blank" href="http://localhost:8080/phpmyadmin/index.php?route=/database/structure&db=database_form"
<button class="btn login100-form-btn2-diff">
myPHPadmin Console
<i class="fa fa-long-arrow-right m-l-5" aria-hidden="true"></i>
</button></a>
</div>
</div>
</div>
</div>
</div>
<link rel="stylesheet" type="text/css" href="css/loading.css">
<!--===============================================================================================-->
<script src="vendor/jquery/jquery-3.2.1.min.js"></script>
<!--===============================================================================================-->
<script src="vendor/bootstrap/js/popper.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<!--===============================================================================================-->
<script src="vendor/select2/select2.min.js"></script>
<!--===============================================================================================-->
<script src="vendor/tilt/tilt.jquery.min.js"></script>
<!--===============================================================================================-->
<script src="js/main.js"></script>
<script src="js/loadingscript.js"></script>
<!-- <script>
function loadTable(tableurl) {
// Use AJAX to load new table content
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
document.getElementById("reloadtable").innerHTML = xhr.responseText;
}
};
xhr.open("GET", tableurl , true); // Replace with the URL of your PHP script
xhr.send();
}
// Call the function initially and set a reload interval (e.g., every 5 seconds)
reloadTable();
setInterval(reloadTable, 5000); // 5000 milliseconds = 5 seconds
</script>
-->
</body>
<footer>
<p>Author: Pankaj Goel, Sankalpa Pramanik, Sewanti Dutta, Ritabrata Dey</p>
<p> Made as part of Software Engineering project (PCC-CS591)</p>
<p><a href="mailto:[email protected]"></a></p>
</footer>
</html>