-
Notifications
You must be signed in to change notification settings - Fork 0
/
driver.php
129 lines (122 loc) · 5.74 KB
/
driver.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Your Orders</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 your available assignemnts....
<i class="fa fa-car" aria-hidden="true"></i>
</div>
</div>
<div class="limiter">
<div class="container-login100">
<div class="wrap-login100">
<span class="login100-form-title">
<h1>Driver Dashboard</h1>
</span>
<span class="login100-form-title">
<h3>John Doe #129APO9027BP</h3>
</span>
<div id="navbar">
<button class="btn btn-success" onclick="loadTable('table-driver-list.php')">Queued Rides</button>
<button class="btn btn-success" onclick="loadTable('table-driver-accepted.php')">Accepted Rides</button>
<a href="logout.php"><button class ="btn btn-danger">Logout </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>Today Completed Ride:</b> 10 <b>Car returned:</b> 8</p>
</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>
</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>