inc/header.inc.php
changeset 82 c255196bc447
parent 71 e1b918eaf69a
child 104 7fef233c99df
equal deleted inserted replaced
81:c72d6d51f3d3 82:c255196bc447
    18  *  You should have received a copy of the GNU General Public License
    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/>.
    19  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    20  */
    20  */
    21 
    21 
    22 global $STYLE;
    22 global $STYLE;
    23 ?>
    23 
    24 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    24 echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n";
    25 <html>
    25 echo "<html>\n";
    26  <head>
    26 echo " <head>\n";
    27   <title><?php echo _('Poweradmin'); ?></title>
    27 echo "  <title>PowerAdmin</title>\n";
    28   <link rel=stylesheet href="style/<?php echo $STYLE; ?>.inc.php" type="text/css">
    28 echo "  <link rel=stylesheet href=\"style/" . $STYLE . ".inc.php\" type=\"text/css\">\n";
    29  </head>
    29 echo " </head>\n";
    30  <body>
    30 echo " <body>\n";
    31 <?php
    31 
    32 if(file_exists('inc/custom_header.inc.php')) 
    32 if(file_exists('inc/custom_header.inc.php')) {
    33 {
       
    34 	include('inc/custom_header.inc.php');
    33 	include('inc/custom_header.inc.php');
    35 }
    34 }
    36 ?>
    35 
    37   <h1><?php echo _('Poweradmin'); ?></h1> 
    36 echo "  <h1>PowerAdmin</h1>\n";
    38 <?php
    37 
    39 if (isset($_SESSION["userid"]))
    38 if (isset($_SESSION["userid"])) {
    40 {
    39 
    41 ?>
    40 	verify_permission(search) ? $perm_search = "1" : $perm_search = "0" ;
    42   
    41 	verify_permission(zone_content_view_own) ? $perm_view_zone_own = "1" : $perm_view_zone_own = "0" ;
    43 	  <div class="menu">
    42 	verify_permission(zone_content_view_other) ? $perm_view_zone_other = "1" : $perm_view_zone_other = "0" ;
    44 	   <span class="menuitem"><a href="index.php"><?php echo _('Index'); ?></a></span>
    43 	verify_permission(supermaster_view) ? $perm_supermaster_view = "1" : $perm_supermaster_view = "0" ;
    45 	   <span class="menuitem"><a href="search.php"><?php echo _('Search zones or records'); ?></a></span>
    44 	verify_permission(zone_master_add) ? $perm_zone_master_add = "1" : $perm_zone_master_add = "0" ;
    46 	   <span class="menuitem"><a href="list_zones.php"><?php echo _('List all zones'); ?></a></span>
    45 	verify_permission(zone_slave_add) ? $perm_zone_slave_add = "1" : $perm_zone_slave_add = "0" ;
    47 	<?php
    46 	verify_permission(supermaster_add) ? $perm_supermaster_add = "1" : $perm_supermaster_add = "0" ;
    48 	if (level(5))
    47 
    49 	{
    48 	echo "    <div class=\"menu\">\n";
    50 	?>
    49 	echo "    <span class=\"menuitem\"><a href=\"index.php\">" . _('Index') . "</a></span>\n";
    51 	   <span class="menuitem"><a href="list_supermasters.php"><?php echo _('List all supermasters'); ?></a></span>
    50 	if ( $perm_search == "1" ) { 
    52 	   <span class="menuitem"><a href="add_zone_master.php"><?php echo _('Add master zone'); ?></a></span>
    51 		echo "    <span class=\"menuitem\"><a href=\"search.php\">" . _('Search zones or records') . "</a></span>\n"; 
    53 	   <span class="menuitem"><a href="add_zone_slave.php"><?php echo _('Add slave zone'); ?></a></span>
       
    54 	   <span class="menuitem"><a href="add_supermaster.php"><?php echo _('Add supermaster'); ?></a></span>
       
    55 	<?php
       
    56 	}
    52 	}
    57 	?>
    53 	if ( $perm_view_zone_own == "1" || $perm_view_zone_other == "1" ) { 
    58 	   <span class="menuitem"><a href="change_password.php"><?php echo _('Change password'); ?></a></span>
    54 		echo "    <span class=\"menuitem\"><a href=\"list_zones.php\">" . _('List all zones') . "</a></span>\n"; 
    59 	<?php
       
    60 	if (level(10))
       
    61 	{
       
    62 	?>
       
    63 	   <span class="menuitem"><a href="users.php"><?php echo _('User administration'); ?></a></span>
       
    64 	<?php
       
    65 	}
    55 	}
    66 	?>
    56 	if ( $perm_supermaster_view ) { 
    67 	   <span class="menuitem"><a href="index.php?logout"><?php echo _('Logout'); ?></a></span>
    57 		echo "    <span class=\"menuitem\"><a href=\"list_supermasters.php\">" . _('List all supermasters') . "</a></span>\n"; 
    68 
    58 	}
    69 	  </div> <!-- /menu -->
    59 	if (  $perm_zone_master_add ) { 
    70 <?php
    60 		echo "    <span class=\"menuitem\"><a href=\"add_zone_master.php\">" . _('Add master zone') . "</a></span>\n"; 
       
    61 	}
       
    62 	if ( $perm_zone_slave_add ) { 
       
    63 		echo "    <span class=\"menuitem\"><a href=\"add_zone_slave.php\">" . _('Add slave zone') . "</a></span>\n"; 
       
    64 	}
       
    65 	if ( $supermaster_add ) { 
       
    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";
    71 }
    72 }
    72 ?>
    73 echo "    <div class=\"content\">\n";
    73   <div class="content">
       
    74 
    74 
    75   
    75   
    76 
    76