/var/www/hkosl.com/alliancealliance/webadmin/enrollment_modifyform.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
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
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
<?php
    
require_once('check_login.php');

    
$id = (int)$_GET["id"];

    
$sql        "SELECT * FROM enrollment WHERE id=? ";
    
$parameters = array($id);
    
$row        bind_pdo($sql$parameters"selectone");

    
$sql99        "SELECT * FROM sys_cms_login WHERE cmsloginid=?";
    
$parameters99 = array((int)$row{'lastupby'});
    
$row99        bind_pdo($sql99$parameters99"selectone");

    
//$course_category_info = get_valid_course_category();
    
$sql                  "select * from course_category where status = ? and deleted = ?";
    
$parameters           = array(10);
    
$course_category_info bind_pdo($sql$parameters"selectall");

    
$sql         "select * from course where status = ? and deleted = ?";
    
$parameters  = array(10);
    
$course_info bind_pdo($sql$parameters"selectall");

    
$sql          "select * from ra_code where deleted = ? order by code ASC";
    
$parameters   = array(0);
    
$ra_code_info bind_pdo($sql$parameters"selectall");

    
$title_info                   get_master_type_code("TITLE");
    
$exp_air_cargo_info           get_master_type_code("EXPERIENCE_IN_AIR_CARGO_INDUSTRY");
    
$education_level_info         get_master_type_code("EDUCATION_LEVEL");
    
$existing_airfreight_info     get_master_type_code("EXISTING_AIRFREIGHT_COMPLIANCE_CLIENT_OD_ALLIANCE");
    
$renew_cert_info              get_master_type_code("RENEWING_CERTIFICATE");
    
$have_enroll_dg_training_info get_master_type_code("HAVE_ENROLLED_DG_TRAINING");
?>
<!DOCTYPE html>
<html>
<head>
    <?php require_once('html_head.php'); ?>

    <style>
        .form_head{
            font-weight: bold;
        }

        .field_width{
            width: 250px;
        }

        p{
            margin: 5px 0;
        }
    </style>

    <script type="text/javascript" src="js/jquery.chained.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#course_id").chained("#course_category_id");

            $("#payment_date").datepicker({dateFormat: 'yy-mm-dd'});
            $("#date_obtain_pre_cert").datepicker({dateFormat: 'yy-mm-dd'});
        });
    </script>
</head>
<body>

<form action="enrollment_modify.php" method="post" name="modifyform" id="modifyform" enctype="multipart/form-data">
    <input type="hidden" name="id" value="<?= $row{'id'}; ?>">
    <table width="1000" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td height="70" align="right" valign="middle" class="icontxt">
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="50" align="center" style="font-size: 12px;">
                            <div onclick="modifyform.submit()" style="cursor: pointer;"><img src="images/iconSave.png" alt="Save" width="32" height="32" border="0"><br>
                                &nbsp;Save&nbsp;&nbsp;
                            </div>
                        </td>
                        <td width="50" align="center">
                            <a href="enrollment_index.php?msg=4"><img src="images/iconCancel.png" alt="Cancel" width="32" height="32" border="0"><br>
                                &nbsp;Cancel&nbsp;&nbsp;</a></td>
                        <td>&nbsp;</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <span style="float:left;" class="pagetitletxt">
                    &nbsp;&nbsp;<b><img src="images/iconList.jpg" width="48" height="48" align="absmiddle"/> Modify Enrollment</b></span><span style="float:right;" class="msg">Last
                    Update: <?= $row99{'cmsusername'} . '&nbsp;&nbsp;&nbsp;' $row{'lastupdate'}; ?></span>
            </td>
        </tr>

        <tr>
            <td height="25" align="left" valign="middle" class="msg" style="padding-left: 10px;"><?php if (!empty($_GET["msg"])) echo $msg?></td>
        </tr>

        <tr>
            <td align="left" valign="middle"><!-- Content -->
                <div style="margin-top: 20px; padding-left: 10px;">
                    <p class="form_head nopadding_nomargin">Enrollment Date: <?=$row["enrollment_date"]?></p>
                    <br>
                    <p class="form_head nopadding_nomargin">Reference Code: <?=$row["ref_code"]?></p>
                    <br>
                    <p class="form_head nopadding_nomargin">INFORMATION OF COURSE</p>

                    <table>
                        <tr>
                            <td colspan="3">
                                <p class="txt">Course Name:</p>

                                <select name="course_category_id" id="course_category_id" required="required">
                                    <?php
                                        
