2020-05-06 23:36:01 +00:00
|
|
|
|
<link rel="stylesheet" href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
|
|
|
|
|
<div class="content-wrapper">
|
|
|
|
|
<!-- Content Header (Page header) -->
|
|
|
|
|
<section class="content-header">
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
$site_url = base_url();
|
|
|
|
|
|
|
|
|
|
if($alert=="ok") {
|
|
|
|
|
|
|
|
|
|
if(!$success=="ok"){
|
|
|
|
|
?>
|
|
|
|
|
<div class='alert alert-danger alert-dismissible'>
|
|
|
|
|
<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>
|
|
|
|
|
<h4><i class='icon fa fa-ban'></i> Error!</h4>
|
|
|
|
|
<?php echo $message; ?>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
} else {
|
|
|
|
|
?>
|
|
|
|
|
<div class="alert alert-success alert-dismissible">
|
|
|
|
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
|
|
|
|
<h4><i class="icon fa fa-check"></i> Success!</h4>
|
|
|
|
|
<?php echo $message; ?>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
<h1>
|
|
|
|
|
<?php echo $this->lang->line("Demandes d'adhésions et codes valides"); ?>
|
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<!-- Main content -->
|
|
|
|
|
<section class="content">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-xs-6">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="box">
|
|
|
|
|
<div class="box-header">
|
|
|
|
|
<h3 class="box-title"><?php echo $this->lang->line("Demandes adhésion"); ?></h3>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.box-header -->
|
2020-06-05 16:53:04 +00:00
|
|
|
|
<div class="box-body" style="overflow-x:auto;">
|
2020-05-06 23:36:01 +00:00
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
$sql2 = $list_dem;
|
|
|
|
|
if($sql2!=false){
|
|
|
|
|
$numrows=$sql2->num_rows();
|
|
|
|
|
$num = 3000;
|
|
|
|
|
if ($numrows > 0) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
<table id="validated" class="table table-bordered table-striped">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th><?php echo $this->lang->line("Téléphone"); ?></th>
|
|
|
|
|
<th><?php echo $this->lang->line("Parrain"); ?></th>
|
|
|
|
|
<th><?php echo $this->lang->line("Reseau"); ?></th>
|
|
|
|
|
<th><?php echo $this->lang->line("Statut"); ?></th>
|
|
|
|
|
<th><?php echo $this->lang->line("Date de la demande"); ?></th>
|
|
|
|
|
<th><?php echo $this->lang->line("Supprimer"); ?></th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
// output data of each row
|
|
|
|
|
foreach($sql2->result() as $row) {
|
|
|
|
|
$etat = $this->lang->line("Non traitée");
|
|
|
|
|
if($row->etat==1){
|
|
|
|
|
$etat = $this->lang->line("traitée");
|
|
|
|
|
}
|
|
|
|
|
$num ++;
|
|
|
|
|
//$member_code = randomString1(10);
|
|
|
|
|
echo "<tr>
|
|
|
|
|
<td> $row->phone</td>
|
|
|
|
|
<td >$row->code_membre </td>
|
|
|
|
|
<td>$row->network</td>
|
|
|
|
|
<td>$etat</td>
|
2020-11-13 16:39:13 +00:00
|
|
|
|
<td >".$row->date_creation."</td>";
|
2020-05-06 23:36:01 +00:00
|
|
|
|
if($row->etat==0){
|
|
|
|
|
echo "
|
|
|
|
|
<td>
|
|
|
|
|
<a href='#myModal-1".$num."' role='button' class='btn btn-block btn-danger' data-toggle='modal'><i class='fa fa-remove'></i></a>
|
|
|
|
|
<div class='modal fade' id='myModal-1".$num."' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true'>
|
|
|
|
|
<div class='modal-dialog'>
|
|
|
|
|
<div class='modal-content'>
|
|
|
|
|
<div class='modal-header'>
|
|
|
|
|
<button type='button' class='close' data-dismiss='modal' aria-label='Close'>
|
|
|
|
|
<span aria-hidden='true'>×</span></button>
|
|
|
|
|
<h4 class='modal-title'>".$this->lang->line('Confirmer la suppression')."</h4>
|
|
|
|
|
</div>
|
|
|
|
|
<div class='modal-body'>
|
|
|
|
|
<p class='error-text'><i class='icon-warning-sign modal-icon'></i>".$this->lang->line('Message suppression')." ". $row->phone."?</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class='modal-footer'>
|
|
|
|
|
<button type='button' class='btn btn-default pull-left' data-dismiss='modal'>".$this->lang->line('Fermer')."</button>
|
|
|
|
|
<a href='".$site_url."Member_code_admin/delete/?recordId=".$row->phone."' role='button' class='btn btn-danger'>
|
|
|
|
|
".$this->lang->line('Supprimer')."</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.modal-content -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.modal-dialog -->
|
|
|
|
|
</div>
|
|
|
|
|
</td>";
|
|
|
|
|
}
|
|
|
|
|
echo "</tr>";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
echo $this->lang->line('Aucune demande');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.box-body -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.box -->
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-xs-6">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="box">
|
|
|
|
|
<div class="box-header">
|
|
|
|
|
<h3 class="box-title"><?php echo $this->lang->line("Codes valides"); ?></h3>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.box-header -->
|
2020-06-05 16:53:04 +00:00
|
|
|
|
<div class="box-body" style="overflow-x:auto;">
|
2020-05-06 23:36:01 +00:00
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
$sql1 = $list_codes;
|
|
|
|
|
if($sql1!=false){
|
|
|
|
|
$numrows=$sql1->num_rows();
|
|
|
|
|
$num = 0;
|
|
|
|
|
|
|
|
|
|
if ($numrows > 0) {
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
<table id="unvalidated" class="table table-bordered table-striped">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th><?php echo $this->lang->line("Code"); ?></th>
|
|
|
|
|
<th><?php echo $this->lang->line("Catégorie"); ?></th>
|
|
|
|
|
<th><?php echo $this->lang->line("Statut"); ?></th>
|
|
|
|
|
<th><?php echo $this->lang->line("Créer le"); ?></th>
|
|
|
|
|
<th><?php echo $this->lang->line("Parrain"); ?></th>
|
|
|
|
|
<th><?php echo $this->lang->line("Supprimer"); ?></th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
// output data of each row
|
|
|
|
|
foreach($sql1->result() as $row) {
|
|
|
|
|
$etat = $this->lang->line("Non assigné");
|
|
|
|
|
if($row->etat==1){
|
|
|
|
|
$etat = $this->lang->line("assigné");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$num ++;
|
|
|
|
|
echo "<tr>
|
|
|
|
|
<td> $row->code_membre</td>
|
|
|
|
|
<td>$row->category </td>
|
|
|
|
|
<td>$etat</td>
|
2020-11-13 16:39:13 +00:00
|
|
|
|
<td >".$row->date_creation."</td>
|
2020-05-06 23:36:01 +00:00
|
|
|
|
<td>$row->code_parrain</td>
|
|
|
|
|
<td>";
|
|
|
|
|
if($row->etat==0){
|
|
|
|
|
echo "
|
|
|
|
|
<a href='#myModal-2".$num."' role='button' class='btn btn-block btn-danger' data-toggle='modal'><i class='fa fa-remove'></i></a>
|
|
|
|
|
<div class='modal smallfade' id='myModal-2".$num."' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true'>
|
|
|
|
|
<div class='modal-dialog'>
|
|
|
|
|
<div class='modal-content'>
|
|
|
|
|
<div class='modal-header'>
|
|
|
|
|
<button type='button' class='close' data-dismiss='modal' aria-label='Close'>
|
|
|
|
|
<span aria-hidden='true'>×</span></button>
|
|
|
|
|
<h4 class='modal-title'>".$this->lang->line('Confirmer la suppression')."</h4>
|
|
|
|
|
</div>
|
|
|
|
|
<div class='modal-body'>
|
|
|
|
|
<p class='error-text'><i class='icon-warning-sign modal-icon'></i>".$this->lang->line('Message suppression code')." ".$row->code_membre."?</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class='modal-footer'>
|
|
|
|
|
<button type='button' class='btn btn-default pull-left' data-dismiss='modal'>".$this->lang->line('Fermer')."</button>
|
2021-10-14 14:33:02 +00:00
|
|
|
|
<a href='".$site_url."Member_code_admin/suppress/?recordId=".$row->code_membre."' role='button' class='btn btn-danger' id='delete'>
|
2020-05-06 23:36:01 +00:00
|
|
|
|
".$this->lang->line('Supprimer')."</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.modal-content -->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</td>";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo "</tr> ";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
echo $this->lang->line("Aucun membre validé");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->db->close();
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.box-body -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.box -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.col -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.row -->
|
|
|
|
|
</section>
|
|
|
|
|
<!-- /.content -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- jQuery 3 -->
|
|
|
|
|
<script src="<?php echo base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script>
|
|
|
|
|
<!-- Bootstrap 3.3.7 -->
|
|
|
|
|
<script src="<?php echo base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
|
|
|
|
|
<!-- DataTables -->
|
|
|
|
|
<script src="<?php echo base_url('bower_components/datatables.net/js/jquery.dataTables.min.js') ?>"></script>
|
|
|
|
|
<script src="<?php echo base_url('bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js') ?>"></script>
|
|
|
|
|
<!-- Slimscroll -->
|
|
|
|
|
<script src="<?php echo base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script>
|
|
|
|
|
<!-- FastClick -->
|
|
|
|
|
<script src="<?php echo base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
|
|
|
|
|
<!-- AdminLTE App -->
|
|
|
|
|
<script src="<?php echo base_url('dist/js/adminlte.min.js') ?>"></script>
|
|
|
|
|
<!-- AdminLTE for demo purposes -->
|
|
|
|
|
<script src="<?php echo base_url('dist/js/demo.js') ?>"></script>
|
|
|
|
|
<script>
|
|
|
|
|
$(function() {
|
|
|
|
|
$('#unvalidated').DataTable()
|
|
|
|
|
$('#validated').DataTable()
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<script type='text/javascript'>
|
|
|
|
|
$(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
$('#pays').change(function(){
|
|
|
|
|
var pays = $(this).val();
|
|
|
|
|
$.ajax({
|
2021-10-14 14:33:02 +00:00
|
|
|
|
url:'<?php echo base_url('Admin/getHypByPays')?>',
|
2020-05-06 23:36:01 +00:00
|
|
|
|
type: 'post',
|
|
|
|
|
data: {pays: pays},
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
success: function(data){
|
|
|
|
|
var len = data.length;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(len > 0){
|
|
|
|
|
|
|
|
|
|
var select = document.getElementById('hyper');
|
|
|
|
|
if(select===null){
|
|
|
|
|
var grpPays = document.getElementById('grp-pays');
|
|
|
|
|
$(grpPays).empty();
|
|
|
|
|
$(grpPays).append("<select class='form-control input-lg' name='hyper' required id='hyper'></select>");
|
|
|
|
|
select = document.getElementById('hyper');
|
|
|
|
|
}
|
|
|
|
|
$(select).empty();
|
|
|
|
|
|
|
|
|
|
for (var i in data) {
|
|
|
|
|
$(select).append('<option value=' + data[i].code_membre + '>' + data[i].lastname +'-' + data[i].network + ' ('+ data[i].code_membre +')</option>');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var code = data[0].code_membre;
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
2021-10-14 14:33:02 +00:00
|
|
|
|
url:'<?php echo base_url('Admin/getVilleByHyp')?>',
|
2020-05-06 23:36:01 +00:00
|
|
|
|
type: 'post',
|
|
|
|
|
data: {code: code,pays:pays},
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
success: function(list){
|
|
|
|
|
var len = list.length;
|
|
|
|
|
|
|
|
|
|
if(len > 0){
|
|
|
|
|
|
|
|
|
|
var select = document.getElementById('ville');
|
|
|
|
|
if(select===null){
|
|
|
|
|
var grpVille = document.getElementById('grp-ville');
|
|
|
|
|
$(grpVille).empty();
|
|
|
|
|
$(grpVille).append("<select class='form-control input-lg' name='ville' required id='ville'></select>");
|
|
|
|
|
select = document.getElementById('ville');
|
|
|
|
|
}
|
|
|
|
|
$(select).empty();
|
|
|
|
|
|
|
|
|
|
for (var i in list) {
|
|
|
|
|
$(select).append('<option value=' + list[i].town_id + '>' + list[i].town +'</option>');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
var select = document.getElementById('ville');
|
|
|
|
|
$(select).empty();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
var select = document.getElementById('hyper');
|
|
|
|
|
$(select).empty();
|
|
|
|
|
|
|
|
|
|
var select2 = document.getElementById('ville');
|
|
|
|
|
$(select2).empty();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#hyper').change(function(){
|
|
|
|
|
var code = $(this).val();
|
|
|
|
|
$.ajax({
|
2021-10-14 14:33:02 +00:00
|
|
|
|
url:'<?php echo base_url('Admin/getVilleByHyp')?>',
|
2020-05-06 23:36:01 +00:00
|
|
|
|
type: 'post',
|
|
|
|
|
data: {code: code},
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
success: function(list){
|
|
|
|
|
var len = list.length;
|
|
|
|
|
|
|
|
|
|
if(len > 0){
|
|
|
|
|
|
|
|
|
|
var select = document.getElementById('ville');
|
|
|
|
|
$(select).empty();
|
|
|
|
|
|
|
|
|
|
for (var i in list) {
|
|
|
|
|
$(select).append('<option value=' + list[i].town_id + '>' + list[i].town +'</option>');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
var select = document.getElementById('ville');
|
|
|
|
|
$(select).empty();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
</script>
|