bug 1394: applied text changes according to bug description
[cacert-devel.git] / pages / wot / 6.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
20 if(!array_key_exists('notarise',$_SESSION['_config']))
21 {
22 echo "Error: No user data found.";
23 exit;
24 }
25
26 $row = $_SESSION['_config']['notarise'];
27 $_SESSION['assuresomeone']['year'] = 0;
28 $_SESSION['assuresomeone']['month'] = 0;
29 $_SESSION['assuresomeone']['day'] = 0;
30
31 if($_SESSION['profile']['ttpadmin'] == 1)
32 // $methods = array("Face to Face Meeting", "Trusted 3rd Parties", "TopUP");
33 // else
34 $methods = array("Face to Face Meeting", "Trusted 3rd Parties");
35 else
36 $methods = array("Face to Face Meeting");
37
38 $mnames = array(
39 '01' => _('January'),
40 '02' => _('February'),
41 '03' => _('March'),
42 '04' => _('April'),
43 '05' => _('May'),
44 '06' => _('June'),
45 '07' => _('July'),
46 '08' => _('August'),
47 '09' => _('September'),
48 '10' => _('October'),
49 '11' => _('November'),
50 '12' => _('December')
51 );
52
53 $fname = sanitizeHTML($row['fname']);
54 $mname = sanitizeHTML($row['mname']);
55 $lname = sanitizeHTML($row['lname']);
56 $suffix = sanitizeHTML($row['suffix']);
57 $dob = $row['dob'];
58
59 $dob_date = explode('-', $dob, 3);
60 $dob_print = sprintf(
61 '<tt class="accountdetail">%s-%s-%s</tt> (%d %s %d)',
62 $dob_date[0], $dob_date[1], $dob_date[2],
63 intval($dob_date[2], 10), $mnames[$dob_date[1]], intval($dob_date[0], 10)
64 );
65
66 $name = $fname." ".$mname." ".$lname." ".$suffix;
67 $_SESSION['_config']['wothash'] = md5($name."-".$dob);
68
69 require_once($_SESSION['_config']['filepath']."/includes/notary.inc.php");
70
71 AssureHead(_("Assurance Confirmation"),sprintf(_("Please check the following details match against what you witnessed when you met %s %s %s %s in person. You MUST NOT proceed unless you are sure the details are correct. You may be held responsible by the CAcert Arbitrator for any issues with this Assurance."), $fname, $mname, $lname, $suffix));
72 AssureTextLine(_("Name"), sprintf(
73 "<tt><span class=\"accountdetail name\"><span class=\"accountdetail fname\">%s</span> <span class=\"accountdetail mname\">%s</span> <span class=\"accountdetail lname\">%s</span> <span class=\"accountdetail suffix\">%s</span></span></tt>",
74 $fname, $mname, $lname, $suffix
75 ));
76 AssureTextLine(_("Date of Birth"),$dob_print);
77 AssureMethodLine(_("Method"),$methods,'');
78 AssureBoxLine("certify",sprintf(_("I certify that %s %s %s %s has appeared in person."), $fname, $mname, $lname, $suffix),array_key_exists('certify',$_POST) && $_POST['certify'] == 1);
79 AssureBoxLine("CCAAgreed",sprintf(_("I verify that %s %s %s %s has accepted the CAcert Community Agreement."), $fname, $mname, $lname, $suffix),array_key_exists('CCAAgreed',$_POST) && $_POST['CCAAgreed'] == 1);
80 AssureInboxLine("location",_("Location"),array_key_exists('location',$_SESSION['_config'])?sanitizeHTML($_SESSION['_config']['location']):"","");
81 AssureInboxLine("date",_("Date"),array_key_exists('date',$_SESSION['_config'])?sanitizeHTML($_SESSION['_config']['date']):date("Y-m-d"),"<br/>"._("The date when the assurance took place. Please adjust the date if you assured the person on a different day (YYYY-MM-DD)."));
82 AssureTextLine("",_("Only tick the next box if the Assurance was face to face."));
83 AssureBoxLine("assertion",_("I believe that the assertion of identity I am making is correct, complete and verifiable. I have seen original documentation attesting to this identity. I accept that the CAcert Arbitrator may call upon me to provide evidence in any dispute, and I may be held responsible."),array_key_exists('assertion',$_POST) && $_POST['assertion'] == 1);
84 AssureBoxLine("rules",_("I have read and understood the CAcert Community Agreement (CCA), Assurance Policy and the Assurance Handbook. I am making this Assurance subject to and in compliance with the CCA, Assurance policy and handbook."),array_key_exists('rules',$_POST) && $_POST['rules'] == 1);
85 AssureTextLine(_("Policy"),"<a href=\"/policy/CAcertCommunityAgreement.html\" target=\"_blank\">"._("CAcert Community Agreement")."</a> - <a href=\"/policy/AssurancePolicy.html\" target=\"_blank\">"._("Assurance Policy")."</a> - <a href=\"http://wiki.cacert.org/AssuranceHandbook2\" target=\"_blank\">"._("Assurance Handbook")."</a>");
86 AssureInboxLine("points",_("Points"),"","<br />(Max. ".maxpoints().")");
87 AssureFoot($id,_("I confirm this Assurance"));
88 ?>