


<style type="text/css"></style>


<div class="kt-content  kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor" id="kt_content">

    <!-- begin:: Content Head -->
    <div class="kt-subheader  kt-grid__item" id="kt_subheader">
        <div class="kt-container  kt-container--fluid ">
            <div class="kt-subheader__main">
                <h3 class="kt-subheader__title"><a href="<?php echo base_url() ?>Dashboard/"><?php echo $this->lang->line('dashboard'); ?></a></h3>
                <span class="kt-subheader__separator kt-subheader__separator--v"></span>
                <span class="kt-subheader__desc"><?php echo $this->lang->line('main') ?></span>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div  style="float:right">
                <?php if (get_ap('student_add', $this->operator_id) == 1) { ?><div  style="margin-left:10px"><a href="<?= base_url() ?>/<?= $this->thispage ?>/add/" class="btn btn-block btn-primary"  style="margin-bottom:5px"><i class="icon-pencil  icon-white"> </i><?php echo $this->lang->line('add-a-member') ?></a>  </div>
                <?php }
                ?>
            </div>   </div>
    </div>
    <div class="row">
        <!-- Main content -->
        <div class="row">
            <div class="col-md-12">
                <div class="box">
                    <div class="box-header with-border">
                        <h3 class="box-title"><?php echo $this->lang->line('the-students') ?></h3>
                        <form method="post" action="<?= base_url() ?>/<?= $this->thispage ?>/report" style="float:right;">
                          <!-- <input type="text" class="start_datepicker" name="start " placeholder="<?php echo $this->lang->line('start-date') ?>(dd/mm/yy)"> -->
                            <input type="text" class="datepicker start_datepicker" name="start_expiry" style="margin-right: 20px;padding: 5px;">
                            <button class="btn btn-block btn-primary" style="width: 120px; float: right;"><i class="icon-pencil  icon-white"> </i><?php echo $this->lang->line('report') ?></button> 
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <div class="box">
                    <form method="post" action=""> 
                        <div class="box-header with-border">
                            <div style="float: left" class="filter topnav">  <lable class="box-title"><?php echo $this->lang->line('name') ?></lable>

                                <select multiple data-multi-select-plugin name="username[]" class="topnav" >
                                    <?php foreach ($username as $value) { ?>
                                        <option value="<?php echo $value->username; ?>"><?php echo $value->username; ?></option>
                                    <?php } ?>
                                </select> 
                            </div>
                            <div style="float: left" class="filter topnav">
                                <lable class="box-title"><?php echo $this->lang->line('civil-no') ?></lable> 
                                <select multiple data-multi-select-plugin name="civil_id[]">
                                    <?php foreach ($username as $value) { ?>
                                        <option value="<?php echo $value->cid_user; ?>"><?php echo $value->cid_user; ?></option>
                                    <?php } ?>
                                </select> 
                            </div>
                            <div style="float: left" class="filter topnav">
                                <lable class="box-title"><?php echo $this->lang->line('nationality') ?></lable> 
                                <select multiple data-multi-select-plugin name="nationality">
                                    <?php foreach ($nationality as $value) { ?>
                                        <option value="<?php
                                        if ($this->session->userdata('language') == 'english') {
                                            echo $value->english;
                                        } else {
                                            echo $value->arabic;
                                        }
                                        ?>"><?php
                                                    if ($this->session->userdata('language') == 'english') {
                                                        echo $value->english;
                                                    } else {
                                                        echo $value->arabic;
                                                    }
                                                    ?></option>
                                    <?php } ?>
                                </select> 
                            </div>
                            <div style="float: left" class="filter topnav">
                                <lable class="box-title"><?php echo $this->lang->line('region') ?></lable> 
                                <select multiple data-multi-select-plugin name="region[]">
                                    <?php foreach ($region as $value) { ?>
                                        <option value="<?php
                                        if ($this->session->userdata('language') == 'english') {
                                            echo $value->english;
                                        } else {
                                            echo $value->arabic;
                                        }
                                        ?>"><?php
                                                    if ($this->session->userdata('language') == 'english') {
                                                        echo $value->english;
                                                    } else {
                                                        echo $value->arabic;
                                                    }
                                                    ?></option>
                                    <?php } ?>
                                </select> 
                            </div> <div style="float: left" class="filter topnav">
                                <lable class="box-title"><?php echo $this->lang->line('status') ?></lable> 
                                <select multiple name="status[]" class="form-control select2_plug">
                                    <option value="<?php echo $this->lang->line('active') ?>" ><?= $this->lang->line('active') ?></option>
                                    <option value="<?php echo $this->lang->line('not-active') ?>"><?= $this->lang->line('not-active') ?></option>
                                </select> 
                            </div><div style="float: left" class="filter topnav" name="status">
                                <lable class="box-title"><?php echo $this->lang->line('sex') ?></lable> 
                                <select multiple name="sex[]" class="form-control select2_plug">
                                    <option value="<?php echo $this->lang->line('male') ?>" ><?= $this->lang->line('male') ?></option>
                                    <option value="<?php echo $this->lang->line('female') ?>" ><?= $this->lang->line('female') ?></option>
                                </select> 
                            </div>
                            <button class="btn btn-block btn-primary" style="width: 120px; float: right;"><i class="icon-pencil  icon-white"> </i><?php echo $this->lang->line('search') ?></button> </div>
                    </form>

                    <!-- /.box-header -->
                    <div class="box-body">
                        <table class="table table-bordered" >
                            <tr>
                                <th><?php echo $this->lang->line('sno') ?></th>
                                <th><?php echo $this->lang->line('the-name') ?></th>
                                <th><?php echo $this->lang->line('civil-no') ?></th>
                                <th><?php echo $this->lang->line('status') ?></th>
                                <th ><?php echo $this->lang->line('nationality') ?></th>
                                <th><?php echo $this->lang->line('region') ?></th>
                                <th ><?php echo $this->lang->line('register') ?></th>
                                <th ><?php echo $this->lang->line('invoices') ?></th>
                                <th style="width: 40px"></th>
                            </tr>
                            <?php
                            $count = 1;
                            foreach ($all_groups as $row):
                                ?>
                                <tr>
                                    <td><?php echo $count++; ?></td>
                                    <td><?= $row['username']; ?></td>
                                    <td><?= $row['cid_user']; ?></td>
                                    <td><?php
                                        if ($row['stop'] == '1')
                                            echo '<span class="label label-danger">' . $this->lang->line('off') . '</span>';
                                        else
                                            echo '<span class="label label-success">' . $this->lang->line('continuous') . '</span>';
                                        ?></td>
                                    <td><?= $row['city']; ?> </td>
                                    <td><?= $row['country']; ?> </td>

                                    <td><?= date("Y/m/d", $row['since_time_register']); ?> </td>
                                    <td> </td>


                                    <td>   
    <?php if (get_ap('student_list', $this->operator_id) == 1) { ?>  <a  class="update btn btn-sm btn-warning pull-right" href="<?= base_url('' . $this->thispage . '/show/' . $row['id']) ?>"><i class="material-icons"><?php echo $this->lang->line('the-details') ?></i></a>
                                <?php } ?>
                                    </td>
                                </tr>
<?php endforeach; ?>

                        </table>
                    </div>
                    <!-- /.box-body -->
<?php if ($all_count > 1): ?>
                        <div class="box-footer clearfix">
                            <ul class="pagination pagination-sm no-margin pull-right">

                                <?php for ($count = 1; $count < $all_count; $count++): ?>
                                    <li><a href="<?= base_url('' . $this->thispage . '/all/' . $count); ?>"><?= $count ?></a></li>

                        <?php endfor; ?>
                            </ul>
                        </div>
<?php endif; ?>   
                </div>
                <!-- /.box -->


                <!-- /.box -->
            </div>
        </div>
    </div>
    <!-- /.row -->

    <script >document.getElementById('output').innerHTML = location.search;
        $(".chosen-select").chosen();
    $(".select2_plug").select2();
    </script>