-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
171 lines (147 loc) · 5.6 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<!DOCTYPE html>
<html>
<?php require("includes/head.php"); ?>
<body>
<?php require("includes/header.php"); ?>
<section class="content-container">
<ul class="small-block-grid-1 medium-block-grid-2 large-block-grid-2">
<li class="candidate">
<img src="images/cropped/hillary-clinton.jpg" alt="Hillary Clinton" >
<h3>Hillary Clinton</h3>, <h4>Democrat</h4>
<h5>Former U.S. Secretary of State, Former Senator from New York</h5>
<ul>
<?php
$results = $db->query("SELECT * FROM app_data WHERE candidate = 'Hillary Clinton'");
require("includes/quote_loop.php");
?>
</ul>
<div class="drawer-toggle"></div>
</li>
<li class="candidate">
<img src="images/cropped/ben-carson.jpg" alt="Ben Carson" >
<h3>Ben Carson</h3>, <h4>Republican</h4>
<h5>Former Director of Pediatric Neurosurgery at Johns Hopkins Hospital</h5>
<ul>
<?php
$results = $db->query("SELECT * FROM app_data WHERE candidate = 'Ben Carson'");
require("includes/quote_loop.php");
?>
</ul>
<div class="drawer-toggle"></div>
</li>
<li class="candidate">
<img src="images/cropped/bernie-sanders.jpg" alt="Bernie Sanders" >
<h3>Bernie Sanders</h3>, <h4>Democrat</h4>
<h5>Senator from Vermont, Former member of the Vermont House of Representatives</h5>
<ul>
<?php
$results = $db->query("SELECT * FROM app_data WHERE candidate = 'Bernie Sanders'");
require("includes/quote_loop.php");
?>
</ul>
<div class="drawer-toggle"></div>
</li>
<li class="candidate">
<img src="images/cropped/donald-trump.jpg" alt="Donald Trump" >
<h3>Donald Trump</h3>, <h4>Republican</h4>
<h5>Chairman and President of The Trump Organization, Chairman of Trump Plaza Associates, LLC, Chairman of Trump Atlantic City Associates, Host of NBC reality show 'The Apprentice'</h5>
<ul>
<?php
$results = $db->query("SELECT * FROM app_data WHERE candidate = 'Donald Trump'");
require("includes/quote_loop.php");
?>
</ul>
<div class="drawer-toggle"></div>
</li>
<li class="candidate">
<img src="images/cropped/martin-omalley.jpg" alt="Martin O'Malley" >
<h3>Martin O'Malley</h3>, <h4>Democrat</h4>
<h5>Former Governor of Maryland</h5>
<ul>
<?php
$results = $db->query("SELECT * FROM app_data WHERE candidate = 'Martin O\'Malley'");
require("includes/quote_loop.php");
?>
</ul>
<div class="drawer-toggle"></div>
</li>
<li class="candidate">
<img src="images/cropped/marco-rubio.jpg" alt="Marco Rubio" >
<h3>Marco Rubio</h3>, <h4>Republican</h4>
<h5>Senator from Florida, Former Speaker of the Florida House of Representatives</h5>
<ul>
<?php
$results = $db->query("SELECT * FROM app_data WHERE candidate = 'Marco Rubio'");
require("includes/quote_loop.php");
?>
</ul>
<div class="drawer-toggle"></div>
</li>
<li class="candidate">
<img src="images/cropped/lawrence-lessig.jpg" alt="Lawrence Lessig" >
<h3>Lawrence Lessig</h3>, <h4>Democrat</h4>
<h5>Professor of Law at Harvard Law School, Founder of Creative Commons</h5>
<ul>
<?php
$results = $db->query("SELECT * FROM app_data WHERE candidate = 'Lawrence Lessig'");
require("includes/quote_loop.php");
?>
</ul>
<div class="drawer-toggle"></div>
</li>
<li class="candidate">
<img src="images/cropped/jeb-bush.jpg" alt="Jeb Bush" >
<h3>Jeb Bush</h3>, <h4>Republican</h4>
<h5>Governor of Florida</h5>
<ul>
<?php
$results = $db->query("SELECT * FROM app_data WHERE candidate = 'Jeb Bush'");
require("includes/quote_loop.php");
?>
</ul>
<div class="drawer-toggle"></div>
</li>
</ul>
<ul class="small-block-grid-1 medium-block-grid-2 large-block-grid-2 polls-links">
<li class="polls-link">
<a href="http://elections.huffingtonpost.com/pollster/2016-national-democratic-primary" class="blue">
2016 National Democratic Primary Polls
</a>
</li>
<li class="polls-link">
<a href="http://elections.huffingtonpost.com/pollster/2016-national-gop-primary">
2016 National GOP Primary Polls
</a>
</li>
</ul>
</section>
<section class="add-quote">
<button>Add a Quote!</button>
</section>
<section class="form-section">
<form method='POST' action='includes/add_quote.php' id='new-quote-form'>
<label><strong>Who</strong> said it? *</label>
<select name="candidate" required>
<option value="">Select Candidate</option>
<option value="Hillary Clinton">Hillary Clinton</option>
<option value="Ben Carson">Ben Carson</option>
<option value="Bernie Sanders">Bernie Sanders</option>
<option value="Donald Trump">Donald Trump</option>
<option value="Martin O'Malley">Martin O'Malley</option>
<option value="Marco Rubio">Marco Rubio</option>
<option value="Lawrence Lessig">Lawrence Lessig</option>
<option value="Jeb Bush">Jeb Bush</option>
</select>
<label><strong>What</strong> did he or she say? *</label>
<textarea type="text" name="quote" required></textarea>
<label><strong>Where</strong> did he or she say it? *</label>
<input type="text" name="source" required ></input>
<label><strong>When</strong> was it from? *</label>
<input type="text" name="date" required ></input>
<label>* required</label>
<input type="submit" value="Submit"></input>
</form>
</section>
<?php require("includes/footer.php"); ?>
</body>
</html>