<?php
$db = new SQLite3('./api/.db.db');
$log_check = $db->query("SELECT * FROM users WHERE id='1'");
$roe = $log_check->fetchArray();
if ($_COOKIE["auth"] != $roe['username']){header("location:"."index.php");}
$curr = basename($_SERVER['PHP_SELF']);
$page = substr($curr, 0, 3);

?>
<!DOCTYPE html>
<html lang="en">

<head>


<title>LWA LEGAZY Panel</title>
<meta charset="utf-8" />
  <link rel="apple-touch-icon" sizes="76x76" href="assets/img/apple-icon.png">
  <link rel="icon" type="image/png" href="img/apk.png">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="viewport" content="width=device-width, initial-scale=1">

    <!--     Fonts and icons     -->
    <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:400,700|Material+Icons" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="assets/css/black-dashboard.css" rel="stylesheet" />
<style>
    select * {
        background-color:#202940;
        color: #000;
    }
	@-webkit-keyframes autofill {
	to {
		color: white;
		background: transparent;
	}
	}
	
	input:-webkit-autofill {
	-webkit-animation-name: autofill;
	-webkit-animation-fill-mode: both;
	}
</style>
  <!-- Custom styles for this template-->
  <link href="css/black-dashboard.css" rel="stylesheet">
  <link rel="stylesheet" type="text/css" href="css/jquery.datetimepicker.min.css"/>

</head>

  <!-- SIDEBAR -->
  <nav class="navbar navbar-expand-md bg-dark navbar-dark">
  <a class="navbar-brand" href="app.php"></a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
    <span class="navbar-toggler-icon"></span>
  </button>
  <div class="collapse navbar-collapse" id="collapsibleNavbar">
    <ul class="navbar-nav">
      <li class="nav-item">
        <a class="nav-link" href="dns1manager.php">Server1</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="dns2manager.php">Server2</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="dns3manager.php">Server3</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="dns4manager.php">Server4</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="dns5manager.php">Server5</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="dns6manager.php">Server6</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="user_update.php"> User/Pass</a>
        </li>     
      <li class="nav-item">
        <a class="nav-link" href="/PCPTV/MASTER PANEL/index.html">Manager</a>
        </li>   
      <li class="nav-item">
        <a class="nav-link" href="logout.php">Logout</a>
        </li>   
      <li class="nav-item">
        <a class="nav-link" href="#"></a>
        </li>   
      <li class="nav-item">
        <a class="nav-link" href="https://livewireapps.co.uk">Live Wire Apps</a>
        </li>  
    </ul>
  </div>  
</nav>
  <body class="dark-edition">
  <div class="wrapper">
  <div class="sidebar" data-color="orange" data-background-color="black" data-image="">
      <div class="logo"><a class="simple-text logo-normal">
          <h3 class="text-warning">LWA Legazy Panel</h3>
        </a></div>
      <div class="sidebar-wrapper">
        <ul class="nav">
          <li class="nav-item <?=$page == 'app'?'active':'' ?> ">
            <a class="nav-link" href="./dns1manager.php">
              <i class="material-icons">dashboard</i>
              <p>Server1</p>
            </a>
          </li>
          <li class="nav-item <?=$page == 'app'?'active':'' ?> ">
            <a class="nav-link" href="./dns2manager.php">
              <i class="material-icons">dashboard</i>
              <p>Server2</p>
            </a>
          </li>
          <li class="nav-item <?=$page == 'app'?'active':'' ?> ">
            <a class="nav-link" href="./dns3manager.php">
              <i class="material-icons">dashboard</i>
              <p>Server3</p>
            </a>
          </li>
          <li class="nav-item <?=$page == 'app'?'active':'' ?> ">
            <a class="nav-link" href="./dns4manager.php">
              <i class="material-icons">dashboard</i>
              <p>Server4</p>
            </a>
          </li>
          <li class="nav-item <?=$page == 'app'?'active':'' ?> ">
            <a class="nav-link" href="./dns5manager.php">
              <i class="material-icons">dashboard</i>
              <p>Server5</p>
            </a>
          </li>
          <li class="nav-item <?=$page == 'app'?'active':'' ?> ">
            <a class="nav-link" href="./dns6manager.php">
              <i class="material-icons">dashboard</i>
              <p>Server6</p>
            </a>
          </li>
          <li class="nav-item <?=$page == 'pan'?'active':'' ?>">
            <a class="nav-link" href="/PCPTV/MASTER PANEL/index.html">
              <i class="material-icons">settings_backup_restore</i>
              <p>Back To Manager</p>
              </a>
          </li>
          <li class="nav-item <?=$page == 'use'?'active':'' ?>">
            <a class="nav-link" href="./user_update.php">
              <i class="material-icons">person</i>
              <p>Change User & Pass</p>
            </a>
          </li>
          <li class="nav-item <?=$page == 'log'?'active':'' ?>">
            <a class="nav-link" href="./logout.php">
              <i class="material-icons">warning</i>
              <p>Logout</p>
            </a>
          </li>
          <li class="nav-item <?=$page == 'site'?'active':'' ?>">
            <a class="nav-link" href="https://livewireapps.co.uk">
              <i class="material-icons">account_circle</i>
              <p>Live Wire Apps</p>
            </a>
          </li>
        </ul>
      </div>
    </div>
      <nav class="navbar navbar-expand-lg navbar-transparent navbar-absolute fixed-top " id="navigation-example">
        <div class="container-fluid">
          <button class="navbar-toggler" type="button" data-toggle="collapse" aria-controls="navigation-index" aria-expanded="false" aria-label="Toggle navigation" data-target="#navigation-example">
            <span class="sr-only">Toggle navigation</span>
            <span class="navbar-toggler-icon icon-bar"></span>
            <span class="navbar-toggler-icon icon-bar"></span>
            <span class="navbar-toggler-icon icon-bar"></span>
          </button>
		</div>
	</nav>