-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.php
74 lines (66 loc) · 1.68 KB
/
footer.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
<footer>
<div class="row">
<div id="footer" class="small-12 columns">
<p>© 2013 Team ¼ Brown @ Y-Hacks. Go UMD!</p>
</div>
</div>
</footer>
<div id="success-modal" class="reveal-modal">
<h2>Added synopsis successfully!</h2>
<p><a id="success-modal-link" href="">View your submission here</a></p>
<a class="close-reveal-modal">×</a>
</div>
<script src="js/foundation.min.js"></script>
<script>
$(document).foundation();
$(document).ready(function() {
$('#login').click(function() {
$.ajax({
type: "POST",
url: 'php/login.php',
data: "username=admin",
success: function(data) {
data = $.parseJSON(data);
if(data.hasOwnProperty("success")) {
window.location = window.location;
}
}
});
});
$('#logout').click(function() {
$.ajax({
type: "GET",
url: 'php/logout.php',
success: function(data) {
data = $.parseJSON(data);
if(data.hasOwnProperty("success")) {
window.location = window.location;
}
}
});
});
$(function(){
$(".movie-textbox").focus(); //Focus on search field
$(".movie-textbox").autocomplete({
minLength: 0,
delay:5,
source: "php/suggest.php",
focus: function( event, ui ) {
$(this).val( ui.item.value );
return false;
},
select: function( event, ui ) {
$(this).val( ui.item.value );
return false;
}
}).data("uiAutocomplete")._renderItem = function( ul, item ) {
return $("<li></li>")
.data( "item.autocomplete", item )
.append( "<a>" + "<span class='imdbTitle'>" + item.label + "</span>" + "<div class='clear'></div></a>" )
.appendTo( ul );
};
});
});
</script>
</body>
</html>