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 " ;
82
+ − 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
119
+ − 36
echo " <h1>Poweradmin</h1> \n " ;
82
+ − 37
144
+ − 38
if ( file_exists ( 'install' )) {
+ − 39
error ( ERR_INSTALL_DIR_EXISTS );
+ − 40
include ( 'inc/footer.inc.php' );
+ − 41
exit ;
+ − 42
} elseif ( isset ( $_SESSION [ "userid" ])) {
126
+ − 43
verify_permission ( 'search' ) ? $perm_search = "1" : $perm_search = "0" ;
+ − 44
verify_permission ( 'zone_content_view_own' ) ? $perm_view_zone_own = "1" : $perm_view_zone_own = "0" ;
+ − 45
verify_permission ( 'zone_content_view_other' ) ? $perm_view_zone_other = "1" : $perm_view_zone_other = "0" ;
+ − 46
verify_permission ( 'supermaster_view' ) ? $perm_supermaster_view = "1" : $perm_supermaster_view = "0" ;
+ − 47
verify_permission ( 'zone_master_add' ) ? $perm_zone_master_add = "1" : $perm_zone_master_add = "0" ;
+ − 48
verify_permission ( 'zone_slave_add' ) ? $perm_zone_slave_add = "1" : $perm_zone_slave_add = "0" ;
+ − 49
verify_permission ( 'supermaster_add' ) ? $perm_supermaster_add = "1" : $perm_supermaster_add = "0" ;
82
+ − 50
+ − 51
echo " <div class= \" menu \" > \n " ;
+ − 52
echo " <span class= \" menuitem \" ><a href= \" index.php \" >" . _ ( 'Index' ) . "</a></span> \n " ;
+ − 53
if ( $perm_search == "1" ) {
111
+ − 54
echo " <span class= \" menuitem \" ><a href= \" search.php \" >" . _ ( 'Search zones and records' ) . "</a></span> \n " ;
13
+ − 55
}
82
+ − 56
if ( $perm_view_zone_own == "1" || $perm_view_zone_other == "1" ) {
111
+ − 57
echo " <span class= \" menuitem \" ><a href= \" list_zones.php \" >" . _ ( 'List zones' ) . "</a></span> \n " ;
82
+ − 58
}
+ − 59
if ( $perm_supermaster_view ) {
111
+ − 60
echo " <span class= \" menuitem \" ><a href= \" list_supermasters.php \" >" . _ ( 'List supermasters' ) . "</a></span> \n " ;
82
+ − 61
}
+ − 62
if ( $perm_zone_master_add ) {
+ − 63
echo " <span class= \" menuitem \" ><a href= \" add_zone_master.php \" >" . _ ( 'Add master zone' ) . "</a></span> \n " ;
13
+ − 64
}
82
+ − 65
if ( $perm_zone_slave_add ) {
+ − 66
echo " <span class= \" menuitem \" ><a href= \" add_zone_slave.php \" >" . _ ( 'Add slave zone' ) . "</a></span> \n " ;
+ − 67
}
104
+ − 68
if ( $perm_supermaster_add ) {
82
+ − 69
echo " <span class= \" menuitem \" ><a href= \" add_supermaster.php \" >" . _ ( 'Add supermaster' ) . "</a></span> \n " ;
+ − 70
}
+ − 71
echo " <span class= \" menuitem \" ><a href= \" change_password.php \" >" . _ ( 'Change password' ) . "</a></span> \n " ;
+ − 72
echo " <span class= \" menuitem \" ><a href= \" users.php \" >" . _ ( 'User administration' ) . "</a></span> \n " ;
+ − 73
echo " <span class= \" menuitem \" ><a href= \" index.php?logout \" >" . _ ( 'Logout' ) . "</a></span> \n " ;
+ − 74
echo " </div> <!-- /menu --> \n " ;
13
+ − 75
}
82
+ − 76
echo " <div class= \" content \" > \n " ;
13
+ − 77
+ − 78