forked from NishealJ/IAESTE-DocGen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnf.php
392 lines (318 loc) · 9.87 KB
/
snf.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
<?php
require('./vendor/autoload.php');
$pdf = new FPDF();
// page formatting
$pdf->SetTitle('Student Nomination Form');
$pdf->SetMargins(25.0, 30.0);
$pdf->AddPage('P', 'A4');
// page title
$pdf->Cell(55);
$pdf->SetFont('Arial', 'B', 12);
$pdf->Cell(48, 0, 'STUDENT NOMINATED');
// reference number
$pdf->Cell(6);
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(12.5, 0.6, 'Ref. No.');
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(14, 0.6, $_POST['ref']);
$pdf->Ln(5);
// important note
$pdf->SetFont('Arial', 'BU', 9);
$pdf->Write(5, 'IMPORTANT:');
$pdf->SetFont('Arial', '', 9);
$pdf->Write(5, ' Under no circumstances are you allowed to contact the company before being accepted. You are accepted for this training offer only after receipt of the IAESTE acceptance forms.');
$pdf->Ln(8);
// line
$pdf->SetLineWidth(0.2);
$pdf->Line($pdf->GetX() + 1, $pdf->GetY(), $pdf->GetX() + 159, $pdf->GetY());
$pdf->Ln(5);
// personal information section
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(0, 0, 'Personal Information');
$pdf->Ln(6);
// family name
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(20, 0, 'Family name:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(65, 0, strtoupper($_POST['fname']));
$pdf->Cell(5);
// date of birth
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(45, 0, 'Date of birth (day/month/year):');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(14, 0, date("d/m/Y", strtotime($_POST['dob'])));
$pdf->Ln(4);
// place of birth
$pdf->Cell(90);
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(21, 0, 'Place of birth:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(46, 0, strtoupper($_POST['pob']));
$pdf->Ln(4);
// first/other name
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(37, 0, 'First and/or other names:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(48, 0, strtoupper($_POST['name']));
$pdf->Cell(5);
// nationality
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(17, 0, 'Nationality:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(40, 0, strtoupper($_POST['nat']));
$pdf->Ln(8);
// home address line 1
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(23, 0, 'Home address:');
// $pdf->SetFont('Arial', 'B', 9);
// $pdf->Cell(62, 0, strtoupper($_POST['hal1']) . ',');
$pdf->Cell(67);
// passport
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(19, 0, 'Passport no:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(20, 0, $_POST['pass-no']);
$pdf->Ln(4);
// home address line 2
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(85, 0, strtoupper($_POST['hal1']) . ',');
$pdf->Cell(5);
// date of issue
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(46, 0, 'Date of Issue (day/month/year):');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(14, 0, date("d/m/Y", strtotime($_POST['doi'])));
$pdf->Ln(4);
// home address line 3
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(85, 0, strtoupper($_POST['hal2']));
$pdf->Cell(5);
// place of issue
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(22, 0, 'Place of Issue:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(46, 0, strtoupper($_POST['poi']));
$pdf->Ln(4);
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(85, 0, strtoupper($_POST['hal3']));
$pdf->Cell(5);
// valid until
//$pdf->Cell(90);
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(41, 0, 'Valid until (day/month/year):');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(14, 0, date("d/m/Y", strtotime($_POST['vu'])));
$pdf->Ln(5);
// phone number
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(16, 0, 'Phone no:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(35, 0, $_POST['phn']);
$pdf->Ln(4);
// email
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(10, 0, 'Email:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(76, 0, $_POST['email']);
$pdf->Cell(4);
// sex
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(8, 0, 'Sex:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(15, 0, strtoupper($_POST['sex']));
$pdf->Ln(8);
// address during terms
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(33, 0, 'Address during terms:');
$pdf->Cell(57);
// marital status
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(21, 0, 'Marital status:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(30, 0, strtoupper($_POST['ms']));
$pdf->Ln(4);
// address during terms line 1
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(85, 0, strtoupper($_POST['adl1']) . ',');
$pdf->Ln(4);
// address during terms line 2
$pdf->Cell(85, 0, strtoupper($_POST['adl2']) . ',');
$pdf->Ln(4);
// address during terms line 3
$pdf->Cell(85, 0, strtoupper($_POST['adl3']));
$pdf->Ln(10);
// alternate phone number
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(16, 0, 'Phone no:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(35, 0, $_POST['phn']);
$pdf->Cell(39);
// medical status
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(31, 0, 'Are you medically fit:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(35, 0, strtoupper($_POST['med']));
$pdf->Ln(4);
// alternate email
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(10, 0, 'Email:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(76, 0, $_POST['alt-email']);
$pdf->Ln(4);
// line
$pdf->SetLineWidth(0.2);
$pdf->Line($pdf->GetX() + 1, $pdf->GetY(), $pdf->GetX() + 159, $pdf->GetY());
$pdf->Ln(5);
// Study Informatiom Section begins here
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(0, 0, 'Study Information');
$pdf->Ln(6);
// University/College
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(65, 0, 'University/College:');
$pdf->Cell(25);
// Knowledge of Languages
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(44, 0, 'Knowledge of Languages:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(14, 0, strtotime($_POST['languages']));
$pdf->Ln(4);
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(65, 0, strtoupper($_POST['uni']));
$pdf->Cell(25);
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(14, 0, strtoupper($_POST['languages']));
$pdf->Ln(4);
$pdf->Cell(90);
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(21, 0, '(1=excellent, 2=good, 3=fair)');
$pdf->Ln(4);
// faculty
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(12, 0, 'Faculty:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(14, 0, strtoupper($_POST['fac']));
$pdf->Ln(5);
// specialization
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(22, 0, 'Specialization:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(14, 0, strtoupper($_POST['spec']));
$pdf->Ln(5);
// Completed years of study
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(38, 0, 'Completed years of study:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(52, 0, strtoupper($_POST['yos']));
// Total years required
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(30, 0, 'Total years required:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(10, 0, strtoupper($_POST['years']));
$pdf->Ln(5);
// line
$pdf->SetLineWidth(0.2);
$pdf->Line($pdf->GetX() + 1, $pdf->GetY(), $pdf->GetX() + 159, $pdf->GetY());
$pdf->Ln(5);
// important guideline
$pdf->SetFont('Arial', 'BU', 9);
$pdf->Write(5, 'IMPORTANT:');
$pdf->SetFont('Arial', '', 9);
$pdf->Write(5, ' A list of subjects studied by the time training begins must be enclosed with this form as well as a Curriculum Vitae (including details of previous work) and an introductory letter to the employer.');
$pdf->Ln(8);
// line
$pdf->SetLineWidth(0.2);
$pdf->Line($pdf->GetX() + 1, $pdf->GetY(), $pdf->GetX() + 159, $pdf->GetY());
$pdf->Ln(5);
// training start date
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(50, 0, 'Desired period of training (day/month/year)');
$pdf->Ln(3);
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(72, 0, '(Within the period specified by the employer):');
$pdf->Cell(8, 0, 'from:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(24, 0, date("d/m/Y", strtotime($_POST['training-start'])));
// training end date
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(5, 0, 'to:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(20, 0, date("d/m/Y", strtotime($_POST['training-end'])));
$pdf->ln(5);
// wish lodging
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(60, 0, 'Do you wish lodging to be found for you?:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(10, 0, strtoupper($_POST['lodge']));
$pdf->Ln(5);
// technical report
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(122, 0, 'Are you required/do you wish to prepare a technical report during the training period?:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(10, 0, strcmp("ON", strtoupper($_POST['report'])) == 0 ? "YES" : "NO");
$pdf->Ln(5);
// line
$pdf->SetLineWidth(0.2);
$pdf->Line($pdf->GetX() + 1, $pdf->GetY(), $pdf->GetX() + 159, $pdf->GetY());
$pdf->Ln(5);
// today's date
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(9, 0, 'Date:');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(60, 0, date("d/m/Y", strtotime($_POST['date'])));
// Student Sign
$pdf->Cell(30);
$pdf->SetFont('Arial', '', 9);
$pdf->Cell(28, 0, 'Student Sign:');
$pdf->Ln(5);
// line
$pdf->SetLineWidth(0.2);
$pdf->Line($pdf->GetX() + 1, $pdf->GetY(), $pdf->GetX() + 159, $pdf->GetY());
$pdf->Ln(8);
// official use only
$pdf->SetTextColor(107, 107, 107);
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(28, 0, 'For official use only:');
$pdf->Ln(8);
// date line
$pdf->SetTextColor(107, 107, 107);
$pdf->SetFont('Arial', 'B', 11);
$pdf->Cell(11, 0, 'Date:');
// nominating country
$pdf->Cell(22);
$pdf->SetTextColor(107, 107, 107);
$pdf->SetFont('Arial', 'B', 11);
$pdf->Cell(40, 0, 'Nominating Country:');
// sending country
$pdf->Cell(18);
$pdf->SetTextColor(107, 107, 107);
$pdf->SetFont('Arial', 'B', 11);
$pdf->Cell(57, 0, 'On behalf of sending country:');
$pdf->Ln(8);
// input dashes
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(23, 0, date("d/m/Y", strtotime($_POST['date'])));
$pdf->Cell(27);
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(28, 0, strtoupper($_POST['country']));
$pdf->Cell(10);
$pdf->ln(2);
$pdf->SetFont('Arial', 'B', 11);
$pdf->Cell(23, 0, '...................');
$pdf->Cell(10);
$pdf->SetFont('Arial', 'B', 11);
$pdf->Cell(48, 0, '..........................................');
$pdf->Cell(10);
$pdf->SetFont('Arial', 'B', 11);
$pdf->Cell(65, 0, '..........................................................');
$pdf->ln(4);
$pdf->Cell(91);
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(28, 0, strtoupper($_POST['head']));
$pdf->ln(4);
$pdf->Cell(91);
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(29, 0, 'HEAD EXCHANGE');
$pdf->Cell(25, 0, strtoupper($_POST['lc']));
$pdf->Output();