ab0e6b270de9140764fd5755ee405abb38aa8acb
[cacert.git] / pages / account / 25.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 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper" width="700">
19 <tr>
20 <td colspan="5" class="title"><?=_("Organisations")?></td>
21 </tr>
22 <tr>
23 <td class="DataTD" width="350"><?=_("Organisation")?></td>
24 <td class="DataTD"><?=_("Domains")?></td>
25 <td class="DataTD"><?=_("Admins")?></td>
26 <td class="DataTD"><?=_("Edit")?></td>
27 <td class="DataTD"><?=_("Delete")?></td>
28 </tr>
29 <?
30 $query = "select * from `orginfo` ORDER BY `id`";
31 $res = mysql_query($query);
32 while($row = mysql_fetch_assoc($res))
33 {
34 $r2 = mysql_query("select * from `org` where `orgid`='".intval($row['id'])."'");
35 $admincount = mysql_num_rows($r2);
36 $r2 = mysql_query("select * from `orgdomains` where `orgid`='".intval($row['id'])."'");
37 $domcount = mysql_num_rows($r2);
38 ?>
39 <tr>
40 <td class="DataTD"><?=htmlspecialchars($row['O'])?>, <?=htmlspecialchars($row['ST'])?> <?=htmlspecialchars($row['C'])?></td>
41 <td class="DataTD"><a href="account.php?id=26&amp;orgid=<?=intval($row['id'])?>"><?=_("Domains")?> (<?=$domcount?>)</a></td>
42 <td class="DataTD"><a href="account.php?id=32&amp;orgid=<?=$row['id']?>"><?=_("Admins")?> (<?=$admincount?>)</a></td>
43 <td class="DataTD"><a href="account.php?id=27&amp;orgid=<?=$row['id']?>"><?=_("Edit")?></a></td>
44 <td class="DataTD"><a href="account.php?id=31&amp;orgid=<?=$row['id']?>"><?=_("Delete")?></a></td>
45 <? if(array_key_exists('viewcomment',$_REQUEST) && $_REQUEST['viewcomment']!='') { ?>
46 <td class="DataTD"><?=sanitizeHTML($row['comments'])?></td>
47 <? } ?>
48 </tr>
49 <? } ?>
50 </table>