2 LibreSSL - CAcert web application
3 Copyright (C) 2004-2008 CAcert Inc.
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.
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.
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
18 if($_SESSION['_config']['language'] != "ja")
20 define('FPDF_FONTPATH','/usr/share/fpdf/font/');
21 require_once('/usr/share/ufpdf/fpdf.php');
22 class PDF2
extends FPDF
26 require('/usr/share/fpdf/japanese.php');
27 class PDF2
extends PDF_Japanese
32 class PDF
extends PDF2
36 $this->Image((array_key_exists('bw',$_REQUEST) && $_REQUEST['bw'])?
'images/CAcert-logo-mono-1000.png':'images/CAcert-logo-colour-1000.png',8,8,100);
37 $this->SetFont('Arial','B',14);
38 if($_SESSION['_config']['language'] == "ja")
39 $this->SetFont('SJIS','',14);
41 $this->Cell(40,20,recode($_SESSION['_config']['recode'], _("CAcert Assurance Programme")));
44 $this->Cell(40,20,recode($_SESSION['_config']['recode'], _("Identity Verification Form")));
48 $this->SetFont('Arial','I',8);
49 if($_SESSION['_config']['language'] == "ja")
50 $this->SetFont('SJIS','I',8);
51 $this->Cell(0,0,'CAcert Inc. - PO Box 66 - Oatley NSW 2223 - Australia - http://www.CAcert.org',0,0,'C');
53 $this->SetFont('Arial','',6);
54 if($_SESSION['_config']['language'] == "ja")
55 $this->SetFont('SJIS','',6);
56 $this->Cell(0,0, recode($_SESSION['_config']['recode'], _("CAcert's Root Certificate fingerprints")).": A6:1B:37:5E:39:0D:9C:36:54:EE:BD:20:31:46:1F:6B "._("and")." 135C EC36 F49C B8E9 3B1A B270 CD80 8846 76CE 8F33",0,0,'C');
57 $this->SetLineWidth(0.05);
58 $this->Line(1, 43, $this->w
- 1, 43);
59 $this->SetLineWidth(0.2);
66 function Body($name = "", $dob = "", $email = "", $assurer = "", $date = "", $maxpoints = "", $document1 = "", $document2 = "", $location = "")
69 $date = date("Y-m-d");
71 // Show text blurb at top of page
73 $this->SetFont('Arial','',10);
74 if($_SESSION['_config']['language'] == "ja")
75 $this->SetFont('SJIS','',10);
76 $this->Write(4,sprintf(recode($_SESSION['_config']['recode'], _("To the Assurer: The CAcert Assurance Programme (CAP) aims to verify the identities of Internet users through face-to-face witnessing of government issued identity documents. The Applicant asks you to verify to CAcert.org that you have met them and verified their identity against one or more original, trusted, government photo identity documents. If you have ANY doubts or concerns about the Applicant's identity, DO NOT COMPLETE OR SIGN this form. For more information about the CAcert Assurance Programme, including detailed guides for CAcert Assurers, please visit: %s")), "http://www.CAcert.org"));
78 $this->Write(4,recode($_SESSION['_config']['recode'], _("As the assurer, you are required to keep the signed document on file for 7 years. Should Cacert Inc. have any concerns about a meeting taking place, Cacert Inc. can request proof, in the form of this signed document, to ensure the process is being followed correctly. After 7 years if you wish to dispose of this form it's preferred that you shred and burn it. You do not need to retain copies of ID at all.")));
80 $this->Write(4,recode($_SESSION['_config']['recode'], _("It's encouraged that you tear the top of this form off and give it to the person you are assuring as a reminder to sign up, and as a side benefit the tear off section also contains a method of offline verification of our fingerprints.")));
84 $this->Rect(11, $top, $this->w
- 25, 60, "D"); //50 -> 60
85 $this->SetXY(11, $top +
5);
86 $this->SetFont("Arial", "BUI", "20");
87 if($_SESSION['_config']['language'] == "ja")
88 $this->SetFont('SJIS','BUI',20);
89 $this->Write(0, recode($_SESSION['_config']['recode'], _("Applicant's Statement")));
90 $this->Rect(13, $top +
10, $this->w
- 29, 6, "D");
91 $this->Line(80, $top +
10, 80, $top +
16);
92 $this->SetXY(15, $top +
13);
93 $this->SetFont("Arial", "B", "12");
94 if($_SESSION['_config']['language'] == "ja")
95 $this->SetFont('SJIS','B',12);
96 $this->Write(0, recode($_SESSION['_config']['recode'], _("Names")).":");
99 $this->SetXY(82, $top +
13);
100 $this->SetFont("Arial", '', "11");
101 if($_SESSION['_config']['language'] == "ja")
102 $this->SetFont('SJIS','',11);
103 $this->Write(0, $name);
105 $this->Rect(13, $top +
16, $this->w
- 29, 6, "D");
106 $this->Line(80, $top +
16, 80, $top +
22);
107 $this->SetXY(15, $top +
19);
108 $this->SetFont("Arial", "B", "12");
109 if($_SESSION['_config']['language'] == "ja")
110 $this->SetFont('SJIS','B',12);
111 $this->Write(0, recode($_SESSION['_config']['recode'], _("Date of Birth")).": ");
112 $this->SetFont("Arial", "", "8");
113 if($_SESSION['_config']['language'] == "ja")
114 $this->SetFont('SJIS','',8);
115 $this->Write(0, "(".recode($_SESSION['_config']['recode'], _("YYYY-MM-DD")).")");
118 $this->SetXY(82, $top +
19);
119 $this->SetFont("Arial", "", "11");
120 if($_SESSION['_config']['language'] == "ja")
121 $this->SetFont('SJIS','',11);
122 $this->Write(0, $dob);
124 $this->Rect(13, $top +
22, $this->w
- 29, 6, "D");
125 $this->Line(80, $top +
22, 80, $top +
28);
126 $this->SetXY(15, $top +
25);
127 $this->SetFont("Arial", "B", "12");
128 if($_SESSION['_config']['language'] == "ja")
129 $this->SetFont('SJIS','B',12);
130 $this->Write(0, recode($_SESSION['_config']['recode'], _("Email Address")).":");
133 $this->SetXY(82, $top +
25);
134 $this->SetFont("Arial", "", "11");
135 if($_SESSION['_config']['language'] == "ja")
136 $this->SetFont('SJIS','',11);
137 $this->Write(0, $email);
139 $this->SetXY(13, $top +
32);
140 $this->SetFont("Arial", "", "9");
141 if($_SESSION['_config']['language'] == "ja")
142 $this->SetFont('SJIS','',9);
143 $this->MultiCell($this->w
- 29, 3, recode($_SESSION['_config']['recode'], _("I hereby confirm that the information stated above is both true and correct, and request the CAcert Assurer (identified below) to verify me according to CAcert Assurance Policy.")));
145 $this->SetXY(13, $top +
42);
146 $this->SetFont("Arial", "", "9");
147 if($_SESSION['_config']['language'] == "ja")
148 $this->SetFont('SJIS','',9);
149 $this->MultiCell($this->w
- 29, 3, recode($_SESSION['_config']['recode'], _("I agree to the CAcert Community Agreement.")." ( http://www.cacert.org/policy/CAcertCommunityAgreement.php )"));
151 $this->SetXY(13, $top +
55); //45->55
152 $this->Write(0, recode($_SESSION['_config']['recode'], _("Applicant's signature")).": __________________________________");
153 $this->SetXY(135, $top +
55);//45->55
154 $this->Write(0, recode($_SESSION['_config']['recode'], _("Date (YYYY-MM-DD)")).": ");
157 $this->Write(0, "20___-___-___");
159 $this->SetFont("Arial", "U", "10");
160 if($_SESSION['_config']['language'] == "ja")
161 $this->SetFont('SJIS','U',10);
162 $this->Write(0, str_pad($date, 13, " "));
166 $top +
= 65; // 55->65
167 $this->Rect(11, $top, $this->w
- 25, 83, "D"); //63->93
168 $this->SetXY(11, $top +
5);
169 $this->SetFont("Arial", "BUI", "20");
170 if($_SESSION['_config']['language'] == "ja")
171 $this->SetFont('SJIS','BUI',20);
172 $this->Write(0, recode($_SESSION['_config']['recode'], _("CAcert Assurer")));
173 $this->SetFont("Arial", "", "9");
174 if($_SESSION['_config']['language'] == "ja")
175 $this->SetFont('SJIS','',9);
176 $this->SetXY(13, $top +
15);
179 $this->Write(0, recode($_SESSION['_config']['recode'], _("Assurer's Name")).": ");
180 $this->SetFont("Arial", "", "10");
181 if($_SESSION['_config']['language'] == "ja")
182 $this->SetFont('SJIS','U',10);
183 // $this->MultiCell($this->w - 70, 2, recode($_SESSION['_config']['recode'], $assurer));
184 $this->Write(0, str_pad($assurer, 50, " "));
186 $this->SetFont("Arial", "U", "10");
187 $this->Write(0, recode($_SESSION['_config']['recode'], _("Assurer's Name")).": ________________________________________________________________");
189 $this->SetFont("Arial", "", "9");
190 if($_SESSION['_config']['language'] == "ja")
191 $this->SetFont('SJIS','',9);
192 $this->SetXY(13, $top +
22);
193 $this->MultiCell($this->w
- 34, 3, recode($_SESSION['_config']['recode'], _("Photo ID Shown: (ID types, not numbers. eg Drivers license, Passport)")));
194 $this->SetXY(13, $top +
30);
197 $this->Write(0, "1. __________________________________________________________________");
199 $this->Write(0, "1. ");
200 $this->SetFont("Arial", "U", "10");
201 if($_SESSION['_config']['language'] == "ja")
202 $this->SetFont('SJIS','U',10);
203 $this->Write(0, str_pad($document1, 90, " "));
205 $this->SetFont("Arial", "", "9");
206 if($_SESSION['_config']['language'] == "ja")
207 $this->SetFont('SJIS','',9);
208 $this->SetXY(13, $top +
35);
211 $this->Write(0, "2. __________________________________________________________________");
213 $this->Write(0, "2. ");
214 $this->SetFont("Arial", "U", "10");
215 if($_SESSION['_config']['language'] == "ja")
216 $this->SetFont('SJIS','U',10);
217 $this->Write(0, str_pad($document2, 90, " "));
219 $this->SetFont("Arial", "", "9");
220 if($_SESSION['_config']['language'] == "ja")
221 $this->SetFont('SJIS','',9);
222 $this->SetXY(13, $top +
45);
223 $this->Write(0, recode($_SESSION['_config']['recode'], _("Location of Face-to-face Meeting")).": ");
226 $this->Write(0, "_____________________________________________");
228 $this->SetFont("Arial", "U", "10");
229 if($_SESSION['_config']['language'] == "ja")
230 $this->SetFont('SJIS','U',10);
231 $this->Write(0, str_pad($location, 70, " "));
233 $this->SetFont("Arial", "", "9");
234 if($_SESSION['_config']['language'] == "ja")
235 $this->SetFont('SJIS','',9);
236 $this->SetXY(13, $top +
50);
239 $this->Write(0, recode($_SESSION['_config']['recode'], _("Maximum Points")).": ".$maxpoints);
241 $this->Write(0, recode($_SESSION['_config']['recode'], _("Points Allocated")).": ______________");
243 $this->SetFont("Arial", "", "9");
244 if($_SESSION['_config']['language'] == "ja")
245 $this->SetFont('SJIS','',9);
246 $this->SetXY(13, $top +
54);
247 $this->MultiCell($this->w
- 33, 3, recode($_SESSION['_config']['recode'], _("I, the Assurer, hereby confirm that I have verified the Member according to CAcert Assurance Policy.")));
248 $this->SetXY(13, $top +
59);
249 $this->MultiCell($this->w
- 33, 3, recode($_SESSION['_config']['recode'], _("I am a CAcert Community Member, have passed the Assurance Challenge, and have been assured with at least 100 Assurance Points.")));
251 $this->SetFont("Arial", "", "9");
252 if($_SESSION['_config']['language'] == "ja")
253 $this->SetFont('SJIS','',9);
254 $this->SetXY(13, $top +
74); //22->67
255 $this->Write(0, recode($_SESSION['_config']['recode'], _("Assurer's signature")).": __________________________________");
256 $this->SetXY(135, $top +
74); //22->67
257 $this->Write(0, recode($_SESSION['_config']['recode'], _("Date (YYYY-MM-DD)")).": ");
260 $this->Write(0, "20___-___-___");
262 $this->SetFont("Arial", "U", "10");
263 if($_SESSION['_config']['language'] == "ja")
264 $this->SetFont('SJIS','U',10);
265 $this->Write(0, str_pad($date, 13, " "));
271 $format = array_key_exists('format',$_REQUEST)?
$_REQUEST['format']:"";
272 if($format != "letter")
275 $maxpoints = array_key_exists('maxpoints',$_REQUEST)?
intval($_GET['maxpoints']):0;
279 $pdf = new PDF('P', 'mm', $format);
280 if($_SESSION['_config']['language'] == "ja")
284 $pdf->Body(array_key_exists('name',$_REQUEST)?
$_REQUEST['name']:"", array_key_exists('dob',$_REQUEST)?
$_REQUEST['dob']:"", array_key_exists('email',$_REQUEST)?
$_REQUEST['email']:"", array_key_exists('assurer',$_REQUEST)?
$_REQUEST['assurer']:"", array_key_exists('date',$_REQUEST)?
$_REQUEST['date']:"", $maxpoints, array_key_exists('document1',$_REQUEST)?
$_REQUEST['document1']:"", array_key_exists('document2',$_REQUEST)?
$_REQUEST['document2']:"", array_key_exists('location',$_REQUEST)?
$_REQUEST['location']:"");
285 header("Expires: ".gmdate("D, j M Y G:i:s \G\M\T", time()+
10800));
286 header("Content-Disposition: attachment; filename=cap.pdf");
287 header("Cache-Control: public, max-age=10800");
288 header("Pragma: cache");