Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

add_user.php 3.8KB

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