Version 1.29 by SuperUwe Trueggelmann on 2022-10-13

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 companyaddress = '$strCompanyAddress',
112 companycity = '$strCompanyCity',
113 companypostcode = '$strCompanyPostcode',
114 companyprovince = '$strCompanyProvince',
115 companycountry = '$strCompanyCountry',
116 title = '$strTitle',
117 firstname = '$strFirstname',
118 lastname = '$strLastname',
119 prefname = '$strPrefname',
120 role = '$strRole',
121 lphone = '$strLphone',
122 mphone = '$strMphone',
123 email = '$strEmail',
124 email2 = '$strEmail2',
125 createtime = now(),
126 createip = '$strCreateIP',
127 confemailsenttime = now(),
128 confemailsentcode = '$strConfCode',
129 confreceivetime = null,
130 confreceivecode = '',
131 status = 'new'
132 WHERE email = '$strEmail';"""
133 sqlConnection.execute(sqlQueryInsertRec)
134 }
135 strEmailBody = "Dear " + strPrefname + ","
136 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"
137 strEmailBody = strEmailBody + "Registered name:\r\n"
138 strEmailBody = strEmailBody + "Name: " + strTitle + " " + strFirstname + " " + strLastname + "\r\n"
139 strEmailBody = strEmailBody + "Registered Business Address:\r\n"
140 strEmailBody = strEmailBody + "Registered Business Name: " + strCompanyName + "\r\n"
141 strEmailBody = strEmailBody + "Registered Business Address: " + strCompanyAddress + "\r\n"
142 strEmailBody = strEmailBody + "Registered Business City: " + strCompanyAddress + "\r\n"
143 strEmailBody = strEmailBody + "Registered Business Postal Code: " + strCompanyAddress + "\r\n"
144 strEmailBody = strEmailBody + "Registered Business Province/State: " + strCompanyAddress + "\r\n"
145 strEmailBody = strEmailBody + "Registered Business Country: " + strCompanyAddress + "\r\n"
146 strEmailBody = strEmailBody + "Contact info:"
147 strEmailBody = strEmailBody + "Role: " + strRole + "\r\n"
148 strEmailBody = strEmailBody + "Landline phone: " + strLphone + "\r\n"
149 strEmailBody = strEmailBody + "Mobile phone:" + strMphone + "\r\n" + "\r\n"
150 strEmailBody = strEmailBody + "The request was made from IP address: " + strCreateIP
151 strEmailBody = strEmailBody + "\r\n" + "\r\n" + "Please click the below link to confirm your e-mail address:" + "\r\n"
152 strEmailBody = strEmailBody + "https://cecocert.com/bin/view/StartPage/X1100%20-%20Process%20e-mail%20confirmation/WebHome"
153 strEmailBody = strEmailBody + "?em=" + strEmail + "&cc=" + strConfCode
154 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!"
155
156 // println strEmailBody
157 xcontext.put("strEmailBody",strEmailBody)
158 // services.writeLog.writeLogEntry(xcontext.getUser(), request.remoteAddr, doc.space, "INSERT AS NEW", intCurUID)
159 xcontext.put("strCompanyName",strCompanyName)
160 xcontext.put("strCompanyName",strCompanyAddress)
161 xcontext.put("strCompanyName",strCompanyCity)
162 xcontext.put("strCompanyName",strCompanyPostcode)
163 xcontext.put("strCompanyName",strCompanyProvince)
164 xcontext.put("strCompanyName",strCompanyCountry)
165 xcontext.put("strTitle",strTitle)
166 xcontext.put("strFirstname",strFirstname)
167 xcontext.put("strLastname",strLastname)
168 xcontext.put("strPrefname",strPrefname)
169 xcontext.put("strRole",strRole)
170 xcontext.put("strLphone",strLphone)
171 xcontext.put("strMphone",strMphone)
172 xcontext.put("strEmail",strEmail)
173 xcontext.put("strEmail2",strEmail2)
174 xcontext.put("strCreateIP",strCreateIP)
175 strFormStatus = "SendEmail"
176 }
177 if (strEditCommand == "Proceed"){
178 xcontext.put("strCompanyName",strCompanyName)
179 xcontext.put("strCompanyName",strCompanyAddress)
180 xcontext.put("strCompanyName",strCompanyCity)
181 xcontext.put("strCompanyName",strCompanyPostcode)
182 xcontext.put("strCompanyName",strCompanyProvince)
183 xcontext.put("strCompanyName",strCompanyCountry)
184 xcontext.put("strTitle",strTitle)
185 xcontext.put("strFirstname",strFirstname)
186 xcontext.put("strLastname",strLastname)
187 xcontext.put("strPrefname",strPrefname)
188 xcontext.put("strRole",strRole)
189 xcontext.put("strLphone",strLphone)
190 xcontext.put("strMphone",strMphone)
191 xcontext.put("strEmail",strEmail)
192 xcontext.put("strEmail2",strEmail2)
193 xcontext.put("strCreateIP",strCreateIP)
194 strFormStatus = "DataVerify"
195 }
196 if (strEditCommand == "Correct"){
197 xcontext.put("strCompanyName",strCompanyName)
198 xcontext.put("strCompanyName",strCompanyAddress)
199 xcontext.put("strCompanyName",strCompanyCity)
200 xcontext.put("strCompanyName",strCompanyPostcode)
201 xcontext.put("strCompanyName",strCompanyProvince)
202 xcontext.put("strCompanyName",strCompanyCountry)
203 xcontext.put("strTitle",strTitle)
204 xcontext.put("strFirstname",strFirstname)
205 xcontext.put("strLastname",strLastname)
206 xcontext.put("strPrefname",strPrefname)
207 xcontext.put("strRole",strRole)
208 xcontext.put("strLphone",strLphone)
209 xcontext.put("strMphone",strMphone)
210 xcontext.put("strEmail",strEmail)
211 xcontext.put("strEmail2",strEmail2)
212 xcontext.put("strCreateIP",strCreateIP)
213 strFormStatus = "DataCorrection"
214 }
215 }
216 sqlConnection.close()
217 xcontext.put("strFormStatus", strFormStatus)
218
219 {{/groovy}}
220
221 {{velocity}}
222 ##$xcontext.strFormStatus
223 #if( $xcontext.strFormStatus == "DataEntry" )
224 {{html wiki=false clean=false}}
225 <head>
226 <style>
227 #cecTable {
228 font-family: Arial, Helvetica, sans-serif;
229 border-collapse: collapse;
230 border-color: #007d84
231 width: 100%;
232 }
233
234 #cecTable td, #cecTable th {
235 border: 1px solid #007d84;
236 padding: 8px;
237 }
238
239 #cecTable tr:nth-child(even){background-color: #d0d3d4;}
240
241 #cecTable tr:hover {background-color: #ddd;}
242
243 #cecTable th {
244 padding-top: 12px;
245 padding-bottom: 12px;
246 text-align: left;
247 background-color: #007d84;
248 color: white;
249 }
250 </style>
251 </head>
252 <form action="" class="xformInline" method="post" name="Contact Edit Form">
253 <table id="cecTable"; cellspacing="5px" cellpadding="5%" border="1" width="100%"; align="left">
254 <col style="width:30%">
255 <col style="width:70%">
256 <th colspan = "2">
257 <b>Company Information</b>
258 </th>
259 <tr>
260 <td align="left" class="style1">Company name:</td>
261 <td class="style1">
262 <input type="text" id="companyname" name="companyname" placeholder="Enter the legal name of your company" size="50">
263 </select>
264 </td>
265 </tr>
266 <tr>
267 <td align="left" class="style1">Registered Business Address - House Number, Street:</td>
268 <td class="style1">
269 <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">
270 </select>
271 </td>
272 </tr>
273 <tr>
274 <td align="left" class="style1">Registered Business Address - City:</td>
275 <td class="style1">
276 <input type="text" id="companycity" name="companycity" placeholder="Enter the City part of your company's registered business address" size="100">
277 </select>
278 </td>
279 </tr>
280 <tr>
281 <td align="left" class="style1">Registered Business Address - Postal Code:</td>
282 <td class="style1">
283 <input type="text" id="companypostcode" name="companypostcode" placeholder="Enter the Postal Code part of your company's registered business address" size="100">
284 </select>
285 </td>
286 </tr>
287 <tr>
288 <td align="left" class="style1">Registered Business Address - Province or State:</td>
289 <td class="style1">
290 <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">
291 </select>
292 </td>
293 </tr>
294 <tr>
295 <td align="left" class="style1">Registered Business Address - Country:</td>
296 <td class="style1">
297 <input type="text" id="companycountry" name="companycountry" placeholder="Enter the Country part of your company's registered business address" size="50">
298 </select>
299 </td>
300 </tr>
301 <th colspan = "2">
302 <b>Your Contact Information</b>
303 </th>
304 <tr>
305 <td align="left" class="style1">Title:</td>
306 <td class="style1">
307 <input type="text" id="title" name="title" placeholder="Enter your title (Ms, Mr, Dr, etc)" size="30">
308 </td>
309 </tr>
310 <tr>
311 <td align="left" class="style1">First name:</td>
312 <td class="style1">
313 <input type="text" id="firstname" name="firstname" placeholder="Enter your first name" size="50">
314 </td>
315 </tr>
316 <tr>
317 <td align="left" class="style1">Last name:</td>
318 <td class="style1">
319 <input type="text" id="lastname" name="lastname" placeholder="Enter your surname/family name" size="50">
320 </td>
321 </tr>
322 <tr>
323 <td align="left" class="style1">Preferred name to address you:</td>
324 <td class="style1">
325 <input type="text" id="prefname" name="prefname" placeholder="Enter the name you want to be addressed by" size="50">
326 </td>
327 </tr>
328 <tr>
329 <td align="left" class="style1">Your Role within the company:</td>
330 <td class="style1">
331 <input type="text" id="role" name="role" placeholder="Enter the Role you have within the company" size="70">
332 </td>
333 </tr>
334 <tr>
335 <td align="left" class="style1">Phone number (Landline):</td>
336 <td class="style1">
337 <input type="text" id="lphone" name="lphone" placeholder="Enter your landline phone number, with country code, without symbols" size="70">
338 </td>
339 </tr>
340 <tr>
341 <td align="left" class="style1">Phone number (Mobile):</td>
342 <td class="style1">
343 <input type="text" id="mphone" name="mphone" placeholder="Enter your mobile phone number, with country code, without symbols" size="70">
344 </td>
345 </tr>
346 <tr>
347 <td align="left" class="style1">E-Mail address (primary):</td>
348 <td class="style1">
349 <input type="email" id="email" name="email" placeholder="Enter your primary e-mail address, usually the company e-mail address" size="70">
350 </td>
351 </tr>
352 <tr>
353 <td align="left" class="style1">E-Mail address (secondary):</td>
354 <td class="style1">
355 <input type="email" id="email2" name="email2" placeholder="Enter a secondary e-mail address, in case the primary one becomes unavailable" size="80">
356 </td>
357 </tr>
358 <tr>
359 <td></td>
360 <td align="left" class="style1">
361 <input class="btn btn-primary" type="submit" name="butAction" value="Proceed">
362 </td>
363 </tr>
364 </table>
365 </form>
366 {{/html}}
367 #end
368 #if( $xcontext.strFormStatus == "DataCorrection" )
369 {{html wiki=false clean=false}}
370 <form action="" class="xformInline" method="post" name="User Registration Form">
371 <table id="cecTable"; cellspacing="5px" cellpadding="5%" border="1" width="100%"; align="left">
372 <col style="width:30%">
373 <col style="width:70%">
374 <th colspan = "2">
375 <b>Company Information</b>
376 </th>
377 <tr>
378 <td align="left" class="style1">Company name:</td>
379 <td class="style1">
380 <input type="text" id="companyname" name="companyname" placeholder="Enter the legal name of your company" value="${xcontext.strCompanyName}" size="50">
381 </select>
382 </td>
383 </tr>
384 <tr>
385 <td align="left" class="style1">Registered Business Address - House Number, Street:</td>
386 <td class="style1">
387 <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">
388 </select>
389 </td>
390 </tr>
391 <tr>
392 <td align="left" class="style1">Registered Business Address - City:</td>
393 <td class="style1">
394 <input type="text" id="companycity" name="companycity" placeholder="Enter the City part of your company's registered business address" size="100">
395 </select>
396 </td>
397 </tr>
398 <tr>
399 <td align="left" class="style1">Registered Business Address - Postal Code:</td>
400 <td class="style1">
401 <input type="text" id="companypostcode" name="companypostcode" placeholder="Enter the Postal Code part of your company's registered business address" size="100">
402 </select>
403 </td>
404 </tr>
405 <tr>
406 <td align="left" class="style1">Registered Business Address - Province or State:</td>
407 <td class="style1">
408 <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">
409 </select>
410 </td>
411 </tr>
412 <tr>
413 <td align="left" class="style1">Registered Business Address - Country:</td>
414 <td class="style1">
415 <input type="text" id="companycountry" name="companycountry" placeholder="Enter the Country part of your company's registered business address" size="50">
416 </select>
417 </td>
418 </tr>
419 <th colspan = "2">
420 <b>Your Contact Information</b>
421 </th>
422 <tr>
423 <td align="left" class="style1">Title:</td>
424 <td class="style1">
425 <input type="text" id="title" name="title" placeholder="Enter your title" value="${xcontext.strTitle}" size="20">
426 </td>
427 </tr>
428 <tr>
429 <td align="left" class="style1">First name:</td>
430 <td class="style1">
431 <input type="text" id="firstname" name="firstname" placeholder="Enter your first name" value="${xcontext.strFirstname}" size="50">
432 </td>
433 </tr>
434 <tr>
435 <td align="left" class="style1">Last name:</td>
436 <td class="style1">
437 <input type="text" id="lastname" name="lastname" placeholder="Enter your surname/family name" value="${xcontext.strLastname}" size="50">
438 </td>
439 </tr>
440 <tr>
441 <td align="left" class="style1">Preferred name to address you:</td>
442 <td class="style1">
443 <input type="text" id="prefname" name="prefname" placeholder="Enter the name you want to be addressed by" value="${xcontext.strPrefname}" size="50">
444 </td>
445 </tr>
446 <tr>
447 <td align="left" class="style1">Phone number (Landline):</td>
448 <td class="style1">
449 <input type="text" id="lphone" name="lphone" placeholder="Enter your landline phone number, with country code, without symbols" value="${xcontext.strLphone}" size="70">
450 </td>
451 </tr>
452 <tr>
453 <td align="left" class="style1">Phone number (Mobile):</td>
454 <td class="style1">
455 <input type="text" id="mphone" name="mphone" placeholder="Enter your mobile phone number, with country code, without symbols" value="${xcontext.strMphone}" size="70">
456 </td>
457 </tr>
458 <tr>
459 <td align="left" class="style1">E-Mail address (primary):</td>
460 <td class="style1">
461 <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">
462 </td>
463 </tr>
464 <tr>
465 <td align="left" class="style1">E-Mail address (secondary):</td>
466 <td class="style1">
467 <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">
468 </td>
469 </tr>
470 <tr>
471 <td></td>
472 <td align="left" class="style1">
473 <input class="btn btn-primary" type="submit" name="butAction" value="Proceed">
474 </td>
475 </tr>
476 </table>
477 </form>
478 {{/html}}
479 #end
480
481 #if( $xcontext.strFormStatus == "DataVerify" )
482 You have entered the following information to register to the CEC Scheme:
483 {{html wiki=false clean=false}}
484 <form action="" class="xformInline" method="post" name="User Registration Form">
485 <table id="table1"; cellspacing="5px" cellpadding="5%" border="1" width="100%"; align="left">
486 <col style="width:30%">
487 <col style="width:70%">
488 <tr>
489 <td align="left" class="style1">Company name:</td>
490 <td class="style1">
491 <input type="hidden" id="companyname" name="companyname" readonly value="${xcontext.strCompanyName}" size="50">
492 ${xcontext.strCompanyName}
493 </td>
494 </tr>
495 <tr>
496 <td align="hidden" class="style1">Title:</td>
497 <td class="style1">
498 <input type="hidden" id="title" name="title" readonly value="${xcontext.strTitle}" size="10">
499 ${xcontext.strTitle}
500 </td>
501 </tr>
502 <tr>
503 <td align="hidden" class="style1">First name:</td>
504 <td class="style1">
505 <input type="hidden" id="firstname" name="firstname" readonly value="${xcontext.strFirstname}" size="50">
506 ${xcontext.strFirstname}
507 </td>
508 </tr>
509 <tr>
510 <td align="hidden" class="style1">Last name:</td>
511 <td class="style1">
512 <input type="hidden" id="lastname" name="lastname" readonly value="${xcontext.strLastname}" size="50">
513 ${xcontext.strLastname}
514 </td>
515 </tr>
516 <tr>
517 <td align="hidden" class="style1">Preferred name to address you:</td>
518 <td class="style1">
519 <input type="hidden" id="prefname" name="prefname" readonly value="${xcontext.strPrefname}" size="50">
520 ${xcontext.strPrefname}
521 </td>
522 </tr>
523 <tr>
524 <td align="left" class="style1">Phone number (Landline):</td>
525 <td class="style1">
526 <input type="hidden" id="lphone" name="lphone" readonly value="${xcontext.strLphone}" size="20">
527 ${xcontext.strLphone}
528 </td>
529 </tr>
530 <tr>
531 <td align="left" class="style1">Phone number (Mobile):</td>
532 <td class="style1">
533 <input type="hidden" id="mphone" name="mphone" readonly value="${xcontext.strMphone}" size="20">
534 ${xcontext.strMphone}
535 </td>
536 </tr>
537 <tr>
538 <td align="left" class="style1">E-Mail address (primary):</td>
539 <td class="style1">
540 <input type="hidden" id="email" name="email" readonly value="${xcontext.strEmail}" size="40">
541 ${xcontext.strEmail}
542 </td>
543 </tr>
544 <tr>
545 <td align="left" class="style1">E-Mail address (secondary):</td>
546 <td class="style1">
547 <input type="hidden" id="email2" name="email2" readonly value="${xcontext.strEmail2}" size="40">
548 ${xcontext.strEmail2}
549 </td>
550 </tr>
551 <tr>
552 <td>Click the button to the right to correct the above information</td>
553 <td align="left" class="style1">
554 <input class="btn btn-default" type="submit" name="butAction" value="Correct">
555 </td>
556 </tr>
557 </table>
558
559 <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>
560 <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>
561 <p><b>By clicking on the Register button, you agree to the following:</b>
562 <ul>
563 <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>
564 <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>
565 <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>
566 <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>
567 <li>By providing your contact information, you agree to TruCert contacting you, and communicating with you for the purposes of the CEC Scheme.</li>
568 <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>
569 <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>
570 <li>TruCert will not sell, nor make available for free, your contact information for marketing or sales purposes of thirdy parties.</li>
571 <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>
572 </ul>
573 <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>
574
575 <input type="hidden" id="companyname" name="companyname" readonly value="${xcontext.strCompanyName}" size="50">
576
577 <input type="hidden" id="companycity" name="companycity" readonly value="${xcontext.strCompanyAddress}" size="100">
578 <input type="hidden" id="companyaddress" name="companyaddress" readonly value="${xcontext.strCompanyCity}" size="100">
579 <input type="hidden" id="companypostcode" name="companypostcode" readonly value="${xcontext.strCompanyPostcode}" size="100">
580 <input type="hidden" id="companyprovince" name="companyprovince" readonly value="${xcontext.strCompanyProvince}" size="100">
581 <input type="hidden" id="companycountry" name="companycountry" readonly value="${xcontext.strCompanyCountry}" size="50">
582
583 <input type="hidden" id="title" name="title" readonly value="${xcontext.strTitle}" size="10">
584 <input type="hidden" id="firstname" name="firstname" readonly value="${xcontext.strFirstname}" size="50">
585 <input type="hidden" id="lastname" name="lastname" readonly value="${xcontext.strLastname}" size="50">
586 <input type="hidden" id="prefname" name="prefname" readonly value="${xcontext.strPrefname}" size="50">
587 <input type="hidden" id="lphone" name="lphone" readonly value="${xcontext.strLphone}" size="20">
588 <input type="hidden" id="mphone" name="mphone" readonly value="${xcontext.strMphone}" size="20">
589 <input type="hidden" id="email" name="email" readonly value="${xcontext.strEmail}" size="40">
590 <input type="hidden" id="email2" name="email2" readonly value="${xcontext.strEmail2}" size="40">
591 <input class="btn btn-primary" type="submit" name="butAction" value="Register">
592 </form>
593 {{/html}}
594
595 #end
596 #if( $xcontext.strFormStatus == "SendEmail" )
597 #set($email_to = "${xcontext.strEmail}")
598 #set($email_subject = "CEC Registration - confirmation required to proceed")
599 #set($email_from = "cec_noreply@cecocert.com")
600 #set($email_text = "$xcontext.strEmailBody")
601 #set ($message = $services.mail.sender.createMessage($email_from, $email_to, $email_subject))
602 #set ($discard = $message.addPart("text/plain", ${xcontext.strEmailBody}))
603 #set ($mailResult = $services.mail.sender.send($message))
604 ## Check if the message was created properly and if we have permissions to send emails
605 #if ($services.mail.sender.lastError)
606 {{error}}$exceptiontool.getStackTrace($services.mail.sender.lastError){{/error}}
607 #end
608 ## Check if the mail we tried to send has failed to be sent
609 #set ($statuses = $mailResult.statusResult.getAllErrors())
610 #if ($statuses.hasNext())
611 #set ($status = $statuses.next())
612 {{error}}
613 Error: $status.errorSummary ($status.state)
614 $status.errorDescription
615 {{/error}}
616 #end
617 An e-mail asking you to confirm your e-mail address was sent to ${xcontext.strEmail}.
618 Please check your inbox and click on the link to confirm your e-mail address!
619 The process will only continue after you have confirmed your e-mail address.
620 #end
621
622 {{/velocity}}
623
© 2022 TruCert Assessment Services Inc.
V01-00