-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
48 lines (43 loc) · 1.67 KB
/
index.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
<!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">
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="assets/css/default.css" rel="stylesheet" >
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<?php
header("Content-type: text/html; charset=utf-8");
include "include/db_connect.php";
$count = $db->query("SELECT COUNT(1) FROM starred");
$row = mysqli_fetch_array($count);
$total = $row[0]; // Count numbers of rows
$results = $db->query("SELECT * FROM starred WHERE status=1 ORDER BY date DESC");
if ($results->num_rows != 0){
echo "<div class='page-header'><h2>Feedbin <small>starred items</small>";
echo " <span class='badge'>". $total ."</span></h2></div>";
while ($rows = $results->fetch_assoc()) {
$title = $rows['title'];
$date = $rows['date'];
$url = $rows['url'];
echo "<strong>$title</strong> <i class='fa fa-star'></i></br>";
echo "<a href='" . $url . "'>$url</a><br>";
echo "Date: " . gmdate("d M y", $date) . "<br><br>";
}
}
?>
</div>
<div class="col-md-2"></div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.14.2/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>