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