foreach ($course_category_info as $course_category) {
                                            if(
$row["course_category_id"] == $course_category["id"])
                                                
$selected "selected";
                                            else
                                                
$selected "";

                                            echo 
'<option value="' $course_category["id"] . '" '.$selected.'>' $course_category["name_" $langcode] . '</option>';
                                        }
                                    
?>
                                </select>
                            </td>
                        </tr>

                        <tr>
                            <td colspan="3">
                                <p class="txt" style="margin-top: 15px;">Course Code:</p>

                                <select name="course_id" id="course_id" required="required">
                                    <option></option>
                                    <?php
                                        
foreach ($course_info as $course) {
                                            if(
$row["course_id"] == $course["id"])
                                                
$selected "selected";
                                            else
                                                
$selected "";

                                            echo 
'<option value="' $course["id"] . '" class="' $course["course_category_id"] . '" '.$selected.'>' $course["code"] . '</option>';
                                        }
                                    
?>
                                </select>
                            </td>
                        </tr>

                        <tr>
                            <td colspan="3"><p class="form_head nopadding_nomargin" style="margin-top: 20px;">
                                    INFORMATION OF PARTICIPANT</p></td>
                        </tr>

                        <tr>
                            <td>
                                <p class="txt required">Title:</p>

                                <select name="title" class="field_width" required="required">
                                    <option value="0">--- Please Select ---</option>
                                    <?php
                                        
foreach ($title_info as $title) {
                                            if(
$row["title"] == $title["name_".$langcode])
                                                
$selected "selected";
                                            else
                                                
$selected "";

                                            echo 
'<option value="' $title["name_" $langcode] . '" '.$selected.'>' $title["name_" $langcode] . '</option>';
                                        }
                                    
?>
                                </select>
                            </td>

                            <td style="padding-left: 20px;">
                                <p class="txt required">Name of Participant: <br>(same as the
                                    one shown on your HKID)</p>

                                <input type="text" name="participant_name" value="<?=rsa_crypt($row["participant_name"],2)?>" class="field_width" required="required"/>
                            </td>

                            <td style="padding-left: 20px;">
                                <p class="txt required">HKID/Passport No.:</p>

                                <input type="text" name="identity_id" value="<?=rsa_crypt($row["identity_id"],2)?>" class="field_width" required="required"/>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <p class="txt">Company RA Code (if any):</p>

                                <input type="text" name="ra_code" value="<?=$row["ra_code"]?>" class="field_width"/>
                            </td>

                            <td style="padding-left: 20px;">
                                <p class="txt required">Name of Company:</p>

                                <input type="text" name="company_name" value="<?=$row["company_name"]?>" class="field_width" required="required" <?php if($row["company_name_diff"] == 1) echo "style='color: red;'"?>/>
                            </td>

                            <td style="padding-left: 20px;">
                            </td>
                        </tr>

                        <tr>
                            <td colspan="3">
                                <p class="txt required">Company Address: </p>

                                <input type="text" name="company_address" value="<?=$row["company_address"]?>" class="field_width" style="width: 635px;" required="required" <?php if($row["company_address_diff"] == 1) echo "style='color: red;'"?>/>
                            </td>

                        </tr>

                        <tr>
                            <td>
                                <p class="txt required">Position:</p>

                                <input type="text" name="position" value="<?=$row["position"]?>" class="field_width" required="required"/>
                            </td>

                            <td style="padding-left: 20px;">
                                <p class="txt">IATA Code (if any):</p>

                                <input type="text" name="iata_code" value="<?=$row["iata_code"]?>" class="field_width"/>
                            </td>

                            <td style="padding-left: 20px;">
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <p class="txt required">Tel.:</p>

                                <input type="text" name="tel" value="<?=rsa_crypt($row["tel"],2)?>" class="field_width" required="required"/>
                            </td>

                            <td style="padding-left: 20px;">
                                <p class="txt required">Mobile:</p>

                                <input type="text" name="mobile" value="<?=rsa_crypt($row["mobile"],2)?>" class="field_width"/>
                            </td>

                            <td style="padding-left: 20px;">
                            </td>
                        </tr>

                        <tr>
                            <td>
                                <p class="txt required">E-mail:</p>

                                <input type="text" name="email" value="<?=rsa_crypt($row["email"], 2)?>" class="field_width" required="required"/>
                            </td>

                            <td style="padding-left: 20px;">
                                <p class="txt">CC E-mail:</p>

                                <input type="text" name="cc_email" value="<?=rsa_crypt($row["cc_email"], 2)?>" class="field_width" />
                            </td>

                            <td style="padding-left: 20px;">
                                <p class="txt">Fax:</p>

                                <input type="text" name="fax" value="<?=$row["fax"]?>" class="field_width"/>
                            </td>
                        </tr>

                        <tr>
                            <td colspan="3">
                                <p class="txt required">Experience in air cargo industry:</p>

                                <select name="exp_air_cargo" class="field_width" required="required">
                                    <option value="0">--- Please Select ---</option>
                                    <?php
                                        
