Show last authors
1 {{groovy}}
2
3 import groovy.sql.Sql
4
5 String strDBTable = "\"regUser\".\"newUser\""
6 def sqlConnection = new Sql(services.cmpConnectRegDB.connectRegDB())
7
8 String strCurRecCol = "firstname"
9 int intRecCount=0
10
11 String strContactID = ""
12 String strCompanyName = ""
13 String strTitle = ""
14 String strFirstname = ""
15 String strLastname = ""
16 String strPrefname = ""
17 String strRole = ""
18 String strLphone = ""
19 String strMphone = ""
20 String strEmail = ""
21 String strEmail2 = ""
22 String strCreateTime = java.time.ZonedDateTime.now()
23 String strCreateIP = request.remoteAddr
24 String strConfCode = ""
25 String strEmailBody = ""
26
27 String strFormStatus = "DataEntry"
28
29 String strEditCommand = request.get("butAction")
30 if (strEditCommand == null){
31 strEditCommand = "none"
32 xcontext.put("strEditCommand", strEditCommand)
33 }
34 // println "strEditCommand:" + strEditCommand
35
36 //Process Commands
37
38 if ((strEditCommand == "Correct") || (strEditCommand == "Register") || (strEditCommand == "Proceed")){
39
40 strCompanyName = services.cleanStr.alphanum(request.companyname)
41 strCompanyAddress = services.cleanStr.alphanum(request.companyaddress)
42 strCompanyCity = services.cleanStr.alphanum(request.companycity)
43 strCompanyPostcode = services.cleanStr.alphanum(request.companypostcode)
44 strCompanyProvince = services.cleanStr.alphanum(request.companyprovince)
45 strCompanyCountry = services.cleanStr.alphanum(request.companycountry)
46 strTitle = services.cleanStr.alphanum(request.title)
47 strFirstname = services.cleanStr.alphanum(request.firstname)
48 strLastname = services.cleanStr.alphanum(request.lastname)
49 strPrefname = services.cleanStr.alphanum(request.prefname)
50 strRole = services.cleanStr.alphanum(request.role)
51 strLphone = services.cleanStr.numphone(request.lphone)
52 strMphone = services.cleanStr.numphone(request.mphone)
53 strEmail = services.cleanStr.alphanum(request.email)
54 strEmail2 = services.cleanStr.alphanum(request.email2)
55 strCreateTime = java.time.ZonedDateTime.now()
56 strCreateIP = request.remoteAddr
57 strConfCode = services.genRandom.randStr(16)
58 if (strEditCommand == "Register"){
59 String sqlHowManyRecords = "SELECT count(createtime) as reccount FROM " + strDBTable + " where email='" + strEmail + "'"
60 intRecCount = sqlConnection.rows(sqlHowManyRecords).reccount[0] ?:0
61 if (intRecCount == 0){ //insert a new record
62 sqlQueryInsertRec = "INSERT INTO " + strDBTable +
63 """(
64 companyname,
65 companyaddress,
66 companycity,
67 companypostcode,
68 companyprovince,
69 companycountry,
70 title,
71 firstname,
72 lastname,
73 prefname,
74 role,
75 lphone,
76 mphone,
77 email,
78 email2,
79 createtime,
80 createip,
81 confemailsenttime,
82 confemailsentcode)
83 VALUES(
84 '$strCompanyName',
85 '$strCompanyAddress',
86 '$strCompanyCity',
87 '$strCompanyPostcode',
88 '$strCompanyProvince',
89 '$strCompanyCountry',
90 '$strTitle',
91 '$strFirstname',
92 '$strLastname',
93 '$strPrefname',
94 '$strRole',
95 '$strLphone',
96 '$strMphone',
97 '$strEmail',
98 '$strEmail2',
99 now(),
100 '$strCreateIP',
101 now(),
102 '$strConfCode')
103 ;"""
104 sqlConnection.execute(sqlQueryInsertRec)
105 }
106 else{ // update the existing record
107 sqlQueryInsertRec = "UPDATE " + strDBTable +
108 """
109 SET
110 companyname = '$strCompanyName',
111 title = '$strTitle',
112 firstname = '$strFirstname',
113 lastname = '$strLastname',
114 prefname = '$strPrefname',
115 role = '$strRole',
116 lphone = '$strLphone',
117 mphone = '$strMphone',
118 email = '$strEmail',
119 email2 = '$strEmail2',
120 createtime = now(),
121 createip = '$strCreateIP',
122 confemailsenttime = now(),
123 confemailsentcode = '$strConfCode',
124 confreceivetime = null,
125 confreceivecode = '',
126 status = 'new'
127 WHERE email = '$strEmail';"""
128 sqlConnection.execute(sqlQueryInsertRec)
129 }
130 strEmailBody = "Dear " + strPrefname + ","
131 strEmailBody = strEmailBody + "\r\n" + "\r\n" + "A request was made to register you to the CEC website (https://cecocert.com) with the following information:" + "\r\n" + "\r\n"
132 strEmailBody = strEmailBody + "Name: " + strTitle + " " + strFirstname + " " + strLastname + "\r\n"
133 strEmailBody = strEmailBody + "Registered Business Name: " + strCompanyName + "\r\n"
134 strEmailBody = strEmailBody + "Registered Business Address: " + strCompanyAddress + "\r\n"
135 strEmailBody = strEmailBody + "Registered Business City: " + strCompanyAddress + "\r\n"
136 strEmailBody = strEmailBody + "Registered Business Postal Code: " + strCompanyAddress + "\r\n"
137 strEmailBody = strEmailBody + "Registered Business Province/State: " + strCompanyAddress + "\r\n"
138 strEmailBody = strEmailBody + "Registered Business Country: " + strCompanyAddress + "\r\n"
139 strEmailBody = strEmailBody + "Role: " + strRole + "\r\n"
140 strEmailBody = strEmailBody + "Landline phone: " + strLphone + "\r\n"
141 strEmailBody = strEmailBody + "Mobile phone:" + strMphone + "\r\n" + "\r\n"
142 strEmailBody = strEmailBody + "The request was made from IP address: " + strCreateIP
143 strEmailBody = strEmailBody + "\r\n" + "\r\n" + "Please click the below link to confirm your e-mail address:" + "\r\n"
144 strEmailBody = strEmailBody + "https://cecocert.com/bin/view/StartPage/X1100%20-%20Process%20e-mail%20confirmation/WebHome"
145 strEmailBody = strEmailBody + "?em=" + strEmail + "&cc=" + strConfCode
146 strEmailBody = strEmailBody + "\r\n" + "\r\n" + "If you do not confirm your e-mail address within 24 hours, the information you entered will be deleted!"
147
148 // println strEmailBody
149 xcontext.put("strEmailBody",strEmailBody)
150 // services.writeLog.writeLogEntry(xcontext.getUser(), request.remoteAddr, doc.space, "INSERT AS NEW", intCurUID)
151 xcontext.put("strCompanyName",strCompanyName)
152 xcontext.put("strCompanyName",strCompanyAddress)
153 xcontext.put("strCompanyName",strCompanyCity)
154 xcontext.put("strCompanyName",strCompanyPostcode)
155 xcontext.put("strCompanyName",strCompanyProvince)
156 xcontext.put("strCompanyName",strCompanyCountry)
157 xcontext.put("strTitle",strTitle)
158 xcontext.put("strFirstname",strFirstname)
159 xcontext.put("strLastname",strLastname)
160 xcontext.put("strPrefname",strPrefname)
161 xcontext.put("strRole",strRole)
162 xcontext.put("strLphone",strLphone)
163 xcontext.put("strMphone",strMphone)
164 xcontext.put("strEmail",strEmail)
165 xcontext.put("strEmail2",strEmail2)
166 xcontext.put("strCreateIP",strCreateIP)
167 strFormStatus = "SendEmail"
168 }
169 if (strEditCommand == "Proceed"){
170 xcontext.put("strCompanyName",strCompanyName)
171 xcontext.put("strCompanyName",strCompanyAddress)
172 xcontext.put("strCompanyName",strCompanyCity)
173 xcontext.put("strCompanyName",strCompanyPostcode)
174 xcontext.put("strCompanyName",strCompanyProvince)
175 xcontext.put("strCompanyName",strCompanyCountry)
176 xcontext.put("strTitle",strTitle)
177 xcontext.put("strFirstname",strFirstname)
178 xcontext.put("strLastname",strLastname)
179 xcontext.put("strPrefname",strPrefname)
180 xcontext.put("strRole",strRole)
181 xcontext.put("strLphone",strLphone)
182 xcontext.put("strMphone",strMphone)
183 xcontext.put("strEmail",strEmail)
184 xcontext.put("strEmail2",strEmail2)
185 xcontext.put("strCreateIP",strCreateIP)
186 strFormStatus = "DataVerify"
187 }
188 if (strEditCommand == "Correct"){
189 xcontext.put("strCompanyName",strCompanyName)
190 xcontext.put("strCompanyName",strCompanyAddress)
191 xcontext.put("strCompanyName",strCompanyCity)
192 xcontext.put("strCompanyName",strCompanyPostcode)
193 xcontext.put("strCompanyName",strCompanyProvince)
194 xcontext.put("strCompanyName",strCompanyCountry)
195 xcontext.put("strTitle",strTitle)
196 xcontext.put("strFirstname",strFirstname)
197 xcontext.put("strLastname",strLastname)
198 xcontext.put("strPrefname",strPrefname)
199 xcontext.put("strRole",strRole)
200 xcontext.put("strLphone",strLphone)
201 xcontext.put("strMphone",strMphone)
202 xcontext.put("strEmail",strEmail)
203 xcontext.put("strEmail2",strEmail2)
204 xcontext.put("strCreateIP",strCreateIP)
205 strFormStatus = "DataCorrection"
206 }
207 }
208 sqlConnection.close()
209 xcontext.put("strFormStatus", strFormStatus)
210
211 {{/groovy}}
212
213 {{velocity}}
214 ##$xcontext.strFormStatus
215 #if( $xcontext.strFormStatus == "DataEntry" )
216 {{html wiki=false clean=false}}
217 <head>
218 <style>
219 #cecTable {
220 font-family: Arial, Helvetica, sans-serif;
221 border-collapse: collapse;
222 border-color: #007d84
223 width: 100%;
224 }
225
226 #cecTable td, #cecTable th {
227 border: 1px solid #007d84;
228 padding: 8px;
229 }
230
231 #cecTable tr:nth-child(even){background-color: #d0d3d4;}
232
233 #cecTable tr:hover {background-color: #ddd;}
234
235 #cecTable th {
236 padding-top: 12px;
237 padding-bottom: 12px;
238 text-align: left;
239 background-color: #007d84;
240 color: white;
241 }
242 </style>
243 </head>
244 <form action="" class="xformInline" method="post" name="Contact Edit Form">
245 <table id="cecTable"; cellspacing="5px" cellpadding="5%" border="1" width="100%"; align="left">
246 <col style="width:30%">
247 <col style="width:70%">
248 <th colspan = "2">
249 <b>Company Information</b>
250 </th>
251 <tr>
252 <td align="left" class="style1">Company name:</td>
253 <td class="style1">
254 <input type="text" id="companyname" name="companyname" placeholder="Enter the legal name of your company" size="50">
255 </select>
256 </td>
257 </tr>
258 <tr>
259 <td align="left" class="style1">Registered Business Address - House Number, Street:</td>
260 <td class="style1">
261 <input type="text" id="companyaddress" name="companyaddress" placeholder="Enter the House Number, Street, Floor, etc part of your company's registered business address" size="100">
262 </select>
263 </td>
264 </tr>
265 <tr>
266 <td align="left" class="style1">Registered Business Address - City:</td>
267 <td class="style1">
268 <input type="text" id="companycity" name="companycity" placeholder="Enter the City part of your company's registered business address" size="100">
269 </select>
270 </td>
271 </tr>
272 <tr>
273 <td align="left" class="style1">Registered Business Address - Postal Code:</td>
274 <td class="style1">
275 <input type="text" id="companypostcode" name="companypostcode" placeholder="Enter the Postal Code part of your company's registered business address" size="100">
276 </select>
277 </td>
278 </tr>
279 <tr>
280 <td align="left" class="style1">Registered Business Address - Province or State:</td>
281 <td class="style1">
282 <input type="text" id="companyprovince" name="companyprovince" placeholder="Enter the Province or State part of your company's registered business address, leave empty if n/a" size="100">
283 </select>
284 </td>
285 </tr>
286 <tr>
287 <td align="left" class="style1">Registered Business Address - Country:</td>
288 <td class="style1">
289 <input type="text" id="companycountry" name="companycountry" placeholder="Enter the Country part of your company's registered business address" size="50">
290 </select>
291 </td>
292 </tr>
293 <th colspan = "2">
294 <b>Your Contact Information</b>
295 </th>
296 <tr>
297 <td align="left" class="style1">Title:</td>
298 <td class="style1">
299 <input type="text" id="title" name="title" placeholder="Enter your title (Ms, Mr, Dr, etc)" size="30">
300 </td>
301 </tr>
302 <tr>
303 <td align="left" class="style1">First name:</td>
304 <td class="style1">
305 <input type="text" id="firstname" name="firstname" placeholder="Enter your first name" size="50">
306 </td>
307 </tr>
308 <tr>
309 <td align="left" class="style1">Last name:</td>
310 <td class="style1">
311 <input type="text" id="lastname" name="lastname" placeholder="Enter your surname/family name" size="50">
312 </td>
313 </tr>
314 <tr>
315 <td align="left" class="style1">Preferred name to address you:</td>
316 <td class="style1">
317 <input type="text" id="prefname" name="prefname" placeholder="Enter the name you want to be addressed by" size="50">
318 </td>
319 </tr>
320 <tr>
321 <td align="left" class="style1">Your Role within the company:</td>
322 <td class="style1">
323 <input type="text" id="role" name="role" placeholder="Enter the Role you have within the company" size="70">
324 </td>
325 </tr>
326 <tr>
327 <td align="left" class="style1">Phone number (Landline):</td>
328 <td class="style1">
329 <input type="text" id="lphone" name="lphone" placeholder="Enter your landline phone number, with country code, without symbols" size="70">
330 </td>
331 </tr>
332 <tr>
333 <td align="left" class="style1">Phone number (Mobile):</td>
334 <td class="style1">
335 <input type="text" id="mphone" name="mphone" placeholder="Enter your mobile phone number, with country code, without symbols" size="70">
336 </td>
337 </tr>
338 <tr>
339 <td align="left" class="style1">E-Mail address (primary):</td>
340 <td class="style1">
341 <input type="email" id="email" name="email" placeholder="Enter your primary e-mail address, usually the company e-mail address" size="70">
342 </td>
343 </tr>
344 <tr>
345 <td align="left" class="style1">E-Mail address (secondary):</td>
346 <td class="style1">
347 <input type="email" id="email2" name="email2" placeholder="Enter a secondary e-mail address, in case the primary one becomes unavailable" size="80">
348 </td>
349 </tr>
350 <tr>
351 <td></td>
352 <td align="left" class="style1">
353 <input class="btn btn-primary" type="submit" name="butAction" value="Proceed">
354 </td>
355 </tr>
356 </table>
357 </form>
358 {{/html}}
359 #end
360 #if( $xcontext.strFormStatus == "DataCorrection" )
361 {{html wiki=false clean=false}}
362 <form action="" class="xformInline" method="post" name="User Registration Form">
363 <table id="cecTable"; cellspacing="5px" cellpadding="5%" border="1" width="100%"; align="left">
364 <col style="width:30%">
365 <col style="width:70%">
366 <th colspan = "2">
367 <b>Company Information</b>
368 </th>
369 <tr>
370 <td align="left" class="style1">Company name:</td>
371 <td class="style1">
372 <input type="text" id="companyname" name="companyname" placeholder="Enter the legal name of your company" value="${xcontext.strCompanyName}" size="50">
373 </select>
374 </td>
375 </tr>
376 <tr>
377 <td align="left" class="style1">Registered Business Address - House Number, Street:</td>
378 <td class="style1">
379 <input type="text" id="companyaddress" name="companyaddress" placeholder="Enter the House Number, Street, Floor, etc part of your company's registered business address" size="100">
380 </select>
381 </td>
382 </tr>
383 <tr>
384 <td align="left" class="style1">Registered Business Address - City:</td>
385 <td class="style1">
386 <input type="text" id="companycity" name="companycity" placeholder="Enter the City part of your company's registered business address" size="100">
387 </select>
388 </td>
389 </tr>
390 <tr>
391 <td align="left" class="style1">Registered Business Address - Postal Code:</td>
392 <td class="style1">
393 <input type="text" id="companypostcode" name="companypostcode" placeholder="Enter the Postal Code part of your company's registered business address" size="100">
394 </select>
395 </td>
396 </tr>
397 <tr>
398 <td align="left" class="style1">Registered Business Address - Province or State:</td>
399 <td class="style1">
400 <input type="text" id="companyprovince" name="companyprovince" placeholder="Enter the Province or State part of your company's registered business address, leave empty if n/a" size="100">
401 </select>
402 </td>
403 </tr>
404 <tr>
405 <td align="left" class="style1">Registered Business Address - Country:</td>
406 <td class="style1">
407 <input type="text" id="companycountry" name="companycountry" placeholder="Enter the Country part of your company's registered business address" size="50">
408 </select>
409 </td>
410 </tr>
411 <th colspan = "2">
412 <b>Your Contact Information</b>
413 </th>
414 <tr>
415 <td align="left" class="style1">Title:</td>
416 <td class="style1">
417 <input type="text" id="title" name="title" placeholder="Enter your title" value="${xcontext.strTitle}" size="20">
418 </td>
419 </tr>
420 <tr>
421 <td align="left" class="style1">First name:</td>
422 <td class="style1">
423 <input type="text" id="firstname" name="firstname" placeholder="Enter your first name" value="${xcontext.strFirstname}" size="50">
424 </td>
425 </tr>
426 <tr>
427 <td align="left" class="style1">Last name:</td>
428 <td class="style1">
429 <input type="text" id="lastname" name="lastname" placeholder="Enter your surname/family name" value="${xcontext.strLastname}" size="50">
430 </td>
431 </tr>
432 <tr>
433 <td align="left" class="style1">Preferred name to address you:</td>
434 <td class="style1">
435 <input type="text" id="prefname" name="prefname" placeholder="Enter the name you want to be addressed by" value="${xcontext.strPrefname}" size="50">
436 </td>
437 </tr>
438 <tr>
439 <td align="left" class="style1">Phone number (Landline):</td>
440 <td class="style1">
441 <input type="text" id="lphone" name="lphone" placeholder="Enter your landline phone number, with country code, without symbols" value="${xcontext.strLphone}" size="70">
442 </td>
443 </tr>
444 <tr>
445 <td align="left" class="style1">Phone number (Mobile):</td>
446 <td class="style1">
447 <input type="text" id="mphone" name="mphone" placeholder="Enter your mobile phone number, with country code, without symbols" value="${xcontext.strMphone}" size="70">
448 </td>
449 </tr>
450 <tr>
451 <td align="left" class="style1">E-Mail address (primary):</td>
452 <td class="style1">
453 <input type="email" id="email" name="email" placeholder="Enter your primary e-mail address, usually the company e-mail address" value="${xcontext.strEmail}" size="70">
454 </td>
455 </tr>
456 <tr>
457 <td align="left" class="style1">E-Mail address (secondary):</td>
458 <td class="style1">
459 <input type="email" id="email2" name="email2" placeholder="Enter a secondary e-mail address, in case the primary one becomes unavailable" value="${xcontext.strEmail2}" size="70">
460 </td>
461 </tr>
462 <tr>
463 <td></td>
464 <td align="left" class="style1">
465 <input class="btn btn-primary" type="submit" name="butAction" value="Proceed">
466 </td>
467 </tr>
468 </table>
469 </form>
470 {{/html}}
471 #end
472
473 #if( $xcontext.strFormStatus == "DataVerify" )
474 You have entered the following information to register to the CEC Scheme:
475 {{html wiki=false clean=false}}
476 <form action="" class="xformInline" method="post" name="User Registration Form">
477 <table id="table1"; cellspacing="5px" cellpadding="5%" border="1" width="100%"; align="left">
478 <col style="width:30%">
479 <col style="width:70%">
480 <tr>
481 <td align="left" class="style1">Company name:</td>
482 <td class="style1">
483 <input type="hidden" id="companyname" name="companyname" readonly value="${xcontext.strCompanyName}" size="50">
484 ${xcontext.strCompanyName}
485 </td>
486 </tr>
487 <tr>
488 <td align="hidden" class="style1">Title:</td>
489 <td class="style1">
490 <input type="hidden" id="title" name="title" readonly value="${xcontext.strTitle}" size="10">
491 ${xcontext.strTitle}
492 </td>
493 </tr>
494 <tr>
495 <td align="hidden" class="style1">First name:</td>
496 <td class="style1">
497 <input type="hidden" id="firstname" name="firstname" readonly value="${xcontext.strFirstname}" size="50">
498 ${xcontext.strFirstname}
499 </td>
500 </tr>
501 <tr>
502 <td align="hidden" class="style1">Last name:</td>
503 <td class="style1">
504 <input type="hidden" id="lastname" name="lastname" readonly value="${xcontext.strLastname}" size="50">
505 ${xcontext.strLastname}
506 </td>
507 </tr>
508 <tr>
509 <td align="hidden" class="style1">Preferred name to address you:</td>
510 <td class="style1">
511 <input type="hidden" id="prefname" name="prefname" readonly value="${xcontext.strPrefname}" size="50">
512 ${xcontext.strPrefname}
513 </td>
514 </tr>
515 <tr>
516 <td align="left" class="style1">Phone number (Landline):</td>
517 <td class="style1">
518 <input type="hidden" id="lphone" name="lphone" readonly value="${xcontext.strLphone}" size="20">
519 ${xcontext.strLphone}
520 </td>
521 </tr>
522 <tr>
523 <td align="left" class="style1">Phone number (Mobile):</td>
524 <td class="style1">
525 <input type="hidden" id="mphone" name="mphone" readonly value="${xcontext.strMphone}" size="20">
526 ${xcontext.strMphone}
527 </td>
528 </tr>
529 <tr>
530 <td align="left" class="style1">E-Mail address (primary):</td>
531 <td class="style1">
532 <input type="hidden" id="email" name="email" readonly value="${xcontext.strEmail}" size="40">
533 ${xcontext.strEmail}
534 </td>
535 </tr>
536 <tr>
537 <td align="left" class="style1">E-Mail address (secondary):</td>
538 <td class="style1">
539 <input type="hidden" id="email2" name="email2" readonly value="${xcontext.strEmail2}" size="40">
540 ${xcontext.strEmail2}
541 </td>
542 </tr>
543 <tr>
544 <td>Click the button to the right to correct the above information</td>
545 <td align="left" class="style1">
546 <input class="btn btn-default" type="submit" name="butAction" value="Correct">
547 </td>
548 </tr>
549 </table>
550
551 <p>Please check the above information, and if correct, then read the terms and conditions below. If the above information is correct and you accept the terms and conditions, then please click the Register button at the bottom of this page.</p>
552 <p>If the information shown in the above table is incorrect, then please click the "Correct" button at the bottom of the above table to return to the editing page.</p>
553 <p><b>By clicking on the Register button, you agree to the following:</b>
554 <ul>
555 <li>The CEC Scheme, the CEC Website (cecocert.com), and the underlying computer systems are owned and operated by TruCert Assessment Services Inc. ("TruCert"), a company incorporated in Canada.</li>
556 <li>The information you enter into any form on the CEC Website may be stored and retained by TruCert and used for the purposes of the CEC Scheme.</li>
557 <li>Your IP address and time and date of you accessing the CEC Website may be stored and retained by TruCert and used for purposes of the CEC Scheme.</li>
558 <li>The primary computer systems used to store your information are located in Canada. TruCert may operate additional computer systems in the USA, the UK, or the EU that may store copies of your information.</li>
559 <li>By providing your contact information, you agree to TruCert contacting you, and communicating with you for the purposes of the CEC Scheme.</li>
560 <li>By providing your contact information, you agree to TruCert sharing your contact information and the fact that you intend in participating in the CEC Scheme to Mastercard International.</li>
561 <li>By providing your contact information, you agree to TruCert informing 3rd parties participating in the CEC Scheme of the fact that you are also participating in the CEC Scheme, for example by listing your contact information in a register of companies participating in the CEC Scheme.</li>
562 <li>TruCert will not sell, nor make available for free, your contact information for marketing or sales purposes of thirdy parties.</li>
563 <li>TruCert may change the terms and conditons of storing and sharing your contact information, but in such case will inform you of the modified terms and conditions by e-mail and will give you the option to have your contact information deleted before the modified terms and conditions come into force.</li>
564 </ul>
565 <p>After you click the below <b>Register</b> button, you should receive an automatically generated e-mail to the primary e-mail address you provide in the form above, containing a verification link. You must verify your e-mail address by clicking this verification link contained in the e-mail within 24 hours, otherwise your data may be deleted and you will have to restart the registration process.</p>
566
567 <input type="hidden" id="companyname" name="companyname" readonly value="${xcontext.strCompanyName}" size="50">
568
569 <input type="hidden" id="companycity" name="companycity" readonly value="${xcontext.strCompanyAddress}" size="100">
570 <input type="hidden" id="companyaddress" name="companyaddress" readonly value="${xcontext.strCompanyCity}" size="100">
571 <input type="hidden" id="companypostcode" name="companypostcode" readonly value="${xcontext.strCompanyPostcode}" size="100">
572 <input type="hidden" id="companyprovince" name="companyprovince" readonly value="${xcontext.strCompanyProvince}" size="100">
573 <input type="hidden" id="companycountry" name="companycountry" readonly value="${xcontext.strCompanyCountry}" size="50">
574
575 <input type="hidden" id="title" name="title" readonly value="${xcontext.strTitle}" size="10">
576 <input type="hidden" id="firstname" name="firstname" readonly value="${xcontext.strFirstname}" size="50">
577 <input type="hidden" id="lastname" name="lastname" readonly value="${xcontext.strLastname}" size="50">
578 <input type="hidden" id="prefname" name="prefname" readonly value="${xcontext.strPrefname}" size="50">
579 <input type="hidden" id="lphone" name="lphone" readonly value="${xcontext.strLphone}" size="20">
580 <input type="hidden" id="mphone" name="mphone" readonly value="${xcontext.strMphone}" size="20">
581 <input type="hidden" id="email" name="email" readonly value="${xcontext.strEmail}" size="40">
582 <input type="hidden" id="email2" name="email2" readonly value="${xcontext.strEmail2}" size="40">
583 <input class="btn btn-primary" type="submit" name="butAction" value="Register">
584 </form>
585 {{/html}}
586
587 #end
588 #if( $xcontext.strFormStatus == "SendEmail" )
589 #set($email_to = "${xcontext.strEmail}")
590 #set($email_subject = "CEC Registration - confirmation required to proceed")
591 #set($email_from = "cec_noreply@cecocert.com")
592 #set($email_text = "$xcontext.strEmailBody")
593 #set ($message = $services.mail.sender.createMessage($email_from, $email_to, $email_subject))
594 #set ($discard = $message.addPart("text/plain", ${xcontext.strEmailBody}))
595 #set ($mailResult = $services.mail.sender.send($message))
596 ## Check if the message was created properly and if we have permissions to send emails
597 #if ($services.mail.sender.lastError)
598 {{error}}$exceptiontool.getStackTrace($services.mail.sender.lastError){{/error}}
599 #end
600 ## Check if the mail we tried to send has failed to be sent
601 #set ($statuses = $mailResult.statusResult.getAllErrors())
602 #if ($statuses.hasNext())
603 #set ($status = $statuses.next())
604 {{error}}
605 Error: $status.errorSummary ($status.state)
606 $status.errorDescription
607 {{/error}}
608 #end
609 An e-mail asking you to confirm your e-mail address was sent to ${xcontext.strEmail}.
610 Please check your inbox and click on the link to confirm your e-mail address!
611 The process will only continue after you have confirmed your e-mail address.
612 #end
613
614 {{/velocity}}
615
© 2022 TruCert Assessment Services Inc.
V01-00