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