-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
111 lines (109 loc) · 5.55 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
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
<?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="shortcut icon" href="favicon.ico" type="image/x-icon">
<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-four-fifths">
<?php
require 'classes/DB.class.php';
try {
$db = new DB();
$db->fetchArticles();
} catch (Exception $e) {
die ('???');
}
?>
</div>
</div>
</body>
</html>