|
1 <?php |
|
2 |
|
3 /* PowerAdmin, a friendly web-based admin tool for PowerDNS. |
|
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 |
|
25 $perm_templ = "-1"; |
|
26 if (isset($_GET['id']) && (v_num($_GET['id']))) { |
|
27 $perm_templ = $_GET['id']; |
|
28 } |
|
29 |
|
30 $confirm = "-1"; |
|
31 if ((isset($_GET['confirm'])) && v_num($_GET['confirm'])) { |
|
32 $confirm = $_GET['confirm']; |
|
33 } |
|
34 |
|
35 if ($perm_templ == "-1"){ |
|
36 error(ERR_INV_INPUT); |
|
37 } else { |
|
38 if (!(verify_permission(user_edit_templ_perm))) { |
|
39 error(ERR_PERM_DEL_PERM_TEMPL); |
|
40 } else { |
|
41 $templ_details = get_permission_template_details($perm_templ); |
|
42 echo " <h2>" . _('Delete permission template') . " \"" . $templ_details['name'] . "\"</h2>\n"; |
|
43 |
|
44 if ($_GET["confirm"] == '1') { |
|
45 delete_perm_templ($perm_templ); |
|
46 success(SUC_PERM_TEMPL_DEL); |
|
47 } else { |
|
48 echo " <p>" . _('Are you sure?') . "</p>\n"; |
|
49 echo " <input type=\"button\" class=\"button\" OnClick=\"location.href='" . $_SERVER['REQUEST_URI'] . "&confirm=1'\" value=\"" . _('Yes') . "\">\n"; |
|
50 } |
|
51 } |
|
52 } |
|
53 |
|
54 include_once("inc/footer.inc.php"); |