bug 1138: added function get_user_agreement
[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 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
35 <tr>
36 <td colspan="<? $colspandefault ?>" class="title"><?=sprintf(_('Account history of %s'),'username')?></td>
37 </tr>
38 <tr>
39 <td colspan="<? $colspandefault ?>" class="title"><?=_('User actions')?></td>
40 </tr>
41 <tr>
42 <td class="DataTD"><?=_('User name')?></td>
43 <td class="DataTD"><?=$name?></td>
44 </tr>
45 <tr>
46 <td class="DataTD"><?=_('Date of Birth')?></td>
47 <td class="DataTD"><?=$dob?></td>
48 </tr>
49 <tr>
50 <td class="DataTD"><?=_("Is Assurer")?>:</td>
51 <td class="DataTD"><?= ($row['assurer']==0)? _('No'):_('Yes')?></td>
52 </tr>
53 <tr>
54 <td class="DataTD"><?=_("Blocked Assurer")?>:</td>
55 <td class="DataTD"><?= ($row['assurer_blocked']==0)? _('No'):_('Yes')?></td>
56 </tr>
57 <tr>
58 <td class="DataTD"><?=_("Account Locking")?>:</td>
59 <td class="DataTD"><?= ($row['locked']==0)? _('No'):_('Yes')?></td>
60 </tr>
61 <tr>
62 <td class="DataTD"><?=_("Code Signing")?>:</td>
63 <td class="DataTD"><?= ($row['codesign']==0)? _('No'):_('Yes')?></td>
64 </tr>
65 <tr>
66 <td class="DataTD"><?=_("Org Assurer")?>:</td>
67 <td class="DataTD"><?= ($row['orgadmin']==0)? _('No'):_('Yes')?></td>
68 </tr>
69 <tr>
70 <td class="DataTD"><?=_("TTP Admin")?>:</td>
71 <td class="DataTD"><?= $row['ttpadmin']._(' - 0 = none, 1 = TTP Admin, 2 = TTP TOPUP admin')?></td>
72 </tr>
73 <tr>
74 <td class="DataTD"><?=_("Location Admin")?>:</td>
75 <td class="DataTD"><?= ($row['locadmin']==0)? _('No'):_('Yes')?></td>
76 </tr>
77 <tr>
78 <td class="DataTD"><?=_("Admin")?>:</td>
79 <td class="DataTD"><?= ($row['admin']==0)? _('No'):_('Yes')?></td>
80 </tr>
81 <tr>
82 <td class="DataTD"><?=_("Ad Admin")?>:</td>
83 <td class="DataTD"><?= $row['adadmin']._(' - 0 = none, 1 = submit, 2 = approve')?></td>
84 </tr>
85 <td class="DataTD"><?=_("General Announcements")?>:</td>
86 <td class="DataTD"><?= ($alerts['general']==0)? _('No'):_('Yes')?></td>
87 </tr>
88 <tr>
89 <td class="DataTD"><?=_("Country Announcements")?>:</td>
90 <td class="DataTD"><?= ($row['id']==0)? _('No'):_('Yes')?></td>
91 </tr>
92 <tr>
93 <td class="DataTD"><?=_("Regional Announcements")?>:</td>
94 <td class="DataTD"><?= ($row['id']==0)? _('No'):_('Yes')?></td>
95 </tr>
96 <tr>
97 <td class="DataTD"><?=_("Within 200km Announcements")?>:</td>
98 <td class="DataTD"><?= ($row['id']==0)? _('No'):_('Yes')?></td>
99 </tr>
100 </table>
101 <br/>
102 <?
103 $dres = get_email_address($userid,'',1);
104 if(mysql_num_rows($dres) > 0) {
105 ?>
106 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
107 <tr>
108 <td colspan="3" class="title"><?=_('Email addresses')?></td>
109 </tr>
110 <?
111 output_log_email_header();
112 while($drow = mysql_fetch_assoc($dres))
113 {
114 output_log_email($drow,$email);
115 } ?>
116 </table>
117 <br/>
118 <?
119 $dres = get_domains($userid,'',1);
120 ?>
121 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
122 <tr>
123 <td colspan="3" class="title"><?=_('Domains')?></td>
124 </tr>
125 <?
126 if(mysql_num_rows($dres) > 0) {
127 output_log_domain_header();
128 while($drow = mysql_fetch_assoc($dres))
129 {
130 output_log_domain($drow,$email);
131 }ELSE{?>
132 <td colspan="3" ><?=_('no entry avialable')?></td>
133 <?}
134 }?>
135 </table>
136 <br/>
137
138 <table>
139 <tr>
140 <td colspan="<? $colspandefault ?>" class="title"><?=_('CATS')?></td>
141 </tr>
142
143 <?
144 $dres = get_user_agreement($userid,'',1);
145 ?>
146 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
147 <tr>
148 <td colspan="4" class="title"><?=_('User agreements')?></td>
149 </tr>
150 <?
151 if(mysql_num_rows($dres) > 0) {
152 output_log_agreement_header();
153 while($drow = mysql_fetch_assoc($dres))
154 {
155 output_log_agreement($drow);
156 }ELSE{
157 ?><td colspan="4" ><?=_('no entry avialable')?></td><?
158 }
159 }?>
160 </table>
161 <br/>
162
163 <table>
164 <tr>
165 <td colspan="<? $colspandefault ?>" class="title"><?=_('Support Engineer actions')?></td>
166 </tr>
167 <tr>
168 <td colspan="<? $colspandefault ?>" class="title"><?=_('Certificate actions')?></td>
169 </tr>
170 <tr>
171 <td colspan="<? $colspandefault ?>" class="title"><?=_('Client certificates')?></td>
172 </tr>
173 <tr>
174 <td colspan="<? $colspandefault ?>" class="title"><?=_('Server certificates')?></td>
175 </tr>
176 <tr>
177 <td colspan="<? $colspandefault ?>" class="title"><?=_('GPG certificates')?></td>
178 </tr>
179 </table>