forked from hakimel/reveal.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
poll.php
200 lines (181 loc) · 5.04 KB
/
poll.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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<!doctype html>
<? if ( $_POST['submit'] && $_POST['nobots'] == '' ) {
// Process Form
$_POST['dataviz'] = serialize($_POST['dataviz']);
unset($_POST['submit']);
unset($_POST['nobots']);
$completed = true;
$fp = fopen('results.csv', 'a');
fputcsv($fp, $_POST);
fclose($fp);
} ?>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Highcharts How-To - ONA14</title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="css/reveal.min.css">
<link rel="stylesheet" href="css/theme/default.css" id="theme">
<!-- For syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<style>
html, body {
width: auto;
height: auto;
overflow: auto;
}
a {
color:#13DAEC;
}
form {
color: #FFF;
width: 80%;
margin: 20px auto 100px;
font-family: "Lato", sans-serif;
font-size: 1.4em;
max-width:400px;
line-height: 1.4;
}
form div {
margin-bottom:30px;
}
label {
display:block;
}
.click {
cursor:pointer;
padding-top: 8px;
}
.click span {
width: 17px;
height: 17px;
border:1px solid black;
border-radius: 50%;
background: #eee;
display: inline-block;
margin-right: 10px;
position: relative;
top: 2px;
}
input[type=checkbox]:checked + span {
background: #46A23E;
-webkit-box-shadow: inset 0px 0px 5px 0px rgba(0,0,0,0.75);
-moz-box-shadow: inset 0px 0px 5px 0px rgba(0,0,0,0.75);
box-shadow: inset 0px 0px 5px 0px rgba(0,0,0,0.75);
}
input[type="checkbox"] {
position: absolute;
left: -150000px
}
select {
font-size: 1em;
background: #FFF;
display: block;
margin: 10px 0 0;
width: 100%;
}
input[type=text] {
font-size: 0.9em;
padding: 5px 2%;
border-radius: 6px;
border: 1px solid #CCC;
margin-top: 10px;
width: 96%;
}
input[type="submit"] {
width: 100%;
padding: 11px;
font-size: 0.8em;
background: #C2C2C2;
border: 1px solid #333;
border-radius: 6px;
color: #FFF;
text-shadow: -1px -1px 0px #777;
text-transform: uppercase;
}
input[type="submit"]:hover {
background:#B8B8B8;
}
input[type="submit"]:active {
position: relative;
left:1px;
top:1px;
outline: 0;
}
</style>
</head>
<body>
<? if ( $completed == true ) { ?>
<form>
<h3>You rock</h3>
<p>Thanks for taking the <a href="http://ona14.journalists.org/sessions/highcharts/#.VA8c3WRdW-U">Highcharts How-To</a> poll. I hope to see you in the session!</p>
<p>See up-to-the-minute results on the <a href="http://www.adamnekola.com/slides/highcharts/dashboard.php">dashboard</a>, or wait to see them in the session.</p>
</form>
<? } else { ?>
<form method="post">
<h3>Dataviz poll</h3>
<p></p>
<div>
<label>Have you ever used Highcharts?</label>
<select name="highcharts">
<option></option>
<option>Yes</option>
<option>No</option>
</select>
</div>
<div>
<label>What other tools have you used for data visualization?</label>
<label class="click"><input type="checkbox" name="dataviz[]" value="Google Charts"><span></span>Google Charts</label>
<label class="click"><input type="checkbox" name="dataviz[]" value="D3.js"><span></span>D3.js</label>
<label class="click"><input type="checkbox" name="dataviz[]" value="Raphael.js"><span></span>Raphael.js</label>
<label class="click"><input type="checkbox" name="dataviz[]" value="Mapbox"><span></span>Mapbox</label>
<label class="click"><input type="checkbox" name="dataviz[]" value="Leaflet"><span></span>Leaflet</label>
<label class="click"><input type="checkbox" name="dataviz[]" value="CartoDB"><span></span>CartoDB</label>
</div>
<div>
<label>How well do you know Javascript or jQuery?</label>
<select name="javascript">
<option></option>
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
</select>
</div>
<div>
<label>What CMS does your organization use?</label>
<select name="cms">
<option></option>
<option>WordPress</option>
<option>Drupal</option>
<option>Joomla</option>
<option>Other</option>
</select>
</div>
<div>
<label>If other, please enter name of CMS:</label>
<input type="text" name="cms_other" placeholder="Optional" />
</div>
<div>
<label>Are you going to the Highcharts session on Saturday?</label>
<select name="attendance">
<option></option>
<option>Yes</option>
<option>No</option>
</select>
</div>
<input type="submit" name="submit" value="Submit your answers" />
<input type="hidden" name="nobots" value="" />
</form>
<? } ?>
</body>
</html>