/
bookmarks.php
53 lines (46 loc) · 1.6 KB
/
bookmarks.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
<?php
include 'util/loginCheck.php';
?>
<!DOCTYPE html>
<html>
<head>
<?php include 'includes/globalHead.html' ?>
<link rel="stylesheet" href="res/css/profile.css">
<link rel="stylesheet" href="res/css/profileNav.css">
</head>
<body>
<?php
include 'includes/header.php';
include 'includes/nav.php';
include 'includes/profileHeader.php';
?>
<div class="nav">
<?php
$current = 'bookmarks';
include 'includes/profileNav.php';
?>
</div>
<div class="display">
<h1>Bookmarks</h1>
<?php
$bookmarks = getUserBookmarks($userid, null, null, $db);
if($bookmarks === null) {
print "<div class=\"columnError\">No bookmarks yet.</div>";
return;
}
foreach($bookmarks as $article) {
print "
<article>
<div class=\"thumbnailSecondary\">
<a href=\"article.php?articleid={$article['ArticleID']}\"><img src=\"{$article['ArticleImage']}\" width=\"150\" height=\"100\"></a>
</div>
<div class=\"textSecondary\">
<h2 class=\"secHeadlineSecondary\"><a href=\"article.php?articleid={$article['ArticleID']}\">{$article['Headline']}</a></h2>
<p>".substr($article['Body'], 0, 75)."...</p>
</div>
</article>"; }
?>
</div>
<?php include 'includes/footer.html'; ?>
</body>
</html>