<?php 
if (Wo_IsAdmin($wo['user']['user_id']) === false) {
    header("Location: " . $wo['config']['site_url']);
    exit();
}
$page = 'dashboard';
$pages_array = array(
   'dashboard',
   'general_setting',
   'site_setting',
   'social_login',
   'manage_users',
   'manage_pages',
   'manage_posts',
   'manage_groups',
   'manage_reports',
   'verifications_requests',
   'themes',
   'announcement',
   'banned_ip',
   'ads',
   'mailing_list',
   'cache',
   'games',
   'design',
   'terms'
   );
if (!empty($_GET['page'])) {
   if (in_array($_GET['page'], $pages_array)) {
      $page = $_GET['page'];
   }
}
?>
<div class="page-margin">
  <?php if (is_dir('install')) { ?>
  <div class="alert alert-danger">
    <i class="fa fa-fw fa-exclamation-triangle"></i> <strong>Important !</strong>Please delete the install folder for security reasons.
  </div>
  <?php } ?>
   <div class="row admin-panel">
      <div class="col-md-3">
         <ul class="list-group">
            <li class="list-group-item black-list <?php echo ($page == 'dashboard') ? 'active-list': '';?>"><a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=dashboard');?>"><i class="fa fa-fw fa-bar-chart"></i> <?php echo $wo['lang']['dashboard'];?></a></li>
            <li class="list-group-item black-list <?php echo ($page == 'general_setting') ? 'active-list': '';?>"><a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=general_setting');?>"><i class="fa fa-fw fa-cog"></i> <?php echo $wo['lang']['general_setting'];?></a></li>
            <li class="list-group-item black-list <?php echo ($page == 'site_setting') ? 'active-list': '';?>"><a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=site_setting');?>"><i class="fa fa-fw fa-wrench"></i> <?php echo $wo['lang']['site_setting'];?></a></li>
            <li class="list-group-item black-list <?php echo ($page == 'social_login') ? 'active-list': '';?>"><a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=social_login');?>"><i class="fa fa-fw fa-share-square"></i> <?php echo $wo['lang']['social_login'];?></a></li>
            <li class="list-group-item black-list <?php echo ($page == 'manage_users') ? 'active-list users': '';?>"><a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=manage_users');?>"><i class="fa fa-fw fa-user"></i> <?php echo $wo['lang']['users'];?></a></li>
            <li class="list-group-item black-list <?php echo ($page == 'manage_pages') ? 'active-list pages': '';?>"><a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=manage_pages');?>"><i class="fa fa-fw fa-flag"></i> <?php echo $wo['lang']['pages'];?></a></li>
            <li class="list-group-item black-list <?php echo ($page == 'manage_groups') ? 'active-list groups': '';?>"><a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=manage_groups');?>"><i class="fa fa-fw fa-users"></i> <?php echo $wo['lang']['groups'];?></a></li>
            <li class="list-group-item black-list <?php echo ($page == 'manage_posts') ? 'active-list posts': '';?>"><a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=manage_posts');?>"><i class="fa fa-fw fa-pencil"></i> <?php echo $wo['lang']['posts'];?></a></li>
            <li class="list-group-item black-list <?php echo ($page == 'games') ? 'active-list': '';?>"><a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=games');?>"><i class="fa fa-fw fa-gamepad"></i> <?php echo $wo['lang']['games'];?></a></li>
            <li class="list-group-item black-list <?php echo ($page == 'manage_reports') ? 'active-list': '';?>">
               <a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=manage_reports');?>">
                  <i class="fa fa-fw fa-exclamation-triangle"></i> <?php echo $wo['lang']['reports'];?> 
                  <?php 
                     $reports = Wo_CountUnseenReports();
                     if ($reports > 0) { ?>
                  <div class="report-not-seen <?php echo Wo_RightToLeft('pull-right');?>"><?php echo $reports;?></div>
                  <?php } ?>
               </a>
            </li>
            <li class="list-group-item black-list <?php echo ($page == 'themes') ? 'active-list': '';?>"><a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=themes');?>"><i class="fa fa-fw fa-desktop"></i> <?php echo $wo['lang']['themes'];?></a></li>
            <li class="list-group-item black-list <?php echo ($page == 'design') ? 'active-list': '';?>"><a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=design');?>"><i class="fa fa-fw fa-paint-brush"></i> <?php echo $wo['lang']['design'];?></a></li>
            <li class="list-group-item black-list <?php echo ($page == 'verifications_requests') ? 'active-list': '';?>">
               <a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=verifications_requests');?>">
                  <i class="fa fa-fw fa-check-circle"></i><?php echo $wo['lang']['verifications_requests'];?>
                  <?php 
                     $reports = Wo_CountUnseenVerifications();
                     if ($reports > 0) { ?>
                  <div class="report-not-seen <?php echo Wo_RightToLeft('pull-right');?>"><?php echo $reports;?></div>
                  <?php } ?>
               </a>
            </li>
            <li class="list-group-item black-list <?php echo ($page == 'banned_ip') ? 'active-list': '';?>"><a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=banned_ip');?>"><i class="fa fa-fw fa-user-times"></i> <?php echo $wo['lang']['ban_user'];?></a></li>
            <li class="list-group-item black-list <?php echo ($page == 'announcement') ? 'active-list': '';?>"><a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=announcement');?>"><i class="fa fa-fw fa-bullhorn"></i> <?php echo $wo['lang']['announcement'];?></a></li>
            <li class="list-group-item black-list <?php echo ($page == 'ads') ? 'active-list': '';?>"><a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=ads');?>"><i class="fa fa-fw fa-usd"></i> <?php echo $wo['lang']['advertisement'];?></a></li>
            <li class="list-group-item black-list <?php echo ($page == 'mailing_list') ? 'active-list': '';?>"><a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=mailing_list');?>"><i class="fa fa-fw fa-envelope-o"></i> <?php echo $wo['lang']['mailing_users'];?></a></li>
            <li class="list-group-item black-list <?php echo ($page == 'terms') ? 'active-list': '';?>"><a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=terms');?>"><i class="fa fa-fw fa-bars"></i> <?php echo $wo['lang']['terms'];?></a></li>
            <li class="list-group-item black-list <?php echo ($page == 'cache') ? 'active-list': '';?>"><a href="<?php echo Wo_SeoLink('index.php?tab1=admincp&page=cache');?>"><i class="fa fa-fw fa-database"></i> <?php echo $wo['lang']['cache'];?></a></li>
         </ul>
      </div>
      <div class="col-md-9">
         <?php echo Wo_LoadPage("admin/{$page}/content"); ?>
      </div>
   </div>
</div>