-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbin_log.php
executable file
·81 lines (54 loc) · 1.55 KB
/
bin_log.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
<?php
$mysqli = new mysqli("localhost", "root", "", "dustbin");
if ($mysqli->connect_errno) {
echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
}
$querr = $mysqli->prepare("SELECT * FROM bin_log ORDER BY `bin_log`.`date_is`");
$querr->execute();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>E-garbage log</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
</head>
<style type="text/css">
#bin_log
{
margin-top: 10%;
}
h3
{
text-align: center;
background-color: lavender;
}
</style>
<?php include 'header_nex.php';?>
<body style="background-color:rgba(58, 146, 213,.5);padding:50px;">
<div class="container">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8 well" id="bin_log">
<?php foreach ($querr->get_result() as $row)
{
?>
<h3><?php echo $row['bin_name']." was full on ".$row['date_is'].'.<br/>'; ?></h3> <hr>
<?php
}
?>
</div>
<div class="col-md-2"></div>
</div>
</div>
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>