2005-06-12 03:51:48 +00:00
< ?
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] != " ja_JP " )
{
define ( 'FPDF_FONTPATH' , '/usr/share/fpdf/font/' );
require_once ( '/usr/share/ufpdf/fpdf.php' );
class PDF2 extends FPDF
{
}
} else {
require ( '/usr/share/fpdf/japanese.php' );
class PDF2 extends PDF_Japanese
{
}
}
2005-06-12 03:51:48 +00:00
2005-07-01 13:12:14 +00:00
class PDF extends PDF2
2005-06-12 03:51:48 +00:00
{
function Header ()
{
$this -> Image ( 'images/logo.png' , 8 , 8 , 100 );
$this -> SetFont ( 'Arial' , 'B' , 14 );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , '' , 14 );
2005-06-12 03:51:48 +00:00
$this -> Cell ( 100 );
2005-07-01 13:12:14 +00:00
$this -> Cell ( 40 , 20 , recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " CAcert Assurance Programme " )));
2005-06-12 03:51:48 +00:00
$this -> Ln ( 6 );
$this -> Cell ( 100 );
2005-07-01 13:12:14 +00:00
$this -> Cell ( 40 , 20 , recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " Identity Verification Form " )));
2005-06-12 03:51:48 +00:00
$this -> Ln ( 10 );
}
function Footer ()
{
$this -> SetY ( - 10 );
$this -> SetFont ( 'Arial' , 'I' , 8 );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , 'I' , 8 );
2005-06-12 03:51:48 +00:00
$this -> Cell ( 0 , 0 , 'CAcert Inc. - P.O. Box 81 - Banksia NSW 2216 - Australia - http://www.CAcert.org' , 0 , 0 , 'C' );
$this -> SetY ( - 7 );
$this -> SetFont ( 'Arial' , '' , 6 );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , '' , 6 );
$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' );
2005-06-12 03:51:48 +00:00
}
2005-07-14 19:56:28 +00:00
function Body ( $name = " " , $dob = " " , $email = " " , $assurer = " " , $date = " " , $maxpoints = " " , $document1 = " " , $document2 = " " , $location = " " )
2005-06-12 03:51:48 +00:00
{
if ( $date == " now " )
$date = date ( " Y-m-d " );
// Show text blurb at top of page
$this -> SetY ( 40 );
$this -> SetFont ( 'Arial' , '' , 10 );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , '' , 10 );
$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 " ));
2005-06-12 03:51:48 +00:00
$this -> Ln ( 10 );
2005-07-01 13:12:14 +00:00
$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. " )));
2005-06-12 03:51:48 +00:00
// Assuree Section
$top = 100 ;
$this -> Rect ( 11 , $top , $this -> w - 25 , 50 , " D " );
$this -> SetXY ( 11 , $top + 5 );
$this -> SetFont ( " Arial " , " BUI " , " 20 " );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , 'BUI' , 20 );
$this -> Write ( 0 , recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " Applicant's Statement " )));
2005-06-12 03:51:48 +00:00
$this -> Rect ( 13 , $top + 10 , $this -> w - 29 , 6 , " D " );
$this -> Line ( 80 , $top + 10 , 80 , $top + 16 );
$this -> SetXY ( 15 , $top + 13 );
$this -> SetFont ( " Arial " , " B " , " 12 " );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , 'B' , 12 );
$this -> Write ( 0 , recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " Names " )) . " : " );
2005-06-12 03:51:48 +00:00
if ( $name )
{
$this -> SetXY ( 82 , $top + 13 );
2005-07-01 13:12:14 +00:00
$this -> SetFont ( " Arial " , '' , " 11 " );
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , '' , 11 );
2005-06-12 03:51:48 +00:00
$this -> Write ( 0 , $name );
}
$this -> Rect ( 13 , $top + 16 , $this -> w - 29 , 6 , " D " );
$this -> Line ( 80 , $top + 16 , 80 , $top + 22 );
$this -> SetXY ( 15 , $top + 19 );
$this -> SetFont ( " Arial " , " B " , " 12 " );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , 'B' , 12 );
$this -> Write ( 0 , recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " Date of Birth " )) . " : " );
2005-06-12 03:51:48 +00:00
$this -> SetFont ( " Arial " , " " , " 8 " );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , '' , 8 );
$this -> Write ( 0 , " ( " . recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " YYYY-MM-DD " )) . " ) " );
2005-06-12 03:51:48 +00:00
if ( $dob )
{
$this -> SetXY ( 82 , $top + 19 );
$this -> SetFont ( " Arial " , " " , " 11 " );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , '' , 11 );
2005-06-12 03:51:48 +00:00
$this -> Write ( 0 , $dob );
}
$this -> Rect ( 13 , $top + 22 , $this -> w - 29 , 6 , " D " );
$this -> Line ( 80 , $top + 22 , 80 , $top + 28 );
$this -> SetXY ( 15 , $top + 25 );
$this -> SetFont ( " Arial " , " B " , " 12 " );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , 'B' , 12 );
$this -> Write ( 0 , recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " Email Address " )) . " : " );
2005-06-12 03:51:48 +00:00
if ( $email )
{
$this -> SetXY ( 82 , $top + 25 );
$this -> SetFont ( " Arial " , " " , " 11 " );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , '' , 11 );
2005-06-12 03:51:48 +00:00
$this -> Write ( 0 , $email );
}
$this -> SetXY ( 13 , $top + 32 );
$this -> SetFont ( " Arial " , " " , " 9 " );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , '' , 9 );
$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 witness my identity in the CAcert Assurance Programme. " )));
2005-06-12 03:51:48 +00:00
$this -> SetXY ( 17 , $top + 45 );
2005-07-01 13:12:14 +00:00
$this -> Write ( 0 , recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " Applicant's signature " )) . " : __________________________________ " );
2005-06-12 03:51:48 +00:00
$this -> SetXY ( 135 , $top + 45 );
2005-07-01 13:12:14 +00:00
$this -> Write ( 0 , recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " Date (YYYY-MM-DD) " )) . " : " );
2005-06-12 03:51:48 +00:00
if ( $date == " " )
{
$this -> Write ( 0 , " 20___-___-___ " );
} else {
$this -> SetFont ( " Arial " , " U " , " 10 " );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , 'U' , 10 );
2005-07-14 19:56:28 +00:00
$this -> Write ( 0 , str_pad ( $date , 13 , " " ));
2005-06-12 03:51:48 +00:00
}
// Assurer Section
$top += 55 ;
$this -> Rect ( 11 , $top , $this -> w - 25 , 63 , " D " );
$this -> SetXY ( 11 , $top + 5 );
$this -> SetFont ( " Arial " , " BUI " , " 20 " );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , 'BUI' , 20 );
$this -> Write ( 0 , recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " CAcert Assurer " )));
2005-06-12 03:51:48 +00:00
$this -> SetFont ( " Arial " , " " , " 9 " );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , '' , 9 );
2005-06-12 03:51:48 +00:00
$this -> SetXY ( 17 , $top + 15 );
if ( $assurer )
{
2005-07-01 13:12:14 +00:00
$this -> Write ( 0 , recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " Assurer's Name " )) . " : " );
2005-06-12 03:51:48 +00:00
$this -> SetFont ( " Arial " , " U " , " 10 " );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , 'U' , 10 );
2005-07-14 19:56:28 +00:00
$this -> Write ( 0 , str_pad ( $assurer , 50 , " " ));
2005-06-12 03:51:48 +00:00
} else {
2005-07-01 13:12:14 +00:00
$this -> Write ( 0 , recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " Assurer's Name " )) . " : ________________________________________________________________ " );
2005-06-12 03:51:48 +00:00
}
$this -> SetFont ( " Arial " , " " , " 9 " );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , '' , 9 );
2005-06-12 03:51:48 +00:00
$this -> SetXY ( 17 , $top + 22 );
2005-07-01 13:12:14 +00:00
$this -> Write ( 0 , recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " Assurer's signature " )) . " : __________________________________ " );
2005-06-12 03:51:48 +00:00
$this -> SetXY ( 135 , $top + 22 );
2005-07-01 13:12:14 +00:00
$this -> Write ( 0 , recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " Date (YYYY-MM-DD) " )) . " : " );
2005-06-12 03:51:48 +00:00
if ( $date == " " )
{
$this -> Write ( 0 , " 20___-___-___ " );
} else {
$this -> SetFont ( " Arial " , " U " , " 10 " );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , 'U' , 10 );
2005-07-14 19:56:28 +00:00
$this -> Write ( 0 , str_pad ( $date , 13 , " " ));
2005-06-12 03:51:48 +00:00
}
$this -> SetFont ( " Arial " , " " , " 9 " );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , '' , 9 );
$this -> SetXY ( 17 , $top + 25 );
$this -> MultiCell ( $this -> w - 34 , 3 , recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " Photo ID Shown: (ID types, not numbers. eg Drivers license, Passport) " )));
2005-06-12 03:51:48 +00:00
$this -> SetXY ( 17 , $top + 35 );
2005-07-14 19:56:28 +00:00
if ( $document1 == " " )
{
$this -> Write ( 0 , " 1. __________________________________________________________________ " );
} else {
$this -> Write ( 0 , " 1. " );
$this -> SetFont ( " Arial " , " U " , " 10 " );
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , 'U' , 10 );
$this -> Write ( 0 , str_pad ( $document1 , 90 , " " ));
}
$this -> SetFont ( " Arial " , " " , " 9 " );
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , '' , 9 );
2005-06-12 03:51:48 +00:00
$this -> SetXY ( 17 , $top + 40 );
2005-07-14 19:56:28 +00:00
if ( $document2 == " " )
{
$this -> Write ( 0 , " 2. __________________________________________________________________ " );
} else {
$this -> Write ( 0 , " 2. " );
$this -> SetFont ( " Arial " , " U " , " 10 " );
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , 'U' , 10 );
$this -> Write ( 0 , str_pad ( $document2 , 90 , " " ));
}
$this -> SetFont ( " Arial " , " " , " 9 " );
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , '' , 9 );
2005-06-12 03:51:48 +00:00
$this -> SetXY ( 17 , $top + 50 );
2005-07-14 19:56:28 +00:00
$this -> Write ( 0 , recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " Location of Face-to-face Meeting " )) . " : " );
if ( $location == " " )
{
$this -> Write ( 0 , " _____________________________________________ " );
} else {
$this -> SetFont ( " Arial " , " U " , " 10 " );
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , 'U' , 10 );
$this -> Write ( 0 , str_pad ( $location , 70 , " " ));
}
$this -> SetFont ( " Arial " , " " , " 9 " );
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$this -> SetFont ( 'SJIS' , '' , 9 );
2005-06-12 03:51:48 +00:00
$this -> SetXY ( 17 , $top + 55 );
2005-07-01 13:12:14 +00:00
$this -> Write ( 0 , recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " Points Allocated " )) . " : ______________ " );
2005-07-14 19:56:28 +00:00
if ( $maxpoints > 0 )
{
$this -> SetXY ( 17 , $top + 60 );
$this -> Write ( 0 , recode ( $_SESSION [ '_config' ][ 'recode' ], _ ( " Maximum Points " )) . " : " . $maxpoints );
}
2005-06-12 03:51:48 +00:00
}
}
$format = $_GET [ 'format' ];
if ( $format != " letter " )
$format = " A4 " ;
$maxpoints = intval ( $_GET [ 'maxpoints' ]);
if ( $maxpoints < 0 )
$maxpoints = 0 ;
if ( $maxpoints == 0 )
$maxpoints = intval ( maxpoints ());
$pdf = new PDF ( 'P' , 'mm' , $format );
2005-07-01 13:12:14 +00:00
if ( $_SESSION [ '_config' ][ 'language' ] == " ja_JP " )
$pdf -> AddSJISFont ();
$pdf -> Open ();
2005-06-12 03:51:48 +00:00
$pdf -> AddPage ();
2005-07-14 19:56:28 +00:00
$pdf -> Body ( $_GET [ 'name' ], $_GET [ 'dob' ], $_GET [ 'email' ], $_GET [ 'assurer' ], $_GET [ 'date' ], $maxpoints , $_GET [ 'document1' ], $_GET [ 'document2' ], $_GET [ 'location' ]);
2005-11-08 10:06:04 +00:00
header ( " Expires: " . gmdate ( " D, j M Y G:i:s \ G \ M \T " , time () + 10800 ));
2005-12-04 21:04:05 +00:00
header ( " Content-Disposition: attachment; filename=cap.pdf " );
2005-11-08 10:06:04 +00:00
header ( " Cache-Control: public, max-age=10800 " );
header ( " Pragma: cache " );
2005-06-12 03:51:48 +00:00
$pdf -> output ();
exit ;
?>