<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>iLink | Dashboard</title>
    <!-- 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.7 -->
    <link rel="stylesheet" href="<?= base_url('bower_components/bootstrap/dist/css/bootstrap.min.css') ?>">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="<?= base_url('bower_components/font-awesome/css/font-awesome.min.css') ?>">
    <!-- Ionicons -->
    <link rel="stylesheet" href="<?= base_url('bower_components/Ionicons/css/ionicons.min.css') ?>">
    <!-- Theme style -->
    <link rel="stylesheet" href="<?= base_url('dist/css/AdminLTE.css') ?>">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="<?= base_url('dist/css/skins/_all-skins.min.css') ?>">
    <link rel="shortcut icon" href="<?= base_url('favicon.ico') ?>" type="image/x-icon">
    <link rel="icon" href="<?= base_url('favicon.ico') ?>" type="image/x-icon">

    <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>

    <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>

    <style media="screen">
        .img-dash {
            height: 50px !important;
            float: left !important;
            padding: 1% !important;
        }

        .table_modified {
            font-size: 11px !important;
        }

    </style>
</head>

<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

    <header class="main-header">
        <!-- Logo -->
        <a href="#" class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->
            <span class="logo-mini"><b>iLink</b></span>
            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg">
                    <img class="img img-responsive img-dash" src="<?= base_url('images/logo.png') ?>">
                    <b>iLink</b> World
                </span>
        </a>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>
            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <!-- User Account: style can be found in dropdown.less -->
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <?= $this->lang->line('Bienvenue'); ?>  <span class="hidden-xs"><b><?= $this->session->userdata('firstname').' '.$this->session->userdata('lastname');?></b></span>
                        </a>
                        <ul class="dropdown-menu">
                            <!-- User image -->
                            <li class="user-header">
                                <p>
                                    <?= $this->lang->line('administrateur'); ?>
                                    <small><?= $this->session->userdata('email');?></small>
                                </p>
                            </li>
                            <!-- Menu Footer-->
                            <li class="user-footer">
                                <div class="pull-left">
                                    <a href="<?= base_url('Admin_dash/filter') ?>" class="btn btn-default btn-flat"><?= $this->lang->line('Terminer'); ?></a>
                                </div>
                                <div class="pull-right">
                                    <a href="<?= base_url('Users/logout') ?>" class="btn btn-default btn-flat"><?= $this->lang->line('Déconnexion'); ?></a>
                                </div>
                            </li>
                        </ul>
                    </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: : style can be found in sidebar.less -->
            <ul class="sidebar-menu" data-widget="tree">

                <li class="<?php if($active=="villes"){echo "active";}  ?>">
                    <a href="<?= base_url('Gestion') ?>">
                        <i class="glyphicon glyphicon-globe"></i> <span><?= $this->lang->line('Villes'); ?></span>
                    </a>
                </li>
                <li class="<?php if($active=="codes-hyper"){echo "active";}  ?>">
                    <a href="<?= base_url('Gestion/codes') ?>">
                        <i class="glyphicon glyphicon-barcode"></i> <span><?= $this->lang->line('Codes hyperviseurs'); ?></span>
                    </a>
                </li>
                <li class="<?php if($active=="networks"){echo "active";}  ?>">
                    <a href="<?= base_url('Gestion/networks') ?>">
                        <i class="glyphicon glyphicon-signal"></i> <span><?= $this->lang->line('Reseaux'); ?></span>
                    </a>
                </li>
                <li class="<?php if($active=="admin"){echo "active";}  ?>">
                    <a href="<?= base_url('Gestion/admin') ?>">
                        <i class="glyphicon glyphicon-user"></i> <span><?= $this->lang->line('Administrateurs'); ?></span>
                    </a>
                </li>
                <li class="<?php if($active=="geoloc"){echo "active";}  ?>">
                    <a href="<?= base_url('Gestion/geolocalisation') ?>">
                        <i class="glyphicon glyphicon-map-marker"></i> <span><?= $this->lang->line('Géolocalisation'); ?></span>
                    </a>
                </li>
                <li class="<?php if($active=="campagne"){echo "active";}  ?>">
                    <a href="<?= base_url('Gestion/campagne') ?>">
                        <i class="glyphicon glyphicon-list-alt"></i> <span><?= $this->lang->line('Campagne'); ?></span>
                    </a>
                </li>
				<li class="<?php if($active=="recherche"){echo "active";}  ?>">
					<a href="<?= base_url('Gestion/recherche') ?>">
						<i class="glyphicon glyphicon-search"></i> <span><?= $this->lang->line('Rechercher'); ?></span>
					</a>
				</li>
				<li class="<?php if($active=="pub"){echo "active";}  ?>">
					<a href="<?= base_url('Gestion/pub') ?>">
						<i class="glyphicon glyphicon-tags"></i> <span><?= $this->lang->line('Publicité'); ?></span>
					</a>
				</li>
				<li class="<?php if ($active == "game") {
					echo "active";
				} ?>">
					<a href="#" data-toggle="modal" data-target="#modal-default">
						<i class="glyphicon glyphicon-phone"></i> <span><?= $this->lang->line('Game'); ?></span>
					</a>
				</li>
				<li class="<?php if ($active == "wallet") {
					echo "active";
				} ?>">
					<a href="<?= base_url('Gestion/wallet') ?>">
						<i class="glyphicon glyphicon-credit-card"></i> <span>Wallet</span>
					</a>
				</li>
				<li class="<?php if ($active == "nano_credit") {
					echo "active";
				} ?>">
					<a href="<?= base_url('Gestion/nano_credit') ?>">
						<i class="glyphicon glyphicon-credit-card"></i> <span>Nano credit</span>
					</a>
				</li>

