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