-
Notifications
You must be signed in to change notification settings - Fork 1
/
content.php
120 lines (118 loc) · 5.5 KB
/
content.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
<?php session_name('atn'); session_start(); ?>
<!doctype html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title>All The News!</title>
<link rel="stylesheet" href="./assets/styles/bulma.css">
<link href="https://fonts.googleapis.com/css?family=Libre+Barcode+128+Text" rel="stylesheet">
<script defer src="./assets/scripts/all.js"></script>
</head>
<body class="container">
<br>
<div class="columns">
<aside class="column is-one-fifth">
<div>
<a class="navbar-content" href="https://dishantmishra.me/all-the-news" style="font-family: 'Libre Barcode 128 Text', 'Helvetica Neue', Helvetica, Arial, serif; background-color: #222;">
<h1 class="subtitle is-1">All The News!</h1>
</a>
<br>
<form method="post" action="search.php">
<div class="field">
<label class="label">SEARCH</label>
<div class="control">
<p class="control has-icons-left has-icons-right">
<input class="input is-small is" type="text" placeholder="Search Titles" name="term">
<span class="icon is-small is-left">
<i class="fas fa-search"></i>
</span>
</p>
<div style="min-height: 10px"></div>
<p>
<input class="is-hidden" name="type" value="title">
<input type="submit" class="button is-small is-dark" value="search">
</p>
</div>
</div>
</form>
<br>
<form method="post" action="search.php">
<div class="field">
<div class="control">
<p class="control has-icons-left has-icons-right">
<input class="input is-small is" type="text" placeholder="Search Content" name="term">
<span class="icon is-small is-left">
<i class="fas fa-search"></i>
</span>
</p>
<div style="min-height: 10px"></div>
<p>
<input class="is-hidden" name="type" value="content">
<input type="submit" class="button is-small is-dark" value="search">
</p>
</div>
</div>
</form>
<br>
<form method="post" action="search.php">
<div class="field">
<div class="control">
<p class="control has-icons-left has-icons-right">
<input class="input is-small is" type="text" placeholder="Search Authors" name="term">
<span class="icon is-small is-left">
<i class="fas fa-search"></i>
</span>
</p>
<div style="min-height: 10px"></div>
<p>
<input class="is-hidden" name="type" value="author">
<input type="submit" class="button is-small is-dark" value="search">
</p>
</div>
</div>
</form>
<br>
<form method="post" action="search.php">
<div class="field">
<div class="control">
<p class="control has-icons-left has-icons-right">
<input class="input is-small is" type="text" placeholder="Search Publication" name="term">
<span class="icon is-small is-left">
<i class="fas fa-search"></i>
</span>
</p>
<div style="min-height: 10px"></div>
<p>
<input class="is-hidden" name="type" value="publication">
<input type="submit" class="button is-small is-dark" value="search">
</p>
</div>
</div>
</form>
</div>
</aside>
<div class="column is-three-fifths">
<?php
require './classes/DB.class.php';
$db = new DB();
$db->selectArticle($_GET['id']);
?>
</div>
<div class="column is-one-fifth">
<form method="post" action="assets/scripts/commentAction.php">
<label for="name" class="label">Name</label>
<input type="text" class="input is-small" name="name" id="name" placeholder="your name"><br>
<label for="comment" class="label">Comment</label>
<textarea class="textarea is-small" name="comment" id="comment" placeholder="comments" rows="10"></textarea><div style="min-height: 10px"></div>
<input name="id" value="<?php echo $_GET['id'] ?>" class="is-hidden">
<input type="submit" class="button is-small is-dark" value="Submit">
</form>
<br>
<?php
$db->fetchComments($_GET['id']);
?>
</div>
</div>
</body>
</html>