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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
|
<? include('_init.php');?> <? $id = intval($_SESSION['student_login']); if(!$id){ $path = 'index.php'; @header("Location: {$path}"); echo "<script language='JavaScript'>window.location='{$path}'</script>"; exit(); }else{ $sql = "select *,(select cmsloginname from sys_cms_login where tb.cmsloginid = cmsloginid and deleted = 0 LIMIT 1) as username from student_main as tb where id = ? and deleted = ? and status = ?"; $parameters = array($id,0,2); $row = bind_pdo($sql, $parameters, "selectone");
if(!$row['id']){ $path = 'index.php'; @header("Location: {$path}"); echo "<script language='JavaScript'>window.location='{$path}'</script>"; exit(); } } $lang = $_SESSION['langcode']; // $sql = "select * from master_type_code where typeid = ? and deleted = ?"; $parameters = array('RESIDENCE_CODE',0); $rows_area = bind_pdo($sql, $parameters, "selectall");
$sql = "select * from master_type_code where typeid = ? and deleted = ?"; $parameters = array('CONTACTSTUDENT_REL',0); $rows_contactstudentrel = bind_pdo($sql, $parameters, "selectall");
$sql = "select * from master_type_code where typeid = ? and deleted = ?"; $parameters = array('CONTACT_TIMERANGE',0); $rows_contacttimerange = bind_pdo($sql, $parameters, "selectall");
$sql = "select * from master_type_code where typeid = ? and deleted = ? order by sort asc"; $parameters = array('EXPSTUDENTAGE', 0); $rows_yearrange = bind_pdo($sql, $parameters, "selectall");
$sql = "select * from master_type_code where typeid = ? and deleted = ? order by sort asc"; $parameters = array('INSTRUMENT_TYPE',0); $rows_instrument_type = bind_pdo($sql, $parameters, "selectall"); // ?> <!DOCTYPE html> <html lang="en"> <head> <? include('_head.php');?> <link href="css/_sign.css" type="text/css" rel="stylesheet"> <script> $(function(){ $('#submitBTN').click( function () { var thisform = $('#LiForm'); var focus_array = new Array(); var error = false; $('.error').hide();
if(!$('input[name="contactname"]',thisform).val()){ $("#contactnameError").show(); focus_array[focus_array.length] = $('input[name="contactname"]',thisform); error = true; } if(!$('input[name="gender"]:checked',thisform).val()){ $("#genderError").show(); focus_array[focus_array.length] = $('input[name="gender"]',thisform); error = true; } if($('input[name="hometelno"]',thisform).val()){ var num = $('input[name="hometelno"]',thisform).val(); if($.isNumeric(num) == false){ $("#hometelnoError2").show(); focus_array[focus_array.length] = $('input[name="hometelno"]',thisform); error = true; } } if(!$('select[name="mas_contactstudentrel"]',thisform).val()){ $("#contactstudentrelError").show(); focus_array[focus_array.length] = $('select[name="mas_contactstudentrel"]',thisform); error = true; } if(!$('select[name="mas_yearrange"]',thisform).val()){ $("#yearrangeError").show(); focus_array[focus_array.length] = $('select[name="mas_yearrange"]',thisform); error = true; }if(!$('select[name="mas_residencecode"]',thisform).val()){ $("#residencecodeError").show(); focus_array[focus_array.length] = $('select[name="mas_residencecode"]',thisform); error = true; } if(!$('select[name="mas_contacttimerange"]',thisform).val()){ $("#contacttimerangeError").show(); focus_array[focus_array.length] = $('select[name="mas_contacttimerange"]',thisform); error = true; } if($('#teachmodeError .InstrumentExpSection').size() > 0){ $('#teachmodeError .InstrumentExpSection').each( function(){ if($(this).parent().attr('id')!='MusicalCVBox'){ if(!$('select[name="instrumentquali[mas_instrument][]"]',this).val() || !$('select[name="instrumentquali[grade][]"]',this).val() || !$('select[name="instrumentquali[year][]"]',this).val()){ $("#instrumentError").show(); error = true; focus_array[focus_array.length] = $('select[name="instrumentquali[mas_instrument][]"]',this); } } } ); } if (error == false) { $('#LiForm').submit(); } else { //focus_array[0].focus(); $('html, body').animate({ scrollTop: $(focus_array[0]).offset().top - 200 }, 500);
//return false; } }); } ); </script> <style> ul { list-style: none; } </style> </head>
<body> <!-- Navigation --> <? include('_header.php');?> <div class="formSection"> <? $signupMenu='student'?> <? include('_signupStudentMenu.php')?> <div class="TutorForm"> <form action="_process.php" method="post" enctype="multipart/form-data" id="LiForm"> <input type="hidden" name="action" value="signup_student"/> <input type="hidden" name="lang" value="<?=$lang?>"/> <div class="InputDataIII"> <div class="BoxTitle"><font color="#ff0000">*</font> <?=_lang('Contact Name')?> </div> <input class="inputFill" placeholder="<?=_lang('Contact Name')?>" name="contactname" value="<?=$row['contactname']?>"> <div style="color:#F00; display:none;" class="error" id="contactnameError"><?=html_entity_decode(_lang('Please Input Your '))._lang('Contact Name')?></div> </div> <div class="HalfLeft"> <div class="BoxTitle"><font color="#ff0000">*</font><?= _lang('Mobile') ?></div> <div style="margin-top:8px;"><?= aes_crypt($row['mobno'], 2) ?></div> </div> <div class="HalfRight"> <div class="BoxTitle"><?=_lang('Home Tel')?></div> <input name="hometelno" class="inputFill" placeholder="<?=_lang('Home Tel')?>" value="<?=aes_crypt($row['hometelno'],2)?>" maxlength="8"> <div style="color:#F00; display:none;" class="error" id="hometelnoError2"><?=_lang("Home telephone number should be digital number.")?></div> </div> <div class="InputDataIII"> <div class="BoxTitle"><font color="#ff0000">*</font><?=_lang("Gender")?></div> <label style="font-weight:100;"> <input type="radio" name="gender" value="m" <? if($row['gender']=='m'){?> checked<? }?>> <?=_lang("Male")?></label> <label style="font-weight:100;"> <input type="radio" name="gender" value="f" <? if($row['gender']=='f'){?> checked<? }?>> <?=_lang("Female")?></label> <div style="color:#F00; display:none;" class="error" id="genderError"><?=_lang("Please select gender.")?></div> </div> <div class="InputDataIII"> <div class="BoxTitle"><font color="#ff0000">*</font> <?=_lang('With Student Relationship')?> </div> <select class="form-control" id="sel1" name="mas_contactstudentrel"> <option value="">- <?=_lang('Please Select')?> -</option> <? foreach($rows_contactstudentrel as $row_contactstudentrel){?> <option value="<?=$row_contactstudentrel['id']?>" <? if($row_contactstudentrel['id'] == $row['mas_contactstudentrel']){?>selected<? }?>> <?=$row_contactstudentrel['name_'.$lang]?> </option> <? }?> </select> <div style="color:#F00; display:none;" class="error" id="contactstudentrelError"><?=html_entity_decode(_lang('Please Input Your '))._lang('Contact Time Range')?></div> </div> <div class="InputDataIII"> <div class="BoxTitle"><font color="#ff0000">*</font> <?=_lang('Student Range')?> </div> <select class="form-control" id="sel1" name="mas_yearrange" required> <option value="">- <?=_lang('Please Select')?> -</option> <? foreach($rows_yearrange as $row_yearrange){?> <option value="<?=$row_yearrange['id']?>" <? if($row_yearrange['id'] == $row['mas_yearrange']){?>selected<? }?>> <?=$row_yearrange['name_'.$lang]?> </option> <? }?> </select> <div style="color:#F00; display:none;" class="error" id="yearrangeError"><?=html_entity_decode(_lang('Please Input Your '))._lang('Student Range')?></div> </div> <div class="InputDataIII"> <div class="BoxTitle"><font color="#ff0000">*</font><?=_lang('Email')?></div> <!--<input class="inputFill" name="email" placeholder="電子郵件">--> <?=aes_crypt($row['email'],2)?> </div> <div class="InputDataIII"> <div class="BoxTitle"><font color="#ff0000">*</font> <?=_lang('Residence')?> </div> <select class="form-control" id="sel1" name="mas_residencecode"> <option value="">- <?=_lang('Please Select')?> -</option> <? foreach($rows_area as $row_area){?> <? $sql = "select * from master_type_code where typeid = ? and extra1 = ? and deleted = ?"; $parameters = array('RESIDENCE_POSITIONCODE',$row_area['code'],0); $rows_position = bind_pdo($sql, $parameters, "selectall"); ?> <optgroup label="<?=$row_area['name_'.$lang]?>"> <? foreach($rows_position as $row_position){?> <option value="<?=$row_position['id']?>" <? if($row_position['id'] == $row['mas_residencecode']){?>selected<? }?>> <?=$row_position['name_'.$lang]?> </option> <? }?> </optgroup> <? }?> </select> <div style="color:#F00; display:none;" class="error" id="residencecodeError"><?=html_entity_decode(_lang('Please Input Your '))._lang('Residence')?></div> </div> <div class="InputDataIII"> <div class="BoxTitle"> <?=_lang('Address')?> </div> <input class="inputFill" placeholder="<?=_lang('Address')?>" name="address" value="<?=$row['address']?>"> <div style="color:#F00; display:none;" class="error" id="addressError"> <?=html_entity_decode(_lang('Please Input Your '))._lang('Address')?> </div> </div> <div class="InputDataIII"> <div class="BoxTitle"><font color="#ff0000">*</font> <?=_lang('Contact Time Range')?> </div> <select class="form-control" id="sel1" name="mas_contacttimerange"> <option value="">- <?=_lang('Please Select')?> -</option> <? foreach($rows_contacttimerange as $row_contacttimerange){?> <option value="<?=$row_contacttimerange['id']?>" <? if($row_contacttimerange['id'] == $row['mas_contacttimerange']){?>selected<? }?>> <?=$row_contacttimerange['name_'.$lang]?> </option> <? }?> </select> <div style="color:#F00; display:none;" class="error" id="contacttimerangeError"><?=html_entity_decode(_lang('Please Input Your '))._lang('Contact Time Range')?></div> </div> <div class="InputDataIII" > <div id="teachmodeError"> <div class="BoxTitle"><?=_lang("Musical Instruments Resume")?></div> <button data-duplicate-add="MusicalCV" type="button" id="uploadSectionBTN" class="add">+</button> <button data-duplicate-remove="MusicalCV" type="button" id="uploadSectionBTN" class="remove">-</button> <div id="MusicalCVBox" style="display:none;"> <div class="InstrumentExpSection"> <div class="InstrumentExp"> <select class="form-control" id="sel1" name="instrumentquali[mas_instrument][]"> <option value="">-<?=_lang("Musical Instrument")?>-</option> <? foreach($rows_instrument_type as $row_instrument_type){?> <? $sql = "select * from master_type_code where typeid = ? and extra1 = ? and deleted = ? order by sort asc"; $parameters = array('INSTRUMENT',$row_instrument_type['code'],0); $rows_instrument = bind_pdo($sql, $parameters, "selectall"); ?> <optgroup label="<?=$row_instrument_type['name_'.$lang]?>"> <? foreach($rows_instrument as $row_instrument){?> <option value="<?=$row_instrument['id']?>"> <?=$row_instrument['name_'.$lang]?> </option> <? }?> </optgroup> <? }?> </select> </div> <div class="InstrumentExp"> <select class="form-control" id="sel1" name="instrumentquali[grade][]"> <option value="">-<?=_lang("Level")?>-</option> <? for($i=1;$i<=9;$i++){ ?> <option value="<?=$i?>"> <?=$i?> </option> <? }?> </select> </div> <div class="InstrumentExp"> <select class="form-control" id="sel1" name="instrumentquali[year][]"> <option>-<?=_lang("Year")?>-</option> <? for($i=date('Y');$i>=date('Y')-100;$i--){?> <option value="<?=$i?>"> <?=$i?> </option> <? }?> </select> </div> </div> </div> <? foreach($count_instrumentquali as $res_instrumentquali){?> <div class="InstrumentExpSection"> <div class="InstrumentExp"> <select class="form-control" id="sel1" name="instrumentquali[mas_instrument][]"> <option value="">-<?=_lang("Musical Instrument")?>-</option> <? foreach($rows_instrument_type as $row_instrument_type){?> <? $sql = "select * from master_type_code where typeid = ? and extra1 = ? and deleted = ? order by sort asc"; $parameters = array('INSTRUMENT',$row_instrument_type['code'],0); $rows_instrument = bind_pdo($sql, $parameters, "selectall"); ?> <optgroup label="<?=$row_instrument_type['name_'.$lang]?>"> <? foreach($rows_instrument as $row_instrument){?> <option value="<?=$row_instrument['id']?>" <? if($row_instrument['id'] == $res_instrumentquali['mas_instrument']){?>selected<? }?>> <?=$row_instrument['name_'.$lang]?> </option> <? }?> </optgroup> <? }?> </select> </div> <div class="InstrumentExp"> <select class="form-control" id="sel1" name="instrumentquali[grade][]"> <option value="">-<?=_lang("Level")?>-</option> <? for($i=1;$i<=9;$i++){ ?> <option value="<?=$i?>" <? if($i == $res_instrumentquali['grade']){?>selected<? }?>> <? if($i > 8){?> 8+ <? }else{?> <?=$i?> <? }?> </option> <? }?> </select> </div> <div class="InstrumentExp"> <select class="form-control" id="sel1" name="instrumentquali[year][]"> <option>-<?=_lang("Year")?>-</option> <? for($i=date('Y');$i>=date('Y')-100;$i--){?> <option value="<?=$i?>" <? if($i == $res_instrumentquali['year']){?>selected<? }?>> <?=$i?> </option> <? }?> </select> </div> </div> <? }?> </div> <div style="color:#F00; display:none;" class="error" id="instrumentError"><?=_lang("Please fill musical instruments resume.")?></div> </div> <input type="button" value="<?=_lang('Next Step')?>" id="submitBTN" class="submitBTN"> </form> </div> </div> <? include('_footer.php')?> </body> </html>
|