First commit of tag changes. bug-1444
[cacert-devel.git] / pages / account / 3.php
1 <?php /*
2 LibreSSL - CAcert web application
3 Copyright (C) 2004-2008 CAcert Inc.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; version 2 of the License.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 include_once("../includes/shutdown.php");
19 ?>
20 <h3><?php echo _("CAcert Certificate Acceptable Use Policy")?></h3>
21 <p><?php echo _("Once you decide to subscribe for an SSL Server Certificate you will need to complete this agreement. Please read it carefully. Your Certificate Request can only be processed with your acceptance and understanding of this agreement.")?></p>
22
23 <p><?php echo _("I hereby represent that I am fully authorized by the owner of the information contained in the CSR sent to CAcert Inc. to apply for an Digital Certificate for secure and authenticated electronic transactions. I understand that a digital certificate serves to identify the Subscriber for the purposes of electronic communication and that the management of the private keys associated with such certificates is the responsibility of the subscriber's technical staff and/or contractors.")?></p>
24
25 <p><?php echo _("CAcert Inc.'s public certification services are governed by a CPS as amended from time to time which is incorporated into this Agreement by reference. The Subscriber will use the SSL Server Certificate in accordance with CAcert Inc.'s CPS and supporting documentation published at")?> <a href="http://www.cacert.org/cps.php">http://www.cacert.org/cps.php</a></p>
26
27 <p><?php echo _("If the Subscriber's name and/or domain name registration change the subscriber will immediately inform CAcert Inc. who shall revoke the digital certificate. When the Digital Certificate expires or is revoked the company will permanently remove the certificate from the server on which it is installed and will not use it for any purpose thereafter. The person responsible for key management and security is fully authorized to install and utilize the certificate to represent this organization's electronic presence.")?></p>
28
29 <form method="post" action="account.php">
30 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
31 <tr>
32 <td colspan="2" class="title"><?php echo _("New Client Certificate")?></td>
33 </tr>
34 <tr>
35 <td class="DataTD"><?php echo _("Add")?></td>
36 <td class="DataTD"><?php echo _("Address")?></td>
37 </tr>
38
39 <?php $query = "select * from `email` where `memid`='".intval($_SESSION['profile']['id'])."' and `deleted`=0 and `hash`=''";
40 $res = mysql_query($query);
41 while($row = mysql_fetch_assoc($res))
42 { ?>
43 <tr>
44 <td class="DataTD"><input type="checkbox" id="addid<?php echo intval($row['id'])?>" name="addid[]" value="<?php echo intval($row['id'])?>"></td>
45 <td class="DataTD" align="left"><label for="addid<?php echo intval($row['id'])?>"><?php echo sanitizeHTML($row['email'])?></label></td>
46 </tr>
47 <?php }
48 if($_SESSION['profile']['points'] >= 50)
49 {
50 $fname = $_SESSION['profile']['fname'];
51 $mname = $_SESSION['profile']['mname'];
52 $lname = $_SESSION['profile']['lname'];
53 $suffix = $_SESSION['profile']['suffix'];
54 ?>
55 <tr>
56 <td class="DataTD" colspan="2" align="left">
57 <input type="radio" id="incname0" name="incname" value="0" checked="checked" />
58 <label for="incname0"><?php echo _("No Name")?></label><br />
59 <?php if($fname && $lname) { ?>
60 <input type="radio" id="incname1" name="incname" value="1" />
61 <label for="incname1"><?php echo _("Include")?> '<?php echo $fname." ".$lname?>'</label><br />
62 <?php } ?>
63 <?php if($fname && $mname && $lname) { ?>
64 <input type="radio" id="incname2" name="incname" value="2" />
65 <label for="incname2"><?php echo _("Include")?> '<?php echo $fname." ".$mname." ".$lname?>'</label><br />
66 <?php } ?>
67 <?php if($fname && $lname && $suffix) { ?>
68 <input type="radio" id="incname3" name="incname" value="3" />
69 <label for="incname3"><?php echo _("Include")?> '<?php echo $fname." ".$lname." ".$suffix?>'</label><br />
70 <?php } ?>
71 <?php if($fname && $mname && $lname && $suffix) { ?>
72 <input type="radio" id="incname4" name="incname" value="4" />
73 <label for="incname4"><?php echo _("Include")?> '<?php echo $fname." ".$mname." ".$lname." ".$suffix?>'</label><br />
74 <?php } ?>
75 </td>
76 </tr>
77 <?php } ?>
78
79 <tr>
80 <td class="DataTD">
81 <input type="checkbox" id="login" name="login" value="1" checked="checked" />
82 </td>
83 <td class="DataTD" align="left">
84 <label for="login"><?php echo _("Enable certificate login with this certificate")?><br />
85 <?php echo _("By allowing certificate login, this certificate can be used to login into this account at https://secure.cacert.org/ .")?></label>
86 </td>
87 </tr>
88 <tr>
89 <td class="DataTD" colspan="2" align="left">
90 <label for="description"><?php echo _("Optional comment, only used in the certificate overview")?></label><br />
91 <input type="text" id="description" name="description" maxlength="100" size="100" />
92 </td>
93 </tr>
94
95 <tr name="expertoff" style="display:none">
96 <td class="DataTD">
97 <input type="checkbox" id="expertbox" name="expertbox" onchange="showExpert(this.checked)" />
98 </td>
99 <td class="DataTD" align="left">
100 <label for="expertbox"><?php echo _("Show advanced options")?></label>
101 </td>
102 </tr>
103
104 <?php if($_SESSION['profile']['points'] >= 50)
105 {
106 ?>
107 <tr name="expert">
108 <td class="DataTD" colspan="2" align="left">
109 <input type="radio" id="root1" name="rootcert" value="1" /> <label for="root1"><?php echo _("Sign by class 1 root certificate")?></label><br />
110 <input type="radio" id="root2" name="rootcert" value="2" checked="checked" /> <label for="root2"><?php echo _("Sign by class 3 root certificate")?></label><br />
111 <?php echo str_replace("\n", "<br />\n", wordwrap(_("Please note: If you use a certificate signed by the class 3 root, the class 3 root certificate needs to be imported into your email program as well as the class 1 root certificate so your email program can build a full trust path chain."), 125))?>
112 </td>
113 </tr>
114 <?php } ?>
115
116 <tr name="expert">
117 <td class="DataTD" colspan="2" align="left">
118 <?php echo _("Hash algorithm used when signing the certificate:")?><br />
119 <?php foreach (HashAlgorithms::getInfo() as $algorithm => $display_info) {
120 ?>
121 <input type="radio" id="hash_alg_<?php echo $algorithm?>" name="hash_alg" value="<?php echo $algorithm?>" <?php echo (HashAlgorithms::$default === $algorithm)?'checked="checked"':''?> />
122 <label for="hash_alg_<?php echo $algorithm?>"><?php echo $display_info['name']?><?php echo $display_info['info']?' - '.$display_info['info']:''?></label><br />
123 <?php }
124 ?>
125 </td>
126 </tr>
127
128 <?php if($_SESSION['profile']['points'] >= 100 && $_SESSION['profile']['codesign'] > 0) { ?>
129 <tr name="expert">
130 <td class="DataTD">
131 <input type="checkbox" id="codesign" name="codesign" value="1" />
132 </td>
133 <td class="DataTD" align="left">
134 <label for="codesign"><?php echo _("Code Signing")?><br />
135 <?php echo _("Please note: By ticking this box you will automatically have your name included in the certificate.")?></label>
136 </td>
137 </tr>
138 <?php } ?>
139
140 <tr name="expert">
141 <td class="DataTD">
142 <input type="checkbox" id="SSO" name="SSO" value="1" />
143 </td>
144 <td class="DataTD" align="left">
145 <label for="SSO"><?php echo _("Add Single Sign On ID Information")?><br />
146 <?php echo str_replace("\n", "<br>\n", wordwrap(_("By adding Single Sign On (SSO) ID information to your certificates this could be used to track you, you can also issue certificates with no email addresses that are useful only for Authentication. Please see a more detailed description on our WIKI about it."), 125))?>
147 <a href="http://wiki.cacert.org/wiki/SSO"><?php echo _("SSO WIKI Entry")?></a></label>
148 </td>
149 </tr>
150
151 <tr name="expert">
152 <td class="DataTD" colspan="2">
153 <label for="optionalCSR"><?php echo _("Optional Client CSR, no information on the certificate will be used")?></label><br />
154 <textarea id="optionalCSR" name="optionalCSR" cols="80" rows="5"></textarea>
155 </td>
156 </tr>
157
158
159 <tr>
160 <td class="DataTD">
161 <input type="checkbox" id="CCA" name="CCA" />
162 </td>
163 <td class="DataTD" align="left">
164 <label for="CCA"><strong><?php echo sprintf(_("I accept the CAcert Community Agreement (%s)."),"<a href='/policy/CAcertCommunityAgreement.html'>CCA</a>")?></strong><br />
165 <?php echo _("Please note: You need to accept the CCA to proceed.")?></label>
166 </td>
167 </tr>
168 <tr>
169 <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?php echo _("Next")?>" /></td>
170 </tr>
171 </table>
172 <input type="hidden" name="oldid" value="<?php echo $id?>" />
173 </form>
174
175 <script language="javascript">
176 function showExpert(a)
177 {
178 b=document.getElementsByName("expert");
179 for(i=0;b.length>i;i++)
180 {
181 if(!a) {b[i].setAttribute("style","display:none"); }
182 else {b[i].removeAttribute("style");}
183 }
184 b=document.getElementsByName("expertoff");
185 for(i=0;b.length>i;i++)
186 {
187 b[i].removeAttribute("style");
188 }
189
190 }
191 showExpert(false);
192 </script>