-
Notifications
You must be signed in to change notification settings - Fork 1
/
dashboard.php
157 lines (124 loc) · 4.99 KB
/
dashboard.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
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<style>
#sidebar{position:relative;margin-top:-20px}
#content{position:relative;margin-left:210px}
@media screen and (max-width: 600px) {
#content {
position:relative;margin-left:auto;margin-right:auto;
}
}
.block-anchor {
color:red;
cursor: pointer;
}
</style>
</head>
<body style="color:black;" >
<?php
include 'conn.php';
include 'session.php';
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true) {
?>
<div id="header">
<?php include 'header.php';
?>
</div>
<div id="sidebar">
<?php
$active="dashboard";
include 'sidebar.php'; ?>
</div>
<div id="content">
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12 lg-12 sm-12">
<h1 class="page-title">Dashboard</h1>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<div class="panel panel-default panel-info" style="border-radius:50px;">
<div class="panel-body panel-info bk-primary text-light" style="background-color:#D6EAF8; border-radius:50px">
<div class="stat-panel text-center">
<?php
$sql =" SELECT * from donor_details ";
$result=mysqli_query($conn,$sql) or die("query failed.");
$row=mysqli_num_rows($result);
?>
<div class="stat-panel-number h1"><?php echo $row?></div>
<div class="stat-panel-title text-uppercase">Blood Donors Available </div>
<br>
<button class="btn btn-danger" onclick="window.location.href = 'donor_list.php';">
Full Detail <i class="fa fa-arrow-right"></i>
</button>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default panel-info" style="border-radius:50px;">
<div class="panel-body panel-info bk-primary text-light" style="background-color:#ABEBC6;border-radius:50px;">
<div class="stat-panel text-center">
<?php
$sql1 =" SELECT * from contact_query ";
$result1=mysqli_query($conn,$sql1) or die("query failed.");
$row1=mysqli_num_rows($result1);
?>
<div class="stat-panel-number h1 "><?php echo $row1?></div>
<div class="stat-panel-title text-uppercase"> All User Queries </div>
<br>
<button class="btn btn-danger" onclick="window.location.href = 'query.php';">
Full Detail <i class="fa fa-arrow-right"></i>
</button>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default panel-info" style="border-radius:50px;">
<div class="panel-body panel-info bk-primary text-light" style="background-color:#E8DAEF ;border-radius:50px; ">
<div class="stat-panel text-center">
<?php
$sql2 ="SELECT * from contact_query where query_status=2 ";
$result2=mysqli_query($conn,$sql2) or die("query failed.");
$row2=mysqli_num_rows($result2);
?>
<div class="stat-panel-number h1 "><?php echo $row2 ?></div>
<div class="stat-panel-title text-uppercase"> Pending Queries </div>
<br>
<button class="btn btn-danger" onclick="window.location.href = 'pending_query.php';">
Full Detail <i class="fa fa-arrow-right"></i>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
} else {
echo '<div class="alert alert-danger"><b> Please Login First To Access Admin Portal.</b></div>';
?>
<form method="post" name="" action="login.php" class="form-horizontal">
<div class="form-group">
<div class="col-sm-8 col-sm-offset-4" style="float:left">
<button class="btn btn-primary" name="submit" type="submit">Go to Login Page</button>
</div>
</div>
</form>
<?php }
?>
</body>
</html>