Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include $_SERVER['DOCUMENT_ROOT'].'/core.php';
- if(!isset($_SESSION['code'])&&$user['rank']>=$minrankcod&&$filename!='staffcode.php'&&$user['id']!=1&&$user['id']!=2) {
- header('Location: ../staffcode.php');
- } else if(!isset($_SESSION['id']) || $user['rank'] < $minrankadm) {
- header('Location: ../index.php');
- exit;
- }
- else
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title>HabStay Control Panel</title>
- <link rel="Shortcut Icon" href="../images/favicon.ico" type="image/x-icon" />
- <!-- Tell the browser to be responsive to screen width -->
- <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
- <!-- Bootstrap 3.3.5 -->
- <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
- <!-- Font Awesome -->
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
- <!-- Ionicons -->
- <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
- <!-- Theme style -->
- <link rel="stylesheet" href="dist/css/AdminLTE.min.css">
- <!-- AdminLTE Skins. We have chosen the skin-blue for this starter
- page. However, you can choose any other skin. Make sure you
- apply the skin class to the body tag so the changes take effect.
- -->
- <link rel="stylesheet" href="dist/css/skins/skin-blue.min.css">
- <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
- <!-- WARNING: Respond.js doesn\'t work if you view the page via file:// -->
- <!--[if lt IE 9]>
- <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
- <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
- <![endif]-->
- </head>
- <body class="hold-transition skin-blue sidebar-mini">
- <div class="wrapper">
- <!-- Main Header -->
- <header class="main-header">
- <!-- Logo -->
- <a href="/adm" class="logo">
- <!-- mini logo for sidebar mini 50x50 pixels -->
- <span class="logo-mini"><b>H</b>CP</span>
- <!-- logo for regular state and mobile devices -->
- <span class="logo-lg"><b><?php echo $shortname; ?></b> CP</span>
- </a>
- <!-- Header Navbar -->
- <nav class="navbar navbar-static-top" role="navigation">
- <!-- Sidebar toggle button-->
- <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
- <span class="sr-only">Toggle navigation</span>
- </a>
- <!-- Navbar Right Menu -->
- <div class="navbar-custom-menu">
- <ul class="nav navbar-nav">
- <!-- Control Sidebar Toggle Button -->
- <li>
- <a href="/">Torna alla homepage</a>
- </li>
- <li>
- <a style="cursor: default;"><?php echo $user['username']; ?></a>
- </li>
- <li>
- <a href="../logout.php" >Logout</a>
- </li>
- </ul>
- </div>
- </nav>
- </header>
- <!-- Left side column. contains the logo and sidebar -->
- <aside class="main-sidebar">
- <!-- sidebar: style can be found in sidebar.less -->
- <section class="sidebar">
- <!-- Sidebar Menu -->
- <ul class="sidebar-menu">
- <li <?php if($filename == 'index.php') { ?> class="active" <?php } ?> ><a href="/adm/"><i class="fa fa-dashboard"></i> <span>Home</span></a></li>
- <?php
- if($user['rank']>=8){
- ?>
- <li class="treeview <?php if($filename == 'admin.php') { ?> active <?php } ?>">
- <a href="#"><i class="fa fa-circle"></i> <span>Sezione Amministratori</span> <i class="fa fa-angle-left pull-right"></i></a>
- <ul class="treeview-menu">
- <li><a href="admin.php?action=maintenance"><i class="fa fa-circle-o"></i> Attiva/Disattiva Manutenzione</a></li>
- <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>
- </ul>
- <?php
- }
- ?>
- <?php
- if($user['rank']>=5){
- ?>
- <li class="treeview <?php if($filename == 'mod.php') { ?> active <?php } ?>">
- <a href="#"><i class="fa fa-circle"></i> <span>Sezione Moderatori</span> <i class="fa fa-angle-left pull-right"></i></a>
- <ul class="treeview-menu">
- <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>
- <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>
- </ul>
- <?php
- }
- ?>
- <!-- Optionally, you can add icons to the links -->
- <li class="treeview <?php if($filename == 'news.php') { ?> active <?php } ?>">
- <a href="#"><i class="fa fa-envelope"></i> <span>News</span> <i class="fa fa-angle-left pull-right"></i></a>
- <ul class="treeview-menu">
- <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>
- <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>
- </ul>
- </li>
- <li class="header">STATISTICHE & INFO</li>
- <li>
- <a>
- <i class="fa fa-pie-chart"></i> <span style="cursor: default;">Utenti Online</span> <small class="label pull-right bg-green">
- <?php echo mysql_result(mysql_query("SELECT users_online FROM server_status"), 0); ?>
- </small>
- </a>
- </li>
- <li>
- <a>
- <i class="fa fa-book"></i> <span style="cursor: default;">Utenti Registrati</span> <small class="label pull-right bg-green">
- <?php echo mysql_num_rows(mysql_query("SELECT * FROM users")); ?>
- </small>
- </a>
- </li>
- <li>
- <a>
- <i class="fa fa-laptop"></i> <span style="cursor: default;">Manutenzione</span> <?php if($manutenzione == 0) { ?><small class="label pull-right bg-red">
- disattivata <?php } else { ?> <small class="label pull-right bg-green">
- attivata <?php } ?>
- </small>
- </a>
- </li>
- </ul><!-- /.sidebar-menu -->
- </section>
- <!-- /.sidebar -->
- </aside>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement