+ Bug fixed when reporting credits requests v2
This commit is contained in:
parent
80116d0bc3
commit
396d5b9f6c
|
@ -30,8 +30,9 @@ class Hyperviseur_dash extends CI_Controller
|
||||||
|
|
||||||
redirect('index.php', $data);
|
redirect('index.php', $data);
|
||||||
} else {
|
} else {
|
||||||
$count_d_traite = $this->user_model->getCountDemandeByStatut($this->session->userdata('member_code'), 1);
|
$count_d_traite = $this->user_model->getCountDemandeByStatut($this->session->userdata('member_code'), '1');
|
||||||
$count_d_no_traite = $this->user_model->getCountDemandeByStatut($this->session->userdata('member_code'), 0);
|
$count_d_no_traite = $this->user_model->getCountDemandeByStatut($this->session->userdata('member_code'), '0');
|
||||||
|
$count_d_no_canceled = $this->user_model->getCountDemandeByStatut($this->session->userdata('member_code'), '2');
|
||||||
$count_d = $this->user_model->getCountDemande($this->session->userdata('member_code'));
|
$count_d = $this->user_model->getCountDemande($this->session->userdata('member_code'));
|
||||||
|
|
||||||
$data['active'] = "dash";
|
$data['active'] = "dash";
|
||||||
|
@ -54,6 +55,7 @@ class Hyperviseur_dash extends CI_Controller
|
||||||
$data['count_sup'] = $this->user_model->countUser("super", 'all', $this->session->userdata('member_code'));
|
$data['count_sup'] = $this->user_model->countUser("super", 'all', $this->session->userdata('member_code'));
|
||||||
$data['count_d_traite'] = $count_d_traite;
|
$data['count_d_traite'] = $count_d_traite;
|
||||||
$data['count_d_no_traite'] = $count_d_no_traite;
|
$data['count_d_no_traite'] = $count_d_no_traite;
|
||||||
|
$data['count_d_no_canceled'] = $count_d_no_canceled;
|
||||||
$data['count_d_users'] = $count_d;
|
$data['count_d_users'] = $count_d;
|
||||||
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||||
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
||||||
|
|
|
@ -30,8 +30,9 @@ class Superviseur_dash extends CI_Controller
|
||||||
|
|
||||||
$count_g = $this->User_model->geolocatedCountByParrain($this->session->userdata('member_code'));
|
$count_g = $this->User_model->geolocatedCountByParrain($this->session->userdata('member_code'));
|
||||||
$count_d = $this->User_model->getCountDemande($this->session->userdata('member_code'));
|
$count_d = $this->User_model->getCountDemande($this->session->userdata('member_code'));
|
||||||
$count_d_traite = $this->User_model->getCountDemandeByStatut($this->session->userdata('member_code'), 1);
|
$count_d_traite = $this->User_model->getCountDemandeByStatut($this->session->userdata('member_code'), '1');
|
||||||
$count_d_no_traite = $this->User_model->getCountDemandeByStatut($this->session->userdata('member_code'), 0);
|
$count_d_no_traite = $this->User_model->getCountDemandeByStatut($this->session->userdata('member_code'), '0');
|
||||||
|
$count_d_no_canceled = $this->user_model->getCountDemandeByStatut($this->session->userdata('member_code'), '2');
|
||||||
|
|
||||||
$data['list_geolocated_users'] = $this->user_model->getUsersGeolocatedForSup($this->session->userdata('member_code'));
|
$data['list_geolocated_users'] = $this->user_model->getUsersGeolocatedForSup($this->session->userdata('member_code'));
|
||||||
|
|
||||||
|
@ -52,6 +53,7 @@ class Superviseur_dash extends CI_Controller
|
||||||
$data['count_d_users'] = $count_d;
|
$data['count_d_users'] = $count_d;
|
||||||
$data['count_d_traite'] = $count_d_traite;
|
$data['count_d_traite'] = $count_d_traite;
|
||||||
$data['count_d_no_traite'] = $count_d_no_traite;
|
$data['count_d_no_traite'] = $count_d_no_traite;
|
||||||
|
$data['count_d_no_canceled'] = $count_d_no_canceled;
|
||||||
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
||||||
$this->load->view('header_sup', $data);
|
$this->load->view('header_sup', $data);
|
||||||
$this->load->view('superviseur_dash');
|
$this->load->view('superviseur_dash');
|
||||||
|
|
|
@ -553,4 +553,6 @@ $lang['modify_operator'] = "Modify operator";
|
||||||
$lang['assign_operator_to_country'] = "Assign an operator to a country";
|
$lang['assign_operator_to_country'] = "Assign an operator to a country";
|
||||||
$lang['operator_type'] = "Operator type";
|
$lang['operator_type'] = "Operator type";
|
||||||
$lang['no_type'] = "No type";
|
$lang['no_type'] = "No type";
|
||||||
|
$lang['accepted_demands'] = "Requests accepted";
|
||||||
|
$lang['canceled_demands'] = "Canceled requests";
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -565,4 +565,6 @@ $lang['modify_operator'] = "Modifier l'opérateur";
|
||||||
$lang['assign_operator_to_country'] = "Assigner un opérateur à un pays";
|
$lang['assign_operator_to_country'] = "Assigner un opérateur à un pays";
|
||||||
$lang['operator_type'] = "Type d'opérateur";
|
$lang['operator_type'] = "Type d'opérateur";
|
||||||
$lang['no_type'] = "Aucun type";
|
$lang['no_type'] = "Aucun type";
|
||||||
|
$lang['accepted_demands'] = "Demandes acceptées";
|
||||||
|
$lang['canceled_demands'] = "Demandes annulées";
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -65,6 +65,17 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getDelayOfTreatmentInSeconds($time, $dateAjout){
|
||||||
|
if ($time == null) {
|
||||||
|
$now = time();
|
||||||
|
$date2 = strtotime($dateAjout);
|
||||||
|
return abs($now - $date2);
|
||||||
|
}else{
|
||||||
|
return $time ;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// function toLocateDate($date , $timezone){
|
// function toLocateDate($date , $timezone){
|
||||||
// if($date){
|
// if($date){
|
||||||
// $carbon = Carbon::createFromFormat('Y-m-d H:i:s', $date, 'UTC');
|
// $carbon = Carbon::createFromFormat('Y-m-d H:i:s', $date, 'UTC');
|
||||||
|
@ -213,6 +224,7 @@
|
||||||
<th>" . $this->lang->line('Date de traitement') . "</th>
|
<th>" . $this->lang->line('Date de traitement') . "</th>
|
||||||
<th>" . $this->lang->line('Statut') . "</th>
|
<th>" . $this->lang->line('Statut') . "</th>
|
||||||
<th>" . $this->lang->line('Délai de traitement') . "</th>
|
<th>" . $this->lang->line('Délai de traitement') . "</th>
|
||||||
|
<th>" . $this->lang->line('Délai de traitement')."(en minutes)" . "</th>
|
||||||
</tr>";
|
</tr>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -250,7 +262,7 @@
|
||||||
<td > " . $row->dateModif . "</td>
|
<td > " . $row->dateModif . "</td>
|
||||||
<td>$etat</td>
|
<td>$etat</td>
|
||||||
<td>" . traitementTemps($row->temps, $row->dateAjout) . "</td>
|
<td>" . traitementTemps($row->temps, $row->dateAjout) . "</td>
|
||||||
|
<td>" . getDelayOfTreatmentInSeconds($row->temps, $row->dateAjout)/60 . "</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -304,6 +316,7 @@
|
||||||
<th>" . $this->lang->line('Date de traitement') . "</th>
|
<th>" . $this->lang->line('Date de traitement') . "</th>
|
||||||
<th>" . $this->lang->line('Statut') . "</th>
|
<th>" . $this->lang->line('Statut') . "</th>
|
||||||
<th>" . $this->lang->line('Délai de traitement') . "</th>
|
<th>" . $this->lang->line('Délai de traitement') . "</th>
|
||||||
|
<th>" . $this->lang->line('Délai de traitement')."(en minutes)" . "</th>
|
||||||
</tr>";
|
</tr>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -339,6 +352,7 @@
|
||||||
<td > " . $row->dateModif . "</td>
|
<td > " . $row->dateModif . "</td>
|
||||||
<td>$etat</td>
|
<td>$etat</td>
|
||||||
<td>" . traitementTemps($row->temps, $row->dateAjout) . "</td>
|
<td>" . traitementTemps($row->temps, $row->dateAjout) . "</td>
|
||||||
|
<td>" . getDelayOfTreatmentInSeconds($row->temps, $row->dateAjout)/60 . "</td>
|
||||||
|
|
||||||
</tr>";
|
</tr>";
|
||||||
|
|
||||||
|
@ -725,6 +739,7 @@
|
||||||
<th>" . $this->lang->line('Date de traitement') . "</th>
|
<th>" . $this->lang->line('Date de traitement') . "</th>
|
||||||
<th>" . $this->lang->line('Statut') . "</th>
|
<th>" . $this->lang->line('Statut') . "</th>
|
||||||
<th>" . $this->lang->line('Délai de traitement') . "</th>
|
<th>" . $this->lang->line('Délai de traitement') . "</th>
|
||||||
|
<th>" . $this->lang->line('Délai de traitement')."(en minutes)" . "</th>
|
||||||
</tr>";
|
</tr>";
|
||||||
?>
|
?>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -763,6 +778,7 @@
|
||||||
<td> " . $row->dateModif . "</td>
|
<td> " . $row->dateModif . "</td>
|
||||||
<td>$etat</td>
|
<td>$etat</td>
|
||||||
<td>" . traitementTemps($row->temps, $row->dateAjout) . "</td>
|
<td>" . traitementTemps($row->temps, $row->dateAjout) . "</td>
|
||||||
|
<td>" . getDelayOfTreatmentInSeconds($row->temps, $row->dateAjout)/60 . "</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -994,7 +1010,12 @@
|
||||||
"columnDefs": [{
|
"columnDefs": [{
|
||||||
targets: [5, 6],
|
targets: [5, 6],
|
||||||
render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss', 'D MMMM YYYY HH:mm:ss', format),
|
render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss', 'D MMMM YYYY HH:mm:ss', format),
|
||||||
}],
|
},
|
||||||
|
{
|
||||||
|
"targets": [ 9 ],
|
||||||
|
"visible": false
|
||||||
|
}
|
||||||
|
],
|
||||||
dom: 'Bfrtip',
|
dom: 'Bfrtip',
|
||||||
"buttons": [
|
"buttons": [
|
||||||
'pageLength',
|
'pageLength',
|
||||||
|
@ -1020,7 +1041,12 @@
|
||||||
"columnDefs": [{
|
"columnDefs": [{
|
||||||
targets: [3, 4],
|
targets: [3, 4],
|
||||||
render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss', 'D MMMM YYYY HH:mm:ss', format),
|
render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss', 'D MMMM YYYY HH:mm:ss', format),
|
||||||
}],
|
},
|
||||||
|
{
|
||||||
|
"targets": [ 7 ],
|
||||||
|
"visible": false
|
||||||
|
}
|
||||||
|
],
|
||||||
dom: 'Bfrtip',
|
dom: 'Bfrtip',
|
||||||
"buttons": [
|
"buttons": [
|
||||||
'pageLength',
|
'pageLength',
|
||||||
|
@ -1045,7 +1071,12 @@
|
||||||
"columnDefs": [{
|
"columnDefs": [{
|
||||||
targets: [1, 2],
|
targets: [1, 2],
|
||||||
render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss', 'D MMMM YYYY HH:mm:ss', format)
|
render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss', 'D MMMM YYYY HH:mm:ss', format)
|
||||||
}],
|
},
|
||||||
|
{
|
||||||
|
"targets": [ 5 ],
|
||||||
|
"visible": false
|
||||||
|
}
|
||||||
|
],
|
||||||
dom: 'Bfrtip',
|
dom: 'Bfrtip',
|
||||||
"buttons": [
|
"buttons": [
|
||||||
'pageLength',
|
'pageLength',
|
||||||
|
|
|
@ -182,7 +182,7 @@ if($users_geolocated_query!=false){
|
||||||
<p><?php echo $this->lang->line('Utilisateurs géolocalisés'); ?></p>
|
<p><?php echo $this->lang->line('Utilisateurs géolocalisés'); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<i class=""></i>
|
<i class="ion ion-location"></i>
|
||||||
</div>
|
</div>
|
||||||
<a href="#" data-toggle="modal" data-target="#modal-default" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
|
<a href="#" data-toggle="modal" data-target="#modal-default" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -197,7 +197,7 @@ if($users_geolocated_query!=false){
|
||||||
<p><?php echo $this->lang->line('Superviseur'); ?></p>
|
<p><?php echo $this->lang->line('Superviseur'); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<i class=""></i>
|
<i class="ion ion-ios-people"></i>
|
||||||
</div>
|
</div>
|
||||||
<a href="<?php echo base_url('index.php/Hyperviseur_dash/getAllSupervisor') ?>" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
|
<a href="<?php echo base_url('index.php/Hyperviseur_dash/getAllSupervisor') ?>" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -211,7 +211,7 @@ if($users_geolocated_query!=false){
|
||||||
<p><?php echo $this->lang->line('Demandes de crédits'); ?></p>
|
<p><?php echo $this->lang->line('Demandes de crédits'); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<i class=""></i>
|
<i class="ion ion-cash"></i>
|
||||||
</div>
|
</div>
|
||||||
<a href="#" data-toggle="modal" data-target="#modal-default2" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
|
<a href="#" data-toggle="modal" data-target="#modal-default2" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -222,28 +222,42 @@ if($users_geolocated_query!=false){
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3><?php echo $count_d_traite;?></h3>
|
<h3><?php echo $count_d_traite;?></h3>
|
||||||
|
|
||||||
<p><?php echo $this->lang->line("Demandes traitées"); ?></p>
|
<p><?php echo $this->lang->line("accepted_demands"); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<i class=""></i>
|
<i class="ion ion-checkmark-circled"></i>
|
||||||
</div>
|
</div>
|
||||||
<a href="#" data-toggle="modal" data-target="#modal-default2" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
|
<a href="#" data-toggle="modal" data-target="#modal-default2" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-2 col-md-4 col-xs-6">
|
<div class="col-lg-2 col-md-4 col-xs-6">
|
||||||
<!-- small box -->
|
<!-- small box -->
|
||||||
<div class="small-box bg-red">
|
<div class="small-box bg-orange">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3><?php echo $count_d_no_traite;?></h3>
|
<h3><?php echo $count_d_no_traite;?></h3>
|
||||||
|
|
||||||
<p><?php echo $this->lang->line("Demandes non traitées"); ?></p>
|
<p><?php echo $this->lang->line("Demandes non traitées"); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<i class=""></i>
|
<i class="ion ion-alert-circled"></i>
|
||||||
</div>
|
</div>
|
||||||
<a href="#" data-toggle="modal" data-target="#modal-default2" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
|
<a href="#" data-toggle="modal" data-target="#modal-default2" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-lg-2 col-md-4 col-xs-6">
|
||||||
|
<!-- small box -->
|
||||||
|
<div class="small-box bg-red">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $count_d_no_canceled;?></h3>
|
||||||
|
|
||||||
|
<p><?php echo $this->lang->line("canceled_demands"); ?></p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-close-circled"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" data-toggle="modal" data-target="#modal-default2" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
|
@ -1,408 +1,422 @@
|
||||||
|
|
||||||
<!-- jvectormap -->
|
<!-- jvectormap -->
|
||||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/jvectormap/jquery-jvectormap.css') ?>">
|
<link rel="stylesheet" href="<?php echo base_url('bower_components/jvectormap/jquery-jvectormap.css') ?>">
|
||||||
<!-- Date Picker -->
|
<!-- Date Picker -->
|
||||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>">
|
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>">
|
||||||
<!-- Daterange picker -->
|
<!-- Daterange picker -->
|
||||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
|
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
|
||||||
<!-- bootstrap wysihtml5 - text editor -->
|
<!-- bootstrap wysihtml5 - text editor -->
|
||||||
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
|
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
|
||||||
<!-- ChartJS -->
|
<!-- ChartJS -->
|
||||||
<script src="<?php echo base_url('bower_components/Chart.js/Chart.js') ?>"></script>
|
<script src="<?php echo base_url('bower_components/Chart.js/Chart.js') ?>"></script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
function convertDate($date){
|
function convertDate($date){
|
||||||
$month = null;
|
$month = null;
|
||||||
switch ($date) {
|
switch ($date) {
|
||||||
case "Jan":
|
case "Jan":
|
||||||
$month = 1;
|
$month = 1;
|
||||||
break;
|
break;
|
||||||
case "Feb":
|
case "Feb":
|
||||||
$month = 2;
|
$month = 2;
|
||||||
break;
|
break;
|
||||||
case "Mar":
|
case "Mar":
|
||||||
$month = 3;
|
$month = 3;
|
||||||
break;
|
break;
|
||||||
case "Apr":
|
case "Apr":
|
||||||
$month = 4;
|
$month = 4;
|
||||||
break;
|
break;
|
||||||
case "May":
|
case "May":
|
||||||
$month = 5;
|
$month = 5;
|
||||||
break;
|
break;
|
||||||
case "Jun":
|
case "Jun":
|
||||||
$month = 6;
|
$month = 6;
|
||||||
break;
|
break;
|
||||||
case "Jul":
|
case "Jul":
|
||||||
$month = 7;
|
$month = 7;
|
||||||
break;
|
break;
|
||||||
case "Aug":
|
case "Aug":
|
||||||
$month = 8;
|
$month = 8;
|
||||||
break;
|
break;
|
||||||
case "Sep":
|
case "Sep":
|
||||||
$month = 9;
|
$month = 9;
|
||||||
break;
|
break;
|
||||||
case "Oct":
|
case "Oct":
|
||||||
$month = 10;
|
$month = 10;
|
||||||
break;
|
break;
|
||||||
case "Nov":
|
case "Nov":
|
||||||
$month = 11;
|
$month = 11;
|
||||||
break;
|
break;
|
||||||
case "Dec":
|
case "Dec":
|
||||||
$month = 12;
|
$month = 12;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return $month;
|
return $month;
|
||||||
}
|
}
|
||||||
|
|
||||||
$month = time();
|
$month = time();
|
||||||
$months[]=convertDate(date("M"));
|
$months[]=convertDate(date("M"));
|
||||||
$label_months [] = date("M")." ".date("Y");
|
$label_months [] = date("M")." ".date("Y");
|
||||||
$years[]= date("Y");
|
$years[]= date("Y");
|
||||||
for ($i = 1; $i <= 11; $i++) {
|
for ($i = 1; $i <= 11; $i++) {
|
||||||
$month = strtotime('last month', $month);
|
$month = strtotime('last month', $month);
|
||||||
$months [] = convertDate(date("M", $month));
|
$months [] = convertDate(date("M", $month));
|
||||||
$years[] = date("Y", $month);
|
$years[] = date("Y", $month);
|
||||||
$label_months [] = date("M", $month)." ".date("Y", $month);
|
$label_months [] = date("M", $month)." ".date("Y", $month);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
** Simple User Treatment
|
** Simple User Treatment
|
||||||
**/
|
**/
|
||||||
|
|
||||||
$date = date("Y");
|
$date = date("Y");
|
||||||
|
|
||||||
$demandes_data[] = '';
|
$demandes_data[] = '';
|
||||||
$demandes_data =array();
|
$demandes_data =array();
|
||||||
for ($i = 1; $i <= 12; $i++) {
|
for ($i = 1; $i <= 12; $i++) {
|
||||||
$demandes_query_mounth = $this->db->query("SELECT demande_id FROM info_demandeCredits
|
$demandes_query_mounth = $this->db->query("SELECT demande_id FROM info_demandeCredits
|
||||||
WHERE MONTH(dateAjout) = '".$months[$i-1]."' AND YEAR(dateAjout) = ".$years[$i-1]."
|
WHERE MONTH(dateAjout) = '".$months[$i-1]."' AND YEAR(dateAjout) = ".$years[$i-1]."
|
||||||
AND codeParrain='".$this->session->userdata('member_code')."'"
|
AND codeParrain='".$this->session->userdata('member_code')."'"
|
||||||
);
|
);
|
||||||
$demandes_data[] = $demandes_query_mounth->num_rows();
|
$demandes_data[] = $demandes_query_mounth->num_rows();
|
||||||
}
|
}
|
||||||
|
|
||||||
$demandes_query = $listdem;
|
$demandes_query = $listdem;
|
||||||
|
|
||||||
if($demandes_query!=false){
|
if($demandes_query!=false){
|
||||||
$demandes=$demandes_query->num_rows();
|
$demandes=$demandes_query->num_rows();
|
||||||
// Count networks for simple users
|
// Count networks for simple users
|
||||||
$array_simple = array();
|
$array_simple = array();
|
||||||
$num = 0;
|
$num = 0;
|
||||||
if ($demandes > 0) {
|
if ($demandes > 0) {
|
||||||
foreach($demandes_query->result() as $row) {
|
foreach($demandes_query->result() as $row) {
|
||||||
$num++;
|
$num++;
|
||||||
$array_simple[] = $row->codeMembre;
|
$array_simple[] = $row->codeMembre;
|
||||||
}
|
}
|
||||||
|
|
||||||
$vals_simple = array_count_values($array_simple);
|
$vals_simple = array_count_values($array_simple);
|
||||||
//echo 'No. of NON Duplicate Items: '.count($vals_simple).'<br><br>';
|
//echo 'No. of NON Duplicate Items: '.count($vals_simple).'<br><br>';
|
||||||
//print_r($vals_simple);
|
//print_r($vals_simple);
|
||||||
$pieChart2 = array();
|
$pieChart2 = array();
|
||||||
foreach(array_keys($vals_simple) as $paramName2) {
|
foreach(array_keys($vals_simple) as $paramName2) {
|
||||||
$color2 = dechex(rand(0x000000, 0xFFFFFF));
|
$color2 = dechex(rand(0x000000, 0xFFFFFF));
|
||||||
$trash2 = array("value" => $vals_simple[$paramName2],
|
$trash2 = array("value" => $vals_simple[$paramName2],
|
||||||
"color" => "#".$color2,
|
"color" => "#".$color2,
|
||||||
"highlight" => "#".$color2,
|
"highlight" => "#".$color2,
|
||||||
"label" => $paramName2);
|
"label" => $paramName2);
|
||||||
|
|
||||||
$pieChart2[]= $trash2;
|
$pieChart2[]= $trash2;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$pieChart2 = array();
|
$pieChart2 = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
** Geolocated User Treatment
|
** Geolocated User Treatment
|
||||||
**/
|
**/
|
||||||
$users_geolocated_query = $list_geolocated_users;
|
$users_geolocated_query = $list_geolocated_users;
|
||||||
// Geolocated Users by month replace 2016 by NOW()
|
// Geolocated Users by month replace 2016 by NOW()
|
||||||
$users_geolocated_data[] = '';
|
$users_geolocated_data[] = '';
|
||||||
$users_geolocated_data =array();
|
$users_geolocated_data =array();
|
||||||
for ($i = 1; $i <= 12; $i++) {
|
for ($i = 1; $i <= 12; $i++) {
|
||||||
$users_geolocated_query_january = $this->db->query("SELECT agent_id FROM super_infos
|
$users_geolocated_query_january = $this->db->query("SELECT agent_id FROM super_infos
|
||||||
WHERE MONTH(date_created) = '".$months[$i-1]."' AND YEAR(date_created) = ".$years[$i-1]."
|
WHERE MONTH(date_created) = '".$months[$i-1]."' AND YEAR(date_created) = ".$years[$i-1]."
|
||||||
AND category='geolocated' AND code_parrain='".$this->session->userdata('member_code')."'");
|
AND category='geolocated' AND code_parrain='".$this->session->userdata('member_code')."'");
|
||||||
$users_geolocated_data[] = $users_geolocated_query_january->num_rows();
|
$users_geolocated_data[] = $users_geolocated_query_january->num_rows();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($users_geolocated_query!=false){
|
if($users_geolocated_query!=false){
|
||||||
|
|
||||||
$users_geolocated=$users_geolocated_query->num_rows();
|
$users_geolocated=$users_geolocated_query->num_rows();
|
||||||
//$users_geolocated_query = json_encode($users_geolocated_query->result());
|
//$users_geolocated_query = json_encode($users_geolocated_query->result());
|
||||||
// Counts network for geolocated users
|
// Counts network for geolocated users
|
||||||
$array_geolocated = array();
|
$array_geolocated = array();
|
||||||
$num = 0;
|
$num = 0;
|
||||||
if ($users_geolocated > 0) {
|
if ($users_geolocated > 0) {
|
||||||
foreach($users_geolocated_query->result() as $row) {
|
foreach($users_geolocated_query->result() as $row) {
|
||||||
$num++;
|
$num++;
|
||||||
$array_geolocated[] = date("M", strtotime($row->date_created));
|
$array_geolocated[] = date("M", strtotime($row->date_created));
|
||||||
}
|
}
|
||||||
$vals_geolocated = array_count_values($array_geolocated);
|
$vals_geolocated = array_count_values($array_geolocated);
|
||||||
//echo 'No. of NON Duplicate Items: '.count($vals_geolocated).'<br><br>';
|
//echo 'No. of NON Duplicate Items: '.count($vals_geolocated).'<br><br>';
|
||||||
//print_r($vals_geolocated);
|
//print_r($vals_geolocated);
|
||||||
$pieChart = array();
|
$pieChart = array();
|
||||||
foreach(array_keys($vals_geolocated) as $paramName) {
|
foreach(array_keys($vals_geolocated) as $paramName) {
|
||||||
$color = dechex(rand(0x000000, 0xFFFFFF));
|
$color = dechex(rand(0x000000, 0xFFFFFF));
|
||||||
$trash = array("value" => $vals_geolocated[$paramName],
|
$trash = array("value" => $vals_geolocated[$paramName],
|
||||||
"color" => "#".$color,
|
"color" => "#".$color,
|
||||||
"highlight" => "#".$color,
|
"highlight" => "#".$color,
|
||||||
"label" => $paramName);
|
"label" => $paramName);
|
||||||
|
|
||||||
$pieChart[]= $trash;
|
$pieChart[]= $trash;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$pieChart = array();
|
$pieChart = array();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1>
|
<h1>
|
||||||
<?php echo $this->lang->line('Superviseur'); ?>
|
<?php echo $this->lang->line('Superviseur'); ?>
|
||||||
<small><?php echo $this->lang->line('Tableau de bord'); ?></small>
|
<small><?php echo $this->lang->line('Tableau de bord'); ?></small>
|
||||||
</h1>
|
</h1>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<!-- Small boxes (Stat box) -->
|
<!-- Small boxes (Stat box) -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-lg-3 col-xs-6">
|
<div class="col-lg-2 col-md-4 col-xs-6">
|
||||||
<!-- small box -->
|
<!-- small box -->
|
||||||
<div class="small-box bg-yellow">
|
<div class="small-box bg-yellow">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3><?php echo $count_g_users;?></h3>
|
<h3><?php echo $count_g_users;?></h3>
|
||||||
|
|
||||||
<p><?php echo $this->lang->line('Utilisateurs géolocalisés'); ?></p>
|
<p><?php echo $this->lang->line('Utilisateurs géolocalisés'); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<i class="ion ion-person-add"></i>
|
<i class="ion ion-location"></i>
|
||||||
</div>
|
</div>
|
||||||
<a href="<?php echo base_url('index.php/Superviseur_dash/getAllUser_g') ?>" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?><i class="fa fa-arrow-circle-right"></i></a>
|
<a href="<?php echo base_url('index.php/Superviseur_dash/getAllUser_g') ?>" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?><i class="fa fa-arrow-circle-right"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-3 col-xs-6">
|
<div class="col-lg-2 col-md-4 col-xs-6">
|
||||||
<!-- small box -->
|
<!-- small box -->
|
||||||
<div class="small-box bg-aqua">
|
<div class="small-box bg-aqua">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3><?php echo $count_d_users;?></h3>
|
<h3><?php echo $count_d_users;?></h3>
|
||||||
|
|
||||||
<p><?php echo $this->lang->line('Demandes de crédits'); ?></p>
|
<p><?php echo $this->lang->line('Demandes de crédits'); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<i class="ion ion-cash"></i>
|
<i class="ion ion-cash"></i>
|
||||||
</div>
|
</div>
|
||||||
<a href="<?php echo base_url('index.php/Superviseur_dash/getDemandes') ?>" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?><i class="fa fa-arrow-circle-right"></i></a>
|
<a href="<?php echo base_url('index.php/Superviseur_dash/getDemandes') ?>" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?><i class="fa fa-arrow-circle-right"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-3 col-xs-6">
|
<div class="col-lg-2 col-md-4 col-xs-6">
|
||||||
<!-- small box -->
|
<!-- small box -->
|
||||||
<div class="small-box bg-green">
|
<div class="small-box bg-green">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3><?php echo $count_d_traite;?></h3>
|
<h3><?php echo $count_d_traite;?></h3>
|
||||||
|
|
||||||
<p><?php echo $this->lang->line('Demandes traitées'); ?></p>
|
<p><?php echo $this->lang->line('Demandes traitées'); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<i class="ion ion-checkmark-circled"></i>
|
<i class="ion ion-checkmark-circled"></i>
|
||||||
</div>
|
</div>
|
||||||
<a href="<?php echo base_url('index.php/Superviseur_dash/getDemandes') ?>" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?><i class="fa fa-arrow-circle-right"></i></a>
|
<a href="<?php echo base_url('index.php/Superviseur_dash/getDemandes') ?>" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?><i class="fa fa-arrow-circle-right"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-3 col-xs-6">
|
<div class="col-lg-2 col-md-4 col-xs-6">
|
||||||
<!-- small box -->
|
<!-- small box -->
|
||||||
<div class="small-box bg-red">
|
<div class="small-box bg-orange">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3><?php echo $count_d_no_traite;?></h3>
|
<h3><?php echo $count_d_no_traite;?></h3>
|
||||||
|
|
||||||
<p><?php echo $this->lang->line('Demandes non traitées'); ?></p>
|
<p><?php echo $this->lang->line('Demandes non traitées'); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<i class="ion ion-close-circled"></i>
|
<i class="ion ion-alert-circled"></i>
|
||||||
</div>
|
</div>
|
||||||
<a href="<?php echo base_url('index.php/Superviseur_dash/getDemandes') ?>" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
|
<a href="<?php echo base_url('index.php/Superviseur_dash/getDemandes') ?>" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-lg-2 col-md-4 col-xs-6">
|
||||||
<div class="col-xs-12">
|
<!-- small box -->
|
||||||
<!-- BAR CHART -->
|
<div class="small-box bg-red">
|
||||||
<div class="box box-success">
|
<div class="inner">
|
||||||
<div class="box-header with-border">
|
<h3><?php echo $count_d_no_canceled;?></h3>
|
||||||
<h3 class="box-title"><?php echo $this->lang->line('Adhésions'); ?></h3>
|
|
||||||
</div>
|
<p><?php echo $this->lang->line("canceled_demands"); ?></p>
|
||||||
<div class="box-body">
|
</div>
|
||||||
<div class="chart">
|
<div class="icon">
|
||||||
<canvas id="barChart" style="height:230px"></canvas>
|
<i class="ion ion-close-circled"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<a href="#" data-toggle="modal" data-target="#modal-default2" class="small-box-footer"><?php echo $this->lang->line("Plus d'informations"); ?> <i class="fa fa-arrow-circle-right"></i></a>
|
||||||
<!-- /.box-body -->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box -->
|
|
||||||
</div>
|
<div class="col-xs-12">
|
||||||
<!-- /.col -->
|
<!-- BAR CHART -->
|
||||||
<div class="col-xs-6">
|
<div class="box box-success">
|
||||||
<!-- DONUT CHART -->
|
<div class="box-header with-border">
|
||||||
<div class="box box-danger">
|
<h3 class="box-title"><?php echo $this->lang->line('Adhésions'); ?></h3>
|
||||||
<div class="box-header with-border">
|
</div>
|
||||||
<h3 class="box-title"><?php echo $this->lang->line('Adhésions par mois sur une année'); ?></h3>
|
<div class="box-body">
|
||||||
</div>
|
<div class="chart">
|
||||||
<div class="box-body" id="chartAd">
|
<canvas id="barChart" style="height:230px"></canvas>
|
||||||
<canvas id="pieChart" style="height:250px"></canvas>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-body -->
|
<!-- /.box-body -->
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box -->
|
<!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6">
|
<!-- /.col -->
|
||||||
<!-- DONUT CHART -->
|
<div class="col-xs-6">
|
||||||
<div class="box box-danger">
|
<!-- DONUT CHART -->
|
||||||
<div class="box-header with-border">
|
<div class="box box-danger">
|
||||||
<h3 class="box-title"><?php echo $this->lang->line('Demande de crédits par utilisateurs'); ?></h3>
|
<div class="box-header with-border">
|
||||||
</div>
|
<h3 class="box-title"><?php echo $this->lang->line('Adhésions par mois sur une année'); ?></h3>
|
||||||
<div class="box-body" id="chartDem">
|
</div>
|
||||||
<canvas id="pieChart2" style="height:250px"></canvas>
|
<div class="box-body" id="chartAd">
|
||||||
</div>
|
<canvas id="pieChart" style="height:250px"></canvas>
|
||||||
<!-- /.box-body -->
|
</div>
|
||||||
</div>
|
<!-- /.box-body -->
|
||||||
<!-- /.box -->
|
</div>
|
||||||
</div>
|
<!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
<!-- /.row -->
|
<div class="col-xs-6">
|
||||||
</section>
|
<!-- DONUT CHART -->
|
||||||
|
<div class="box box-danger">
|
||||||
</div>
|
<div class="box-header with-border">
|
||||||
|
<h3 class="box-title"><?php echo $this->lang->line('Demande de crédits par utilisateurs'); ?></h3>
|
||||||
|
</div>
|
||||||
<!-- jQuery 3 -->
|
<div class="box-body" id="chartDem">
|
||||||
<script src="<?php echo base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script>
|
<canvas id="pieChart2" style="height:250px"></canvas>
|
||||||
<!-- jQuery UI 1.11.4 -->
|
</div>
|
||||||
<script src="<?php echo base_url('bower_components/jquery-ui/jquery-ui.min.js') ?>"></script>
|
<!-- /.box-body -->
|
||||||
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
|
</div>
|
||||||
<script>
|
<!-- /.box -->
|
||||||
$.widget.bridge('uibutton', $.ui.button);
|
</div>
|
||||||
</script>
|
</div>
|
||||||
<!-- Bootstrap 3.3.7 -->
|
<!-- /.row -->
|
||||||
<script src="<?php echo base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
|
</section>
|
||||||
<!-- Morris.js charts -->
|
|
||||||
<script src="<?php echo base_url('bower_components/raphael/raphael.min.js') ?>"></script>
|
</div>
|
||||||
<!-- Sparkline -->
|
|
||||||
<script src="<?php echo base_url('bower_components/jquery-sparkline/dist/jquery.sparkline.min.js') ?>"></script>
|
|
||||||
<!-- jvectormap -->
|
<!-- jQuery 3 -->
|
||||||
<script src="<?php echo base_url('plugins/jvectormap/jquery-jvectormap-1.2.2.min.js') ?>"></script>
|
<script src="<?php echo base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script>
|
||||||
<script src="<?php echo base_url('plugins/jvectormap/jquery-jvectormap-world-mill-en.js') ?>"></script>
|
<!-- jQuery UI 1.11.4 -->
|
||||||
<!-- jQuery Knob Chart -->
|
<script src="<?php echo base_url('bower_components/jquery-ui/jquery-ui.min.js') ?>"></script>
|
||||||
<script src="<?php echo base_url('bower_components/jquery-knob/dist/jquery.knob.min.js') ?>"></script>
|
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
|
||||||
<!-- daterangepicker -->
|
<script>
|
||||||
<script src="<?php echo base_url('bower_components/moment/min/moment.min.js') ?>"></script>
|
$.widget.bridge('uibutton', $.ui.button);
|
||||||
<script src="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.js') ?>"></script>
|
</script>
|
||||||
<!-- datepicker -->
|
<!-- Bootstrap 3.3.7 -->
|
||||||
<script src="<?php echo base_url('bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js') ?>"></script>
|
<script src="<?php echo base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
|
||||||
<!-- Bootstrap WYSIHTML5 -->
|
<!-- Morris.js charts -->
|
||||||
<script src="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js') ?>"></script>
|
<script src="<?php echo base_url('bower_components/raphael/raphael.min.js') ?>"></script>
|
||||||
<!-- Slimscroll -->
|
<!-- Sparkline -->
|
||||||
<script src="<?php echo base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script>
|
<script src="<?php echo base_url('bower_components/jquery-sparkline/dist/jquery.sparkline.min.js') ?>"></script>
|
||||||
<!-- FastClick -->
|
<!-- jvectormap -->
|
||||||
<script src="<?php echo base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
|
<script src="<?php echo base_url('plugins/jvectormap/jquery-jvectormap-1.2.2.min.js') ?>"></script>
|
||||||
<!-- AdminLTE App -->
|
<script src="<?php echo base_url('plugins/jvectormap/jquery-jvectormap-world-mill-en.js') ?>"></script>
|
||||||
<script src="<?php echo base_url('dist/js/adminlte.min.js') ?>"></script>
|
<!-- jQuery Knob Chart -->
|
||||||
<!-- AdminLTE for demo purposes -->
|
<script src="<?php echo base_url('bower_components/jquery-knob/dist/jquery.knob.min.js') ?>"></script>
|
||||||
<script src="<?php echo base_url('dist/js/demo.js') ?>"></script>
|
<!-- daterangepicker -->
|
||||||
|
<script src="<?php echo base_url('bower_components/moment/min/moment.min.js') ?>"></script>
|
||||||
<!-- ChartJS -->
|
<script src="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.js') ?>"></script>
|
||||||
<script src="<?php echo base_url('bower_components/chart.js/Chart.js') ?>"></script>
|
<!-- datepicker -->
|
||||||
|
<script src="<?php echo base_url('bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js') ?>"></script>
|
||||||
<script >
|
<!-- Bootstrap WYSIHTML5 -->
|
||||||
/*
|
<script src="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js') ?>"></script>
|
||||||
|
<!-- Slimscroll -->
|
||||||
var cities = [];
|
<script src="<?php echo base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script>
|
||||||
var cities_simple = [];
|
<!-- FastClick -->
|
||||||
|
<script src="<?php echo base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
|
||||||
//console.log(geocodeposition(52.5487429714954,-1.81602098644987));
|
<!-- AdminLTE App -->
|
||||||
|
<script src="<?php echo base_url('dist/js/adminlte.min.js') ?>"></script>
|
||||||
|
<!-- AdminLTE for demo purposes -->
|
||||||
for(var i = 0 ; i < 1 ; i++ ) {
|
<script src="<?php echo base_url('dist/js/demo.js') ?>"></script>
|
||||||
var cit;
|
|
||||||
var latit = Number(users[i]['latitude']);
|
<!-- ChartJS -->
|
||||||
var longi = Number(users[i]['longitude']);
|
<script src="<?php echo base_url('bower_components/chart.js/Chart.js') ?>"></script>
|
||||||
|
|
||||||
|
<script >
|
||||||
//cit = geocodeposition(latit, longi);
|
/*
|
||||||
cities[i] = {};
|
|
||||||
cities[i] = cit;
|
var cities = [];
|
||||||
}
|
var cities_simple = [];
|
||||||
*/
|
|
||||||
//console.log(cities);
|
//console.log(geocodeposition(52.5487429714954,-1.81602098644987));
|
||||||
|
|
||||||
var Pie = '<?php echo json_encode($pieChart) ?>';
|
|
||||||
if(Pie==='[]'){
|
for(var i = 0 ; i < 1 ; i++ ) {
|
||||||
var select = document.getElementById('chartAd');
|
var cit;
|
||||||
$(select.children).hide();
|
var latit = Number(users[i]['latitude']);
|
||||||
$(select).append("<p><?php echo $this->lang->line('Aucune adhesion'); ?></p>");
|
var longi = Number(users[i]['longitude']);
|
||||||
}else{
|
|
||||||
Pie = JSON.parse(Pie);
|
|
||||||
}
|
//cit = geocodeposition(latit, longi);
|
||||||
|
cities[i] = {};
|
||||||
var Pie2 = '<?php echo json_encode($pieChart2) ?>';
|
cities[i] = cit;
|
||||||
if(Pie2==='[]') {
|
}
|
||||||
var select = document.getElementById('chartDem');
|
*/
|
||||||
$(select.children).hide();
|
//console.log(cities);
|
||||||
$(select).append("<p><?php echo $this->lang->line('Aucune demande'); ?></p>");
|
|
||||||
}else{
|
var Pie = '<?php echo json_encode($pieChart) ?>';
|
||||||
Pie2 = JSON.parse(Pie2);
|
if(Pie==='[]'){
|
||||||
}
|
var select = document.getElementById('chartAd');
|
||||||
|
$(select.children).hide();
|
||||||
|
$(select).append("<p><?php echo $this->lang->line('Aucune adhesion'); ?></p>");
|
||||||
|
}else{
|
||||||
var areaChartData = {
|
Pie = JSON.parse(Pie);
|
||||||
labels : <?php echo json_encode($label_months) ?>,
|
}
|
||||||
datasets: [
|
|
||||||
{
|
var Pie2 = '<?php echo json_encode($pieChart2) ?>';
|
||||||
label : 'Electronics',
|
if(Pie2==='[]') {
|
||||||
fillColor : 'rgba(255, 162, 0, 1)',
|
var select = document.getElementById('chartDem');
|
||||||
strokeColor : 'rgba(255, 162, 0, 1)',
|
$(select.children).hide();
|
||||||
pointColor : 'rgba(255, 162, 0, 1)',
|
$(select).append("<p><?php echo $this->lang->line('Aucune demande'); ?></p>");
|
||||||
pointStrokeColor : '#ffa200',
|
}else{
|
||||||
pointHighlightFill : '#fff',
|
Pie2 = JSON.parse(Pie2);
|
||||||
pointHighlightStroke: 'rgba(220,220,220,1)',
|
}
|
||||||
data: <?php echo json_encode($users_geolocated_data) ?>
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label : 'Digital Goods',
|
var areaChartData = {
|
||||||
fillColor : 'rgba(0, 187, 255, 1)',
|
labels : <?php echo json_encode($label_months) ?>,
|
||||||
strokeColor : 'rgba(0, 187, 255, 1)',
|
datasets: [
|
||||||
pointColor : '#00bbff',
|
{
|
||||||
pointStrokeColor : 'rgba(0, 187, 255, 1)',
|
label : 'Electronics',
|
||||||
pointHighlightFill : '#fff',
|
fillColor : 'rgba(255, 162, 0, 1)',
|
||||||
pointHighlightStroke: 'rgba(0, 187, 255, 1)',
|
strokeColor : 'rgba(255, 162, 0, 1)',
|
||||||
data : <?php echo json_encode($demandes_data) ?>
|
pointColor : 'rgba(255, 162, 0, 1)',
|
||||||
}
|
pointStrokeColor : '#ffa200',
|
||||||
]
|
pointHighlightFill : '#fff',
|
||||||
};
|
pointHighlightStroke: 'rgba(220,220,220,1)',
|
||||||
|
data: <?php echo json_encode($users_geolocated_data) ?>
|
||||||
var ctx = document.getElementById('barChart').getContext('2d');
|
},
|
||||||
var chart = new Chart(ctx, {
|
{
|
||||||
// The type of chart we want to create
|
label : 'Digital Goods',
|
||||||
type: 'line',
|
fillColor : 'rgba(0, 187, 255, 1)',
|
||||||
|
strokeColor : 'rgba(0, 187, 255, 1)',
|
||||||
// The data for our dataset
|
pointColor : '#00bbff',
|
||||||
data: {
|
pointStrokeColor : 'rgba(0, 187, 255, 1)',
|
||||||
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July','August','September','October','November','December'],
|
pointHighlightFill : '#fff',
|
||||||
datasets: [{
|
pointHighlightStroke: 'rgba(0, 187, 255, 1)',
|
||||||
label: "My First dataset",
|
data : <?php echo json_encode($demandes_data) ?>
|
||||||
backgroundColor: 'rgb(255, 99, 132)',
|
}
|
||||||
borderColor: 'rgb(255, 99, 132)',
|
]
|
||||||
data: [0, 10, 5, 2, 20, 30, 45]
|
};
|
||||||
}]
|
|
||||||
},
|
var ctx = document.getElementById('barChart').getContext('2d');
|
||||||
|
var chart = new Chart(ctx, {
|
||||||
// Configuration options go here
|
// The type of chart we want to create
|
||||||
options: {}
|
type: 'line',
|
||||||
});
|
|
||||||
</script>
|
// The data for our dataset
|
||||||
<!-- Page script -->
|
data: {
|
||||||
<script src="<?php echo base_url('dist/js/custom.js') ?>"></script>
|
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July','August','September','October','November','December'],
|
||||||
|
datasets: [{
|
||||||
|
label: "My First dataset",
|
||||||
|
backgroundColor: 'rgb(255, 99, 132)',
|
||||||
|
borderColor: 'rgb(255, 99, 132)',
|
||||||
|
data: [0, 10, 5, 2, 20, 30, 45]
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
|
||||||
|
// Configuration options go here
|
||||||
|
options: {}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<!-- Page script -->
|
||||||
|
<script src="<?php echo base_url('dist/js/custom.js') ?>"></script>
|
||||||
|
|
Loading…
Reference in New Issue