foreach ($exp_air_cargo_info as $exp_air_cargo) {
                                            if(
$row["exp_air_cargo"] == $exp_air_cargo["name_" $langcode])
                                                
$selected "selected";
                                            else
                                                
$selected "";

                                            echo 
'<option value="' $exp_air_cargo["name_" $langcode] . '" '.$selected.'>' $exp_air_cargo["name_" $langcode] . '</option>';
                                        }
                                    
?>
                                </select>
                            </td>
                        </tr>

                        <tr>
                            <td colspan="3"><p class="form_head nopadding_nomargin" style="margin-top: 30px;">OTHERS
                                    INFORMATION</p></td>
                        </tr>

                        <tr>
                            <td>
                                <p class="txt required">Education Level:</p>

                                <select name="education_level" class="field_width" required="required">
                                    <option value="0">--- Please Select ---</option>
                                    <?php
                                        
foreach ($education_level_info as $education_level) {
                                            if(
$row["education_level"] == $education_level["name_" $langcode])
                                                
$selected "selected";
                                            else
                                                
$selected "";

                                            echo 
'<option value="' $education_level["name_" $langcode] . '" '.$selected.'>' $education_level["name_" $langcode] . '</option>';
                                        }
                                    
?>
                                </select>
                            </td>

                            <td style="padding-left: 20px;">
                                <p class="txt">Existing airfreight compliance client od Alliance:</p>

                                <select name="existing_airfreight" class="field_width">
                                    <option value="0">--- Please Select ---</option>
                                    <?php
                                        
foreach ($existing_airfreight_info as $existing_airfreight) {
                                            if(
$row["existing_airfreight"] == $existing_airfreight["name_" $langcode])
                                                
$selected "selected";
                                            else
                                                
$selected "";

                                            echo 
'<option value="' $existing_airfreight["name_" $langcode] . '" '.$selected.'>' $existing_airfreight["name_" $langcode] . '</option>';
                                        }
                                    
?>
                                </select>
                            </td>

                            <td style="padding-left: 20px;">

                            </td>
                        </tr>

                        <tr>
                            <td style="padding-top: 10px;">
                                <p class="txt">Are you renewing the certificate?</p>

                                <select name="renew_cert" class="field_width">
                                    <option value="0">--- Please Select ---</option>
                                    <?php
                                        
