forked from leemacat2/FinalMadApp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvolunteers.html
247 lines (134 loc) · 4.71 KB
/
volunteers.html
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
<html>
<head>
<title>Volunteers</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" type="text/css" href="css/ThisIsIt.css">
<link rel="stylesheet" href="css/jquery.mobile.structure-1.1.1.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.mobile-1.1.1.min.js"></script>
<style type="text/css">
.ui-select{
width: 55%;
}
</style>
<script type= "text/javascript" >
$(document).ready(function(){
$("#changepage").click(function(){
$.mobile.changePage("#page2");
});
$("#back").bind('click',function(){
var city= $("#city").val();
var group= $("#group").val();
var name= $("#searchvolunteer").val();
$("#here").html("<br>");
$.getJSON("http://10.0.2.2/SERVER/searchvolunteers.php",{name:name,city:city,group:group},function(result){
//alert(result);
if(result=='')
{
$("#here").text("no result");
}
else
{
$.each(result,function(i,item){
//$("head").append("<link rel='stylesheet' href='css/jquery.mobile.structure-1.1.1.css' />");
$("#here").append("<div data-role='collapsible'><h1>"+item[0]+"</h1><div><ul><li><h2>"+item[1]+"</h2></li><li><h3>"+item[2]+"</h3></li><li><h3>"+item[3]+"</h3></li></ul></div></div>").trigger("create");
});
}
});
});
//alert("daivame..!");
$.getJSON("http://10.0.2.2/SERVER/volunteers.php",function(result){
$.each(result,function(i,item){
//$("head").append("<link rel='stylesheet' href='css/jquery.mobile.structure-1.1.1.css' />");
$("#here").append("<div data-role='collapsible'><h1>"+item[0]+"</h1><div><ul><li><h2>"+item[1]+"</h2></li><li><h3>"+item[2]+"</h3></li><li><h3>"+item[3]+"</h3></li></ul></div></div>").trigger("create");
});
});
$.getJSON("http://10.0.2.2/SERVER/citylist.php",function(result)
{
$.each(result,function(i,item){
$("#city").append("<option>"+item+"</option>");
});
});
$.getJSON("http://10.0.2.2/SERVER/grouplist.php",function(result)
{
$.each(result,function(i,item){
$("#group").append("<option>"+item+"</option>");
});
});
$("#logout").click(function(){
window.location="index.html";
})
$("#dashboard").click(function(){
window.location="home.html";
})
});
</script>
</head>
<body>
<div data-role="page" id="page1">
<div data-role="header" data-position="fixed" data-fullscreen="true">
<a href="" data-icon="home" data-iconpos="notext" id="dashboard"/>Home</a>
<h1>MADApp</h1>
<a href="" data-iconpos="notext" data-icon="logout" id="logout">Logout</a>
</div><!--header-->
<div data-role="content">
<br><br>
<div>
<h2>VOLUNTEERS</h2>
</div>
<hr>
<div align="right">
<a data-role="button" id="changepage" data-transition="turn" data-theme="a" style="width:50%;" data-icon="search" data-iconpos="right">Search</a>
</div>
<div data-role="collapsible-set" data-iconpos="right" id="here">
</div>
</div>
<div data-role="footer" data-theme="a" data-position="fixed" data-fullscreen="true" data-id="foo">
<div data-role="navbar" >
<ul>
<li><a data-rel="back" data-icon="back" data-ajax="false">Previous</a></li>
<li><a href="updates.html" data-icon="star" data-ajax="false">Updates</a></li>
<li><a href="profile.html" data-icon="info">Profile</a></li>
</ul>
</div><!-- /navbar -->
</div>
</div>
<div data-role="page" id="page2">
<div data-role="header" data-position="fixed" data-fullscreen="true">
<h2>SEARCH</h2>
</div><!--header-->
<div data-role="content">
<br><br>
<div>
<h2>VOLUNTEERS</h2>
</div>
<hr>
<div align="center">
<form id="form1" method="get" action="">
<label for="searchvolunteer">Search volunteer by Name</label>
<input id="searchvolunteer" name="searchvolunteer" type="text" style="width:50%;">[OR]
<label for="city" align="center">Look for the volunteer from</label>
<select id="city" name="city">
<option value="null">AnyCity</option>[OR]
</select>
<label for="group" align="center">Look for the member of group</label>
<select id="group" name="group">
<option value="null">Any one</option>[OR]
</select>
</form>
<a data-role="button" id="back" data-direction="reverse" data-rel="back" style="width:30%;" data-icon="arrow-r" data-iconpos="right">Go</a>
</div>
<div><br><br><br></div>
</div>
<div data-role="footer" data-theme="a" data-position="fixed" data-fullscreen="true" data-id="foo">
<div data-role="navbar" >
<ul>
<li><a data-rel="back" data-icon="back" data-ajax="false">Previous</a></li>
<li><a href="updates.html" data-icon="star" data-ajax="false">Updates</a></li>
<li><a href="profile.html" data-icon="info">Profile</a></li>
</ul>
</div><!-- /navbar -->
</div>
</div>
</body>
</html>