-
Notifications
You must be signed in to change notification settings - Fork 7
/
submit-raid.php
66 lines (58 loc) · 1.66 KB
/
submit-raid.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
<?php
include 'frontend/functions.php';
include 'frontend/menu.php';
include 'config/dbbuilding.php';
?>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script type="text/javascript" src="//code.jquery.com/jquery-1.8.3.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
<script>
$(document).ready(function(){
$("#raidsearch").select2({
templateResult: formatState1,
width:'100%'
});
});
function formatState1 (state) {
if (!state.id) { return state.text; }
var $state = $(
'<span ><img style="display: inline-block;" src="static/icons/' + state.element.value.toLowerCase() + '.png" heigth="24" width="24"/> ' + state.text + '</span>'
);
return $state;
}
$(document).ready(function(){
$("#gymsearch").select2({
templateResult: formatState2,
sorter: sortresults,
width:'100%'
});
});
function sortresults (state) {
return state.sort(function (a, b) {
if (a.text > b.text) {
return 1;
}
if (a.text < b.text) {
return -1;
}
return 0;
});
}
function formatState2 (state) {
if (!state.id) { return state.text; }
var $state = $(
'<span ><img style="display: inline-block;" src="static/gyms/' + state.element.label + '.png" heigth="24" width="24"/> ' + state.text + '</span>'
);
return $state;
}
</script>
</head>
<?php
menu();
raidsubmission();
?>
</body>
<footer></footer>