All mysql_-statments replaced by their corresponding mysqli_-statements
[cacert-devel.git] / pages / account / 32.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 $query = "select * from `orginfo` where `id`='".intval($_REQUEST['orgid'])."'";
20 $row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
21 ?>
22 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper" width="500">
23 <tr>
24 <td colspan="5" class="title"><? printf(_("%s's Administrators"), $row['O']); ?> (<a href="account.php?id=33&amp;orgid=<?=$row['id']?>"><?=_("Add")?></a>)</td>
25 </tr>
26 <tr>
27 <td class="DataTD"><?=_("Administrator")?></td>
28 <td class="DataTD"><?=_("Master Account")?></td>
29 <td class="DataTD"><?=_("Department")?></td>
30 <td class="DataTD"><?=_("Comments")?></td>
31 <td class="DataTD"><?=_("Delete")?></td>
32 </tr>
33 <?
34 $query = "select * from `org` where `orgid`='".intval($_REQUEST['orgid'])."'";
35 $res = mysqli_query($_SESSION['mconn'], $query);
36 while($row = mysqli_fetch_assoc($res))
37 {
38 $user = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='".intval($row['memid'])."'"));
39 ?>
40 <tr>
41 <td class="DataTD"><a href='mailto:<?=sanitizeHTML($user['email'])?>'><?=sanitizeHTML($user['fname'])?> <?=sanitizeHTML($user['lname'])?></a></td>
42 <td class="DataTD"><?=($row['masteracc'])?></a></td>
43 <td class="DataTD"><?=sanitizeHTML($row['OU'])?></a></td>
44 <td class="DataTD"><?=sanitizeHTML($row['comments'])?></a></td>
45 <? if($row['masteracc'] == 0 || $_SESSION['profile']['orgadmin'] == 1) { ?>
46 <td class="DataTD"><a href="account.php?id=34&amp;orgid=<?=$row['orgid']?>&amp;memid=<?=$row['memid']?>"><?=_("Delete")?></a></td>
47 <? } else { ?>
48 <td class="DataTD">N/A</td>
49 <? } ?>
50 </tr>
51 <? } ?>
52 </table>