Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

add_zone_templ.php 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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-2014 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 zone templates
  24. *
  25. * @package Poweradmin
  26. * @copyright 2007-2010 Rejo Zenger <rejo@zenger.nl>
  27. * @copyright 2010-2014 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 (!verify_permission('zone_master_add')) {
  33. error(ERR_PERM_ADD_ZONE_TEMPL);
  34. } else {
  35. if (isset($_POST['commit'])) {
  36. if (add_zone_templ($_POST, $_SESSION['userid'])) {
  37. success(SUC_ZONE_TEMPL_ADD);
  38. } // TODO: otherwise repopulate values to form
  39. }
  40. /*
  41. Display new zone template form
  42. */
  43. $username = get_fullname_from_userid($_SESSION['userid']);
  44. echo " <h2>" . _('Add zone template for') . " " . $username . "</h2>\n";
  45. echo " <form method=\"post\" action=\"add_zone_templ.php\">\n";
  46. echo " <table>\n";
  47. echo " <tr>\n";
  48. echo " <th>" . _('Name') . "</th>\n";
  49. echo " <td><input class=\"wide\" type=\"text\" name=\"templ_name\" value=\"\"></td>\n";
  50. echo " </tr>\n";
  51. echo " <tr>\n";
  52. echo " <th>" . _('Description') . "</th>\n";
  53. echo " <td><input class=\"wide\" type=\"text\" name=\"templ_descr\" value=\"\"></td>\n";
  54. echo " </tr>\n";
  55. echo " </table>\n";
  56. echo " <input type=\"submit\" class=\"button\" name=\"commit\" value=\"" . _('Add zone template') . "\">\n";
  57. echo " </form>\n";
  58. }
  59. include_once("inc/footer.inc.php");