0eaafc4835da1223315c86d886a5600acabc007c
[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 include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php");
19
20 $colspandefault=2;
21 $userid = intval($_REQUEST['userid']);
22 $res =get_user_data($userid);
23
24 if(mysql_num_rows($res) <= 0)
25 {
26 echo _("I'm sorry, the user you were looking for seems to have disappeared! Bad things are a foot!");
27 exit;
28 }
29
30 $row = mysql_fetch_assoc($res);
31
32 $fname = $row['fname'];
33 $mname = $row['mname'];
34 $lname = $row['lname'];
35 $suffix = $row['suffix'];
36 $dob = $row['dob'];
37 $username = $fname." ".$mname." ".$lname." ".$suffix;
38 $email = $row['email'];
39 $alerts =get_alerts($userid);
40 $support=0;
41 if(intval($_REQUEST['oldid'])==43){
42 $support=$_SESSION['profile']['admin'];
43 }
44
45 ?>
46 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
47 <tr>
48 <td colspan="<?=$colspandefault ?>" class="title"><?=sprintf(_('Account history of %s'),$username)?></td>
49 </tr>
50 <tr>
51 <td colspan="<?=$colspandefault ?>" class="title"><?=_('User actions')?></td>
52 </tr>
53 <tr>
54 <td class="DataTD"><?=_('User name')?></td>
55 <td class="DataTD"><?=$username?></td>
56 </tr>
57 <tr>
58 <td class="DataTD"><?=_('Date of Birth')?></td>
59 <td class="DataTD"><?=$dob?></td>
60 </tr>
61 <tr>
62 <td class="DataTD"><?=_("Is Assurer")?>:</td>
63 <td class="DataTD"><?= ($row['assurer']==0)? _('No'):_('Yes')?></td>
64 </tr>
65 <tr>
66 <td class="DataTD"><?=_("Blocked Assurer")?>:</td>
67 <td class="DataTD"><?= ($row['assurer_blocked']==0)? _('No'):_('Yes')?></td>
68 </tr>
69 <tr>
70 <td class="DataTD"><?=_("Account Locking")?>:</td>
71 <td class="DataTD"><?= ($row['locked']==0)? _('No'):_('Yes')?></td>
72 </tr>
73 <tr>
74 <td class="DataTD"><?=_("Code Signing")?>:</td>
75 <td class="DataTD"><?= ($row['codesign']==0)? _('No'):_('Yes')?></td>
76 </tr>
77 <tr>
78 <td class="DataTD"><?=_("Org Assurer")?>:</td>
79 <td class="DataTD"><?= ($row['orgadmin']==0)? _('No'):_('Yes')?></td>
80 </tr>
81 <tr>
82 <td class="DataTD"><?=_("TTP Admin")?>:</td>
83 <td class="DataTD"><?= $row['ttpadmin']._(' - 0 = none, 1 = TTP Admin, 2 = TTP TOPUP admin')?></td>
84 </tr>
85 <tr>
86 <td class="DataTD"><?=_("Location Admin")?>:</td>
87 <td class="DataTD"><?= ($row['locadmin']==0)? _('No'):_('Yes')?></td>
88 </tr>
89 <tr>
90 <td class="DataTD"><?=_("Admin")?>:</td>
91 <td class="DataTD"><?= ($row['admin']==0)? _('No'):_('Yes')?></td>
92 </tr>
93 <tr>
94 <td class="DataTD"><?=_("Ad Admin")?>:</td>
95 <td class="DataTD"><?= $row['adadmin']._(' - 0 = none, 1 = submit, 2 = approve')?></td>
96 </tr>
97 <tr>
98 <td class="DataTD"><?=_("General Announcements")?>:</td>
99 <td class="DataTD"><?= ($alerts['general']==0)? _('No'):_('Yes')?></td>
100 </tr>
101 <tr>
102 <td class="DataTD"><?=_("Country Announcements")?>:</td>
103 <td class="DataTD"><?= ($row['id']==0)? _('No'):_('Yes')?></td>
104 </tr>
105 <tr>
106 <td class="DataTD"><?=_("Regional Announcements")?>:</td>
107 <td class="DataTD"><?= ($row['id']==0)? _('No'):_('Yes')?></td>
108 </tr>
109 <tr>
110 <td class="DataTD"><?=_("Within 200km Announcements")?>:</td>
111 <td class="DataTD"><?= ($row['id']==0)? _('No'):_('Yes')?></td>
112 </tr>
113 </table>
114 <br/>
115 <?
116 $dres = get_email_address($userid,'',1);
117 if(mysql_num_rows($dres) > 0) {
118 ?>
119 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
120 <tr>
121 <td colspan="3" class="title"><?=_('Email addresses')?></td>
122 </tr>
123 <?
124 output_log_email_header();
125 while($drow = mysql_fetch_assoc($dres))
126 {
127 output_log_email($drow,$email);
128 } ?>
129 </table>
130 <br/>
131 <?}
132 $dres = get_domains($userid,'',1);
133 ?>
134 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
135 <tr>
136 <td colspan="3" class="title"><?=_('Domains')?></td>
137 </tr>
138 <?
139 if(mysql_num_rows($dres) > 0) {
140 output_log_domains_header();
141 while($drow = mysql_fetch_assoc($dres))
142 {
143 output_log_domains($drow,$email);
144 }
145 }ELSE{?>
146 <td colspan="3" ><?=_('no entry avialable')?></td>
147 <?}?>
148 </table>
149 <br/>
150
151 <?
152 $dres = get_training_result($userid);
153 ?>
154 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
155 <tr>
156 <td colspan="3" class="title"><?=_('Trainings')?></td>
157 </tr>
158 <?
159 if(mysql_num_rows($dres) > 0) {
160 output_log_training_header();
161 while($drow = mysql_fetch_assoc($dres))
162 {
163 output_log_training($drow);
164 }
165 }ELSE{
166 ?><td colspan="3" ><?=_('no entry avialable')?></td><?
167 }?>
168 </table>
169 <br/>
170
171 <?
172 $dres = get_user_agreement($userid,'',1);
173 ?>
174 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
175 <tr>
176 <td colspan="4" class="title"><?=_('User agreements')?></td>
177 </tr>
178 <?
179 if(mysql_num_rows($dres) > 0) {
180 output_log_agreement_header();
181 while($drow = mysql_fetch_assoc($dres))
182 {
183 output_log_agreement($drow);
184 }
185 }ELSE{
186 ?><td colspan="4" ><?=_('no entry avialable')?></td><?
187 }?>
188 </table>
189 <br/>
190
191 <?
192 $dres = get_client_certs($userid,1);
193 $colspan=10;
194 if (1==$support) {
195 $colspan=7;
196 }
197 ?>
198 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
199 <tr>
200 <td colspan="<?=$colspan?>" class="title"><?=_('Client certificates')?></td>
201 </tr>
202 <?
203 if(mysql_num_rows($dres) > 0) {
204 output_client_cert_header($support);
205 while($drow = mysql_fetch_assoc($dres))
206 {
207 output_client_cert($drow,$support);
208 }
209 }ELSE{
210 ?><td colspan="<?=$colspan?>" ><?=_('no entry avialable')?></td><?
211 }?>
212 </table>
213 <br/>
214
215 <?
216 $dres = get_server_certs($userid,1);
217 $colspan = 8;
218 if (1 == $support) {
219 $colspan = 5;
220 }
221 ?>
222 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
223 <tr>
224 <td colspan="<?=$colspan?>" class="title"><?=_('Server certificates')?></td>
225 </tr>
226 <?
227 if(mysql_num_rows($dres) > 0) {
228 output_log_server_certs_header($support);
229 while($drow = mysql_fetch_assoc($dres))
230 {
231 output_log_server_certs($drow,$support);
232 }
233 }ELSE{
234 ?><td colspan="<?=$colspan?>" ><?=_('no entry avialable')?></td><?
235 }?>
236 </table>
237 <br/>
238
239 <?
240 $dres = get_gpg_certs($userid,1);
241 $colspan = 6;
242 if (1 == $support) {
243 $colspan = 4;
244 }
245 ?>
246 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
247 <tr>
248 <td colspan="<?=$colspan?>" class="title"><?=_('GPG/PGP certificates')?></td>
249 </tr>
250 <?
251 if(mysql_num_rows($dres) > 0) {
252 output_gpg_certs_header($support);
253 while($drow = mysql_fetch_assoc($dres))
254 {
255 output_gpg_certs($drow,$support);
256 }
257 }ELSE{
258 ?><td colspan="<?=$colspan?>" ><?=_('no entry avialable')?></td><?
259 }?>
260 </table>
261 <br/>
262
263 <?
264 $dres = get_se_log($userid);
265 $colspan = 2;
266 if (1 == $support) {
267 $colspan = 4;
268 }
269 ?>
270 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
271 <tr>
272 <td colspan="<?=$colspan?>" class="title"><?=_('Admin log')?></td>
273 </tr>
274 <?
275 if(mysql_num_rows($dres) > 0) {
276 output_log_se_header($support);
277 while($drow = mysql_fetch_assoc($dres))
278 {
279 output_log_se($drow,$support);
280 }
281 }ELSE{
282 ?><td colspan="<?=$colspan?>" ><?=_('no entry avialable')?></td><?
283 }?>
284 </table>