Added new files and new versions

pull/1/head
root 16 years ago
parent 2cd48b9e16
commit b3007006ab

@ -0,0 +1,247 @@
<?php /*
LibreSSL - CAcert web application
Copyright (C) 2004-2008 CAcert Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
loadem("index");
showheader(_("Identity Verification Form (CAP) form"));
Version: $Id: cap.html.php,v 1.1 2009/03/02 23:09:05 root Exp $
*/
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', "\n";
echo '<html>', "\n";
echo '<head>', "\n";
echo '<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">', "\n";
echo '<title>'._("Identity Verification Form (CAP) form").'</title>', "\n";
echo '</head>', "\n";
echo '<body>', "\n";
echo '<p>', "\n";
echo '<div style="text-align: right;"><img style="width: 30%; float: none;" alt="CAcert logo" src="http://www.cacert.org/logos/CAcert-logo-colour-1000.png" vspace="3">';
echo '</div>', "\n";
echo '</p>', "\n";
echo '<p>', "\n";
echo '<div style="text-align: right;">', "\n";
echo '<big><big><span style="font-weight: bold;">'._("CAcert Assurance Programme").'</span></big></big><br>', "\n";
echo '</div>', "\n";
echo '<div style="text-align: right;">', "\n";
echo '<big><big><span style="font-weight: bold;">'._("Identity Verification Form (CAP) form").'</span></big></big><br>', "\n";
echo '</div>', "\n";
echo '<div style="text-align: right;">'.'CAcert Inc. - P.O. Box 4107 - Denistone East NSW 2112 - Australia - <a href="http://www.cacert.org/"> http://www.cacert.org/</a><br></div>', "\n";
echo '<table border=1 cellspacing="0" cellpadding="0" bordercolor="lightblue" cellpadding="0" cellspacing="0" width="100%" style="color: white; background-color: rgb(112, 154, 186);" rules="groups">', "\n";
echo '<tbody>', "\n";
echo '<tr><td>', "\n";
echo '<tr>', "\n";
echo ' <td align="left"><font size=-7>'._("CAcert's Root Certificate sha1 fingerprints").'</font></td>', "\n";
echo ' <td align="right"><font size=-7>class 1: 135C EC36 F49C B8E9 3B1A B270 CD80 8846 76CE 8F33</font></td>', "\n";
echo '</tr>', "\n";
echo '<tr>', "\n";
echo ' <td></td>', "\n";
echo ' <td align="right"><font size=-7>class 3: DB4C 4269 073F E9C2 A37D 890A 5C1B 18C4 184E 2A2D</font></td>', "\n";
echo '<tr>', "\n";
echo '</font>', "\n";
echo '</td>', "\n";
echo '</tr>', "\n";
echo '</tbody>', "\n";
echo '</table>', "\n";
echo '<p>', "\n";
echo _("The CAcert Assurance Programme (CAP) aims to verify the identities of Internet users through face to face witnessing of government-issued photo identity documents.");
echo _("The Applicant asks the Assurer to verify to the CAcert Community that the Assurer has met and verified the Applicant's identity against original documents.");
echo _("Assurer may leave a copy of the details with the Applicant, and may complete and sign her final form after the meeting.");
echo _("If there are any doubts or concerns about the Applicant's identity, do not allocate points. You are encouraged to perform a mutual Assurance.");
echo '<br>', "\n";
echo _("For more information about the CAcert Assurance Programme, including detailed guides for CAcert Assurers, please visit:");
echo ' <a href="http://www.cacert.org/">http://www.cacert.org/</a><br>', "\n";
echo _("A CAcert Arbitrator can require the Assurer to deliver the completed form in the event of a dispute. After 7 years this form should be securely disposed of to prevent identity misuse. E.g. shred or burn the form. The Assurer does not retain copies of ID at all.");
echo '<br>', "\n";
echo _("For the CAcert Organisation Assurance Programme there is a separate special COAP form.");
/*
echo '</p>', "\n";
*/
echo '<form target="_blank" enctype="application/x-www-form-urlencoded" method="get" action="https://www.cacert.org/capnew.php" name="CAP form">', "\n";
echo '<table width=100% cellspacing="0" celpadding="0"><tr>', "\n";
echo ' <td>';
echo '<div style="text-align: left;"><span style="font-style: italic; text-align: right;">'._("Date and location of the face-to-face meeting").':</span>', "\n";
echo '<input maxlength="80" size="30" name="location"></span>', "\n";
echo '</td>', "\n", ' <td>';
echo '<div style="text-align: right;"><span style="font-style: italic;"><small>('._("yyyy-dd-mm").')</small></span>';
echo '<input size="12" name="date"></div>', "\n";
echo '</td>', "\n", '</tr>', "\n", '</tabe>', "\n";
echo '<br>', "\n";
echo '<table border="3" cellpadding="2" cellspacing="0" width="100%" bordercolor="lightblue" rules="groups">', "\n";
echo '<thead>', "\n";
echo '<tr style="background-color: rgb(17, 86, 140); color: white;">', "\n";
echo ' <th colspan="2" align="left"><big><big>'._("Applicant's Identity Information").'</big></big></th>', "\n";
echo ' <th align=left>';
/* echo _("points").'<br>'._("allocated"); */
echo str_replace(" ", '<br>', _("points allocated"));
echo '</th>', "\n";
echo '</tr>', "\n";
echo '</thead>', "\n";
echo '<tbody>', "\n";
echo '<tr><td align="left">'._("Exact full name on the ID").': </td>', "\n";
echo ' <td align="right">(', "\n"._("type of ID shown").')</td>', "\n";
echo ' <td align="right">', "\n"._("max").'35</td>', "\n";
echo '</tr>', "\n";
echo '<tr>', "\n";
echo ' <td><input size="55" maxlength="80" name="name1"></td>', "\n";
echo ' <td align="right"><select size="1" name="name1ID">', "\n";
echo ' <option selected="selected">'._("passport").'</option>', "\n";
echo ' <option>'._("identity card").'</option>', "\n";
echo ' <option>'._("driver license").'</option>', "\n";
echo ' <option value="......">'._("other").'</option>', "\n";
echo ' </select>', "\n";
echo ' </td>', "\n";
echo ' <td align="right"><input maxlength="2" size="2" name="name1Pnts"></td>', "\n";
echo '</tr>', "\n";
echo '<tr> ', "\n";
echo ' <td><input size="55" maxlength="80" name="name2"></td>', "\n";
echo ' <td align="right"><select size="1" name="name2ID">', "\n";
echo ' <option>'._("passport").'</option>';
echo ' <option selected="selected">'._("identity card").'</option>', "\n";
echo ' <option>'._("driver license").'</option>', "\n";
echo ' <option value="....">'._("other").'</option>', "\n";
echo ' </select>', "\n";
echo ' </td>', "\n";
echo ' <td align="right"><input maxlength="2" size="2" name="name2Pnts"></td>', "\n";
echo '</tr>', "\n";
echo '<tr><td><input size="55" maxlength="80" name="name3"></td>', "\n";
echo ' <td align="right"><select size="1" name="name3ID">', "\n";
echo ' <option>'._("passport").'</option>', "\n";
echo ' <option>'._("identity card").'</option>';
echo ' <option selected="selected" value="">', "\n"._("driver license").'</option>';
echo ' <option value="....">', "\n"._("other").'</option>';
echo ' </select>', "\n";
echo ' </td>', "\n";
echo ' <td align="right"><input maxlength="2" size="2" name="name3Pnts"></td>', "\n";
echo '</tr>', "\n";
echo '</tbody>', "\n";
echo '<tbody>', "\n";
echo '<tr><td>'._("Email address").': <br><input maxlength="80" size="55" name="email"></td>', "\n";
echo ' <td colspan="2" align="right">'._("Date of Birth").' ('._("yyyy-mm-dd").')'.'<br><input maxlength="10" size="11" name="dob"></td>', "\n";
echo '</tr>', "\n";
echo '</tbody>', "\n";
echo '<!--', "\n";
echo '</table>', "\n";
echo '<table border="3" cellpadding="2" cellspacing="0" width="100%" bordercolor="lightblue" rules="groups">', "\n";
echo '-->', "\n";
echo '<thead>', "\n";
echo '<tr style="background-color: rgb(17, 86, 140); color: white;">', "\n";
echo ' <th colspan="3" align="left"><big><big>'._("Applicant's Statement").'</big></big></th>', "\n";
echo '</thead>', "\n";
echo '<tbody>', "\n";
echo '<tr>', "\n";
echo ' <td colspan="3">'._("Make sure you have read and agreed with the CAcert Community Agreement");
echo '(<a href="http://www.cacert.org/policy/CAcertCommunityAgreement.php">CCA</a>)<br>', "\n";
echo '</td>', " \n", '</tr>', "\n";
/*
echo '</tbody>', "\n";
echo '<tbody>', "\n";
*/
echo '<tr>', "\n";
echo ' <td colspan="3"><input type="checkbox" checked name="checked" value="1"> ';
echo _("I hereby confirm that the information stating my Identity Information above is both true and correct and request the CAcert Assurer (see below) to witness my identity in the CAcert Assurance Programme.");
echo '</td>', "\n".'</tr>', "\n";
echo '<tr>', "\n". ' <td colspan="3"><input type="checkbox" checked name="checked" value="2"> ';
echo _("I agree to the CAcert Community Agreement.").' (';
echo '<a href="http://www.cacert.org/policy/CAcertCommunityAgreement.php">CCA</a>)</dd>', "\n";
echo '</td>', "\n".'</tr>', "\n";
/*
echo '</tbody>', "\n";
echo '<tbody>', "\n";
*/
echo '<tr>', "\n";
echo ' <td>'._("Date").' ('._("yyyy-mm-dd").')'.'<br><input maxlength="10" size="11" name="assurancedate"></td>', "\n";
echo ' <td colspan="2" align="right" valign="top"> '._("Applicant's signature").'</td>', "\n";
echo '</tr>', "\n";
echo '</tbody>', "\n";
echo '</table>', "\n";
echo '<br>', "\n";
echo '<table border="3" cellpadding="2" cellspacing="0" width="100%" bordercolor="lightblue" rules="groups">', "\n";
echo '<thead>', "\n";
echo '<tr style="background-color: rgb(17, 86, 140); color: white;">', "\n";
echo ' <th colspan="2" align="left"><big><big>'._("Assurer's Statement").'</big></big></td>', "\n";
echo '</tr>', "\n";
echo '</thead>', "\n";
echo '<tbody>', "\n";
echo '<tr>', "\n";
echo ' <td>'._("Assurer's Name").'<br><input maxlength="80" size="55" name="assurer"></td>', "\n";
echo ' <td align="right"><small><small>'.'('._("optional").')'.'</small></small>', "\n";
echo _("Date of Birth").' ('._("yyyy-mm-dd").')';
echo '<br><input maxlength="10" size="11" name="assurerdob"></td>', "\n";
echo '</tr>', "\n";
echo '<tr>', "\n";
echo ' <td colspan="2">'._("Assurer's email address").'<small><small>', "\n";
echo '('._("optional").')'.'</small></small><br><input maxlength="80" size="55" name="assureremail"></td>', "\n";
echo '</tr>', "\n";
/*
echo '</tbody>', "\n";
echo '<tbody>', "\n";
*/
echo '<tr>', "\n";
echo ' <td colspan="2"><input type="checkbox" checked name="checked" value="3"> ';
echo _("I, the Assurer, hereby confirm that I have verified the Applicant's Identity Information, I will witness the Applicant's identity in the CAcert Assurance Programme, and allocate Assurance Points.");
echo '</td>', "\n";
echo '</tr>', "\n";
echo '<tr>', "\n";
echo ' <td colspan="2"><input type="checkbox" checked name="checked" value="4"> ';
echo _("I am a CAcert Community Member, have passed the Assurance Challenge, and have been assured with at least 100 Assurance Points.");
echo '</td>', "\n";
echo '</tr>', "\n";
/*
echo '</tbody>', "\n";
echo '<tbody>', "\n";
*/
echo '<tr>', "\n";
echo ' <td>'._("Date").' ('._("yyyy-mm-dd").')';
echo '<br><input maxlength="10" size="11" name="assurerdate"></td>', "\n";
echo ' <td align="right" valign="top">'._("Assurer's signature").'</td>', "\n";
echo '</tr>', "\n";
echo '</tbody>', "\n";
echo '</table>', "\n";
echo '<div style="text-align: right;"><small><small><span>&copy; '.date('Y').' CAcert Inc., V5, '.date('Y-n-j').'</small></small></span></div>', "\n";
echo '<br>', "\n";
echo '<p>', "\n";
echo '<table border="3" cellpadding="2" cellspacing="0" width="100%" bordercolor="lightblue" rules="groups">', "\n";
echo '<thead>', "\n";
echo '<tr style="background-color: rgb(112, 154, 186); color: white;">', "\n";
echo ' <th colspan="2" align="left"><big><big>'._("How To Print this CAP form").'</big></big></td>', "\n";
echo '</tr>', "\n";
echo '</thead>', "\n";
echo '</table>', "\n";
echo '<p>';
echo _("A printer ready file with the form and attachments can be generated as follows:");
echo '<dl>', "\n";
echo ' <dd><input type="radio" name="orientation" value="landscape"> '._("2-up");
echo ' <input type="radio" checked="checked" name="orientation" value="portrait"> '._("portrait").' '._("1-up").')';
echo '</dd>', "\n";
echo ' <dd><input type="radio" checked="checked" name="format" value="A4"> A4', "\n";
echo ' <input type="radio" name="format" value="A5"> A5', "\n";
echo ' <input type="radio" name="format" value="letter"> Letter '._("paper format");
echo '</dd>', "\n";
echo ' <dd><input type="radio" name="nocca" value="false"> '._("no");
echo ' <input type="radio" checked="checked" name="nocca" value="true"> '._("yes, the CCA is attached to the form.");
echo '</dd>', "\n";
echo '</dl>', "\n";
echo _("Submit the form").': <button type="submit" style="background-color: rgb(112, 154, 186); color: white;"> '._("generate PDF file");
echo '</button>', "\n";
echo '</p>', "\n";
echo '</form>', "\n";
echo '</body>', "\n";
echo '</html>', "\n";
?>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,350 @@
<?php /*
LibreSSL - CAcert web application
Copyright (C) 2004-2008 CAcert Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Version: $Id: coap.html.php,v 1.1 2009/03/02 23:09:05 root Exp $
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<?php
echo '<title>'._("Organisation Information (COAP) form").'</title>', "\n";
?>
</head>
<body>
<style type="text/css">
table#TAB1 {border-color: rgb(173,197,215); border-top: solid 5px rgb(173,197,215); border-left: solid 5px rgb(173,197,215);}
table#TAB1 td { border: 0 }
</style>
<p>
<div style="text-align: right;"><img align="absbottum" style="width: 30%; float: none;" alt="CAcert logo" src="http://www.cacert.org/logos/CAcert-logo-colour-1000.png" vspace="3" /></div>
</div>
</p>
<p>
<div style="text-align: right;">
<?php
echo '<big><big><span style="font-weight: bold;">'._("CAcert Organisation Assurance Programme").'</span></big></big><br>', "\n";
?>
</div>
<div style="text-align: right;">
<?php
echo '<big><big><span style="font-weight: bold;">'._("Organisation Information (COAP) form").'</span></big></big><br>', "\n";
?>
</div>
<div style="text-align: right;">CAcert Inc. - P.O. Box 4107 - Denistone East NSW 2112 - Australia - <a href="http://www.cacert.org/">http://www.cacert.org</a><br></div>
<br>
<table style="border-bottom: solid; border-color: rgb(17, 86, 140)" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<?php
echo ' <td border=0 align="left"><font size=-7>'._("CAcert's Root Certificate sha1 fingerprints").'</font></td>', "\n";
?>
<td border=0 align="right"><font size=-7>class 1: 135C EC36 F49C B8E9 3B1A B270 CD80 8846 76CE 8F33</font></td>
</tr>
<tr>
<td border=0></td>
<td border=0 align="right"><font size=-7>class 3: DB4C 4269 073F E9C2 A37D 890A 5C1B 18C4 184E 2A2D</font></td>
<tr>
</font>
</td>
</tr>
</tbody>
</table>
<p>
<?php
echo _("The CAcert Organisation Programme (COAP) aims to verify the identity of the organisation."), "<br>\n";
echo _("The Applicant asks the Organisation Assurer to verify to CAcert Community that the information provided by the Applicant is correct, and according to the official trade office registration bodies."), "<br>\n";
echo _("For more information about the CAcert Organisation Assurance Programme, including detailed guides to CAcert Organisation Assurers, please visit:"), ' ';
echo ' <a href="http://www.cacert.org/">http://www.cacert.org</a><br>';
echo _("A CAcert Arbitrator can require the Organisation Assurer to deliver the completed forms and accompanying documents in the event of a dispute."), "<br>\n";
echo _("For the CAcert Individual Assurance Programme there is a separate special CAP form.");
?>
<form target="_blank" enctype="application/x-www-form-urlencoded" method="get" action="https://www.cacert.org/coapnew.php" name="COAP form">
<br>
<table border="1" id="TAB1" cellpadding="2" cellspacing="0" width="100%" rules="groups">
<thead>
<tr style="background-color: rgb(17, 86, 140); color: white;">
<?php
echo ' <th colspan="4" align="left"><big><big>'._("Organisation Identity Information").'</big></big></th>', "\n";
?>
</tr>
</thead>
<tbody>
<tr>
<?php
echo ' <td nowrap>'. _("Name of the organisation").'</td>', "\n";
echo ' <td colspan="3"><input size=\"60\" maxlength=\"80\" name=\"name\"></td>', "\n";
echo '</tr>', "\n";
echo '<tr>', "\n";
echo ' <td nowrap>'. _("Address").' ('. _("comma separated"). ')';
echo ' <td colspan="3"><input size=\"60\" maxlength=\"80\" name=\"address\"></td>', "\n";
echo '</tr>', "\n";
?>
</tbody>
<tbody>
<tr>
<?php
echo ' <td>'. _("Jurisdiction info"). '</td>', "\n";
echo ' <td align="left"><i>'. _("type"). '</td></i>', "\n";
echo ' <td align="left"><i>'. _("state"). '</td></i>', "\n";
echo ' <td align="right"><i>'. _("country code"). '</td></i>', "\n";
echo '</tr>', "\n";
echo '<tr>', "\n";
echo ' <td></td>', "\n";
echo ' <td align="left"><input size=\"25\" maxlength=\"80\" name=\"type\"></td>', "\n";
echo ' <td align="left"><input size=\"25\" maxlength=\"80\" name=\"state\"></td>', "\n";
echo ' <td align="right"><input size=\"3\" maxlength=\"80\" name=\"country\"></td>', "\n";
?>
</tr>
</tbody>
<tbody>
<?php
for ( $i = 0; $i < 2; $i++ ) {
echo '<tr>', "\n", ' <td>';
if ( $i < 1 ) { echo _("Registered Trade Names");}
echo '</td>', "\n";
for ( $j = 1; $j <= 3; $j++ ) {
printf(" <td align=\"%s\"><input size=\"25\" maxlength=\"80\" name=\"dba%d\"></td>\n", $j > 2 ? "right" : ($j > 2 ? "center" : "left") , $i * 3 + $j);
}
echo '</tr>', "\n";
}
?>
</tbody>
<tbody>
<tr>
<?php
echo ' <td>'. _("Trade Office info"). '</td>', "\n";
echo ' <td align="left"><i>'. _("reg. number"). '</td></i>', "\n";
echo ' <td align="left"><i>'. _("trade office"). '</td></i>', "\n";
echo ' <td align="right"><i>'. _("region"). '</td></i>', "\n";
echo '</tr>', "\n";
echo '<tr>', "\n";
echo ' <td></td>', "\n";
echo ' <td align="left"><input size=\"25\" maxlength=\"80\" name=\"identity\"></td>', "\n";
echo ' <td align="left"><input size=\"25\" maxlength=\"80\" name=\"tor\"></td>', "\n";
echo ' <td align="right"><input size=\"25\" maxlength=\"80\" name=\"torregion\"></td>', "\n";
?>
</tr>
</tbody>
<tbody>
<?php
for ( $i = 0; $i < 2; $i++ ) {
echo '<tr>', "\n", ' <td>';
if ( $i < 1 ) { echo _("Internet Domain(s)");}
echo '</td>', "\n";
for ( $j = 1; $j <= 3; $j++ ) {
printf(" <td align=\"%s\"><input size=\"25\" maxlength=\"80\" name=\"domain%d\"></td>\n", $j > 2 ? "right" : ($j > 2 ? "center" : "left"), $i * 3 + $j);
}
echo '</tr>', "\n";
}
?>
</tbody>
<tbody>
<?php
for ( $i = 1; $i <=2; $i++ ) {
echo '<tr>', "\n", ' <td>';
if( $i < 2 ) { echo _("Organisation Administrator(s)"); }
echo '</td>', "\n";
printf(" <td colspan=\"3\"<input size=\"65\" maxlength=\"80\" name=\"admin%d\"></td>\n</tr>\n",$i);
echo "<tr>\n <td></td><td colspan=\"2\" align=\"left\"><i>". _("email") . "</i> ";
printf("<input size=\"45\" maxlength=\"80\" name=\"admin%demail\"></td>\n", $i);
echo " <td align=\"right\"><i>". _("phone") . "</i> ";
printf("<input size=\"15\" maxlength=\"80\" name=\"admin%dphone\"></td>\n</tr>\n", $i);
}
?>
</tbody>
</table>
<table border="1" id="TAB1" cellpadding="2" cellspacing="0" width="100%" rules="groups">
<tr style="background-color: rgb(17, 86, 140); color: white;">
<th colspan="3" align="left"><big><big>
<?php
echo _("Organisation's Statement");
?>
</big></big></th>
</thead>
<tbody>
<tr>
<td colspan="2"><i>
<?php
echo _("Make sure you have read and agreed with the CAcert Community Agreement");
?>
(<a href="http://www.cacert.org/policy/CAcertCommunityAgreement.php">CCA</a>)</i><br></td>
</tr>
<tr><td colspan=2><p></td></tr>
<tr>
<?php
echo ' <td colspan="2"><i>'. _("director") . '</i>', "\n";
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input maxlength="80" size="65" name="director"></td>', "\n";
echo '</tr><tr>', "\n";
echo ' <td><i>'. _("email");
echo ' <small><small>(optional)</small></small>';
echo '</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input maxlength="80" size="40" name="email"></td>', "\n";
echo ' <td align="right"><i>'. _("phone");
echo ' <small><small>(optional)</small></small>';
echo '</i> <input maxlength="80" size="15" name="phone"></td>', "\n";
?>
</tr>
<tr>
<td colspan="2"><input type="checkbox" checked name="checked" value="1">
<?php
echo ' '. _("I agree to the CAcert Community Agreement.").' (';
?>
<a href="http://www.cacert.org/policy/CAcertCommunityAgreement.php">CCA</a>)</dd></td>
</tr>
<tr>
<td colspan="2"><input type="checkbox" checked name="checked" value="2">
<?php
echo _("I hereby confirm that all information is complete and accurate and will notify CAcert of any updates or changes thereof."). "</td>\n</tr>\n";
echo "<tr>\n", ' <td colspan="2"><input type="checkbox" checked name="checked" value="3">';
echo _("I am duly authorised to act on behalf of the organisation, I grant operational certificate administrative privileges to the specified Organisation Administrator and, I request the Organisation Assurer to verify the organisation information according to the Assurance Policies."). "</td>\n";
?>
<tr><td colspan="2"></td></tr>
<tr>
<?php
echo ' <td>'. _("Date"). ' <small><small>(<i>'. _("yyyy-mm-dd"). '</i>)</small></small>';
echo '<br><input maxlength="10" size="11" name="date"></td>', "\n";
echo ' <td align="right">'. _("Signature") .'<br> ('._("and organisation stamp") . ")</td>\n";
echo "</tr><tr>\n";
?>
</tr>
<tr><td colspan="2"><p></td></tr>
</tbody>
</table>
<br>
<table border="1" id="TAB1" cellpadding="2" cellspacing="0" width="100%" rules="groups">
<thead>
<tr style="background-color: rgb(17, 86, 140); color: white;">
<?php
echo ' <th colspan="2" align="left"><big><big>'._("Organisation Assurer's Statement").'</big></big></td>', "\n";
?>
</tr>
</thead>
<tbody>
<tr><td colspan="2"><p></td></tr>
<tr>
<?php
echo ' <td colspan="2"><i>'. _("organisation assurer") . '</i> ', "\n";
echo '<input maxlength="80" size="60" name="assurer"></td>', "\n";
echo '</tr><tr>', "\n";
echo ' <td><i>'. _("email");
echo ' <small><small>(optional)</small></small>';
echo '</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input maxlength="80" size="40" name="assureremail"></td>', "\n";
echo ' <td align="right"><i>'. _("phone");
echo ' <small><small>(optional)</small></small>';
echo '</i> <input maxlength="80" size="15" name="assurerphone"></td>', "\n";
?>
</tr>
<tr>
<td colspan="2"><input type="checkbox" checked name="checked" value="3">
<?php
echo _("I, the Assurer, hereby confirm that I have verified the official Information for the organisation, I will witness the organisation's identity in the CAcert Organisation Assurance Programme, and complete the Assurance.") . "</td>\n";
?>
</tr>
<tr>
<td colspan="2"><input type="checkbox" checked name="checked" value="4">
<?php
echo _("I am a CAcert Community Member, have passed the Organisation Assurance Challenge, and have been appointed for Organisation Assurances within the country where the organisation is registered."). "</td>\n";
?>
</tr>
<tr><td colspan=2><p></td></tr>
<tr>
<?php
echo ' <td>'._("Date").' <small><small>(<i>'._("yyyy-mm-dd").'</i>)</small></small>';
?>
<br><input maxlength="10" size="11" name="assurerdate"></td>
<?php
echo ' <td align="right" valign="top">'._("Signature").'</td>', "\n";
?>
</tr>
<tr><td colspan="2"></td><tr>
</tbody>
</table>
<div style="text-align: right;"><small><small><span>&copy;
<?php
echo date('Y').' CAcert Inc., V2, '.date('Y-n-j');
?>
</small></small></span></div>
<br>
<p>
<table border="0" cellpadding="2" cellspacing="0" width="100%" rules="groups">
<thead>
<tr style="background-color: rgb(112, 154, 186); color: white;">
<th colspan="2" align="left"><big><big>
<?php
echo _("How To Print this CAP form");
?>
</big></big></td>
</tr>
</thead>
</table>
<p>
<?php
echo _("A printer ready file with the form and attachments can be generated as follows:");
?>
<dl>
<dd><input type="radio" name="orientation" value="landscape">
<?php
echo ' '._("2-up");
echo ' <input type="radio" checked="checked" name="orientation" value="portrait"> '._("portrait").' '._("1-up").')';
?>
</dd>
<dd><input type="radio" checked="checked" name="format" value="A4"> A4
<input type="radio" name="format" value="A5"> A5
<?php
echo ' <input type="radio" name="format" value="letter"> Letter '._("paper format");
echo "</dd>\n";
echo ' <p><dd><input type="radio" name="nocca" value="false"> '._("no");
echo ' <input type="radio" checked="checked" name="nocca" value="true"> '._("yes, the CCA is attached to the form."), "</dd>\n";
$policies = array(
'Organisation Assurance Policy' =>
'http://svn.cacert.org/CAcert/Policies/OrganisationAssurancePolicy/OrganisationAssurancePolicy.html',
'Organisation Assurance Subpolicy for Australia' =>
'http://svn.cacert.org/CAcert/Policies/OrganisationAssurancePolicy/OrganisationAssuranceSubPolicyAustralia.html',
'Organisation Assurance Subpolicy for Europe' =>
'http://svn.cacert.org/CAcert/Policies/OrganisationAssurancePolicy/OrganisationAssuranceSubPolicyEurope.html',
'Organisation Assurance Subpolicy for the United States' =>
'http://svn.cacert.org/CAcert/Policies/OrganisationAssurancePolicy/OrganizationAssuranceSubPolicyUnitedStates.html',
);
$cnt = 0;
while( list($key, $ref) = each($policies) ) {
$cnt++;
if( $cnt < 2 ) {
echo '<p><dd>'. _("Applicable Organisation Policy documents and information can be attached to the pdf output file. Mark those documents, which need to be attached") . ":<br>\n";
}
printf("<dd><input type=\"checkbox\" name=\"policy%d\" value=\"%s\"> <a href=\"%s\">%s</a></dd>\n", $cnt, $ref, $ref, $key);
}
if( $cnt > 0 ) {
echo "</dd>\n";
}
echo "</dl>\n";
echo _("Submit the form").': <button type="submit" style="background-color: rgb(112, 154, 186); color: white;"> '._("generate PDF file");
echo "</button>\n";
?>
</p>
</form>
</body>
</html>

@ -17,8 +17,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
// $Id: coapnew.php,v 1.1 2008/11/14 23:39:10 root Exp $
define('REV', '$Revision: 1.1 $');
// $Id: coapnew.php,v 1.2 2009/03/02 23:09:05 root Exp $
define('REV', '$Revision: 1.2 $');
/*
** Created from old cap.php 2003, which used the now obsoleted ftpdf package
@ -36,7 +36,7 @@ define('REV', '$Revision: 1.1 $');
** PDF generation package (tcpdf/tcpdf.php):
** TCPDF package + define the TCPDF_DIR install directory (GPL)
** tcpdf package is patched for text subtypes see tcpdf diff file.
** Add free embedding zapfdingbat font: e.g. ITC_Zapf_Dingbats_Medium.ttf
** Add free embedding zapfdingbat font
** ttf2pt1 -F zapfdinbats.ttf -> zapfdingbats.utf metrics file
** php -q makefont.php zapfsdingbats.ttf zapfdingbats.utf -> .php,.ctg.z,.z
** install files: zapfdingbats.{php,z,ctg.z} in tcpdf/fonts dir
@ -53,8 +53,8 @@ define('REV', '$Revision: 1.1 $');
** see UTF8_ASCII definition for location requirements
** Thirdly: if not found transliteration feature is disabled.
**
** CCA pdf inclusion:
** if on one page: define holder for CCA file (CCA_FILE) (disabled now)
** policy documents for pdf inclusion:
** define CCA file (default policy)
** LOGO: CAcert logo logos directory is LOGO
**
** Functionality:
@ -73,8 +73,8 @@ define('REV', '$Revision: 1.1 $');
** PDF URL links are used to web, wiki, and faq for more info search
** Only on non-ascii chars in a name the utf8 routines are loaded
** PDF reader has wiki info url's and easy email feedback
** DISABLED:
** CCA generates only on request (to be changed when it fits on one page)
** ENABLED:
** included is the CCA generates 2 extra pages (needs work to limit vert spacing)
**
** For other re-use of some routines:
** abbreviate() abbreviate a name on std way
@ -93,10 +93,13 @@ define('REV', '$Revision: 1.1 $');
** If not provided: should check every string is transcoded?
** recode(), recode_string(0 is said to have too many (japanese) defeats
** recode_string() is only used on GET[] input (html->utf-8),
** own translate fie _() is expected to provide utf-8 (own recode() )
** UTF-8 use routines from http://www.sourceforge.net/projects/phputf8
** which replaces php recode() package.
** on many places own utf-8 handling code exists and is loaded (tcpdf problem)
** _() translation routine. The returned HTML string is translated to utf-8 string.
** the GET() routines expects utf-8 code (see test defs) but might be changed
** to use html entity conversion routine of PHP (5.2 has a problem...).
**
** PDF compression zlib: (now disabled)
** if PHP lib zcompress() is present, generated PDF is compressed
**
@ -105,7 +108,7 @@ define('REV', '$Revision: 1.1 $');
** Latter font is no longer for free download
** For now: FreeVeraSans is used now and embedded (std in TCPDF package)
** Zapf Dingbats font: some Open Source readers have bad font handling or
** no zapfdingbat font. So it is embedded: e.g. free ITC_Zapf_Dingbats_Medium.ttf
** no zapfdingbat font. So one is embedded
** To be generated with tooling in util directory.
**
** TO DO, to CHECK and KNOWN PROBLEMS:
@ -171,6 +174,7 @@ define('REV', '$Revision: 1.1 $');
//** $_GET['assurancedate'] date of assurance (new) (depreciated)
//** $_GET['location'] location of assurance (depreciated)
** $_GET['nocca'] do not print CCA on back side (dflt: false)
** $_GET['policy<%d>'] to include policy document(s) in pdf file %d = 1-9 (new)
** $_GET['noform'] do not print form (dflt: true) (new)
** $_GET['format'] paper format required A0-A6,Letter, Folio, B0-B6 (dflt A4)
** $_GET['watermark'] watermark on the page
@ -329,7 +333,7 @@ define('LIME', '#C7FF00'); // RGB 199 255 0
define('GREEN', '#00BE00'); // 0 190 0
define('POBOX','CAcert Inc. - P.O. Box 4107 - Denistone East NSW 2112 - Australia');
define('WEB', 'http://www.CAcert.org');
define('WEB', 'http://www.cacert.org');
define('WIKI','http://wiki.cacert.org/wiki');
define('ROOTKEYS','http://www.cacert.org/index.php?id=3');
define('ASSCOAP', WIKI.'/FAQ/AssuranceByCAP');
@ -339,18 +343,17 @@ define('ASSINTRO', WIKI.'/FAQ/AssuranceIntroduction');
define('ASSORG', WIKI."/OrganisationAssurance");
define('ARBIT', WIKI."/ArbitrationForum");
// CAcert Community Agreement
define('CCA', WEB."/policy/CAcertCommunityAgreement.php");
define('CCA', "CAcertCommunityAgreement"); // default policy to print
define('POLICY','policy/'); // default polciy doc directory
define('EXT','.php'); // default polciy doc extention, should be html
/* finger print CAcert Root Key */ // should obtain this automatically
define("CLASS1_SHA1","135C EC36 F49C B8E9 3B1A B270 CD80 8846 76CE 8F33");
define("CLASS3_SHA1","DB4C 4269 073F E9C2 A37D 890A 5C1B 18C4 184E 2A2D");
// next two are not used on the form
define("CLASS1_MD5","A6:1B:37:5E:39:0D:9C:36:54:EE:BD:20:31:46:1F:6B");
define("CLASS3_MD5","73:3F:35:54:1D:44:C9:E9:5A:4A:EF:51:AD:03:06:B6");
// place where CCA files resides
if( file_exists('../CAcertCommunityAgreement.html') )
define('CCA_FILE', '../CAcertCommunityAgreement.html');
//else
// define('CCA_FILE', CCA); // this greps the page from internet !!
// if on draft provide std message
define('WATERMARK',"");
// other definitions for the form
define("MAX_COLS", 2); // max coulumns per page Landscape is printed with 2-up
@ -419,30 +422,89 @@ function utf8_is_ascii_ctrl($str) {
// extend TCPF with custom functions
class COAPPDF extends TCPDF {
// do cap form version numbering automatically "$Revision: 1.1 $"
// do cap form version numbering automatically "$Revision: 1.2 $"
/*public*/ function Version() {
strtok(REV, " ");
return(strtok(" "));
}
function Header()
/*public*/ function myHeader( $msg = NULL, $url = NULL )
{
$this->setXY($this->lMargin, $this->lMargin);
}
function Footer()
{
if( $this->footer_msg == NULL ) return;
$this->SetFont(FONT,'', F_SIZE-1);
$strg = "© ". date("Y"). " CAcert Inc.". $this->footer_msg;
if( $this->GetGroupPageNo() > 0 ) {
$this->SetXY(0, $this->GetPageHeight()/$this->scale*100.0-7);
$this->Cell($this->GetPageWidth()/$this->scale*100.0, 3,
sprintf("%s %d/%d", _("page"), $this->GetGroupPageNo()+1,
$this->GetNumPages()), 0, 0, 'C');
static $my_url = NULL;
if( $msg != NULL ) {
$this->my_header_msg = $msg; $my_url = $url; return;
}
if( $this->my_header_msg == NULL ) return;
if( $this->msg_page_nr > 0 ) {
$font_fam = $this->FontFamily;
$font_style = $this->FontStyle.($this->underline ? 'U' : '').($this->linethrough ? 'D' : '');
$font_size = $this->getFontSize();
$this->SetFont(FONT,'', F_SIZE-1);
$this->setXY($this->lMargin, MARGIN-3);
$this->Cell($this->colwidth, 3,$this->my_header_msg, 0, 0, 'R');
if( !empty($font_fam ) )
$this->SetFont($font_fam,$font_style,$font_size);
if( $my_url != NULL AND $my_url != "" )
$this->myLink($this->lMargin+$this->colwidth/2,$this->lMargin-4,$this->colwidth,(F_SIZE+5)/2.9,$my_url);
}
$this->setXY($this->lMargin, MARGIN+3);
$this->y0 = $this->getY();
}
// undefine default header and footer handling
// default routines do not handle columns
function Footer() { }
function Header() { }
function Mark( $string = "" ) {
return array( $string, 1+substr_count($string,'.') );
}
/*public*/ function myFooter( $msg = NULL, $url = NULL )
{
static $my_url = NULL;
if( $msg != NULL ) {
$this->my_footer_msg = $msg; $this->msg_page_nr = 0;
$my_url = $url; return;
}
if( $this->my_footer_msg == NULL ) return;
$this->InFooter = true;
$this->msg_page_nr++;
$font_fam = $this->FontFamily;
$font_style = $this->FontStyle.($this->underline ? 'U' : '').($this->linethrough ? 'D' : '');
$font_size = $this->getFontSize();
$this->SetFont(FONT,'', F_SIZE-1);
if( $this->msg_page_nr > 1 ) {
$this->SetXY($this->lMargin, $this->GetPageHeight()/$this->scale*100.0-6);
$this->Cell($this->colwidth, 3,
sprintf("%s %d", $this->unhtmlentities( _('page') ), $this->msg_page_nr),
0, 0, 'C');
}
if( $this->my_footer_msg != "" ) {
$strg = "© ". date("Y"). " CAcert Inc.".", ". $this->my_footer_msg;
$this->SetXY($this->lMargin+MARGIN/2, $this->GetPageHeight()/$this->scale*100.0-6);
$this->Cell($this->colwidth, 3, $strg, 0, 0, 'R');
if( $my_url != NULL AND $my_url != "" )
$this->myLink($this->lMargin+MARGIN/2,$this->GetPageHeight()/$this->scale*100.0-6,$this->colwidth,(F_SIZE+5)/2.9,$my_url);
}
if( $this->Watermark != "" ) {
$this->StartTransform();
$savex = $this->GetX(); $savey = $this->GetY();
$this->SetFont(FONT,'', F_SIZE*7);
$l = $this->GetStringWidth($this->Watermark);
$h = $this->GetPageHeight()/$this->scale*100.0/2;
$w = $this->colwidth/2+MARGIN;
$this->SetXY(0,0);
$this->TranslateY($h+(F_SIZE*7)/2.9);
$this->TranslateX($w-MARGIN+$this->lMargin);
$this->Rotate(rad2deg(atan($h/$w)));
$this->Text(-$l/2,0,$this->Watermark, 0.8);
$this->StopTransform();
$this->SetXY($savex,$savey);
}
$this->SetXY(MARGIN/2, $this->GetPageHeight()/$this->scale*100.0-7);
$this->Cell($this->GetPageWidth()/$this->scale*100.0-MARGIN, 3, $strg, 0, 0, 'R');
if( !empty($font_fam ) )
$this->SetFont($font_fam,$font_style,$font_size);
$this->InFooter = false;
}
// user and print preferences
@ -451,7 +513,8 @@ class COAPPDF extends TCPDF {
'Duplex' => 'Simplex',
'NumCopies'=> '1',
'DisplayDocTitle' => 'CAcert Organisation Assurance Programme (COAP) form',
'HideToolBar' => 'true'
'HideToolBar' => true,
'FitWindow' => true,
);
//number of colums
@ -472,11 +535,13 @@ class COAPPDF extends TCPDF {
// scaling factor
/*protected*/ var $scale = 100.0;
// print form (footer msg)
/*protected*/ var $footer_msg = NULL;
// print header and footer
/*protected*/ var $my_footer_msg = NULL;
/*protected*/ var $my_header_msg = NULL;
/*protected*/ var $msg_page_nr = 0;
// print short watermark on the page
/*public*/ var $Watermark = "";
/*public*/ var $Watermark = WATERMARK;
/*public*/ function SetFormat( $format = "A4" ) {
switch( strtolower($format) ) {
@ -507,14 +572,15 @@ class COAPPDF extends TCPDF {
}
//Set position at a given column
/*private*/ function SetCol($col = 0) {
/*private*/ function SetCol($col = -1) {
static $pagecolwidth = 1.0;
static $column_space = 1.0;
if( $col == -1 ) $col = $this->col+1;
if( $this->colwidth == 0 ) {
// only once at start; set default values
//set margins
$this->addPage();
$this->addPage(); $col = 0; // reset to zero
$this->SetMargins(MARGIN, MARGIN, MARGIN);
if( $this->CurOrientation != 'L' ) {
$this->scale *= 1.4142;
@ -534,11 +600,18 @@ class COAPPDF extends TCPDF {
}
$this->y0 = $this->GetY();
}
$this->PrintTable("", -1); // if pending table close up table
else {
if( $col == $this->col ) { // reset on close of this column
$x = MARGIN + $this->col*($pagecolwidth+$column_space);
$this->SetLeftMargin($x);
//$this->SetRightMargin($this->w - $x - $this->colwidth);
}
$this->PrintTable("", -1); // if pending table close up table
$this->myFooter(); // print footer msg if defined
}
if( $col >= $this->ncols ) {
$this->addPage();
$this->addPage(); $col = 0;
$this->ScaleXY($this->scale,0,0);
$col = 0;
$this->y0 = 0; //no header/footer done...
} elseif ( $col > 0 AND $col < $this->ncols) {
// print column separator
@ -556,24 +629,39 @@ class COAPPDF extends TCPDF {
$this->SetLeftMargin($x);
$this->SetRightMargin($this->w - $x - $this->colwidth);
$this->SetXY($x, $this->y0);
$this->myHeader(); //print header msg if defined
$this->PrintTable("", 0); // if in table reprint title table
}
//Method accepting or not automatic page break
/*public*/ function AcceptPageBreak() {
if($this->col < ($this->ncols-1)) {
//Go to next column
$this->SetCol($this->col+1);
//Set ordinate to top
$this->SetY($this->y0);
//Keep on page
return false;
} else {
//Go back to first column
$this->SetCol($this->ncols);
//Page break
return false;
$this->SetCol();
return false;
}
// redefine this routine from tcpdf.php due to scaling bug
/*protected*/ function checkPageBreak($h) {
if (((($this->y + $h)*$this->scale/100.0) > $this->PageBreakTrigger) ) {
if ( !$this->InFooter ) {
if ( ($this->AcceptPageBreak())) {
$rs = "";
//Automatic page break
$x = $this->x;
$ws = $this->ws;
if ($ws > 0) {
$this->ws = 0;
$rs .= '0 Tw';
}
$this->AddPage($this->CurOrientation);
if ($ws > 0) {
$this->ws = $ws;
$rs .= sprintf('%.3f Tw', $ws * $k);
}
$this->_out($rs);
$this->y = $this->tMargin;
$this->x = $x;
}
}
}
}
@ -584,7 +672,7 @@ class COAPPDF extends TCPDF {
// put Link in user space
/*private*/ function myLink( $x, $y, $w, $h, $Lnk = NULL, $Type = array('SubType'=>'Link') ) {
if( $Lnk == NULL ) return;
if( $Lnk == "" ) $Lnk = WEB;
if( $Lnk == "" ) $Lnk = WEB."/";
$this->Annotation( $this->S($x), $this->S($y), $this->S($w), $this->S($h), $Lnk, $Type);
//$this->Annotation( $x, $y, $w, $h, $Lnk, $Type);
}
@ -694,7 +782,7 @@ class COAPPDF extends TCPDF {
/*private*/ function PrintDate( $x=10, $y=10, $dstrg="teus", $dvalue="1945-10-6", $field = NULL , $RL = 'L')
{
static $TextProps = array('strokeColor' => LLBLUE, 'value' => "", 'fillColor' => LBLUE , 'textSize' => '11', 'charLimit'=> 10);
$TextProps['userName'] = _("yyyy-mm-dd");
$TextProps['userName'] = $this->unhtmlentities( _("yyyy-mm-dd") );
$this->SetFont( FONT, '', F_SIZE);
$this->SetXY($RL == 'L'? $x : $x-50, $y);
@ -711,75 +799,93 @@ class COAPPDF extends TCPDF {
}
// Add import HTML text eg from CCA
/*private*/ function CCAinfo() {
$error = "";
if( !defined('CCA_FILE') ) return;
$data = file_get_contents(CCA_FILE);
if( !$data ) $error = "\nInternal Error: no ".CCA_FILE." found.";
$regs = array();
preg_match('/<[Bb][oO][Dd][yY]\s*>/', $data, $regs);
if( count($regs) < 1 ) $error .= "\nInternal Error: not a html body tag found.";
/*public*/ function PrintHTML( $url = NULL ) {
if( $url == NULL OR $url == "" ) return;
$error = ""; $title = ""; $url = POLICY.$url.EXT;
if( ! file_exists($url) ) $url = WEB."/".$url;
$data = file_get_contents($url);
if( !$data ) $error = "\nInternal Error: no ".$url." found.";
else {
$start = strpos($data, $regs[0]) + strlen($regs[0]);
$data = substr($data, $start);
$regs = array();
preg_match('/<[Tt][Ii][Tt][Ll][Ee][^>]*>/', $data, $regs);
if( count($regs) < 1 ) $error .= "\nInternal Error: no open tag title found on $url.";
else {
$start = strpos($data, $regs[0]) + strlen($regs[0]);
$data = substr($data, $start);
}
$regs = array();
preg_match('/<\/[Tt][Ii][Tt][Ll][Ee][^>]*>/', $data, $regs);
if( count($regs) < 1 ) $error .= "\nInternal Error: no close title tag found on $url.";
else {
$end = strpos($data, $regs[0]);
$title = trim(substr($data,0,$end));
$data = substr($data, $end+strlen($regs[0]));
}
$regs = array();
preg_match('/<[Bb][oO][Dd][yY][^>]*>/', $data, $regs);
if( count($regs) < 1 ) $error .= "\nInternal Error: no open html body tag found on $url.";
else {
$start = strpos($data, $regs[0]) + strlen($regs[0]);
$data = substr($data, $start);
}
$regs = array();
preg_match('/<\/[Bb][oO][Dd][yY][^>]*>/', $data, $regs);
if( count($regs) < 1 ) $error .= "\nInternal Error: no closing html body tag found on $url.";
else {
$end = strpos($data, $regs[0])-1;
$data = substr($data, 1, $end);
}
}
$regs = array(); preg_match('/<\/[Bb][oO][Dd][yY]\s*>/', $data, $regs);
if( count($regs) < 1 ) $error .= "\nInternal Error: not closing html body tag found.";
else {
$end = strpos($data, $regs[0])-1;
$data = substr($data, 1, $end);
}
if( !$title ) $title = $url;
$this->SetCol();
$this->setFont(FONT, F_SIZE);
if( !$error )
$this->writeHTMLCell($this->colwidth,2.5,$this->lMargin+1,$this->GetY()+2.5,
if( !$error ) {
$this->PrintHeader(_($title), $this->unhtmlentities( _('policy document') ), strncmp($url,WEB,strlen(WEB))==0? $url : (WEB."/".$url));
if( $title ) $this->Bookmark($title,0);
$this->writeHTMLCell($this->colwidth,2.5,$this->lMargin+1,$this->GetY()+2.5,
$data, 0,2,0,'L');
}
else
$this->MultiCell($this->colwidth, 3, $error);
$this->MultiCell($this->colwidth, 3, $error);
}
// Add CAcert Community Agreement
/*private*/ function PrintCCA(){
$this->PrintHeader(_("CAcert Community Agreement"), _("(informal, one page version)"), defined('CCA')? CCA:"");
$this->CCAinfo();
$this->PrintFooter("");
}
/*private*/ function PrintCOAP($organisation = NULL, $registry = NULL, $assurer = NULL, $assurance = NULL){
$this->PrintHeader(_('CAcert Organisation Assurance Programme'), _('Organisation Information (COAP) form'), defined('ASSCOAP')?ASSCOAP:"",defined('WEB')? WEB.substr(__FILE__, strrpos(__FILE__,"/")) : "");
$this->SetCol();
$this->PrintHeader($this->unhtmlentities( _('CAcert Organisation Assurance Programme'), _('Organisation Information (COAP) form'), defined('ASSCOAP')?ASSCOAP:"",defined('WEB')? WEB.substr(__FILE__, strrpos(__FILE__,"/")) : "") );
// define slighly different footer message
$this->myFooter("V". substr($this->Version(), 0, strpos($this->Version(), '.')).", ". $this->unhtmlentities( _('generated')." ".date("Y-n-j") ));
$this->AssuranceInfo();
$this->InfoOrganisation($organisation, $registry);
$this->StatementOrganisation($organisation);
$this->StatementAssurer( $assurer, $assurance );
$this->PrintFooter(", V". substr($this->Version(), 0, strpos($this->Version(), '.')).", ". _("generated")." ".date("Y-n-j"));
}
//Add form and/or CCA (on duplex only when more as one page is printed)
/*public*/ function PrintForm( $organisation = NULL, $registry = NULL, $assurer = NULL, $page = NULL ) {
$col = 0;
if( !isset( $page['form']) OR $page['form'] ) {
for( ; $col < $this->ncols; $col++ ) {
$this->SetCol($col);
for($cnt=0 ; $cnt < $this->ncols; $cnt++ ) {
if( !isset( $page['form']) OR $page['form'] ) {
// the form is one page, use new room?
if ( $organisation == NULL OR $registry == NULL OR $assurer == NULL )
$this->Error("Organisation or Assurer data records failure");
$this->PrintCOAP( $organisation, $registry, $assurer);
}
} else $page['cca'] = true; // on no form sure we print CCA
// do the Community Agreement print
if( isset($page['cca']) AND $page['cca'] ) {
if( $col >= $this->ncols ) {
// and on duplex print back side with Community Agreement
if( $this->CurOrientation == 'P' )
$this->ViewerPrefs['Duplex'] = 'DuplexFlipLongEdge';
else
$this->ViewerPrefs['Duplex'] = 'DuplexFlipShortEdge';
}
for( $col = 0; $col < $this->ncols; $col++) {
$this->SetCol($col);
$this->PrintCCA();
}
}
// print off policy documents to be included in pdf file
foreach( $page['policies'] as $i => $file ) {
$this->Watermark = WATERMARK; // no watermark on these pages
if( $file ) $this->PrintHTML( $file );
}
if( $this->col > 0 OR $this->getPage() > 1 ) break;
}
if( $this->getPage() > 1 ) {
// and on duplex print back side with Community Agreement
if( $this->CurOrientation == 'P' )
$this->ViewerPrefs['Duplex'] = 'DuplexFlipLongEdge';
else
$this->ViewerPrefs['Duplex'] = 'DuplexFlipShortEdge';
}
// close up this column, make sure footer is printed.
$this->my_header_msg = NULL; $this->SetCol($this->col);
}
// Set form title (right align)
@ -790,6 +896,8 @@ class COAPPDF extends TCPDF {
// CAcert logo
// eps should be better, but it does not seem to work with CAcert logo
$this->rMargin -= 1;
$this->myFooter($title1,$url1);
$this->myHeader($title2,$url2);
if( LOGO_TYPE == '.eps' )
$this->ImageEPS(BW?LOGO.'mono'.LOGO_TYPE:LOGO.'colour'.LOGO_TYPE,
($this->lMargin+$this->colwidth)-51,$tSide-3,51);
@ -798,17 +906,19 @@ class COAPPDF extends TCPDF {
$this->Image(BW?LOGO.'mono'.LOGO_TYPE:LOGO.'colour'.LOGO_TYPE,
($this->lMargin+$this->colwidth)-51,$tSide-3,51,0,0,
NULL,0,true,intval(LOGO_DPI));
$this->myLink($this->lMargin+$this->colwidth-51, $tSide-3,51,51/1000*229,WEB);
$this->myLink($this->lMargin+$this->colwidth-51, $tSide-3,51,51/1000*229,WEB."/");
// form type
$this->SetFont(FONT,'B',F_SIZE+5);
$this->SetY($tSide+5); $this->SetX($this->lMargin);
$l = $this->GetStringWidth($title1);
$this->Cell($this->colwidth+1,14,$title1,0,0,'R',0,NULL);
$this->myLink($this->lMargin+$this->colwidth-$l,$this->GetY()+5,$l,(F_SIZE+5)/2.9,$url1);
if( $url1 != NULL AND $url1 != "" )
$this->myLink($this->lMargin+$this->colwidth-$l,$this->GetY()+5,$l,(F_SIZE+5)/2.9,$url1);
$this->Ln(5); $this->SetX($this->lMargin);
$l = $this->GetStringWidth($title2);
$this->Cell($this->colwidth+1,14,$title2,0,0,'R',0,NULL);
$this->myLink($this->lMargin+$this->colwidth-$l,$this->GetY()+5,$l,(F_SIZE+5)/2.9,$url2);
if( $url2 != NULL AND $url2 != "" )
$this->myLink($this->lMargin+$this->colwidth-$l,$this->GetY()+5,$l,(F_SIZE+5)/2.9,$url2);
// CAcert Inc. postbox address
$this->Ln(6); $this->SetX($this->lMargin);
@ -825,7 +935,7 @@ class COAPPDF extends TCPDF {
$this->SetXY($savex,$savey);
// sha1 fingerprint CAcert rootkeys class 1 and class 3
$strg = _("CAcert's Root Certificate sha1 fingerprints") . ", class 1: ". CLASS1_SHA1 . ", class 3: " . CLASS3_SHA1;
$strg = $this->unhtmlentities( _("CAcert's Root Certificate sha1 fingerprints") ) . ", class 1: ". CLASS1_SHA1 . ", class 3: " . CLASS3_SHA1;
$this->Ln(3); $this->SetX($this->lMargin);
$this->SetFont(FONT,'',F_SIZE * $this->colwidth / ($this->GetStringWidth($strg) +1));
$this->Cell($this->colwidth,10, $strg,0,0,'C',0,NULL);
@ -860,14 +970,14 @@ class COAPPDF extends TCPDF {
// store current margin values
$cellcnt = 0;
$this->SetY($this->GetY()+0.5);
$this->Bookmark(_("CAcert COAP form"),0,$this->S($this->GetY()));
$this->Bookmark($this->unhtmlentities( _('CAcert COAP form') ),0,$this->S($this->GetY()));
// Show text blurb at top of page
$strg = _("The CAcert Organisation Programme (COAP) aims to verify the identity of the organisation.");
$strg .= "\r\n". _("The Applicant asks the Organisation Assurer to verify to CAcert Community that the information provided by the Applicant is correct, and according to the official trade office registration bodies.");
$strg = $this->unhtmlentities( _('The CAcert Organisation Programme (COAP) aims to verify the identity of the organisation.') );
$strg .= "\r\n". $this->unhtmlentities( _('The Applicant asks the Organisation Assurer to verify to CAcert Community that the information provided by the Applicant is correct, and according to the official trade office registration bodies.') );
$cellcnt += $this->PrintInfo( $strg, defined('ASSINTRO')? ASSINTRO:"");
$cellcnt += $this->PrintInfo( _("For more information about the CAcert Organisation Assurance Programme, including detailed guides to CAcert Organisation Assurers, please visit:")." ".WEB, defined('ASSCOAP')?ASSCOAP:"");
$cellcnt += $this->PrintInfo( _("A CAcert Arbitor can require the Organisation Assurer to deliver the completed forms and accompanying documents in the event of a dispute."),defined('ARBIT')?ARBIT:"");
$cellcnt += $this->PrintInfo( $this->unhtmlentities( _('For more information about the CAcert Organisation Assurance Programme, including detailed guides to CAcert Organisation Assurers, please visit:')." ".WEB, defined('ASSCOAP')?ASSCOAP:"") );
$cellcnt += $this->PrintInfo( $this->unhtmlentities( _('A CAcert Arbitrator can require the Organisation Assurer to deliver the completed forms and accompanying documents in the event of a dispute.'),defined('ARBIT')?ARBIT:"") );
$this->SetY($this->GetY()+0.3);
return( $cellcnt);
}
@ -956,13 +1066,13 @@ class COAPPDF extends TCPDF {
// put assurer help for assurance in pdf file for mouse over
if ( $info != "" ) $msg = $info;
if ( $email != NULL AND $email != "" AND $title != "" )
$msg .= " ". _("The email address, which matches the CAcert account email address, is handy for administrative and contact reasons. For organisation administrator the email address is required.");
$msg .= " ". $this->unhtmlentities( _('The email address, which matches the CAcert account email address, is handy for administrative and contact reasons. For organisation administrator the email address is required.') );
if( $msg != "" )
$this->myLink($this->lMargin-7, $this->GetY()-1, 5, 3, $msg,
array('subtype'=> 'Text', 'Open' => true,
'c'=> array(173,197,215), 'name' => 'Comment',
'f'=> array( 'nozoom', 'readonly', 'norotate'),
't'=> _("COAP form help"))
't'=> $this->unhtmlentities( _('COAP form help') ))
);
if( $backgrnd ) {
if ( BW ) {
@ -1003,18 +1113,18 @@ class COAPPDF extends TCPDF {
if( $email != NULL ) $abbr = $this->Abbreviate( $name ); else $abbr="";
if( $ascii != "" OR $abbr != "") {
$la = $this->GetStringWidth($name) + 5;
$msg = _("The exact name of the individual may have transliterated characters and/or some given names may be abbreviated. If present the first given name will be shown abbreviated and parentheses around the last part of the given name.")."\r\n";
$msg = $this->unhtmlentities( _('The exact name of the individual may have transliterated characters and/or some given names may be abbreviated. If present the first given name will be shown abbreviated and parentheses around the last part of the given name.') )."\r\n";
if( $ascii != "" ) $msg .= '* '. $ascii . "\r\n";
if( $abbr != "" ) $msg .= '* '. $abbr . "\r\n";
$this->myLink($this->lMargin+$l+$la, $savey, 3, 2, $msg,
array('subtype'=> 'Text', 'Open' => false,
'c' => array(173,197,215), 'name' => 'Comment',
'f'=> array( 'nozoom', 'readonly', 'norotate'),
't' => _("On the full name of the Assurer")));
't' => $this->unhtmlentities( _('On the full name of the Assurer') )));
}
}
$TextProps['value'] = $name ? $name : " ";
$TextProps['userName'] = _("Full exact name of the individual.");
$TextProps['userName'] = $this->unhtmlentities( _('Full exact name of the individual.') );
$this->TextField($field.($email? 'Name' : ""), $this->SetFieldXY($this->lMargin+2+$l, $savey, $this->colwidth-$l-3-($phone?25:0)), 4.5, $TextProps );
$this->SetFieldXY();
if( $phone AND $phone != " " ) {
@ -1029,8 +1139,8 @@ class COAPPDF extends TCPDF {
$this->Cell($sw+1,0,$phone);
}
if( $phone ) {
$TextProps['value'] = $phone ? $phone : _("phone nr") . "?";
$TextProps['userName'] = _("For organisation administrators and assurer: provide email address and optionally your phone number.");
$TextProps['value'] = $phone ? $phone : $this->unhtmlentities( _('phone nr') ) . "?";
$TextProps['userName'] = $this->unhtmlentities( _('For organisation administrators and assurer: provide email address and optionally your phone number.') );
$this->TextField($field.'Phone', $this->SetFieldXY($this->lMargin+$this->colwidth-25, $savey, 24), 4.5, $TextProps );
$this->SetFieldXY();
}
@ -1040,12 +1150,12 @@ class COAPPDF extends TCPDF {
$this->SetFont(FONT, "", F_SIZE);
if( !BW ) $this->SetTextColor(17,86,140);
$this->Write(0, $email);
$this->myLink($this->lMargin+$l, $savey,$this->GetStringWidth($email), 3, "mailto:". $email . "?subject=" . _("Organisation Assurance"));
$this->myLink($this->lMargin+$l, $savey,$this->GetStringWidth($email), 3, "mailto:". $email . "?subject=" . $this->unhtmlentities( _('Organisation Assurance') ));
if( !BW ) $this->SetTextColor(0);
}
if( $email ) {
$TextProps['value'] = $email ? $email : _("email") . "?";
$TextProps['userName'] = _("For organisation administrators and assurer: provide email address and optionally your phone number.");
$TextProps['value'] = $email ? $email : $this->unhtmlentities( _('email') ) . "?";
$TextProps['userName'] = $this->unhtmlentities( _('For organisation administrators and assurer: provide email address and optionally your phone number.') );
$this->TextField($field.'Email', $this->SetFieldXY($this->lMargin+2+$l, $savey, $this->colwidth-$l-28), 4.5, $TextProps);
$this->SetFieldXY(); $savey += 3;
}
@ -1058,27 +1168,27 @@ class COAPPDF extends TCPDF {
// All information of Applicant goes in one table
/*public*/ function InfoOrganisation( $organisation = NULL, $registry = NULL ){
// Applicant Identity information part
$tSide = $this->PrintTable(_("Organisation Identity Information"))+1;
$tSide = $this->PrintTable($this->unhtmlentities( _('Organisation Identity Information') ))+1;
$msg = _("The organisation name, director name and signature, and applicable company law is checked by the Organisation Assurer with the official Trade Office Registration (Extract) or by other means. The organisation domain name(s) are checked of ownership against the internet domain DNS records.");
$msg = $this->unhtmlentities( _('The organisation name, director name and signature, and applicable company law is checked by the Organisation Assurer with the official Trade Office Registration (Extract) or by other means. The organisation domain name(s) are checked of ownership against the internet domain DNS records.') );
$msg .= "\r\nThe organisation administrator (a CAcert Assurer) email address must be the primary email address registered with CAcert.";
// put hint on comparing names on title table
$this->myLink($this->lMargin-7, $tSide-7, 5, 5, $msg,
array('subtype'=> 'Text', 'Open' => true,
'c'=> array(173,197,215), 'name' => 'Comment',
'f'=> array( 'nozoom', 'readonly', 'norotate'),
't'=> _("On organisation identity information")));
't'=> $this->unhtmlentities( _('On organisation identity information') )));
$this->SetXY($this->lMargin+1, $tSide);
$this->PrintName(
_("The official full name of the organisation equal to the name of the organisation registered e.g. at the trade office registration of the state."),
_("Name of the organisation")." ",
$this->unhtmlentities( _('The official full name of the organisation equal to the name of the organisation registered e.g. at the trade office registration of the state.') ),
$this->unhtmlentities( _('Name of the organisation') )." ",
"OrganisationNames0",
$organisation['namecnt']>0?$organisation['names'][0]:" ",
NULL, NULL, true);
$this->PrintName(
_("The organisation address which should be equal to the address registered with the trade office."),
_("Address (comma separated)")." ",
$this->unhtmlentities( _('The organisation address which should be equal to the address registered with the trade office.') ),
$this->unhtmlentities( _('Address (comma separated)') )." ",
"OrganisationAddress",
$organisation['address'],
NULL, NULL, true);
@ -1086,8 +1196,8 @@ class COAPPDF extends TCPDF {
foreach( array( $organisation['type'], $organisation['state'], $organisation['country']) as $i )
if( $i != "" ) $strg .= ($strg != "" ? ", ": "") . $i;
$this->PrintName(
_("The legal organisation type: eg Ltd, EPS, society, foundation, association, etc. The state/country under which jurisdiction the organisation operates."),
_("Type, jurisdiction (state)")." ",
$this->unhtmlentities( _('The legal organisation type: eg Ltd, EPS, society, foundation, association, etc. The state/country under which jurisdiction the organisation operates.') ),
$this->unhtmlentities( _('Type, jurisdiction (state)') )." ",
"OrganisationType",
$strg,
NULL, NULL, true);
@ -1095,8 +1205,8 @@ class COAPPDF extends TCPDF {
$strg = $organisation['namecnt'] <= 1 ? "" : $organisation['names'][1];
for( $i = 3; $i <= $organisation['namecnt']; $i++)
$strg .= ", ". $organisation['names'][$i-1];
$this->PrintName( _("Other registered trade names of the organisation. (comma separated)"),
_("Registered Trade Names"), 'OrganisationDBA',
$this->PrintName( $this->unhtmlentities( _('Other registered trade names of the organisation. (comma separated)') ),
$this->unhtmlentities( _('Registered Trade Names') ), 'OrganisationDBA',
$strg,
NULL, NULL, true);
//$this->Ln(0.4);
@ -1104,8 +1214,8 @@ class COAPPDF extends TCPDF {
foreach( array( $registry['identifier'], $registry['name'], $registry['region'], $registry['date'] ) as $i )
if( $i != "" ) $strg .= ($strg != "" ? ", " : "") . $i;
$this->PrintName(
_("Trade Office Registry information, as organisation registration Identification number or license number, name of the trade office registry, trade office operating region, and optionally date of extract."),
_("Registration (id, name, region)"),
$this->unhtmlentities( _('Trade Office Registry information, as organisation registration Identification number or license number, name of the trade office registry, trade office operating region, and optionally date of extract.') ),
$this->unhtmlentities( _('Registration (id, name, region)') ),
'torinfo',
$strg,
NULL, NULL, true);
@ -1113,8 +1223,8 @@ class COAPPDF extends TCPDF {
$strg = ""; foreach( $organisation['domains'] as $i )
$strg .= ($strg != "" ? ", " : "") . $i;
$this->PrintName(
_("The internet domain name(s) the organisation controls and owns. The names will be checked with WHOIS with e.g. the DNS official top domain registrar e.g. the country ccTLD .<country code> registrar."),
_("Internet Domain(s)"),
$this->unhtmlentities( _('The internet domain name(s) the organisation controls and owns. The names will be checked with WHOIS with e.g. the DNS official top domain registrar e.g. the country ccTLD .<country code> registrar.') ),
$this->unhtmlentities( _('Internet Domain(s)') ),
'OrganisationDomains',
$strg,
NULL, NULL, true);
@ -1125,8 +1235,8 @@ class COAPPDF extends TCPDF {
$space = $this->getPageHeight()/$this->scale*100.0 -MINH ; // margin
for( $i = 0; $i < $cnt; $i++ ) { // names to be printed
$this->PrintName(
_("The organisation administrator (CAcert Assurer) contact information. The administrator is appointed by the organisation director to administer the organisation domain certificates, secure the certificates and maintain them."),
_("Organisation Administrator"),
$this->unhtmlentities( _('The organisation administrator (CAcert Assurer) contact information. The administrator is appointed by the organisation director to administer the organisation domain certificates, secure the certificates and maintain them.') ),
$this->unhtmlentities( _('Organisation Administrator') ),
sprintf("OrganisationAdmin%d",$i),
$organisation['admins'][$i]['name'],
$organisation['admins'][$i]['email']? $organisation['admins'][$i]['email']:" ",
@ -1138,8 +1248,8 @@ class COAPPDF extends TCPDF {
// empty fields up to max 3 empty fields and allowed space
if( $space < $this->getY() ) break;
$this->PrintName(
$i+$j == 0? _("The organisation administrator (CAcert Assurer) contact information. The administrator is appointed by the organisation director to administer the organisation domain certificates, secure the certificates and maintain them."):"",
$i+$j > 0? "": _("Organisation Administrator"),
$i+$j == 0? $this->unhtmlentities( _('The organisation administrator (CAcert Assurer) contact information. The administrator is appointed by the organisation director to administer the organisation domain certificates, secure the certificates and maintain them.') ):"",
$i+$j > 0? "": $this->unhtmlentities( _('Organisation Administrator') ),
sprintf("OrganisationAdmin%d",$i+$j),
"", " ", " ", TRUE);
}
@ -1183,42 +1293,42 @@ class COAPPDF extends TCPDF {
$cellcnt = 0;
// assuree statement section
$tSide = $this->PrintTable(_("Organisation's Statement")); // mark table header
$msg = _("The Director indicated by the Trade Office Registry Extract, has to underwrite the correctness of the information for the organisation and allowance of certificate operations by the administrators.");
$tSide = $this->PrintTable($this->unhtmlentities( _("Organisation's Statement") )); // mark table header
$msg = $this->unhtmlentities( _('The Director indicated by the Trade Office Registry Extract, has to underwrite the correctness of the information for the organisation and allowance of certificate operations by the administrators.') );
$msg .= "\r\nFor formal contact with the organisation the email address of the organisation is required.";
// put hint on comparing names on title table
$this->myLink($this->lMargin-7, $tSide-7, 5, 5, $msg,
array('subtype'=> 'Text', 'Open' => true,
'c'=> array(173,197,215), 'name'=> 'Comment',
'f'=> array( 'nozoom', 'readonly', 'norotate'),
't'=> _("On director's statement")));
't'=> $this->unhtmlentities( _("On director's statement") )));
$cellcnt += $this->PrintTicked( _("Make sure you have read and agreed with the CAcert Community Agreement "), false /* no tick */);
$cellcnt += $this->PrintTicked( $this->unhtmlentities( _("Make sure you have read and agreed with the CAcert Community Agreement") ), false /* no tick */);
if( !BW ) $this->SetTextColor(17, 86, 140);
$this->SetXY($this->lMargin+2,$this->GetY()-0.5);
$ret = $this->Write($this->lasth, CCA, NULL);
$this->myLink($this->lMargin+1, $this->GetY()-F_SIZE/2.9, $this->colwidth-2, F_SIZE*2.9/2.9, CCA);
$ret = $this->Write($this->lasth, WEB."/".POLICY.CCA.EXT, NULL);
$this->myLink($this->lMargin+1, $this->GetY()-F_SIZE/2.9, $this->colwidth-2, F_SIZE*2.9/2.9, WEB."/".POLICY.CCA.EXT);
$this->Ln(4);
if( !BW ) $this->SetTextColor(0);
$this->Ln(0.3);
$this->PrintName(_("Name and contact details (organisation email address & optionally phone number), of the Director of the organisation as is referred to in the trade office extract."),
_("Director"), "OrganisationDirector", $organisation['director'],
$this->PrintName($this->unhtmlentities( _('Name and contact details (organisation email address & optionally phone number), of the Director of the organisation as is referred to in the trade office extract.') ),
$this->unhtmlentities( _('Director') ), "OrganisationDirector", $organisation['director'],
$organisation['email']?$organisation['email'] : "email:",
$organisation['phone']? $organisation['phone']:" ");
$cellcnt += $this->PrintTicked( _("I agree to the CAcert Community Agreement."), true /* tick */);
$cellcnt += $this->PrintTicked( _("I hereby confirm that all information is complete and accurate and will notify CAcert of any updates or changes thereof."), true /* tick */);
$cellcnt += $this->PrintTicked( _("I am duly authorised to act on behalf of the organisation, I grant operational certificate administrative privileges to the specified Organisation Administrator and, I request the Organisation Assurer to verify the organisation information according to the Assurance Policies."), true /* tick */);
$cellcnt += $this->PrintTicked( $this->unhtmlentities( _('I agree to the CAcert Community Agreement.') ), true /* tick */);
$cellcnt += $this->PrintTicked( $this->unhtmlentities( _('I hereby confirm that all information is complete and accurate and will notify CAcert of any updates or changes thereof.') ), true /* tick */);
$cellcnt += $this->PrintTicked( $this->unhtmlentities( _('I am duly authorised to act on behalf of the organisation, I grant operational certificate administrative privileges to the specified Organisation Administrator and, I request the Organisation Assurer to verify the organisation information according to the Assurance Policies.') ), true /* tick */);
$this->Ln(0.5);
$savey = $this->GetY();
$strg = _("Date");
$strg = $this->unhtmlentities( _('Date') );
if($organisation['date'] == "")
$strg .= " (". _("yyyy-mm-dd") . ")";
$strg .= " (". $this->unhtmlentities( _("yyyy-mm-dd") ). ")";
$strg = $strg;
$this->PrintDate( $this->lMargin+1, $savey+1, $strg, $organisation['date'], 'OrganisationDate', 'L');
$strg = _("Signature and organisation stamp");
$strg = $this->unhtmlentities( _('Signature and organisation stamp') );
$this->SetFont(FONT, '', F_SIZE);
$l = $this->GetStringWidth( $strg );
$this->SetXY($this->lMargin+$this->colwidth-$l-3, $savey+1);
@ -1238,37 +1348,37 @@ class COAPPDF extends TCPDF {
$TextProps = array('strokeColor'=> LLBLUE, 'value' => "", 'fillColor'=> LBLUE, 'doNotScrole'=> 'true', 'textSize' => '14', 'rotate'=>0);
$cellcnt = 0;
$tSide = $this->PrintTable(_("Organisation Assurer's Statement")); // mark table ordinate
$tSide = $this->PrintTable($this->unhtmlentities( _("Organisation Assurer's Statement") )); // mark table ordinate
// put assurer help for assurance in pdf file for mouse over
$msg = _("The organisation assurer will check the trade office registry for company information (name, location, country of jurisdiction, director names, trade office Identification number, domain name ownership, and system admin reference). Any associated costs for this research will be reimborsed by the assurer from the organisation.");
$msg = $this->unhtmlentities( _('The organisation assurer will check the trade office registry for company information (name, location, country of jurisdiction, director names, trade office Identification number, domain name ownership, and system admin reference). Any associated costs for this research will be reimborsed by the assurer from the organisation.') );
$this->myLink($this->lMargin-7, $tSide-6, 5, 5, $msg,
array('subtype'=> 'Text', 'Open' => true,
'c'=> array(173,197,215), 'name'=> 'Comment',
'f'=> array( 'nozoom', 'readonly', 'norotate'),
't'=> _("On mutual assurance")));
't'=> $this->unhtmlentities( _('On mutual assurance') )));
// assurer identity info
$this->Ln(0.9);
$this->PrintName(
_("The Organisation Assurer contact information. This assurer will verify the organisation identity and registration information."),
_("Organisation Assurer") . " ","Assurer",
$this->unhtmlentities( _('The Organisation Assurer contact information. This assurer will verify the organisation identity and registration information.') ),
$this->unhtmlentities( _('Organisation Assurer') ) . " ","Assurer",
$assurer['name'],
$assurer['email']? $assurer['email']:" ",
$assurer['phone']? $assurer['phone']:" ");
// assurer statements
$this->SetY($this->GetY()-0.5);
$cellcnt += $this->PrintTicked( _("I, the Assurer, hereby confirm that I have verified the official Information for the organisation, I will witness the organisation's identity in the CAcert Organisation Assurance Programme, and complete the Assurance."), true /* ticked */);
$cellcnt += $this->PrintTicked( _("I am a CAcert Community Member, have passed the Organisation Assurance Challenge, and have been appointed for Organisation Assurances within the country where the organisation is registered."), true /* ticked */);
$cellcnt += $this->PrintTicked( $this->unhtmlentities( _("I, the Assurer, hereby confirm that I have verified the official Information for the organisation, I will witness the organisation's identity in the CAcert Organisation Assurance Programme, and complete the Assurance.") ), true /* ticked */);
$cellcnt += $this->PrintTicked( $this->unhtmlentities( _('I am a CAcert Community Member, have passed the Organisation Assurance Challenge, and have been appointed for Organisation Assurances within the country where the organisation is registered.') ), true /* ticked */);
$this->Ln(1); $savey = $this->GetY();
$strg = _("Date");
if( $assurer['date'] == "" ) $strg .= " (" . _("yyyy-mm-dd") . ")";
$strg = $this->unhtmlentities( _('Date') );
if( $assurer['date'] == "" ) $strg .= " (" . $this->unhtmlentities( _("yyyy-mm-dd") ).")";
$strg = $strg;
$this->PrintDate( $this->lMargin+1, $savey, $strg, $assurer['date'], 'AssurerDate', 'L');
$this->SetXY($this->lMargin+1, $savey);
$this->SetFont(FONT, "",F_SIZE);
$strg = _("Organisation Assurer's signature");
$strg = $this->unhtmlentities( _("Organisation Assurer's signature") );
$this->SetXY($this->lMargin+$this->colwidth-$this->GetStringWidth($strg)-3, $savey);
$this->Write(0, $strg );
$savey = $this->GetY()+7; // leave room for date and signature
@ -1281,40 +1391,6 @@ class COAPPDF extends TCPDF {
$this->SetY($next);
}
// print copy right on bottumn of page
/*public*/ function PrintFooter( $msg = NULL ) {
$this->InFooter = true;
$this->SetFont(FONT,'', F_SIZE-1);
if( $this->GetGroupPageNo() > 0 ) {
$this->SetXY($this->lMargin, $this->GetPageHeight()/$this->scale*100.0-6);
$this->Cell($this->colwidth, 3,
sprintf("%s %d/%d", _("page"), $this->GetGroupPageNo()+1,
$this->GetNumPages()), 0, 0, 'C');
}
if( $msg == NULL ) return;
$strg = "© ". date("Y"). " CAcert Inc.". $msg;
$this->SetXY($this->lMargin+MARGIN/2, $this->GetPageHeight()/$this->scale*100.0-6);
$this->Cell($this->colwidth, 3, $strg, 0, 0, 'R');
if( $this->Watermark != "" ) {
$this->StartTransform();
$savex = $this->GetX(); $savey = $this->GetY();
$this->SetFont(FONT,'', F_SIZE*7);
$l = $this->GetStringWidth($this->Watermark);
$h = $this->GetPageHeight()/$this->scale*100.0/2;
$w = $this->colwidth/2+MARGIN;
$this->SetXY(0,0);
$this->TranslateY($h+(F_SIZE*7)/2.9);
$this->TranslateX($w-MARGIN+$this->lMargin);
$this->Rotate(rad2deg(atan($h/$w)));
$this->Text(-$l/2,0,$this->Watermark, 0.8);
$this->StopTransform();
$this->SetXY($savex,$savey);
}
$this->InFooter = false;
}
// End of CAPPDF TCPDF class extension
}
@ -1338,7 +1414,8 @@ function GET( $key = "" ) {
}
// form, CCA and page format info
$page['format'] = strtolower(GET('format')); // A3, A4, A5, letter, legal
$page['format'] = strtolower(GET('format')); // A3, A4, A5, letter, legal, etc.
if( !$page['format'] ) $page['format'] = 'a4'; // default a4, portrait
// on landscape orientation we do two half pages
$page['orientation'] = strtolower(GET('orientation'));
if( $page['orientation'] != 'l' AND $page['orientation'] != "landscape" ) {
@ -1346,7 +1423,10 @@ function GET( $key = "" ) {
}
$page['form'] = GET('noform') != "" ? false : true;
// dft is now true it should go to true
$page['cca'] = GET('nocca') != ""? true : false;
$page['policies'] = array();
if( GET('nocca') == "" ) {
if( defined('CCA') ) $page['policies'][] = CCA;
}
// set $page['form'] on 'simplex' or 'duplex' to get CCA on pdf page
// Assurer info
@ -1438,7 +1518,13 @@ if( $domains ) { // csv list to array and trim white spaces
} else $organisation['domains'][0] = " ";
unset($domains);
// try to get policy documents names to be printed off
$j = 0; // after two successive empty name we stop searching
for( $i = 1; $i <= 9 AND $j<2; $i++ ) {
$name = GET(sprintf("policy%d", $i));
if( $name != "" ) { $page['policies'][] = $name; $j = 0; }
else $j++;
}
if( $utf8 ) { // have scanned arguments for non-ascii code now
//require_once("../utf8/native/core.php");
@ -1470,30 +1556,18 @@ unset( $i ); unset( $j); unset( $utf8 ); // unset($_GET);
// set document property information
$pdf->SetCreator("LibreSSL - CAcert web application");
$pdf->SetAuthor("© " . date("Y") . " CAcert Inc., Australia.");
$pdf->SetKeywords("X.509, Certificate Programme, COAP form");
$pdf->SetTitle("CAcert Organisation Assurance Programme form");
$pdf->SetKeywords("X.509, Organisation Assurance Programme, COAP form, digital certificates, CAcert, Community Agreement");
$pdf->SetTitle("CAcert Organisation Assurance Programme");
$pdf->SetSubject("COAP form V".$pdf->Version().", generated " . date("Y-n-j H:i:s T"));
if( GET('watermark') != '') $pdf->Watermark = my_recode(GET('watermark'));
// requires zlib and will decrease response time but increase bandwidth
// if no zlib is found, automatically no compression is done
$pdf->SetCompression(true); // turn it off when more pperformance is needed
// set default header data
//$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
//$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
//$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// AddSJISFont function is not present in tcpdf package !!!!
// set default header data
//$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
//$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
//$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
//set auto page breaks
$pdf->SetAutoPageBreak(TRUE, /* 4 */ MARGIN/2);
$pdf->SetAutoPageBreak(TRUE, MARGIN*0.707);
//set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
@ -1506,7 +1580,7 @@ unset( $i ); unset( $j); unset( $utf8 ); // unset($_GET);
// AND GENERATE THE FORM ===================================
// generation properties which have been set from environment:
// BW (color), FONT (free Sans Vera), orientation (landscape, 2-up), format (A4)
// BW (color), FONT (free Sans Vera), orientation (portrait, 1-up), format (A4)
if ( FONT == 'SJIS') $pdf->AddSJISFont();
$pdf->PrintForm($organisation, $registry, $assurer, $page);
$pdf->setViewerPreferences($pdf->ViewerPrefs);

Loading…
Cancel
Save