<!--				<li class="--><?php //if ($active == "nano_health") {echo "active";} ?><!--">-->
<!--					<a href="--><?php //echo base_url('Gestion/nano_health') ?><!--">-->
<!--						<i class="glyphicon glyphicon-heart"></i> <span>--><?php //echo $this->lang->line('nano_health'); ?><!--</span>-->
<!--					</a>-->
<!--				</li>-->
				<!--                <li class="--><?php ////if($active=="map"){echo "active";}  ?><!--">-->
				<!--                    <a href="--><?php ////echo base_url('Gestion/map') ?><!--">-->
				<!--                        <i class="glyphicon glyphicon-map-marker"></i> <span>Carte</span>-->
				<!--                    </a>-->
				<!--                </li>-->
				<li class="<?php if ($active == "currency") {
					echo "active";
				} ?>">
					<a href="<?= base_url('Gestion/currency') ?>">
						<i class="ion ion-cash"></i> <span><?= $this->lang->line('currency'); ?></span>
					</a>
				</li>

				<li class="<?php if ($active == "regulations") {
					echo "active";
				} ?>">
					<a href="<?= base_url('Gestion/regulations') ?>">
						<i class="fa fa-registered"></i> <span><?= $this->lang->line('regulations'); ?></span>
					</a>
				</li>

				<li class="<?php if($active=="operators"){echo "active";}  ?>">
					<a href="<?= base_url('Gestion/operators') ?>">
						<i class="fa fa-building"></i> <span><?= $this->lang->line('operators'); ?></span>
					</a>
				</li>

				<li class="<?php if($active=="agency_banking"){echo "active";} ?>">
					<a href="<?= base_url('Gestion/agency_banking') ?>">
						<i class="fa fa-university"></i> 
						<span> <span><?= $this->lang->line('agency_banking'); ?></span>
					</a>
				</li>

				<li class="<?php if($active=="aggregators"){echo "active";}  ?>">
					<a href="<?php echo base_url('index.php/Gestion/aggregators') ?>">
						<i class="ion ion-cash"></i> <span><?php echo $this->lang->line('aggregators'); ?></span>
					</a>
				</li>
				<li class="<?php if($active=="settings"){echo "active";}  ?>">
					<a href="<?= base_url('Gestion/settings') ?>">
						<i class="ion ion-settings"></i> <span><?= $this->lang->line('settings'); ?></span>
					</a>
				</li>
            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>

    <div class="modal fade" id="modal-default">
        <div class="modal-dialog">
            <div class="modal-content">
                <form action="<?= base_url('Gestion/game')?>" method="post">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <h4 class="modal-title"><?= $this->lang->line('select_country'); ?></h4>
                    </div>
                    <div class="modal-body">

                            <div class="form-group">

                                <?php
                                $result=$game_pays;

                                $numrows=$result->num_rows();

                                if ($numrows > 0) { ?>
                                    <select class="form-control input-lg" name="pays" required>
                                    <?php foreach($result->result() as $row) {

                                        echo "<option value=".$row->id.">".$row->name."</option>";
                                    } ?>
                                    </select>
                                <?php }else{
                                    echo "Aucun utilisateur géolocalisé";
                                }
                                ?>

                        </div>

                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default pull-left" data-dismiss="modal"><?= $this->lang->line('Fermer'); ?></button>
                        <button type="submit" class="btn btn-primary"><?= $this->lang->line('Continuer'); ?></button>
                    </div>
                </form>
            </div>
        </div>
    </div>
<!--    <div class="modal fade" id="modal-choix-network">-->
<!--        <div class="modal-dialog">-->
<!--            <div class="modal-content">-->
<!--                <form action="--><?php //echo base_url('Gestion/wallet')?><!--" method="post">-->
<!--                    <div class="modal-header">-->
<!--                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">-->
<!--                            <span aria-hidden="true">&times;</span>-->
<!--                        </button>-->
<!--                        <h4 class="modal-title">Sélectionnez le réseau--><?php ////echo $this->lang->line('Sélectionnez le pays'); ?><!--</h4>-->
<!--                    </div>-->
<!--                    <div class="modal-body">-->
<!---->
<!--                            <div class="form-group">-->
<!---->
<!--                                --><?php
//                                $result=$networks;
//
//                                $numrows=$result->num_rows();
//
//                                if ($numrows > 0) { ?>
<!--                                    <select class="form-control input-lg" name="id" required>-->
<!--                                    --><?php //foreach($result->result() as $row) {
//
//                                        echo "<option value=".$row->id.">".$row->name." - ".$row->country."</option>";
//                                    } ?>
<!--                                    </select>-->
<!--                                --><?php //}else{
//                                    echo "Aucun réseau";
//                                }
//                                ?>
<!---->
<!--                        </div>-->
<!---->
<!--                    </div>-->
<!--                    <div class="modal-footer">-->
<!--                        <button type="button" class="btn btn-default pull-left" data-dismiss="modal">--><?php //echo $this->lang->line('Fermer'); ?><!--</button>-->
<!--                        <button type="submit" class="btn btn-primary">--><?php //echo $this->lang->line('Continuer'); ?><!--</button>-->
<!--                    </div>-->
<!--                </form>-->
<!--            </div>-->
<!--        </div>-->
<!--    </div>-->


