-
Notifications
You must be signed in to change notification settings - Fork 0
/
regEngine.php
323 lines (285 loc) · 11.3 KB
/
regEngine.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
<?php
$From ="Starta-Co Registration Form";
$to ="[email protected]";
$subject ="starta-co Company Registration Form";
// Company details
$fmonth = Trim(htmlspecialchars(stripcslashes($_POST["fmonth"])));
$auth = trim(htmlspecialchars(stripcslashes($_POST["auth"])));
$companyemail = trim(htmlspecialchars(stripcslashes($_POST["companyemail"])));
// Company Physical Address
$physicalAddress1 = trim(htmlspecialchars(stripcslashes($_POST["compphysical1"])));
$physicalAddress2 = trim(htmlspecialchars(stripcslashes(($_POST["compphysical2"])));
$physicalAddress3 = trim(htmlspecialchars(stripcslashes($_POST["compPhysical3"])));
$compphysicalprovince = trim(htmlspecialchars(stripcslashes($_POST["companyphicalprovince"])));
$companyphysicalcode = trim(htmlspecialchars(stripcslashes($_POST["companyPhysicalCode"])));
// Compnay Postal Details
$ComppostalAddress1 = trim(htmlspecialchars(stripcslashes($_POST["companyPostal1"])));
$ComppostalAddress2 = trim(htmlspecialchars(stripcslashes($_POST["companyPostal2"])));
$ComppostalAddress3 trim(htmlspecialchars(stripcslashes($_POST["companyPostal3"])));
$postalprovince = trim(htmlspecialchars(stripcslashes($_POST["Comppostalprovince"])));
$postalcode = trim(htmlspecialchars(stripcslashes($_POST["Comppostalcode"])));
// Company Names Information
$compname1 = trim(htmlspecialchars(stripcslashes($_POST["compname1"])));
$compname2 = trim(htmlspecialchars(stripcslashes($_POST["compname2"])));
$compname3 = trim(htmlspecialchars(stripcslashes($_POST["compname3"])));
$compname4 = trim(htmlspecialchars(stripcslashes($_POST["compname4"])));
// Director 1 Details
$directorfirstname1 = trim(htmlspecialchars(stripcslashes($_POST["directorfirstname1"])));
$directorsecondname1 = trim(htmlspecialchars(stripcslashes($_POST["directorsecondname1"])));
$idnumber1 = trim(htmlspecialchars(stripcslashes($_POST["idnumber1"])));
$nationality1 = trim(htmlspecialchars(stripcslashes($_POST["nationality1"])));
$directemail1 = trim(htmlspecialchars(stripcslashes($_POST["directemail1"])));
$directorcontact1 = trim(htmlspecialchars(stripcslashes($_POST["directorcontact1"])));
// Diretor 1 Physical Address
$directaddress11 = trim(htmlspecialchars(stripcslashes($_POST["directaddress11"])));
$directaddress12 = trim(htmlspecialchars(stripcslashes($_POST["directaddress12"])));
$directaddress13 = trim(htmlspecialchars(stripcslashes($_POST["directaddress13"])));
$directorprovince1 = trim(htmlspecialchars(stripcslashes($_POST["directorprovince1"])));
$directorcode1 = trim(htmlspecialchars(stripcslashes($_POST["directorcode1"])));
// Director 1 Postal Address
$drpostaladd11 = trim(htmlspecialchars(stripcslashes($_POST["drpostaladd11"])));
$drpostaladd12 = trim(htmlspecialchars(stripcslashes($_POST["drpostaladd12"])));
$drpostaladd13 = trim(htmlspecialchars(stripcslashes($_POST["drpostaladd13"])));
$drprovince1 = trim(htmlspecialchars(stripcslashes($_POST["drprovince1"])));
$drcode1 = trim(htmlspecialchars(stripcslashes($_POST["drcode1"])));
//Director 2 Details
$directorfirstname2 = trim(htmlspecialchars(stripcslashes($_POST["directorfirstname2"])));
$directorsecondname2 = trim(htmlspecialchars(stripcslashes($_POST["directorsecondname2"])));
$idnumber2 = trim(htmlspecialchars(stripcslashes($_POST["idnumber2"])));
$nationality2 = trim(htmlspecialchars(stripcslashes($_POST["nationality2"])));
$directemail2 = trim(htmlspecialchars(stripcslashes($_POST["directemail2"])));
$directorcontact2 = trim(htmlspecialchars(stripcslashes($_POST["directorcontact2"])));
// Diretor 2 Physical Address
$directresidential21 = trim(htmlspecialchars(stripcslashes($_POST["directaddress21"])));
$directaddress22 = trim(htmlspecialchars(stripcslashes($_POST["directaddress22"])));
$directaddress23 = trim(htmlspecialchars(stripcslashes($_POST["directaddress23"])));
$directorprovince2 = trim(htmlspecialchars(stripcslashes($_POST["directorprovince2"])));
$directorcode2 = trim(htmlspecialchars(stripcslashes($_POST["directorcode2"])));
// Director 2 Postal Address
$drpostaladd21 = trim(htmlspecialchars(stripcslashes($_POST["drpostaladd21"])));
$drpostaladd22 = trim(htmlspecialchars(stripcslashes($_POST["drpostaladd22"])));
$drpostaladd23 = trim(htmlspecialchars(stripcslashes($_POST["drpostaladd23"])));
$drprovince2 = trim(htmlspecialchars(stripcslashes($_POST["drprovince2"])));
$drcode2 = trim(htmlspecialchars(stripcslashes($_POST["drcode2"])));
// Director 3 Details
$directorfirstname3 = trim(htmlspecialchars(stripcslashes($_POST["directorfirstname3"])));
$directorsecondname3 = trim(htmlspecialchars(stripcslashes($_POST["directorsecondname3"])));
$idnumber3 = trim(htmlspecialchars(stripcslashes($_POST["idnumber3"])));
$nationality3 = trim(htmlspecialchars(stripcslashes($_POST["nationality3"])));
$directemail3 = trim(htmlspecialchars(stripcslashes($_POST["directemail3"])));
$directorcontact3 = trim(htmlspecialchars(stripcslashes($_POST["directorcontact3"])));
// Diretor 3 Physical Address
$directresidential31 = trim(htmlspecialchars(stripcslashes($_POST["directaddress31"])));
$directaddress32 = trim(htmlspecialchars(stripcslashes($_POST["directaddress32"])));
$directaddress33 = trim(htmlspecialchars(stripcslashes($_POST["directaddress33"])));
$directorprovince3 = trim(htmlspecialchars(stripcslashes($_POST["directorprovince3"])));
$directorcode3 = trim(htmlspecialchars(stripcslashes($_POST["directorcode3"])));
// Director 3 Postal Address
$drpostaladd31 = trim(htmlspecialchars(stripcslashes($_POST["drpostaladd31"])));
$drpostaladd32 = trim(htmlspecialchars(stripcslashes($_POST["drpostaladd32"])));
$drpostaladd33 = trim(htmlspecialchars(stripcslashes($_POST["drpostaladd33"])));
$drprovince3 = trim(htmlspecialchars(stripcslashes($_POST["drprovince3"])));
$drcode3 = trim(htmlspecialchars(stripcslashes($_POST["drcode3"])));
// Prepare the body of the email
$Body = "";
$Body .= "Financial Year (Month) :";
$Body .= $fmonth;
$Body .= "\n";
$Body .= "Number of Authorised Share :";
$Body .= $auth;
$Body .= "\n";
$Body .= "Company Email :";
$Body .= $companyemail;
$Body .= "\n";
// Company Physical Address
$Body .= "company Physical Address :";
$Body .= $physicalAddress1;
$Body .= "\n";
$Body .= $physicalAddress2;
$Body .= "\n";
$Body .= $physicalAddress3;
$Body .= "\n";
$Body .= "Company Physical Province :";
$Body .= $compphysicalprovince;
$Body .= "\n";
$Body .= "Company Physical Code :";
$Body .= $companyphysicalcode;
// Company Postal Address
$Body .= "company Physical Address :";
$Body .= $ComppostalAddress1;
$Body .= "\n";
$Body .= $ComppostalAddress2;
$Body .= "\n";
$Body .= $ComppostalAddress3;
$Body .= "\n";
$Body .= "Company Postal Province :";
$Body .= $postalprovince;
$Body .= "\n";
$Body .= "Company Postal Code :";
$Body .= $postalcode;
// Company Names Suggestion
$Body .= "Name one Suggestion :";
$Body .= $compname1;
$Body .= "\n";
$Body .= "Name two Suggestion :";
$Body .= $compname2;
$Body .= "\n";
$Body .= "Name three Suggestion :";
$Body .= $compname3;
$Body .= "\n";
$Body .= "Name four Suggestion :";
$Body .= $compname4;
$Body .= "\n";
// Director 1 Details
$Body .= "Director one Name :";
$Body .= $directorfirstname1;
$Body .= "\n";
$Body .= "Director one Surnames :";
$Body .= $directorsecondname1;
$Body .= "\n";
$Body .= "Director one ID/Passport Number :";
$Body .= $idnumber1;
$Body .= "\n";
$Body .= "Director one Nationality :";
$Body .= $nationality1;
$Body .= "\n";
$Body .= "Director one Email :";
$Body .= $directemail1;
$Body .= "\n";
$Body .= "Director one Contact :";
$Body .= $directorcontact1;
$Body .= "\n";
//Director One Physical Address
$Body .= "Director one Physical Address :";
$Body .= $directaddress11;
$Body .= "\n";
$Body .= $directaddress12;
$Body .= "\n";
$Body .= $directaddress13;
$Body .= "Director one Physical Province :";
$Body .= $directorprovince1;
$Body .= "\n";
$Body .= "Director one Physical Code :";
$Body .= $directorcode1;
$Body .= "\n";
// Director 1 Postal Address
$Body .= "Director one Postal Address :";
$Body .= $drpostaladd11;
$Body .= "\n";
$Body .= $drpostaladd12;
$Body .= "\n";
$Body .= $drpostaladd13;
$Body .= "Director one Postal Province :";
$Body .= $drprovince1;
$Body .= "\n";
$Body .= "Director one Postal Code :";
$Body .= $drcode1;
$Body .= "\n";
//Director 2
$Body .= "Director two Name :";
$Body .= $directorfirstname2;
$Body .= "\n";
$Body .= "Director two Surnames :";
$Body .= $directorsecondname2;
$Body .= "\n";
$Body .= "Director two ID/Passport Number :";
$Body .= $idnumber2;
$Body .= "\n";
$Body .= "Director two Nationality :";
$Body .= $nationality2;
$Body .= "\n";
$Body .= "Director two Email :";
$Body .= $directemail2;
$Body .= "\n";
$Body .= "Director two Contact :";
$Body .= $directorcontact2;
$Body .= "\n";
//Director two Physical Address
$Body .= "Director two Physical Address :";
$Body .= $directaddress21;
$Body .= "\n";
$Body .= $directaddress22;
$Body .= "\n";
$Body .= $directaddress23;
$Body .= "Director two Physical Province :";
$Body .= $directorprovince2;
$Body .= "\n";
$Body .= "Director two Physical Code :";
$Body .= $directorcode2;
$Body .= "\n";
// Director 2 Postal Address
$Body .= "Director two Postal Address :";
$Body .= $drpostaladd21;
$Body .= "\n";
$Body .= $drpostaladd22;
$Body .= "\n";
$Body .= $drpostaladd23;
$Body .= "Director two Postal Province :";
$Body .= $drprovince2;
$Body .= "\n";
$Body .= "Director two Postal Code :";
$Body .= $drcode2;
$Body .= "\n";
// Director 3
$Body .= "Director three Name :";
$Body .= $directorfirstname3;
$Body .= "\n";
$Body .= "Director three Surnames :";
$Body .= $directorsecondname3;
$Body .= "\n";
$Body .= "Director three ID/Passport Number :";
$Body .= $idnumber3;
$Body .= "\n";
$Body .= "Director three Nationality :";
$Body .= $nationality3;
$Body .= "\n";
$Body .= "Director three Email :";
$Body .= $directemail3;
$Body .= "\n";
$Body .= "Director three Contact :";
$Body .= $directorcontact3;
$Body .= "\n";
//Director two Physical Address
$Body .= "Director three Physical Address :";
$Body .= $directaddress31;
$Body .= "\n";
$Body .= $directaddress32;
$Body .= "\n";
$Body .= $directaddress33;
$Body .= "Director three Physical Province :";
$Body .= $directorprovince3;
$Body .= "\n";
$Body .= "Director three Physical Code :";
$Body .= $directorcode3;
$Body .= "\n";
// Director 2 Postal Address
$Body .= "Director three Postal Address :";
$Body .= $drpostaladd31;
$Body .= "\n";
$Body .= $drpostaladd32;
$Body .= "\n";
$Body .= $drpostaladd33;
$Body .= "Director three Postal Province :";
$Body .= $drprovince3;
$Body .= "\n";
$Body .= "Director three Postal Code :";
$Body .= $drcode3;
$Body .= "\n";
// Validation
$validationOK = true;
if( !$validationOK)
{
print "<meta http-equiv=\"refresh\" content=\"0;URL=regError.php\">";
exit;
}
//Send Email
$success = mail ($to, $subject, $Body, "From: <$email>");
if($success)
{
print "<meta http-equiv=\"refresh\" content=\"0;URL=regThanks.php\">";
}
else
{
print "<meta http-equiv=\"refresh\" content=\"0;URL=regError.php\">";
}
?>