All mysql_-statments replaced by their corresponding mysqli_-statements
[cacert-devel.git] / pages / account / 9.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 <form method="post" action="account.php">
19 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
20 <tr>
21 <td colspan="3" class="title"><?=_("Domains")?></td>
22 </tr>
23 <tr>
24 <td class="DataTD"><?=_("Delete")?></td>
25 <td class="DataTD"><?=_("Status")?></td>
26 <td class="DataTD"><?=_("Address")?></td>
27
28 <?
29 $query = "select * from `domains` where `memid`='".intval($_SESSION['profile']['id'])."' and `deleted`=0";
30 $res = mysqli_query($_SESSION['mconn'], $query);
31 if(mysqli_num_rows($res) <= 0)
32 {
33 ?>
34 <tr>
35 <td colspan="3" class="DataTD"><?=_("No domains are currently listed.")?></td>
36 </tr>
37 <? } else {
38 while($row = mysqli_fetch_assoc($res))
39 {
40 if($row['hash'] == "")
41 $verified = _("Verified");
42 else
43 $verified = _("Unverified");
44 ?>
45 <tr>
46 <td class="DataTD"><input type="checkbox" name="delid[]" value="<?=intval($row['id'])?>"></td>
47 <td class="DataTD"><?=$verified?></td>
48 <td class="DataTD"><?=sanitizeHTML($row['domain'])?></td>
49 </tr>
50 <? } ?>
51 <tr>
52 <td class="DataTD" colspan="3"><input type="submit" name="process" value="<?=_("Delete")?>"></td>
53 </tr>
54 <? } ?>
55 </table>
56 <input type="hidden" name="oldid" value="<?=$id?>">
57 </form>