First commit of tag changes. bug-1444
[cacert-devel.git] / pages / account / 33.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 <?php $query = "select * from `orginfo` where `id`='".intval($_REQUEST['orgid'])."'";
19 $row = mysql_fetch_assoc(mysql_query($query));
20
21 // Reset session variables regarding OrgAdmin's, present empty form
22 if (array_key_exists('email',$_SESSION['_config'])) $_SESSION['_config']['email']="";
23 if (array_key_exists('OU',$_SESSION['_config'])) $_SESSION['_config']['OU'] = "";
24 if (array_key_exists('masteracc',$_SESSION['_config'])) $_SESSION['_config']['masteracc'] = 0;
25 if (array_key_exists('comments',$_SESSION['_config'])) $_SESSION['_config']['comments'] = "";
26
27 ?>
28 <form method="post" action="account.php">
29 <input type="hidden" name="orgid" value="<?php echo intval($_REQUEST['orgid'])?>">
30 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
31 <tr>
32 <td colspan="2" class="title"><?php printf(_("New Admin for %s"), ($row['O'])); ?></td>
33 </tr>
34 <tr>
35 <td class="DataTD"><?php echo _("Email")?>:</td>
36 <td class="DataTD"><input type="text" name="email" value=""></td>
37 </tr>
38 <tr>
39 <td class="DataTD"><?php echo _("Department")?>:</td>
40 <td class="DataTD"><input type="text" name="OU" value=""></td>
41 </tr>
42 <?php if($_SESSION['profile']['orgadmin'] == 1) { ?>
43 <tr>
44 <td class="DataTD"><?php echo _("Master Account")?>:</td>
45 <td class="DataTD"><select name="masteracc">
46 <option value="0">No</option> // make default option as of SA telco 2011-08-02 on bug 966
47 <option value="1">Yes</option>
48 </select></td>
49 </tr>
50 <?php } ?>
51 <tr>
52 <td class="DataTD"><?php echo _("Comments")?>:</td>
53 <td class="DataTD"><textarea name="comments" cols="30" rows="5"></textarea></td>
54 </tr>
55 <tr>
56 <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?php echo _("Add")?>"></td>
57 </tr>
58 </table>
59 <input type="hidden" name="oldid" value="<?php echo $id?>">
60 <input type="hidden" name="csrf" value="<?php echo make_csrf('orgadmadd')?>" />
61 </form>