71
|
1 |
<?php |
47
|
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 |
|
13
|
22 |
global $STYLE; |
82
|
23 |
|
|
24 |
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n"; |
|
25 |
echo "<html>\n"; |
|
26 |
echo " <head>\n"; |
|
27 |
echo " <title>PowerAdmin</title>\n"; |
|
28 |
echo " <link rel=stylesheet href=\"style/" . $STYLE . ".inc.php\" type=\"text/css\">\n"; |
|
29 |
echo " </head>\n"; |
|
30 |
echo " <body>\n"; |
|
31 |
|
|
32 |
if(file_exists('inc/custom_header.inc.php')) { |
13
|
33 |
include('inc/custom_header.inc.php'); |
|
34 |
} |
82
|
35 |
|
|
36 |
echo " <h1>PowerAdmin</h1>\n"; |
|
37 |
|
|
38 |
if (isset($_SESSION["userid"])) { |
|
39 |
|
|
40 |
verify_permission(search) ? $perm_search = "1" : $perm_search = "0" ; |
|
41 |
verify_permission(zone_content_view_own) ? $perm_view_zone_own = "1" : $perm_view_zone_own = "0" ; |
|
42 |
verify_permission(zone_content_view_other) ? $perm_view_zone_other = "1" : $perm_view_zone_other = "0" ; |
|
43 |
verify_permission(supermaster_view) ? $perm_supermaster_view = "1" : $perm_supermaster_view = "0" ; |
|
44 |
verify_permission(zone_master_add) ? $perm_zone_master_add = "1" : $perm_zone_master_add = "0" ; |
|
45 |
verify_permission(zone_slave_add) ? $perm_zone_slave_add = "1" : $perm_zone_slave_add = "0" ; |
|
46 |
verify_permission(supermaster_add) ? $perm_supermaster_add = "1" : $perm_supermaster_add = "0" ; |
|
47 |
|
|
48 |
echo " <div class=\"menu\">\n"; |
|
49 |
echo " <span class=\"menuitem\"><a href=\"index.php\">" . _('Index') . "</a></span>\n"; |
|
50 |
if ( $perm_search == "1" ) { |
|
51 |
echo " <span class=\"menuitem\"><a href=\"search.php\">" . _('Search zones or records') . "</a></span>\n"; |
13
|
52 |
} |
82
|
53 |
if ( $perm_view_zone_own == "1" || $perm_view_zone_other == "1" ) { |
|
54 |
echo " <span class=\"menuitem\"><a href=\"list_zones.php\">" . _('List all zones') . "</a></span>\n"; |
|
55 |
} |
|
56 |
if ( $perm_supermaster_view ) { |
|
57 |
echo " <span class=\"menuitem\"><a href=\"list_supermasters.php\">" . _('List all supermasters') . "</a></span>\n"; |
|
58 |
} |
|
59 |
if ( $perm_zone_master_add ) { |
|
60 |
echo " <span class=\"menuitem\"><a href=\"add_zone_master.php\">" . _('Add master zone') . "</a></span>\n"; |
13
|
61 |
} |
82
|
62 |
if ( $perm_zone_slave_add ) { |
|
63 |
echo " <span class=\"menuitem\"><a href=\"add_zone_slave.php\">" . _('Add slave zone') . "</a></span>\n"; |
|
64 |
} |
104
|
65 |
if ( $perm_supermaster_add ) { |
82
|
66 |
echo " <span class=\"menuitem\"><a href=\"add_supermaster.php\">" . _('Add supermaster') . "</a></span>\n"; |
|
67 |
} |
|
68 |
echo " <span class=\"menuitem\"><a href=\"change_password.php\">" . _('Change password') . "</a></span>\n"; |
|
69 |
echo " <span class=\"menuitem\"><a href=\"users.php\">" . _('User administration') . "</a></span>\n"; |
|
70 |
echo " <span class=\"menuitem\"><a href=\"index.php?logout\">" . _('Logout') . "</a></span>\n"; |
|
71 |
echo " </div> <!-- /menu -->\n"; |
13
|
72 |
} |
82
|
73 |
echo " <div class=\"content\">\n"; |
13
|
74 |
|
|
75 |
|
|
76 |
|