-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathold-index.php
More file actions
336 lines (289 loc) · 11.6 KB
/
old-index.php
File metadata and controls
336 lines (289 loc) · 11.6 KB
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
<?php
// error_reporting(E_ALL);
// ini_set('display_errors', '1');
// ini_set('display_startup_errors', 1);
require './vendor/autoload.php'; # For Composer
// die('in the index.php');
// set_include_path(get_include_path() . PATH_SEPARATOR . './libraries/google-api-php-client/src'); # To get Access Tokens to work
require_once './application/config.php';
error_reporting(0);
// die('here');
// Controller
require './application/controllers/controller.php';
$controller = new Controller();
// Google Analytics
include_once './application/analyticstracking.php';
echo $google_analytics;
// Header
require_once './views/header.php';
$rows = $controller->getRows(); // rows
// var_dump($rows);
$teamMembers = array();
$teamName;
foreach ($rows as $row) {
$teamMember = array();
if (is_string($row)) {
$teamName = $row;
} else {
foreach ($row as $key => $value) {
$teamMember[$key] = $value;
$teamMember['team name'] = $teamName . ': ';
}
$teamMembers[] = $teamMember;
}
}
/*
* all form fields == hidden
* if github
* unhide all form fields except: name, email, and github
* if facebook
* unhide all form fields except: name, email, (possibly university, major, gender, date of birth)
* if email
* uhide all form fields
*
*/
?>
<!-- Social Like/Follow Buttons -->
<div class="top-left-social">
<!-- Facebook Like -->
<div class="fb-like" data-href="<?php echo FACEBOOK_URL; ?>" data-layout="button_count" data-action="like" data-show-faces="true" data-share=""></div>
<!-- Google+ Plus -->
<div class="g-follow" data-annotation="bubble" data-height="20" data-href="<?php echo GOOGLE_PLUS_URL; ?>" data-rel="publisher"></div>
<!-- Twitter Follow -->
<a href="<?php echo TWITTER_URL; ?>" class="twitter-follow-button" data-show-count="true">Follow @hackingedusf</a>
</div>
<div id="blog-switch"></div>
<div id="body">
<!-- MAIN IMAGE SECTION -->
<div id="home" class="headerwrap">
<div class="container">
<div class="row mg-bottom-7em">
<div class="col-lg-8 col-lg-offset-2">
<img class="marg-top-20 col-xs-12 col-sm-10 col-lg-10 col-sm-offset-1 col-lg-offset-1" alt="HackingEDU hackathon" src="./assets/img/hacklogo-white-no-border.png" alt="">
<div class="col-lg-10 col-lg-offset-1">
<h3 class="mobile-size">SF Bay Area</h3>
<h2 class="mobile-size">Invent the Future</h2>
</div>
<!-- HACKER APPLICATION -->
<a class="btn marg-left-6 col-lg-offset-2 col-md-offset-2 col-sm-offset-2 col-lg-3 col-sm-3 col-xs-12 main-btn apply-btn" href="#apply">Main Application</a>
<!-- <a type="button" class="btn btn-default" href="#hackerForm" data-toggle="tab">Hacker</a> -->
<!-- VOLUNTEER APPLICATION -->
<a class="btn col-lg-3 col-md-3 col-sm-3 col-xs-12 main-btn volunteer-btn" href="#apply">Volunteer</a>
<!-- SPONSOR APPLICATION -->
<a class="btn col-lg-3 col-md-3 col-sm-3 col-xs-12 main-btn sponsor-btn sponsor-btn-pad" href="#apply">Sponsor</a>
<div class="spacer"></div>
</div>
</div><!-- row -->
</div><!-- /container -->
</div><!-- /headerwrap -->
<div id="fb-root"></div>
<!-- ABOUT -->
<?php require_once './views/about.php'; ?>
<!-- APPLICATION FORMS -->
<?php require_once './views/formSignUp.php'; ?>
<!-- RULES -->
<?php require_once './views/rules.php'; ?>
<!-- SCHEDULE -->
<?php require_once './views/schedule.php'; ?>
<!-- CALL TO ACTION -->
<?php require_once './views/sponsors.php'; ?>
<!-- STAY CONNECTED -->
<?php require_once './views/stayConnected.php'; ?>
<!-- SOCIAL FOOTER -->
<?php require_once './views/socialFooter.php'; ?>
<!-- TEAM -->
<?php require_once './views/team.php'; ?>
</div>
<!-- Contact Form Modal -->
<?php require_once './views/formContact.php'; ?>
<!-- Levels of Sponsorship Modal -->
<?php require_once './views/sponsorshipLevelsModal.php'; ?>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="assets/js/jquery.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/main.js"></script>
<script src="assets/js/masonry.pkgd.min.js"></script>
<script src="assets/js/imagesloaded.js"></script>
<script src="assets/js/classie.js"></script>
<script src="assets/js/AnimOnScroll.js"></script>
<!-- SOCIAL MEDIA BUTTONS @ TOP -->
<!-- Google+ Plus Button / Follow Button -->
<script src="https://apis.google.com/js/platform.js" async defer></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<!-- <script src="http://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js"></script>
<script src="assets/js/bootstrap-image-gallery.min.js"></script>
<script src="./libraries/flexisel-master/js/jquery.flexisel.js"></script>
<script src="./libraries/Smooth-Div-Scroll/js/jquery.kinetic.min.js"></script>
<script src="./libraries/Smooth-Div-Scroll/js/jquery.smoothdivscroll-1.3-min.js"></script>
<script src="./libraries/Smooth-Div-Scroll/js/jquery.mousewheel.min.js"></script>
<script src="./libraries/Smooth-Div-Scroll/js/source/jquery.smoothDivScroll-1.3.js"></script>
<script src="./libraries/Smooth-Div-Scroll/js/source/jquery-ui-1.10.3.custom.js"></script> -->
<!-- jQuery 1.7+ -->
<script src="./libraries/owl.carousel/assets/js/jquery-1.9.1.min.js"></script>
<!-- Include js plugin -->
<script src="./libraries/owl.carousel/owl-carousel/owl.carousel.js"></script>
<script src="./assets/js/EmailConfirmation.js"></script>
<script>
// $(function () {
// animateOnScroll();
// });
// DIRECT TO CORRECT FORM
$(document).ready(function() {
$('.apply-btn').click(function() {
$('ul.panel-tabs li.active').removeClass('active');
$('ul.panel-tabs li.hackerSignup').addClass('active');
$('div.tab-pane.active').removeClass('active');
$('div.tab-pane.hackerSignup').addClass('active');
});
$('.volunteer-btn').click(function() {
$('ul.panel-tabs li.active').removeClass('active');
$('ul.panel-tabs li.volunteerSignup').addClass('active');
$('div.tab-pane.active').removeClass('active');
$('div.tab-pane.volunteerSignup').addClass('active');
});
$('.sponsor-btn').click(function() {
$('ul.panel-tabs li.active').removeClass('active');
$('ul.panel-tabs li.sponsorSignup').addClass('active');
$('div.tab-pane.active').removeClass('active');
$('div.tab-pane.sponsorSignup').addClass('active');
});
});
// Remove the Social Links that aren't used for Team Profiles!
$.fn.exists = function () {
return this.length !== 0;
}
$(document).ready(function() {
if ($('a[href*="N/A"]').exists()) { // hiding twitter if they don't have a value
$('a[href*="N/A"]').addClass('hidden');
}
if ($('a[href*=" "]').exists()) { // hiding linkedin if they don't have a value
$('a[href*=" "]').addClass('hidden');
};
});
// Form Change Business + Technical
function business () {
$('input[placeholder="Alexander the Hacker"]').attr("placeholder", "Alexander the Businessman");
$('input[placeholder="Computer Science"]').attr("placeholder", "Business");
$('input[placeholder="@your_github_username"]').nextAll().eq(1).text("N/A if not applicable");
}
function technical () {
$('input[placeholder="Alexander the Businessman"]').attr("placeholder", "Alexander the Hacker");
$('input[placeholder="Business"]').attr("placeholder", "Computer Science");
$('input[placeholder="@your_github_username"]').nextAll().eq(1).text("required");
}
//Email confirmation handlers (on form submission)
function hackerConfirmation() {
var radios = $('form input[type=radio]:checked', '#hackerForm');
var data = {
type: $(radios[0]).val(),
name: $('#entry_1672223234').val(),
email: $('#entry_2114170671').val(),
major: $('#entry_74476949').val(),
school: $('#entry_1717680027').val(),
gender: $(radios[1]).val(),
grade: $(radios[2]).val(),
firstHackathon: $(radios[3]).val(),
githubUsername: $('#entry_1542160184').val(),
linkedinUrl: $('#entry_1161751270').val(),
shirtSize: $(radios[4]).val(),
reimbursement: $(radios[5]).val(),
idea: $('#entry_1146393786').val()
};
EmailConfirm.hacker(data);
}
function sponsorConfirmation() {
var radios = $('form input[type=radio]:checked', '#sponsorForm');
var data = {
sponsorName: $('#entry_1407218381').val(),
contactName: $('#entry_1410046818').val(),
email: $('#entry_359855923').val(),
phone: $('#entry_1077658725').val(),
level: $(radios[0]).val()
};
EmailConfirm.sponsor(data);
}
function volunteerConfirmation() {
var radios = $('form input[type=radio]:checked', '#volunteerForm');
var data = {
name: $('#entry_1518263597').val(),
email: $('#entry_2004162391').val(),
mentor: $(radios[0]).val(),
shirtSize: $(radios[1]).val(),
company: $('#entry_68404305').val(),
school: $('#entry_2127045771').val()
};
EmailConfirm.volunteer(data);
}
// Animations for the sponsors!
// $(document).ready(function() {
// $("#owl-example").owlCarousel({
// //Autoplay
// autoPlay : true,
// stopOnHover : true,
// // Navigation
// navigation : false,
// //Basic Speeds
// slideSpeed : 700,
// rewindSpeed : 1000
// });
// $("#owl-example2").owlCarousel({
// //Autoplay
// autoPlay : true,
// stopOnHover : true,
// //Basic Speeds
// slideSpeed : 300,
// rewindSpeed : 500
// });
// });
// -- Bootstrap slider
$(document).ready(function() {
$('#media').carousel({
pause: true,
interval: false,
});
});
// Facebook Like Button
window.fbAsyncInit = function() {
FB.init({
appId : '{your-app-id}',
xfbml : true,
version : 'v2.0'
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
// Twitter Follow Button
!function(d,s,id){
var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){
js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);
}
}(document, 'script', 'twitter-wjs');
// ANIMATIONS ON SCROLL
new AnimOnScroll( document.getElementById( 'grid' ), {
minDuration : 0.4,
maxDuration : 0.7,
viewportFactor : 0.2
} );
new AnimOnScroll( document.getElementById( 'process' ), {
minDuration : 0.4,
maxDuration : 0.7,
viewportFactor : 0.2
} );
</script>
</body>
</html>