82
|
1 |
<?php |
|
2 |
|
119
|
3 |
/* Poweradmin, a friendly web-based admin tool for PowerDNS. |
82
|
4 |
* See <https://rejo.zenger.nl/poweradmin> for more details. |
|
5 |
* |
|
6 |
* Copyright 2007, 2008 Rejo Zenger <rejo@zenger.nl> |
|
7 |
* |
|
8 |
* This program is free software: you can redistribute it and/or modify |
|
9 |
* it under the terms of the GNU General Public License as published by |
|
10 |
* the Free Software Foundation, either version 3 of the License, or |
|
11 |
* (at your option) any later version. |
|
12 |
* |
|
13 |
* This program is distributed in the hope that it will be useful, |
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
* GNU General Public License for more details. |
|
17 |
* |
|
18 |
* You should have received a copy of the GNU General Public License |
|
19 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
20 |
*/ |
|
21 |
|
|
22 |
require_once("inc/toolkit.inc.php"); |
|
23 |
include_once("inc/header.inc.php"); |
|
24 |
|
126
|
25 |
if (!verify_permission('user_add_new')) { |
82
|
26 |
error(ERR_PERM_ADD_USER); |
|
27 |
} else { |
|
28 |
if($_POST["commit"]) { |
|
29 |
add_new_user($_POST); |
|
30 |
success(SUC_USER_ADD); |
|
31 |
} |
|
32 |
|
110
|
33 |
echo " <h2>" . _('Add user') . "</h2>\n"; |
82
|
34 |
echo " <form method=\"post\">\n"; |
|
35 |
echo " <table>\n"; |
|
36 |
echo " <tr>\n"; |
|
37 |
echo " <td class=\"n\">" . _('Username') . "</td>\n"; |
|
38 |
echo " <td class=\"n\"><input type=\"text\" class=\"input\" name=\"username\" value=\"\"></td>\n"; |
|
39 |
echo " </tr>\n"; |
|
40 |
echo " <tr>\n"; |
|
41 |
echo " <td class=\"n\">" . _('Fullname') . "</td>\n"; |
|
42 |
echo " <td class=\"n\"><input type=\"text\" class=\"input\" name=\"fullname\" value=\"\"></td>\n"; |
|
43 |
echo " </tr>\n"; |
|
44 |
echo " <tr>\n"; |
|
45 |
echo " <td class=\"n\">" . _('Password') . "</td>\n"; |
102
|
46 |
echo " <td class=\"n\"><input type=\"password\" class=\"input\" name=\"password\"></td>\n"; |
82
|
47 |
echo " </tr>\n"; |
|
48 |
echo " <tr>\n"; |
110
|
49 |
echo " <td class=\"n\">" . _('Emailaddress') . "</td>\n"; |
82
|
50 |
echo " <td class=\"n\"><input type=\"text\" class=\"input\" name=\"email\" value=\"\"></td>\n"; |
|
51 |
echo " </tr>\n"; |
|
52 |
echo " <tr>\n"; |
|
53 |
echo " <td class=\"n\">" . _('Permission template') . "</td>\n"; |
|
54 |
echo " <td class=\"n\">\n"; |
|
55 |
echo " <select name=\"perm_templ\">\n"; |
|
56 |
foreach (list_permission_templates() as $template) { |
|
57 |
echo " <option value=\"" . $template['id'] . "\">" . $template['name'] . "</option>\n"; |
|
58 |
} |
|
59 |
echo " </select>\n"; |
|
60 |
echo " </td>\n"; |
|
61 |
echo " </tr>\n"; |
|
62 |
echo " <tr>\n"; |
|
63 |
echo " <td class=\"n\">" . _('Description') . "</td>\n"; |
|
64 |
echo " <td class=\"n\"><textarea rows=\"4\" cols=\"30\" class=\"inputarea\" name=\"descr\"></textarea></td>\n"; |
|
65 |
echo " </tr>\n"; |
|
66 |
echo " <tr>\n"; |
|
67 |
echo " <td class=\"n\">" . _('Enabled') . "</td>\n"; |
|
68 |
echo " <td class=\"n\"><input type=\"checkbox\" class=\"input\" name=\"active\" value=\"1\"></td>\n"; |
|
69 |
echo " </tr>\n"; |
|
70 |
echo " <tr>\n"; |
|
71 |
echo " <td class=\"n\"> </td>\n"; |
|
72 |
echo " <td class=\"n\"><input type=\"submit\" class=\"button\" name=\"commit\" value=\"" . _('Commit changes') . "\"></td>\n"; |
|
73 |
echo " </table>\n"; |
|
74 |
echo " </form>\n"; |
|
75 |
} |
|
76 |
|
|
77 |
include_once("inc/footer.inc.php"); |
|
78 |
|
|
79 |
?> |