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