inc/header.inc.php
author rejo
Wed, 26 Mar 2008 14:56:43 +0000
changeset 91 f6c1336dbef8
parent 82 c255196bc447
child 104 7fef233c99df
permissions -rw-r--r--
[feladat @ 191] Bugfix. Syntax problem in debug_print function.
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
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
     3
/*  PowerAdmin, a friendly web-based admin tool for PowerDNS.
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
13
2ff220cfde13 [feladat @ 60]
rejo
parents: 4
diff changeset
    22
global $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";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    27
echo "  <title>PowerAdmin</title>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    28
echo "  <link rel=stylesheet href=\"style/" . $STYLE . ".inc.php\" type=\"text/css\">\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    29
echo " </head>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    30
echo " <body>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    31
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    32
if(file_exists('inc/custom_header.inc.php')) {
13
2ff220cfde13 [feladat @ 60]
rejo
parents: 4
diff changeset
    33
	include('inc/custom_header.inc.php');
2ff220cfde13 [feladat @ 60]
rejo
parents: 4
diff changeset
    34
}
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    35
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    36
echo "  <h1>PowerAdmin</h1>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    37
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    38
if (isset($_SESSION["userid"])) {
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    39
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    40
	verify_permission(search) ? $perm_search = "1" : $perm_search = "0" ;
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    41
	verify_permission(zone_content_view_own) ? $perm_view_zone_own = "1" : $perm_view_zone_own = "0" ;
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    42
	verify_permission(zone_content_view_other) ? $perm_view_zone_other = "1" : $perm_view_zone_other = "0" ;
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    43
	verify_permission(supermaster_view) ? $perm_supermaster_view = "1" : $perm_supermaster_view = "0" ;
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    44
	verify_permission(zone_master_add) ? $perm_zone_master_add = "1" : $perm_zone_master_add = "0" ;
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    45
	verify_permission(zone_slave_add) ? $perm_zone_slave_add = "1" : $perm_zone_slave_add = "0" ;
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    46
	verify_permission(supermaster_add) ? $perm_supermaster_add = "1" : $perm_supermaster_add = "0" ;
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    47
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    48
	echo "    <div class=\"menu\">\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    49
	echo "    <span class=\"menuitem\"><a href=\"index.php\">" . _('Index') . "</a></span>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    50
	if ( $perm_search == "1" ) { 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    51
		echo "    <span class=\"menuitem\"><a href=\"search.php\">" . _('Search zones or records') . "</a></span>\n"; 
13
2ff220cfde13 [feladat @ 60]
rejo
parents: 4
diff changeset
    52
	}
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    53
	if ( $perm_view_zone_own == "1" || $perm_view_zone_other == "1" ) { 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    54
		echo "    <span class=\"menuitem\"><a href=\"list_zones.php\">" . _('List all zones') . "</a></span>\n"; 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    55
	}
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    56
	if ( $perm_supermaster_view ) { 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    57
		echo "    <span class=\"menuitem\"><a href=\"list_supermasters.php\">" . _('List all supermasters') . "</a></span>\n"; 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    58
	}
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    59
	if (  $perm_zone_master_add ) { 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    60
		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
    61
	}
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    62
	if ( $perm_zone_slave_add ) { 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    63
		echo "    <span class=\"menuitem\"><a href=\"add_zone_slave.php\">" . _('Add slave zone') . "</a></span>\n"; 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    64
	}
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    65
	if ( $supermaster_add ) { 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    66
		echo "    <span class=\"menuitem\"><a href=\"add_supermaster.php\">" . _('Add supermaster') . "</a></span>\n"; 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    67
	}
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    68
	echo "    <span class=\"menuitem\"><a href=\"change_password.php\">" . _('Change password') . "</a></span>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    69
	echo "    <span class=\"menuitem\"><a href=\"users.php\">" . _('User administration') . "</a></span>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    70
	echo "    <span class=\"menuitem\"><a href=\"index.php?logout\">" . _('Logout') . "</a></span>\n";
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    71
	echo "    </div> <!-- /menu -->\n";
13
2ff220cfde13 [feladat @ 60]
rejo
parents: 4
diff changeset
    72
}
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    73
echo "    <div class=\"content\">\n";
13
2ff220cfde13 [feladat @ 60]
rejo
parents: 4
diff changeset
    74
2ff220cfde13 [feladat @ 60]
rejo
parents: 4
diff changeset
    75
  
2ff220cfde13 [feladat @ 60]
rejo
parents: 4
diff changeset
    76