bug 1138: added function get_server_certs
[cacert-devel.git] / pages / account / 59.php
1 <?/*
2 LibreSSL - CAcert web application
3 Copyright (C) 2004-2008 CAcert Inc.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; version 2 of the License.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19
20 $colspandefault=2;
21 $userid = intval($_REQUEST['userid']);
22 $res =get_user_data($userid);
23 $row = mysql_fetch_assoc($res);
24
25 $fname = $row['fname'];
26 $mname = $row['mname'];
27 $lname = $row['lname'];
28 $suffix = $row['suffix'];
29 $dob = $row['dob'];
30 $name = $fname." ".$mname." ".$lname." ".$suffix;
31 $email = $row['email'];
32 $alerts =get_alerts($userid);
33
34 $support=0;
35
36 ?>
37 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
38 <tr>
39 <td colspan="<? $colspandefault ?>" class="title"><?=sprintf(_('Account history of %s'),'username')?></td>
40 </tr>
41 <tr>
42 <td colspan="<? $colspandefault ?>" class="title"><?=_('User actions')?></td>
43 </tr>
44 <tr>
45 <td class="DataTD"><?=_('User name')?></td>
46 <td class="DataTD"><?=$name?></td>
47 </tr>
48 <tr>
49 <td class="DataTD"><?=_('Date of Birth')?></td>
50 <td class="DataTD"><?=$dob?></td>
51 </tr>
52 <tr>
53 <td class="DataTD"><?=_("Is Assurer")?>:</td>
54 <td class="DataTD"><?= ($row['assurer']==0)? _('No'):_('Yes')?></td>
55 </tr>
56 <tr>
57 <td class="DataTD"><?=_("Blocked Assurer")?>:</td>
58 <td class="DataTD"><?= ($row['assurer_blocked']==0)? _('No'):_('Yes')?></td>
59 </tr>
60 <tr>
61 <td class="DataTD"><?=_("Account Locking")?>:</td>
62 <td class="DataTD"><?= ($row['locked']==0)? _('No'):_('Yes')?></td>
63 </tr>
64 <tr>
65 <td class="DataTD"><?=_("Code Signing")?>:</td>
66 <td class="DataTD"><?= ($row['codesign']==0)? _('No'):_('Yes')?></td>
67 </tr>
68 <tr>
69 <td class="DataTD"><?=_("Org Assurer")?>:</td>
70 <td class="DataTD"><?= ($row['orgadmin']==0)? _('No'):_('Yes')?></td>
71 </tr>
72 <tr>
73 <td class="DataTD"><?=_("TTP Admin")?>:</td>
74 <td class="DataTD"><?= $row['ttpadmin']._(' - 0 = none, 1 = TTP Admin, 2 = TTP TOPUP admin')?></td>
75 </tr>
76 <tr>
77 <td class="DataTD"><?=_("Location Admin")?>:</td>
78 <td class="DataTD"><?= ($row['locadmin']==0)? _('No'):_('Yes')?></td>
79 </tr>
80 <tr>
81 <td class="DataTD"><?=_("Admin")?>:</td>
82 <td class="DataTD"><?= ($row['admin']==0)? _('No'):_('Yes')?></td>
83 </tr>
84 <tr>
85 <td class="DataTD"><?=_("Ad Admin")?>:</td>
86 <td class="DataTD"><?= $row['adadmin']._(' - 0 = none, 1 = submit, 2 = approve')?></td>
87 </tr>
88 <td class="DataTD"><?=_("General Announcements")?>:</td>
89 <td class="DataTD"><?= ($alerts['general']==0)? _('No'):_('Yes')?></td>
90 </tr>
91 <tr>
92 <td class="DataTD"><?=_("Country Announcements")?>:</td>
93 <td class="DataTD"><?= ($row['id']==0)? _('No'):_('Yes')?></td>
94 </tr>
95 <tr>
96 <td class="DataTD"><?=_("Regional Announcements")?>:</td>
97 <td class="DataTD"><?= ($row['id']==0)? _('No'):_('Yes')?></td>
98 </tr>
99 <tr>
100 <td class="DataTD"><?=_("Within 200km Announcements")?>:</td>
101 <td class="DataTD"><?= ($row['id']==0)? _('No'):_('Yes')?></td>
102 </tr>
103 </table>
104 <br/>
105 <?
106 $dres = get_email_address($userid,'',1);
107 if(mysql_num_rows($dres) > 0) {
108 ?>
109 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
110 <tr>
111 <td colspan="3" class="title"><?=_('Email addresses')?></td>
112 </tr>
113 <?
114 output_log_email_header();
115 while($drow = mysql_fetch_assoc($dres))
116 {
117 output_log_email($drow,$email);
118 } ?>
119 </table>
120 <br/>
121 <?
122 $dres = get_domains($userid,'',1);
123 ?>
124 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
125 <tr>
126 <td colspan="3" class="title"><?=_('Domains')?></td>
127 </tr>
128 <?
129 if(mysql_num_rows($dres) > 0) {
130 output_log_domain_header();
131 while($drow = mysql_fetch_assoc($dres))
132 {
133 output_log_domain($drow,$email);
134 }ELSE{?>
135 <td colspan="3" ><?=_('no entry avialable')?></td>
136 <?}
137 }?>
138 </table>
139 <br/>
140
141 <?
142 $dres = get_training_result($userid);
143 ?>
144 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
145 <tr>
146 <td colspan="3" class="title"><?=_('Trainings')?></td>
147 </tr>
148 <?
149 if(mysql_num_rows($dres) > 0) {
150 output_log_training_header();
151 while($drow = mysql_fetch_assoc($dres))
152 {
153 output_log_training($drow);
154 }ELSE{
155 ?><td colspan="3" ><?=_('no entry avialable')?></td><?
156 }
157 }?>
158 </table>
159 <br/>
160 <?
161 $dres = get_user_agreement($userid,'',1);
162 ?>
163 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
164 <tr>
165 <td colspan="4" class="title"><?=_('User agreements')?></td>
166 </tr>
167 <?
168 if(mysql_num_rows($dres) > 0) {
169 output_log_agreement_header();
170 while($drow = mysql_fetch_assoc($dres))
171 {
172 output_log_agreement($drow);
173 }ELSE{
174 ?><td colspan="4" ><?=_('no entry avialable')?></td><?
175 }
176 }?>
177 </table>
178 <br/>
179 <?
180 $dres = get_client_certs($userid);
181 $colspan=10;
182 if (1==$support) {
183 $colspan=7;
184 }
185 ?>
186 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
187 <tr>
188 <td colspan="<? $colspan?>" class="title"><?=_('Client certificates')?></td>
189 </tr>
190 <?
191 if(mysql_num_rows($dres) > 0) {
192 output_client_cert_header($support);
193 while($drow = mysql_fetch_assoc($dres))
194 {
195 output_client_cert($drow,$support);
196 }ELSE{
197 ?><td colspan="<? $colspan?>" ><?=_('no entry avialable')?></td><?
198 }
199 }?>
200 </table>
201 <br/>
202 <?
203 $dres = get_server_certs($userid);
204 $colspan=8;
205 if (1==$support) {
206 $colspan=5;
207 }
208 ?>
209 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
210 <tr>
211 <td colspan="<? $colspan?>" class="title"><?=_('Server certificates')?></td>
212 </tr>
213 <?
214 if(mysql_num_rows($dres) > 0) {
215 output_log_server_certs_header($support);
216 while($drow = mysql_fetch_assoc($dres))
217 {
218 output_log_server_certs($drow,$support);
219 }ELSE{
220 ?><td colspan="<? $colspan?>" ><?=_('no entry avialable')?></td><?
221 }
222 }?>
223 </table>
224 <br/>
225
226 <table>
227
228
229 <tr>
230 <td colspan="<? $colspandefault ?>" class="title"><?=_('GPG certificates')?></td>
231 </tr>
232 </table>