-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathadmin.php
151 lines (131 loc) · 4.69 KB
/
admin.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
<?php
include('adhead.php');
if(!isset($_SESSION['userdata']))
{
header('Location: index.php');
}
if($_SESSION['userdata']['is_admin']==1){
include('adsidebar.php'); ?>
<h3 class="text-center">Welcome <?php echo $_SESSION['userdata']['username']; ?></h3>
<div class="row pl-lg-5">
<div class="col-sm-6 col-lg-3">
<div class="card bg-success text-center">
<div class="card-body">
<h5 class="card-title ">All Rides</h5>
<p class="card-text font-weight-bold text-dark h1">
<?php
$adm = new adminwrk();
$admc = new dbcon();
$cn = $adm->countride($admc->conn);
print_r($cn); ?></p>
<a href="allrides.php" class="btn btn-primary green">Go To</a>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3 ">
<div class="card bg-warning text-center">
<div class="card-body">
<h5 class="card-title">Pending Rides</h5>
<p class="card-text font-weight-bold text-dark h1">
<?php
$cn = $adm->pcountride($admc->conn);
print_r($cn); ?></p>
<a href="apenride.php" class="btn btn-primary green">Go To</a>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3 ">
<div class="card bg-info text-center">
<div class="card-body">
<h5 class="card-title">Completed Rides</h5>
<p class="card-text font-weight-bold text-dark h1">
<?php
$cn = $adm->cocountride($admc->conn);
print_r($cn); ?></p>
<a href="acomride.php" class="btn btn-primary green">Go To</a>
</div>
</div>
</div>
</div>
<div class="row pt-4 pl-lg-5">
<div class="col-sm-6 col-lg-3 ">
<div class="card bg-success text-center">
<div class="card-body">
<h5 class="card-title">Cancelled Rides</h5>
<p class="card-text font-weight-bold text-dark h1">
<?php
$cn = $adm->cacountride($admc->conn);
print_r($cn); ?></p>
<a href="acanride.php" href="allrides.php#penr" class="btn btn-primary green">Go To</a>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3 ">
<div class="card bg-warning text-center">
<div class="card-body">
<h5 class="card-title">Total Earning</h5>
<p class="card-text font-weight-bold text-dark h1">
<?php
$en = $adm->earn($admc->conn);
?>₹<?php echo $en; ?></p>
<p>Earning of completed Rides</p>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3 ">
<div class="card bg-info text-center">
<div class="card-body">
<h5 class="card-title">Total Users</h5>
<p class="card-text font-weight-bold text-dark h1">
<?php
$us = $adm->countuser($admc->conn);
echo $us; ?></p>
<a href="allusers.php" class="btn btn-primary green">Go To</a>
</div>
</div>
</div>
</div>
<div class="row pt-4 pl-lg-5">
<div class="col-sm-6 col-lg-3 ">
<div class="card bg-success text-center">
<div class="card-body">
<h5 class="card-title">Approved Users</h5>
<p class="card-text font-weight-bold text-dark h1">
<?php
$au = $adm->acountuser($admc->conn);
print_r($au); ?></p>
<a href="aprovedusr.php" class="btn btn-primary green">Go To</a>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3 ">
<div class="card bg-warning text-center">
<div class="card-body">
<h5 class="card-title">Pending Users</h5>
<p class="card-text font-weight-bold text-dark h1">
<?php
$pu = $adm->pcountuser($admc->conn);
echo $pu; ?></p>
<a href="aprove.php" class="btn btn-primary green">Go To</a>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3 ">
<div class="card bg-info text-center">
<div class="card-body">
<h5 class="card-title">All Locations</h5>
<p class="card-text font-weight-bold text-dark h1">
<?php
$lc = $adm->countloc($admc->conn);
echo $lc; ?></p>
<a href="addlocation.php" class="btn btn-primary green">Go To</a>
</div>
</div>
</div>
</div>
<?php
}
else{
echo '<h1 class="text-center text-weight-bold text-dark">You Are not Authorised</h1>';
}
include('adfoot.php'); ?>