foreach ($renew_cert_info as $renew_cert) {
                                            if(
$row["renew_cert"] == $renew_cert["name_" $langcode])
                                                
$selected "selected";
                                            else
                                                
$selected "";

                                            echo 
'<option value="' $renew_cert["name_" $langcode] . '" '.$selected.'>' $renew_cert["name_" $langcode] . '</option>';
                                        }
                                    
?>
                                </select>
                            </td>

                            <td style="padding-left: 20px;padding-top: 10px;">
                                <p class="txt">Date of obtain previous certificate:</p>

                                <input type="text" name="date_obtain_pre_cert" id="date_obtain_pre_cert" value="<?php if(!empty($row["date_obtain_pre_cert"]) && $row["date_obtain_pre_cert"] != "0000-00-00") echo $row["date_obtain_pre_cert"]?>" class="field_width"/> (YYYY-MM-DD)

                            </td>

                            <td style="padding-left: 20px;">

                            </td>
                        </tr>

                        <tr>
                            <td style="padding-top: 10px;">
                                <p class="txt">Institution of issuing:</p>

                                <input type="text" name="institution_issuing" value="<?=$row["institution_issuing"]?>" class="field_width"/>

                            </td>

                            <td style="padding-left: 20px;padding-top: 10px;">
                                <p class="txt">Have you ever enroll the DG Training?</p>

                                <select name="have_enroll_dg_training" class="field_width">
                                    <option value="0">--- Please Select ---</option>
                                    <?php
                                        
foreach ($have_enroll_dg_training_info as $have_enroll_dg_training) {
                                            if(
$row["have_enroll_dg_training"] == $have_enroll_dg_training["name_" $langcode])
                                                
$selected "selected";
                                            else
                                                
$selected "";

                                            echo 
'<option value="' $have_enroll_dg_training["name_" $langcode] . '" '.$selected.'>' $have_enroll_dg_training["name_" $langcode] . '</option>';
                                        }
                                    
?>
                                </select>
                            </td>

                            <td style="padding-left: 20px;">

                            </td>
                        </tr>

                        <tr>
                            <td colspan="3" style="padding-top: 10px;">
                                Remark:<br>
                                <textarea name="remark" style="width: 520px; height: 100px;"><?=$row["remark"]?></textarea>
                            </td>
                        </tr>

                        <tr>
                            <td colspan="3" style="padding-top: 10px;">
                                Course Fee:<br>
                                $<input type="text" name="course_fee" id="course_fee" value="<?php if(!empty($row["course_fee"])) echo floatval($row["course_fee"])?>" class="field_width"/>
                            </td>
                        </tr>

                        <tr>
                            <td colspan="3" style="padding-top: 10px;">
                                Payment Date:<br>
                                <input type="text" name="payment_date" id="payment_date" value="<?php if(!empty($row["payment_date"]) && $row["payment_date"] != "0000-00-00") echo $row["payment_date"]?>" class="field_width"/>
                            </td>
                        </tr>

                        <tr>
                            <td colspan="3" style="padding-top: 10px;">
                                Payment Method:<br>
                                <select name="payment_method" class="field_width">
                                    <option value="">--- Please select ---</option>
                                    <option value="Cash" <?php if($row["payment_method"] == "Cash") echo "selected" ?>>Cash</option>
                                    <option value="Bank In" <?php if($row["payment_method"] == "Bank In") echo "selected" ?>>Bank In</option>
                                    <option value="Cheque" <?php if($row["payment_method"] == "Cheque") echo "selected" ?>>Cheque</option>
                                </select>
                            </td>
                        </tr>

                        <tr>
                            <td colspan="3" style="padding-top: 10px;">
                                Cheque No.:<br>
                                <input type="text" name="cheque_num" id="cheque_num" value="<?=$row["cheque_num"]?>" class="field_width"/>
                            </td>
                        </tr>

                        <tr>
                            <td colspan="3" style="padding-top: 10px;">
                                <br>
                                <span style="color: red">* Required Fields</span>
                                <br><br>
                                <br><br>
                            </td>
                        </tr>
                    </table>

                </div>
            </td>
        </tr>
    </table>
</form>
</body>
</html>