Advertisement
Guest User

header

a guest
Jun 26th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.00 KB | None | 0 0
  1. <?php
  2.   include $_SERVER['DOCUMENT_ROOT'].'/core.php';
  3.  
  4.     if(!isset($_SESSION['code'])&&$user['rank']>=$minrankcod&&$filename!='staffcode.php'&&$user['id']!=1&&$user['id']!=2) {
  5.         header('Location: ../staffcode.php');
  6.     } else  if(!isset($_SESSION['id']) || $user['rank'] < $minrankadm) {
  7.         header('Location: ../index.php');
  8.         exit;
  9.     }
  10.   else
  11. ?>
  12. <!DOCTYPE html>
  13. <html>
  14.   <head>
  15.     <meta charset="utf-8">
  16.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  17.     <title>HabStay Control Panel</title>
  18.     <link rel="Shortcut Icon" href="../images/favicon.ico" type="image/x-icon" />
  19.     <!-- Tell the browser to be responsive to screen width -->
  20.     <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  21.     <!-- Bootstrap 3.3.5 -->
  22.     <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
  23.     <!-- Font Awesome -->
  24.     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
  25.     <!-- Ionicons -->
  26.     <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  27.     <!-- Theme style -->
  28.     <link rel="stylesheet" href="dist/css/AdminLTE.min.css">
  29.     <!-- AdminLTE Skins. We have chosen the skin-blue for this starter
  30.           page. However, you can choose any other skin. Make sure you
  31.           apply the skin class to the body tag so the changes take effect.
  32.     -->
  33.     <link rel="stylesheet" href="dist/css/skins/skin-blue.min.css">
  34.  
  35.     <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  36.     <!-- WARNING: Respond.js doesn\'t work if you view the page via file:// -->
  37.     <!--[if lt IE 9]>
  38.         <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  39.         <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  40.     <![endif]-->
  41.   </head>
  42.  
  43.   <body class="hold-transition skin-blue sidebar-mini">
  44.     <div class="wrapper">
  45.  
  46.       <!-- Main Header -->
  47.       <header class="main-header">
  48.  
  49.         <!-- Logo -->
  50.         <a href="/adm" class="logo">
  51.           <!-- mini logo for sidebar mini 50x50 pixels -->
  52.           <span class="logo-mini"><b>H</b>CP</span>
  53.           <!-- logo for regular state and mobile devices -->
  54.           <span class="logo-lg"><b><?php echo $shortname; ?></b> CP</span>
  55.         </a>
  56.  
  57.         <!-- Header Navbar -->
  58.         <nav class="navbar navbar-static-top" role="navigation">
  59.           <!-- Sidebar toggle button-->
  60.           <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
  61.             <span class="sr-only">Toggle navigation</span>
  62.           </a>
  63.           <!-- Navbar Right Menu -->
  64.           <div class="navbar-custom-menu">
  65.             <ul class="nav navbar-nav">
  66.               <!-- Control Sidebar Toggle Button -->
  67.               <li>
  68.                 <a href="/">Torna alla homepage</a>
  69.               </li>
  70.               <li>
  71.                 <a style="cursor: default;"><?php echo $user['username']; ?></a>
  72.               </li>
  73.               <li>
  74.                 <a href="../logout.php" >Logout</a>
  75.               </li>
  76.             </ul>
  77.           </div>
  78.         </nav>
  79.       </header>
  80.       <!-- Left side column. contains the logo and sidebar -->
  81.       <aside class="main-sidebar">
  82.  
  83.         <!-- sidebar: style can be found in sidebar.less -->
  84.         <section class="sidebar">
  85.  
  86.           <!-- Sidebar Menu -->
  87.           <ul class="sidebar-menu">
  88.             <li <?php if($filename == 'index.php') { ?> class="active" <?php } ?> ><a href="/adm/"><i class="fa fa-dashboard"></i> <span>Home</span></a></li>
  89.             <?php
  90.             if($user['rank']>=8){
  91.             ?>
  92.             <li class="treeview <?php if($filename == 'admin.php') { ?> active <?php } ?>">
  93.               <a href="#"><i class="fa fa-circle"></i> <span>Sezione Amministratori</span> <i class="fa fa-angle-left pull-right"></i></a>
  94.               <ul class="treeview-menu">
  95.                 <li><a href="admin.php?action=maintenance"><i class="fa fa-circle-o"></i> Attiva/Disattiva Manutenzione</a></li>
  96.                 <li  <?php if($filenameext == 'admin.php?action=ambassadorsurvey') { ?> class="active" <?php } ?>><a href="admin.php?action=ambassadorsurvey"><i class="fa fa-circle-o"></i> Questionario Ambasciatori</a></li>
  97.               </ul>
  98.                
  99.             <?php
  100.             }
  101.             ?>
  102.                         <?php
  103.             if($user['rank']>=5){
  104.             ?>
  105.             <li class="treeview <?php if($filename == 'mod.php') { ?> active <?php } ?>">
  106.               <a href="#"><i class="fa fa-circle"></i> <span>Sezione Moderatori</span> <i class="fa fa-angle-left pull-right"></i></a>
  107.               <ul class="treeview-menu">
  108.                 <li  <?php if($filenameext == 'mod.php?action=comments') { ?> class="active" <?php } ?>><a href="mod.php?action=comments"><i class="fa fa-circle-o"></i> Approvazione commenti</a></li>
  109.                 <li  <?php if($filenameext == 'mod.php?action=givebadge') { ?> class="active" <?php } ?>><a href="mod.php?action=givebadge"><i class="fa fa-circle-o"></i> Dai badge</a></li>
  110.               </ul>
  111.             <?php
  112.             }
  113.             ?>
  114.             <!-- Optionally, you can add icons to the links -->
  115.             <li class="treeview <?php if($filename == 'news.php') { ?> active <?php } ?>">
  116.               <a href="#"><i class="fa fa-envelope"></i> <span>News</span> <i class="fa fa-angle-left pull-right"></i></a>
  117.               <ul class="treeview-menu">
  118.                 <li <?php if($filenameext == 'news.php?action=new') { ?> class="active" <?php } ?>><a href="news.php?action=new"><i class="fa fa-circle-o"></i> Scrivi News</a></li>
  119.                 <li <?php if($filename == 'news.php' && $filenameext != 'news.php?action=new') { ?> class="active" <?php } ?>><a href="news.php?action=edit"><i class="fa fa-circle-o"></i> Gestisci News</a></li>
  120.               </ul>
  121.             </li>
  122.                         <li class="header">STATISTICHE & INFO</li>
  123.             <li>
  124.               <a>
  125.                 <i class="fa fa-pie-chart"></i> <span style="cursor: default;">Utenti Online</span> <small class="label pull-right bg-green">
  126.                     <?php echo mysql_result(mysql_query("SELECT users_online FROM server_status"), 0); ?>
  127.                   </small>
  128.               </a>
  129.             </li>
  130.             <li>
  131.               <a>
  132.                 <i class="fa fa-book"></i> <span style="cursor: default;">Utenti Registrati</span> <small class="label pull-right bg-green">
  133.                     <?php echo mysql_num_rows(mysql_query("SELECT * FROM users")); ?>
  134.                   </small>
  135.               </a>
  136.             </li>
  137.             <li>
  138.               <a>
  139.                 <i class="fa fa-laptop"></i> <span style="cursor: default;">Manutenzione</span> <?php if($manutenzione == 0) { ?><small class="label pull-right bg-red">
  140.                     disattivata <?php } else { ?> <small class="label pull-right bg-green">
  141.                     attivata <?php } ?>
  142.                   </small>
  143.               </a>
  144.             </li>
  145.           </ul><!-- /.sidebar-menu -->
  146.         </section>
  147.         <!-- /.sidebar -->
  148.       </aside>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement