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