Merge branch 'bug-1394' into testserver-stable
[cacert-devel.git] / www / wot.php
1 <? /*
2 LibreSSL - CAcert web application
3 Copyright (C) 2004-2008 CAcert Inc.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; version 2 of the License.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */ ?>
18 <?
19 require_once("../includes/loggedin.php");
20 require_once("../includes/lib/l10n.php");
21 require_once("../includes/notary.inc.php");
22
23
24 function show_page($target,$message,$error)
25 {
26 showheader(_("My CAcert.org Account!"));
27 if ($error != "")
28 $message=_("ERROR").": ".$error;
29 if ($message != "")
30 echo "<p class=\"error_warning\">".$message."</p>";
31
32 switch ($target)
33 {
34 case '0':
35 case 'InfoPage': includeit(0, "wot");
36 break;
37 case '1':
38 case 'ListByCity': includeit(1, "wot");
39 break;
40 case '2':
41 case 'BecomeAssurer': includeit(2, "wot");
42 break;
43 case '3':
44 case 'TrustRules': includeit(3, "wot");
45 break;
46 case '4':
47 case 'ShowTTPInfo': includeit(4, "wot");
48 break;
49 case '5';
50 case 'EnterEmail': includeit(5, "wot");
51 break;
52 case '6':
53 case 'VerifyData': includeit(6, "wot");
54 break;
55 // case '7':
56 // case '???': includeit(7, "wot");
57 // break;
58 case '8':
59 case 'EnterMyInfo': includeit(8, "wot");
60 break;
61 case '9':
62 case 'ContactAssurer': includeit(9, "wot");
63 break;
64 case '10':
65 case 'MyPointsOld': includeit(10, "wot");
66 break;
67 // case '11':
68 // case 'OAInfo': includeit(11, "wot");
69 // break;
70 case '12':
71 case 'SearchAssurer': includeit(12, "wot");
72 break;
73 case '13':
74 case 'EnterMyCity': includeit(13, "wot");
75 break;
76 // case '14':
77 // case 'EnterEmail': includeit(14, "wot");
78 // break;
79 case '15':
80 case 'MyPointsNew': includeit(15, "wot");
81 break;
82 case '16':
83 case 'TTPForm': includeit(16, "wot");
84 break;
85 case '17':
86 case 'AssurerCheck': includeit(17, "wot");
87 break;
88 }
89
90 showfooter();
91 }
92
93 function send_reminder()
94 {
95 $body = "";
96 $my_translation = L10n::get_translation();
97
98 $_SESSION['_config']['reminder-lang'] = $_POST['reminder-lang'];
99
100 $reminder_translations[] = $_POST['reminder-lang'];
101 if ( !in_array("en", $reminder_translations, $strict=true) ) {
102 $reminder_translations[] = "en";
103 }
104
105 foreach ($reminder_translations as $translation) {
106 L10n::set_translation($translation);
107
108 $body .= L10n::$translations[$translation].":\n\n";
109 $body .= sprintf(_("This is a short reminder that you filled out forms to become trusted with CAcert.org, and %s has attempted to issue you points. Please create your account at %s as soon as possible and then notify %s so that the points can be issued."), $_SESSION['profile']['fname']." (".$_SESSION['profile']['email'].")", "http://www.cacert.org", $_SESSION['profile']['fname'])."\n\n";
110 $body .= _("Best regards")."\n";
111 $body .= _("CAcert Support Team")."\n\n";
112 }
113
114 L10n::set_translation($reminder_translations[0]); // for the subject
115 sendmail($_POST['email'], "[CAcert.org] "._("Reminder Notice"), $body, $_SESSION['profile']['email'], "", "", $_SESSION['profile']['fname']);
116
117 L10n::set_translation($my_translation);
118
119 $_SESSION['_config']['remindersent'] = 1;
120 $_SESSION['_config']['error'] = _("A reminder notice has been sent.");
121 }
122
123 loadem("account");
124 if(array_key_exists('date',$_POST) && $_POST['date'] != "")
125 $_SESSION['_config']['date'] = $_POST['date'];
126
127 if(array_key_exists('location',$_POST) && $_POST['location'] != "")
128 $_SESSION['_config']['location'] = $_POST['location'];
129
130 $id=array_key_exists('id',$_REQUEST)?intval($_REQUEST['id']):0;
131 $oldid=array_key_exists('oldid',$_REQUEST)?intval($_REQUEST['oldid']):0;
132
133 if($oldid == 12)
134 $id = $oldid;
135
136 if($oldid == 4)
137 {
138 if ($_POST['ttp']!='') {
139 //This mail does not need to be translated
140 $body = "Hi TTP adminstrators,\n\n";
141 $body .= "User ".$_SESSION['profile']['fname']." ".
142 $_SESSION['profile']['lname']." with email address '".
143 $_SESSION['profile']['email']."' is requesting a TTP assurances for ".
144 mysql_escape_string(stripslashes($_POST['country'])).".\n\n";
145 if ($_POST['ttptopup']=='1') {
146 $body .= "The user is also requesting TTP TOPUP.\n\n";
147 }else{
148 $body .= "The user is NOT requesting TTP TOPUP.\n\n";
149 }
150 $body .= "The user received ".intval($_SESSION['profile']['points'])." assurance points up to today.\n\n";
151 $body .= "Please start the TTP assurance process.";
152 sendmail("support@cacert.org", "[CAcert.org] TTP request.", $body, "support@cacert.org", "", "", "CAcert Website");
153
154 //This mail needs to be translated
155 $body =_("You are receiving this email because you asked for TTP assurance.")."\n\n";
156 if ($_POST['ttptopup']=='1') {
157 $body .=_("You are requesting TTP TOPUP.")."\n\n";
158 }else{
159 $body .=_("You are NOT requesting TTP TOPUP.")."\n\n";
160 }
161 $body .= _("Best regards")."\n";
162 $body .= _("CAcert Support Team");
163
164 sendmail($_SESSION['profile']['email'], "[CAcert.org] "._("You requested TTP assurances"), $body, "support@cacert.org", "", "", "CAcert Support");
165
166 }
167
168 }
169
170 if(($id == 5 || $oldid == 5 || $id == 6 || $oldid == 6))
171 if (!is_assurer($_SESSION['profile']['id']))
172 {
173 show_page ("Exit","",get_assurer_reason($_SESSION['profile']['id']));
174 exit;
175 }
176
177 if($oldid == 6 && intval($_SESSION['_config']['notarise']['id']) <= 0)
178 {
179 show_page ("EnterEmail","",_("Something went wrong. Please enter the email address again"));
180 exit;
181 }
182 if($oldid == 5 && array_key_exists('reminder',$_POST) && $_POST['reminder'] != "")
183 {
184 send_reminder();
185 show_page ("EnterEmail",_("A reminder notice has been sent."),"");
186 exit;
187 }
188
189 if($oldid == 5)
190 {
191 $query = "select * from `users` where `email`='".mysql_real_escape_string(stripslashes($_POST['email']))."' and `deleted`=0";
192 $res = mysql_query($query);
193 if(mysql_num_rows($res) != 1)
194 {
195 $_SESSION['_config']['noemailfound'] = 1;
196 show_page("EnterEmail","",_("I'm sorry, there was no email matching what you entered in the system. Please double check your information."));
197 exit;
198 } else
199 {
200 $_SESSION['_config']['noemailfound'] = 0;
201 $_SESSION['_config']['notarise'] = mysql_fetch_assoc($res);
202 if ($_SESSION['_config']['notarise']['verified'] == 0)
203 {
204 show_page("EnterEmail","",_("User is not yet verified. Please try again in 24 hours!"));
205 exit;
206 }
207 if ($_SESSION['profile']['ttpadmin'] != 1) {
208 $_SESSION['assuresomeone']['year'] = intval($_POST['year']);
209 $_SESSION['assuresomeone']['month'] = intval($_POST['month']);
210 $_SESSION['assuresomeone']['day'] = intval($_POST['day']);
211 $dob = sprintf('%04d-%02d-%02d', $_SESSION['assuresomeone']['year'], $_SESSION['assuresomeone']['month'], $_SESSION['assuresomeone']['day']);
212
213 if ( $_SESSION['_config']['notarise']['dob'] != $dob) {
214 show_page("EnterEmail","",_("The data entered is not matching with an account."));
215 exit;
216 }
217 }
218 }
219 $query = "select * from `users` where `email`='".mysql_real_escape_string(stripslashes($_POST['email']))."' and `locked`=1";
220 $res = mysql_query($query);
221 if(mysql_num_rows($res) >= 1)
222 {
223 $_SESSION['_config']['noemailfound'] = 0;
224 show_page("EnterEmail","",_("This account is locked and can not be assured. For more information ask support@cacert.org."));
225 exit;
226 }
227 }
228
229 if($oldid == 5 || $oldid == 6)
230 {
231 $id=6;
232 // $oldid=0;
233 if(array_key_exists('cancel',$_REQUEST) && $_REQUEST['cancel'] != "")
234 {
235 show_page("EnterEmail","","");
236 exit;
237 }
238 if($_SESSION['_config']['notarise']['id'] == $_SESSION['profile']['id'])
239 {
240 show_page("EnterEmail","",_("You are never allowed to Assure yourself!"));
241 exit;
242 }
243
244 $query = "select * from `notary` where `from`='".intval($_SESSION['profile']['id'])."' and
245 `to`='".intval($_SESSION['_config']['notarise']['id'])."' and `deleted` = 0";
246 $res = mysql_query($query);
247 if(mysql_num_rows($res) > 0)
248 {
249 show_page("EnterEmail","",_("You are only allowed to Assure someone once!"));
250 exit;
251 }
252 }
253
254 if($oldid == 6)
255 {
256 $iecho= "c";
257 //date checks
258 if(trim($_REQUEST['date']) == '')
259 {
260 show_page("VerifyData","",_("You must enter the date when you met the assuree."));
261 exit;
262 }
263
264 if(!check_date_format(trim($_REQUEST['date'])))
265 {
266 show_page("VerifyData","",_("You must enter the date in this format: YYYY-MM-DD."));
267 exit;
268 }
269
270 if(!check_date_difference(trim($_REQUEST['date'])))
271 {
272 show_page("VerifyData","",_("You must not enter a date in the future."));
273 exit;
274 }
275
276 //proof of identity check and accept arbitration, implements CCA
277 if(!array_key_exists('assertion',$_POST) || $_POST['assertion'] != 1)
278 {
279 show_page("VerifyData","",_("You failed to check all boxes to validate your adherence to the rules and policies of CAcert"));
280 exit;
281 }
282
283 //proof of CCA agreement by assuree after 2010-01-01
284 if((!array_key_exists('CCAAgreed',$_POST) || $_POST['CCAAgreed'] != 1) and (check_date_format(trim($_REQUEST['date']),2010)))
285 {
286 show_page("VerifyData","",_("You failed to check all boxes to validate your adherence to the rules and policies of CAcert"));
287 exit;
288 }
289
290 //assurance done according to rules
291 if(!array_key_exists('rules',$_POST) || $_POST['rules'] != 1)
292 {
293 show_page("VerifyData","",_("You failed to check all boxes to validate your adherence to the rules and policies of CAcert"));
294 exit;
295 }
296
297 //met assuree in person, not appliciable for TTP / TTP Topup assurances
298 if((!array_key_exists('certify',$_POST) || $_POST['certify'] != 1 ) && $_REQUEST['method'] != "Trusted 3rd Parties")
299 {
300 show_page("VerifyData","",_("You failed to check all boxes to validate your adherence to the rules and policies of CAcert"));
301 exit;
302 }
303
304 //check location, min 3 characters
305 if(!array_key_exists('location',$_POST) || trim($_POST['location']) == "")
306 {
307 show_page("VerifyData","",_("You failed to enter a location of your meeting."));
308 exit;
309 }
310
311 if(strlen(trim($_REQUEST['location']))<=2)
312 {
313 show_page("VerifyData","",_("You must enter a location with at least 3 characters eg town and country."));
314 exit;
315 }
316
317 //check for points in range 0-35, for nucleus 35 + 15 temporary
318 if($_REQUEST['points'] == "" || !is_numeric($_REQUEST['points']))
319 {
320 show_page("VerifyData","",_("You must enter the number of points you wish to allocate to this person."));
321 exit;
322 }
323
324 if($_REQUEST['points'] <0 || ($_REQUEST['points']>35))
325 {
326 show_page("VerifyData","",_("The number of points you entered are out of the range given by policy."));
327 exit;
328 }
329
330 $query = "select * from `users` where `id`='".intval($_SESSION['_config']['notarise']['id'])."'";
331 $res = mysql_query($query);
332 $row = mysql_fetch_assoc($res);
333 $name = sanitizeHTML($row['fname'])." ".sanitizeHTML($row['mname'])." ".sanitizeHTML($row['lname'])." ".sanitizeHTML($row['suffix']);
334 if($_SESSION['_config']['wothash'] != md5($name."-".$row['dob']) || $_SESSION['_config']['wothash'] != $_REQUEST['pagehash'])
335 {
336 show_page("VerifyData","",_("Race condition discovered, user altered details during assurance procedure. PLEASE MAKE SURE THE NEW DETAILS BELOW MATCH THE ID DOCUMENTS."));
337 exit;
338 }
339 }
340
341
342 if($oldid == 6)
343 {
344 $max = maxpoints();
345
346 $awarded = intval($_POST['points']);
347 if($awarded > $max)
348 $awarded = $max;
349 if($awarded < 0)
350 $awarded = 0;
351
352 $drow_points = get_received_assurance_points(intval($_SESSION['_config']['notarise']['id']));
353
354 if(mysql_real_escape_string(stripslashes($_POST['date'])) == "")
355 $_POST['date'] = date("Y-m-d H:i:s");
356
357 $query = "select * from `notary` where `from`='".intval($_SESSION['profile']['id'])."' AND
358 `to`='".intval($_SESSION['_config']['notarise']['id'])."' AND
359 `awarded`='".intval($awarded)."' AND
360 `location`='".mysql_real_escape_string(stripslashes($_POST['location']))."' AND
361 `date`='".mysql_real_escape_string(stripslashes($_POST['date']))."' AND
362 `deleted`=0";
363 $res = mysql_query($query);
364 if(mysql_num_rows($res) > 0)
365 {
366 show_page("VerifyEmail","",_("Identical Assurance attempted, will not continue."));
367 exit;
368 }
369 }
370
371 if($oldid == 6)
372 {
373 $query = "insert into `notary` set `from`='".intval($_SESSION['profile']['id'])."',
374 `to`='".intval($_SESSION['_config']['notarise']['id'])."',
375 `points`='0', `awarded`='".intval($awarded)."',
376 `location`='".mysql_real_escape_string(stripslashes($_POST['location']))."',
377 `date`='".mysql_real_escape_string(stripslashes($_POST['date']))."',
378 `when`=NOW()";
379 //record active acceptance by Assurer
380 if (check_date_format(trim($_REQUEST['date']),2010)) {
381 write_user_agreement($_SESSION['profile']['id'], "CCA", "assurance", "Assuring", 1, $_SESSION['_config']['notarise']['id']);
382 write_user_agreement($_SESSION['_config']['notarise']['id'], "CCA", "assurance", "Being assured", 0, $_SESSION['profile']['id']);
383 }
384 if($_SESSION['profile']['ttpadmin'] >= 1 && $_POST['method'] == 'TTP-Assisted') {
385 $query .= ",\n`method`='TTP-Assisted'";
386 }
387 if($_SESSION['profile']['ttpadmin'] == 2 && $_POST['method'] == 'TTP-TOPUP') {
388 $query .= ",\n`method`='TTP-TOPUP'";
389 }
390 mysql_query($query);
391 include_once("../includes/notary.inc.php");
392
393 recalculate_old_assurance_points($_SESSION['_config']['notarise']['id']);
394 fix_assurer_flag($_SESSION['_config']['notarise']['id']);
395 if($_SESSION['profile']['points'] < 150)
396 {
397 $addpoints = 0;
398 if($_SESSION['profile']['points'] < 149 && $_SESSION['profile']['points'] >= 100)
399 $addpoints = 2;
400 else if($_SESSION['profile']['points'] == 149 && $_SESSION['profile']['points'] >= 100)
401 $addpoints = 1;
402 $query = "insert into `notary` set `from`='".intval($_SESSION['profile']['id'])."',
403 `to`='".intval($_SESSION['profile']['id'])."',
404 `points`='".intval($addpoints)."', `awarded`='".intval($addpoints)."',
405 `location`='".mysql_real_escape_string(stripslashes($_POST['location']))."',
406 `date`='".mysql_real_escape_string(stripslashes($_POST['date']))."',
407 `method`='Administrative Increase',
408 `when`=NOW()";
409 mysql_query($query);
410
411 // No need to fix_assurer_flag here, this should only happen for assurers...
412 $_SESSION['profile']['points'] += $addpoints;
413 }
414
415 $my_translation = L10n::get_translation();
416 L10n::set_translation($_SESSION['_config']['notarise']['language']);
417
418 $body = sprintf(_("You are receiving this email because you have been assured by %s %s (%s)."), $_SESSION['profile']['fname'], $_SESSION['profile']['lname'], $_SESSION['profile']['email'])."\n\n";
419
420 $body .= sprintf(_("You were issued %s assurance points and you now have %s assurance points in total."), $awarded, ($awarded + $drow_points))."\n\n";
421
422 if(($drow_points + $awarded) < 100 && ($drow_points + $awarded) >= 50)
423 {
424 $body .= _("You now have over 50 points, and can now have your name added to client certificates, and issue server certificates for up to 2 years.")."\n\n";
425 }
426
427 if(($drow_points + $awarded) >= 100 && $drow_points < 0 && !is_assurer(intval($_SESSION['_config']['notarise']['id'])) )
428 {
429 $body .= _("You have at least 100 Assurance Points, if you want to become an assurer try the Assurer Challenge")." ( https://cats.cacert.org )\n\n";
430 $body .= _("To make it easier for others in your area to find you, it's helpful to list yourself as an assurer (this is voluntary), as well as a physical location where you live or work the most. You can flag your account to be listed, and add a comment to the display by going to:")."\n";
431 $body .= "https://www.cacert.org/wot.php?id=8\n\n";
432 $body .= _("You can list your location by going to:")."\n";
433 $body .= "https://www.cacert.org/wot.php?id=13\n\n";
434 }
435
436 $body .= _("Best regards")."\n";
437 $body .= _("CAcert Support Team");
438
439 sendmail($_SESSION['_config']['notarise']['email'], "[CAcert.org] "._("You've been Assured."), $body, "support@cacert.org", "", "", "CAcert Website");
440
441 L10n::set_translation($my_translation);
442
443 $body = sprintf(_("You are receiving this email because you have assured %s %s (%s)."), $_SESSION['_config']['notarise']['fname'], $_SESSION['_config']['notarise']['lname'], $_SESSION['_config']['notarise']['email'])."\n\n";
444 $body .= sprintf(_("You issued %s assurance points."), $awarded)."\n\n";
445
446 $body .= _("Best regards")."\n";
447 $body .= _("CAcert Support Team");
448
449 sendmail($_SESSION['profile']['email'], "[CAcert.org] "._("You've Assured Another Member."), $body, "support@cacert.org", "", "", "CAcert Support");
450
451 show_page('EnterEmail', _("Shortly you and the person you were assuring will receive an email confirmation. There is no action on your behalf required to complete this."));
452 exit;
453 }
454
455 if($oldid == 8)
456 {
457 csrf_check("chgcontact");
458
459 $info = mysql_real_escape_string(strip_tags(stripslashes($_POST['contactinfo'])));
460 $listme = intval($_POST['listme']);
461 if($listme < 0 || $listme > 1)
462 $listme = 0;
463
464 $_SESSION['profile']['listme'] = $listme;
465 $_SESSION['profile']['contactinfo'] = $info;
466
467 $query = "update `users` set `listme`='$listme',`contactinfo`='$info' where `id`='".intval($_SESSION['profile']['id'])."'";
468 mysql_query($query);
469
470 showheader(_("My CAcert.org Account!"));
471 echo "<p>"._("Your account information has been updated.")."</p>";
472 showfooter();
473 exit;
474 }
475
476 if($oldid == 9 && $_REQUEST['userid'] > 0 && $_SESSION['profile']['id'] > 0)
477 {
478 if($_SESSION['_config']['pagehash'] != $_REQUEST['pageid'])
479 {
480 $oldid=0;
481 $id = 9;
482 show_page("ContactAssurer","",_("It looks like you were trying to contact multiple people, this isn't allowed due to data security reasons."));
483 exit;
484 } else {
485 $body = $_REQUEST['message'];
486 $subject = $_REQUEST['subject'];
487 $userid = intval($_REQUEST['userid']);
488 $user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($userid)."' and `listme`=1"));
489 if(is_assurer($userid) > 0)
490 {
491 $my_translation = L10n::get_translation();
492 L10n::set_translation($user['language']);
493
494 $subject = "[CAcert.org] ".sprintf(_("Message from %s"),
495 $_SESSION['profile']['fname']);
496
497 $body = sprintf(_("Hi %s,"), $user['fname'])."\n\n";
498 $body .= sprintf(_("%s %s has sent you a message via the ".
499 "contact an Assurer form on CAcert.org."),
500 $_SESSION['profile']['fname'],
501 $_SESSION['profile']['lname'])."\n\n";
502 $body .= sprintf(_("Subject: %s"), $_REQUEST['subject'])."\n";
503 $body .= _("Message:")."\n";
504 $body .= $_REQUEST['message']."\n\n";
505 $body .= "------------------------------------------------\n\n";
506 $body .= _("Please note, that this is NOT a message on behalf ".
507 "of CAcert but another CAcert community member. If ".
508 "you suspect that the contact form might have been ".
509 "abused, please write to support@cacert.org")."\n\n";
510 $body .= _("Best regards")."\n";
511 $body .= _("Your CAcert Community");
512
513 sendmail($user['email'], $subject, $body,
514 $_SESSION['profile']['email'], //from
515 "", //replyto
516 "", //toname
517 $_SESSION['profile']['fname']." ".
518 $_SESSION['profile']['lname']); //fromname
519
520 L10n::set_translation($my_translation);
521
522 showheader(_("My CAcert.org Account!"));?>
523 <p>
524 <? printf(_("Your email has been sent to %s."), sanitizeHTML($user['fname'])); ?>
525 </p>
526 <p>[ <a href='javascript:history.go(-2)'><?= _("Go Back") ?></a> ]</p>
527 <?
528 showfooter();
529 exit;
530 } else {
531 show_page(0,"",_("Sorry, I was unable to locate that user."));
532 exit;
533 }
534
535 }
536 }
537 if($oldid == 9)
538 {
539 $oldid=0;
540 $id = 9;
541 show_page("ContactAssurer","",_("There was an error and I couldn't proceed"));
542 exit;
543 }
544
545 // Assurer Check
546 if($oldid == 17 )
547 {
548 $oldid = 0;
549 $id = 17;
550 $number = 5;
551 $email = mysql_real_escape_string(trim($_REQUEST['email']));
552 $reason = mysql_real_escape_string(trim($_REQUEST['reason']));
553 $uid = get_user_id_from_email($email);
554
555 if ($uid == 0) {
556 show_page("AssurerCheck", "", _("I'm sorry, there was no email matching what you entered in the system. Please double check your information."));
557 exit;
558 }
559
560 if ($reason == "--") {
561 show_page("AssurerCheck", "" ,_("I'm sorry, there was no reason given why you need to check the assurer status."));
562 exit;
563 }
564
565 if (get_number_of_adminlog_entries($_SESSION['profile']['id'],1000,1) > $number) {
566 show_page("AssurerCheck", "", sprintf(_("I'm sorry, you reached the maximum requests of %s per hour. Please wait until you try it again."),$number));
567 exit;
568 }
569
570 if (is_assurer($uid)) {
571 $status = _('Is assurer');
572 } else {
573 $status = _('Is no assurer');
574 }
575
576 write_se_log($uid, $_SESSION['profile']['id'], 'User Assurer status check', '', 1000);
577
578 $assurer = get_user($uid);
579
580 //mail to member
581 $my_translation = L10n::get_translation();
582 L10n::set_translation($assurer['language']);
583
584 $subject = "[CAcert.org] ". _("Assurer status report for you");
585
586 $body = sprintf(_("Hi %s,"), $assurer['fname'])."\n\n";
587 $body .= sprintf(_("%s %s (%s) has requested your assurer status for %s."),
588 $_SESSION['profile']['fname'],
589 $_SESSION['profile']['lname'],
590 $_SESSION['profile']['email'],
591 $reason)."\n\n";
592 $body .= sprintf(_("The transmitted result: %s"), $status)."\n";
593 $body .= _("Best regards")."\n";
594 $body .= _("CAcert Support Team");
595
596 sendmail($assurer['email'], "[CAcert.org] ". $subject, $body,
597 "support@cacert.org", //from
598 "", //replyto
599 "", //toname
600 "CAcert Support"); //fromname
601
602 L10n::set_translation($my_translation);
603
604 showheader(_("My CAcert.org Account!"));?>
605 <p>
606 <?=sprintf(_('The assurer status for %s %s (%s) is: %s'),
607 $assurer['fname'],
608 $assurer['lname'],
609 $assurer['email'],
610 $status) . '<br/>'. _('The mail with the status request has been sent to the email address above.'); ?>
611 </p>
612 <?
613 showfooter();
614 exit;
615 }
616
617 show_page ($id,"","");