<?php
 //gets filename from url
$file = $_SERVER['PHP_SELF'];
$break = Explode('/', $file);
$file = $break[count($break) - 1];
$extension = strrchr($file, ".");
$file = substr($file, 0, -strlen($extension));
$serverRoot=serverRoot;

?>
<STYLE type=text/css>BODY {
    BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0px; BACKGROUND-COLOR: white; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; HEIGHT: 100%; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0px
}
</STYLE>  
 <IMG style="FLOAT: left" 
      border=0 alt="Center for Government Interoperability - Gov Ideas" 
      src="<?php echo $serverRoot.'images/cloud.jpg'; ?>" width=100% height=96>
      
   <TABLE border=0 cellSpacing=0 cellPadding=0 width="100%" background=images/cloud.jpg bgColor=#000000>
  <TBODY>
  <TR> 

  <?php if($session->logged_in && $session->userlevel==2) {        ?> 
    <TD height=20 background=images/black_dot.gif width="5%" colSpan=3 align=middle><FONT color=#cccccc>
        <A class=charcoalHeader href="<?php echo $serverRoot.'index.php'; ?>">Home</A></FONT></TD> 
     <TD height=20 background=images/black_dot.gif width="5%" align=middle>
      <DIV align=center><FONT color=#cccccc><A class=charcoalHeader href="<?php echo $serverRoot.'admin/suggestions.php'; ?>">Latest Suggestions</A></FONT></DIV></TD>    
   <TD height=20 background=images/black_dot.gif width="5%" align=middle>
      <DIV align=center><FONT color=#cccccc><A class=charcoalHeader href="<?php echo $serverRoot.'admin/appList.php'; ?>">Browse Suggestions</A></FONT></DIV></TD>
     
    <?php } ?>
    
   <?php if($session->logged_in && $session->userlevel==1) {        ?> 
   
   <TD height=20 background=images/black_dot.gif width="5%" colSpan=3 align=middle><FONT color=#cccccc>
        <A class=charcoalHeader href="<?php echo $serverRoot.'index.php'; ?>">Home</A></FONT></TD> 
    <TD height=20 background=images/black_dot.gif width="5%" align=middle>
      <DIV align=center><FONT color=#cccccc><A class=charcoalHeader href="<?php echo $serverRoot.'admin/appList.php'; ?>">Browse Suggestions</A></FONT></DIV></TD>
    <TD height=20 background=images/black_dot.gif width="5%" align=middle>
      <DIV align=center><FONT color=#cccccc><A class=charcoalHeader href="<?php echo $serverRoot.'super-admin/organization.php'; ?>">Manage Organizations</A></FONT></DIV></TD>
    <TD height=20 background=images/black_dot.gif width="5%" align=middle>
      <DIV align=center><FONT color=#cccccc><A class=charcoalHeader href="<?php echo $serverRoot.'super-admin/app.php'; ?>">Manage Applications</A></FONT></DIV></TD>
    <TD height=20 background=images/black_dot.gif width="5%" align=middle>
      <DIV align=center><FONT color=#cccccc><A class=charcoalHeader href="<?php echo $serverRoot.'super-admin/user.php'; ?>">Manage Admins</A></FONT></DIV></TD>
    <TD height=20 background=images/black_dot.gif width="5%" align=middle>
      <DIV align=center><FONT color=#cccccc><A class=charcoalHeader href="<?php echo $serverRoot.'super-admin/permission.php'; ?>">Manage Permissions</A></FONT></DIV></TD>
    <TD height=20 background=images/black_dot.gif width="5%" align=middle>
      <DIV align=center><FONT color=#cccccc><A class=charcoalHeader href="<?php echo $serverRoot.'super-admin/setting.php'; ?>">Manage Settings</A></FONT></DIV></TD>
     
    <?php } ?> 
    <?php if($session->logged_in) {        ?> 
     <TD height=20 background=images/black_dot.gif width="5%" align=middle>
      <DIV align=center><FONT color=#cccccc><A class=charcoalHeader href="<?php echo $serverRoot."admin/account.php"; ?>">My Account</A></FONT></DIV></TD>
      
      <TD height=20 background=images/black_dot.gif width="5%" align=middle>
      <DIV align=center><FONT color=#cccccc><A class=charcoalHeader href="<?php echo $serverRoot."process.php"; ?>">LOGOUT</A></FONT></DIV></TD>
    <?php } ?>  
   </TR></TBODY></TABLE>
<P></P>

<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%" align=left>
  <TBODY>
  <TR> 
    <TD 
    style="BORDER-BOTTOM: hidden; PADDING-BOTTOM: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 20px; BORDER-RIGHT: hidden; PADDING-TOP: 0px" 
    bgColor=#ffffff vAlign=top width=182><!--------------------------------->
      
      
    
      <UL id=menu2>
      <?php if($session->logged_in) echo "<br><font color='red'>Current user:<br> ( ".$session->username." )</font>";   ?> 
<?php if($session->logged_in) {
        
            switch ($file){ //seperate sub menus for each page
            
                case 'setting':
                echo "<LI><A href='$serverRoot"."super-admin/setting.php'>Manage Categories</A></LI>";
                echo "<LI><A href='$serverRoot"."super-admin/setting.php?page=config'>Display Setting</A></LI>";
                echo "<LI><A href='$serverRoot"."super-admin/setting.php?page=mail'>Mail Settings</A></LI>"; 
                echo "<LI><A href='$serverRoot"."super-admin/setting.php?page=testMail'>Test Mail Settings</A></LI>";
                break;
                
                case 'account':
                echo "<LI><A href='$serverRoot"."admin/account.php'>Update Account</A></LI>";
                echo "<LI><A href='$serverRoot"."admin/account.php?page=changePass'>Change Password</A></LI>";
                break;
            }
 }
      else { ?>
      <LI><A href="<?php echo $serverRoot.'login.php'; ?>">LOGIN</A></LI> 
<?php } ?>
       </UL>
    </TD>
  
    
    
    
    
    
    
    <!--------------------------------->
    <TD bgColor=#ffffff vAlign=top width=1077><!-- #BeginEditable "put%20main%20content%20here" --> 
      <DIV style="CLEAR: both"></DIV><!-- #EndEditable -->
     