-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
157 lines (141 loc) · 4.07 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>WMFO Rivendell Search</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
<link href="./css/bootstrap.min.css" rel="stylesheet">
<link href="./css/bootstrap-responsive.css" rel="stylesheet">
<style type="text/css">
body {
padding-top: 20px;
padding-bottom: 40px;
}
/* Custom container */
.container-narrow {
margin: 0 auto;
max-width: 700px;
}
.container-narrow > hr {
margin: 30px 0;
}
/* Main marketing message and sign up button */
.jumbotron {
margin: 60px 0;
text-align: center;
}
.jumbotron h1 {
font-size: 72px;
line-height: 1;
}
.jumbotron .btn {
font-size: 21px;
padding: 14px 24px;
}
/* Supporting marketing content */
.marketing {
margin: 60px 0;
}
.marketing p + h4 {
margin-top: 28px;
}
.filter-close {
float: none;
position: relative;
left: 5em;
top: 1.25em;
z-index: 3;
}
</style>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="../assets/js/html5shiv.js"></script>
<![endif]-->
<!-- Fav and touch icons -->
</head>
<body id="everything">
<div class="container-narrow">
<div class="masthead">
<ul class="nav nav-pills pull-right">
<li><a href="http://www.wmfo.org/">WMFO Home</a></li>
</ul>
<a href="http://www.wmfo.org/"><img src="WMFO-logo.png"></a>
<h2 align="center" class="muted">WMFO Rivendell Search</h2>
</div>
<noscript>
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Fiddlesticks!</strong> This website requires Javascript, and you appear to have it disabled. Please enable JavaScript for proper functionality. Thanks!
</div>
</noscript>
<hr>
<form class="form" id="resultsform">
<select id="selector" name="category">
<option value="artist">By Artist</option>
<option value="title">By Title</option>
<option value="album">By Album</option>
</select>
<label for="query">Query:</label>
<input type="text" id="query" name="query" size="30" maxlength="255" autocomplete="off">
<div class="accordion" id="accordion2">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">Advanced Options</a>
</div>
<div id="collapseOne" class="accordion-body collapse">
<div class="accordion-inner">
<div class="controls form-inline">
<label for="limit">Limit:</label>
<select id="limit" name="limit">
<option value="25">25</option>
<option value="50">50</option>
<option value="125">125</option>
<option value="250"selected>250</option>
<option value="250">500</option>
<option value="250">1000</option>
</select><br>
<input type="checkbox" name="exact" value="true" id="exact">
<label for="exact">Exact Matches Only</label><br>
</div>
</div>
</div>
</div>
</div>
</form>
<div id="tablediv"></div>
<hr>
<div class="footer">
<p>© WMFO <?php echo date("Y"); ?></p>
</div>
</div> <!-- /container -->
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="./js/jquery-1.9.1.min.js"></script>
<script src="./js/bootstrap.min.js"></script>
<script>
function loadTable() {
$("#tablediv").html("<p>Loading...</p>");
var data = $("#resultsform").serialize();
$.post('./resultstable.php', data, function(results) {
$("#tablediv").html(results);
});
}
$(loadTable);
$("#selector").change(loadTable);
$("#limit").change(loadTable);
$("#query").change(loadTable);
$("#exact").change(loadTable);
$('#query').keypress(function(e){
if ( e.which == 13 ) // Enter key = keycode 13
{
$(this).blur();
return false;
}
});
</script>
</body>
</html>