-
Notifications
You must be signed in to change notification settings - Fork 0
/
distcenters.php
203 lines (181 loc) · 9.14 KB
/
distcenters.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<?php
$db_host = "us-cdbr-east-06.cleardb.net";
$db_user = "bf913bab427a13";
$db_password = "5c3796bb";
$db_name = "heroku_3f1b3994b709799";
//Get Heroku ClearDB connection information
$cleardb_url = parse_url(getenv("CLEARDB_DATABASE_URL"));
$cleardb_server = $cleardb_url["host"];
$cleardb_username = $cleardb_url["user"];
$cleardb_password = $cleardb_url["pass"];
$cleardb_db = substr($cleardb_url["path"],1);
$active_group = 'default';
$query_builder = TRUE;
// Connect to DB
$conn = mysqli_connect($cleardb_server, $cleardb_username, $cleardb_password, $cleardb_db);
//check connection
if(!$conn){
die("connection failed");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- basic -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- mobile metas -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<!-- site metas -->
<title>Vaccine Distribution Centers</title>
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="author" content="">
<!-- bootstrap css -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- style css -->
<link rel="stylesheet" href="css/style.css">
<!-- Responsive-->
<link rel="stylesheet" href="css/responsive.css">
<!-- fevicon -->
<link rel="icon" href="images/fevicon.png" type="image/gif" />
<!-- Scrollbar Custom CSS -->
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
<link rel="stylesheet" href="css/owl.carousel.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css" media="screen">
<link rel="stylesheet" href="https://rawgit.com/LeshikJanz/libraries/master/Bootstrap/baguetteBox.min.css">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]-->
</head>
<!-- body -->
<body class="main-layout inner_page">
<!-- loader -->
<div class="loader_bg">
<div class="loader"><img src="images/loading.gif" alt="#"/></div>
</div>
<!-- end loader -->
<!-- top -->
<!-- header -->
<header class="header-area">
<div class="left">
<a href="Javascript:void(0)"><i class="fa fa-search" aria-hidden="true"></i></a>
</div>
<div class="right">
<a href="admin_index.php" ><i class="fa fa-home" aria-hidden="true"></i></a>
</div>
<div class="container">
<div class="row d_flex">
<div class="col-sm-3 logo_sm">
<div class="logo">
<a href="index.html"></a>
</div>
</div>
<div class="col-lg-10 offset-lg-1 col-md-12 col-sm-9">
<div class="navbar-area">
<nav class="site-navbar">
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="action.html">take action</a></li>
<li><a class="active" href="distcenters.php" class="logo_midle">centers</a></li>
<li><a href="news.html">News</a></li>
<li><a href="doctors.html">doctors</a></li>
<li><a href="contact.html">Contact </a></li>
</ul>
<button class="nav-toggler">
<span></span>
</button>
</nav>
</div>
</div>
</div>
</div>
</header>
<!-- end header -->
<br>
<br>
<br>
<div class="container">
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">Vaccine Distribution Centers
</div>
<div class="card-body">
<?php
$sql = "SELECT * FROM distributioncenter";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result)>0){
echo '<div class="table-responsive">';
echo '<table class="table table-bordered" id="dataTable" width="50%" cellspacing="0">';
echo '<thead>';
echo '<tr>';
echo '<th data-field>Center ID</th>';
echo '<th>Center Name</th>';
echo '<th>Phone Number</th>';
echo '<th>Email</th>';
echo '<th>City</th>';
echo '<th>Region</th>';
echo '</tr>';
echo '</thead>';
echo '</tbody>';
while($row = mysqli_fetch_assoc($result)){
echo '<tr>';
echo "<td>" .$row['centerID']. "</td>";
echo "<td>" .$row['name']. "</td>";
echo "<td>" .$row['telephone']. "</td>";
echo "<td>" .$row['email']. "</td>";
echo "<td>" .$row['city']. "</td>";
echo "<td>" .$row['region']. "</td>";
}
echo '</table>';
}
?>
</div>
</div>
</div>
<div class="container">
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">Branches
</div>
<div class="card-body">
<?php
$sql = "SELECT * FROM branch";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result)>0){
echo '<div class="table-responsive">';
echo '<table class="table table-bordered" id="dataTable" width="50%" cellspacing="0">';
echo '<thead>';
echo '<tr>';
echo '<th data-field>Branch Name</th>';
echo '<th data-field>Phone Number</th>';
echo '<th data-field>Email</th>';
echo '<th data-field>City</th>';
echo '<th data-field>Region</th>';
echo '</tr>';
echo '</thead>';
echo '</tbody>';
while($row = mysqli_fetch_assoc($result)){
echo '<tr>';
echo "<td>" .$row['name']. "</td>";
echo "<td>" .$row['telephone']. "</td>";
echo "<td>" .$row['email']. "</td>";
echo "<td>" .$row['city']. "</td>";
echo "<td>" .$row['region']. "</td>";
}
echo '</table>';
}
?>
</div>
</div>
</div>
<!-- Javascript files-->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.bundle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.8.1/baguetteBox.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/custom.js"></script>
</body>
</html>