First commit of tag changes. bug-1444
[cacert-devel.git] / pages / account / 2.php
1 <?php /*
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="4" class="title"><?php echo _("Email Accounts")?></td>
22 </tr>
23 <tr>
24 <td class="DataTD"><?php echo _("Default")?></td>
25 <td class="DataTD"><?php echo _("Status")?></td>
26 <td class="DataTD"><?php echo _("Delete")?></td>
27 <td class="DataTD"><?php echo _("Address")?></td>
28
29 <?php $query = "select * from `email` where `memid`='".intval($_SESSION['profile']['id'])."' and `deleted`=0";
30 $res = mysql_query($query);
31 while($row = mysql_fetch_assoc($res))
32 {
33 if($row['hash'] == "")
34 $verified = _("Verified");
35 else
36 $verified = _("Unverified");
37 ?>
38 <tr>
39 <td class="DataTD"><?php if($row['hash'] == "") { ?><input type="radio" name="emailid" value="<?php echo $row['id']?>"
40 <?php if($row['email'] == $_SESSION['profile']['email']) echo " checked"; ?>><?php } else { echo "&nbsp;"; } ?></td>
41 <td class="DataTD"><?php echo $verified?></td>
42 <?php if($row['email'] == $_SESSION['profile']['email']) { ?>
43 <td class="DataTD"><?php echo _("N/A")?></td>
44 <?php } else { ?>
45 <td class="DataTD"><input type="checkbox" name="delid[]" value="<?php echo $row['id']?>"></td>
46 <?php } ?>
47 <td class="DataTD"><?php echo sanitizeHTML($row['email'])?></td>
48 </tr>
49 <?php } ?>
50 <tr>
51 <td class="DataTD" colspan="2"><input type="submit" name="makedefault" value="<?php echo _("Make Default")?>"></td>
52 <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?php echo _("Delete")?>"></td>
53 </tr>
54 </table>
55 <input type="hidden" name="oldid" value="<?php echo $id?>">
56 <input type="hidden" name="csrf" value="<?php echo make_csrf('chgdef')?>" />
57 </form>
58 <p>
59 <?php echo _("Please Note: You can not set an unverified account as a default account, and you can not remove a default account. To remove the default account you must set another verified account as the default.")?>
60 </p>