inc/header.inc.php
author Peter Gervai <grin@grin.hu>
Fri, 14 Nov 2008 14:40:26 +0100
changeset 197 eabe847b2b65
parent 194 df674d004508
permissions -rw-r--r--
Added tag release_2.1.2 for changeset 1e24ee6c41e5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
71
e1b918eaf69a [feladat @ 118]
peter
parents: 47
diff changeset
     1
<?php
47
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
     2
119
f74e4f88b680 [feladat @ 222]
rejo
parents: 111
diff changeset
     3
/*  Poweradmin, a friendly web-based admin tool for PowerDNS.
47
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
     4
 *  See <https://rejo.zenger.nl/poweradmin> for more details.
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
     5
 *
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
     6
 *  Copyright 2007, 2008  Rejo Zenger <rejo@zenger.nl>
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
     7
 *
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
     8
 *  This program is free software: you can redistribute it and/or modify
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
     9
 *  it under the terms of the GNU General Public License as published by
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    10
 *  the Free Software Foundation, either version 3 of the License, or
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    11
 *  (at your option) any later version.
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    12
 *
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    13
 *  This program is distributed in the hope that it will be useful,
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    16
 *  GNU General Public License for more details.
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    17
 *
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    18
 *  You should have received a copy of the GNU General Public License
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    19
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    20
 */
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    21
136
c795dd75a77e [feladat @ 242]
rejo
parents: 126
diff changeset
    22
global $iface_style;
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    23
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    24
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    25
echo "<html>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    26
echo " <head>\n";
119
f74e4f88b680 [feladat @ 222]
rejo
parents: 111
diff changeset
    27
echo "  <title>Poweradmin</title>\n";
136
c795dd75a77e [feladat @ 242]
rejo
parents: 126
diff changeset
    28
echo "  <link rel=stylesheet href=\"style/" . $iface_style . ".inc.php\" type=\"text/css\">\n";
194
df674d004508 [feladat @ 307]
peter
parents: 144
diff changeset
    29
echo "  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n";
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    30
echo " </head>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    31
echo " <body>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    32
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    33
if(file_exists('inc/custom_header.inc.php')) {
13
2ff220cfde13 [feladat @ 60]
rejo
parents: 4
diff changeset
    34
	include('inc/custom_header.inc.php');
2ff220cfde13 [feladat @ 60]
rejo
parents: 4
diff changeset
    35
}
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    36
119
f74e4f88b680 [feladat @ 222]
rejo
parents: 111
diff changeset
    37
echo "  <h1>Poweradmin</h1>\n";
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    38
144
ad667d767a0a [feladat @ 250]
rejo
parents: 136
diff changeset
    39
if (file_exists('install')) {
ad667d767a0a [feladat @ 250]
rejo
parents: 136
diff changeset
    40
	error(ERR_INSTALL_DIR_EXISTS);
ad667d767a0a [feladat @ 250]
rejo
parents: 136
diff changeset
    41
	include('inc/footer.inc.php');
ad667d767a0a [feladat @ 250]
rejo
parents: 136
diff changeset
    42
	exit;
ad667d767a0a [feladat @ 250]
rejo
parents: 136
diff changeset
    43
} elseif (isset($_SESSION["userid"])) {
126
cb06e3e29ed8 [feladat @ 230]
peter
parents: 119
diff changeset
    44
	verify_permission('search') ? $perm_search = "1" : $perm_search = "0" ;
cb06e3e29ed8 [feladat @ 230]
peter
parents: 119
diff changeset
    45
	verify_permission('zone_content_view_own') ? $perm_view_zone_own = "1" : $perm_view_zone_own = "0" ;
cb06e3e29ed8 [feladat @ 230]
peter
parents: 119
diff changeset
    46
	verify_permission('zone_content_view_other') ? $perm_view_zone_other = "1" : $perm_view_zone_other = "0" ;
cb06e3e29ed8 [feladat @ 230]
peter
parents: 119
diff changeset
    47
	verify_permission('supermaster_view') ? $perm_supermaster_view = "1" : $perm_supermaster_view = "0" ;
cb06e3e29ed8 [feladat @ 230]
peter
parents: 119
diff changeset
    48
	verify_permission('zone_master_add') ? $perm_zone_master_add = "1" : $perm_zone_master_add = "0" ;
cb06e3e29ed8 [feladat @ 230]
peter
parents: 119
diff changeset
    49
	verify_permission('zone_slave_add') ? $perm_zone_slave_add = "1" : $perm_zone_slave_add = "0" ;
cb06e3e29ed8 [feladat @ 230]
peter
parents: 119
diff changeset
    50
	verify_permission('supermaster_add') ? $perm_supermaster_add = "1" : $perm_supermaster_add = "0" ;
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    51
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    52
	echo "    <div class=\"menu\">\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    53
	echo "    <span class=\"menuitem\"><a href=\"index.php\">" . _('Index') . "</a></span>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    54
	if ( $perm_search == "1" ) { 
111
0a2342a64b83 [feladat @ 211]
rejo
parents: 104
diff changeset
    55
		echo "    <span class=\"menuitem\"><a href=\"search.php\">" . _('Search zones and records') . "</a></span>\n"; 
13
2ff220cfde13 [feladat @ 60]
rejo
parents: 4
diff changeset
    56
	}
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    57
	if ( $perm_view_zone_own == "1" || $perm_view_zone_other == "1" ) { 
111
0a2342a64b83 [feladat @ 211]
rejo
parents: 104
diff changeset
    58
		echo "    <span class=\"menuitem\"><a href=\"list_zones.php\">" . _('List zones') . "</a></span>\n"; 
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    59
	}
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    60
	if ( $perm_supermaster_view ) { 
111
0a2342a64b83 [feladat @ 211]
rejo
parents: 104
diff changeset
    61
		echo "    <span class=\"menuitem\"><a href=\"list_supermasters.php\">" . _('List supermasters') . "</a></span>\n"; 
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    62
	}
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    63
	if (  $perm_zone_master_add ) { 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    64
		echo "    <span class=\"menuitem\"><a href=\"add_zone_master.php\">" . _('Add master zone') . "</a></span>\n"; 
13
2ff220cfde13 [feladat @ 60]
rejo
parents: 4
diff changeset
    65
	}
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    66
	if ( $perm_zone_slave_add ) { 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    67
		echo "    <span class=\"menuitem\"><a href=\"add_zone_slave.php\">" . _('Add slave zone') . "</a></span>\n"; 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    68
	}
104
7fef233c99df [feladat @ 204]
rejo
parents: 82
diff changeset
    69
	if ( $perm_supermaster_add ) { 
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    70
		echo "    <span class=\"menuitem\"><a href=\"add_supermaster.php\">" . _('Add supermaster') . "</a></span>\n"; 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    71
	}
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    72
	echo "    <span class=\"menuitem\"><a href=\"change_password.php\">" . _('Change password') . "</a></span>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    73
	echo "    <span class=\"menuitem\"><a href=\"users.php\">" . _('User administration') . "</a></span>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    74
	echo "    <span class=\"menuitem\"><a href=\"index.php?logout\">" . _('Logout') . "</a></span>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    75
	echo "    </div> <!-- /menu -->\n";
13
2ff220cfde13 [feladat @ 60]
rejo
parents: 4
diff changeset
    76
}
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    77
echo "    <div class=\"content\">\n";
13
2ff220cfde13 [feladat @ 60]
rejo
parents: 4
diff changeset
    78
2ff220cfde13 [feladat @ 60]
rejo
parents: 4
diff changeset
    79