+ Add detect timezone for client browser
This commit is contained in:
parent
eb893a50fd
commit
2ad9e3d20d
|
@ -9,6 +9,7 @@ class Gestion extends CI_Controller
|
||||||
{
|
{
|
||||||
parent::_contruct();
|
parent::_contruct();
|
||||||
$this->load->model('user_model');
|
$this->load->model('user_model');
|
||||||
|
date_default_timezone_set ($this->session->userdata('timezone'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
|
|
|
@ -13,6 +13,7 @@ class Hyperviseur_dash extends CI_Controller
|
||||||
{
|
{
|
||||||
parent::_contruct();
|
parent::_contruct();
|
||||||
$this->load->model('user_model');
|
$this->load->model('user_model');
|
||||||
|
date_default_timezone_set ($this->session->userdata('timezone'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
|
|
|
@ -8,6 +8,7 @@ class Superviseur_dash extends CI_Controller
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
$this->load->model('Users_simple');
|
$this->load->model('Users_simple');
|
||||||
$this->load->model('User_model');
|
$this->load->model('User_model');
|
||||||
|
date_default_timezone_set ($this->session->userdata('timezone'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
|
|
|
@ -77,6 +77,8 @@
|
||||||
$data = $this->user_model->login_user($user_login['user_email'], $user_login['user_password'], $user_login['user_role']);
|
$data = $this->user_model->login_user($user_login['user_email'], $user_login['user_password'], $user_login['user_role']);
|
||||||
|
|
||||||
if ($data) {
|
if ($data) {
|
||||||
|
$this->session->set_userdata('timezone' ,$this->input->post('timezone') );
|
||||||
|
date_default_timezone_set ($this->session->userdata('timezone'));
|
||||||
|
|
||||||
$hyper = "hyper";
|
$hyper = "hyper";
|
||||||
$super = "super";
|
$super = "super";
|
||||||
|
|
|
@ -2,6 +2,17 @@
|
||||||
<link rel="stylesheet" href="bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
|
<link rel="stylesheet" href="bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="content-header">
|
<div class="content-header">
|
||||||
|
<?php
|
||||||
|
use Carbon\Carbon;
|
||||||
|
function toLocateDate($date , $timezone){
|
||||||
|
if($date){
|
||||||
|
$carbon = Carbon::createFromFormat('Y-m-d H:i:s', $date, 'UTC');
|
||||||
|
$carbon->setTimezone($timezone);
|
||||||
|
return $carbon->toDateTimeString();
|
||||||
|
}
|
||||||
|
return $date;
|
||||||
|
}
|
||||||
|
?>
|
||||||
<?php
|
<?php
|
||||||
if($alert=="ok") {
|
if($alert=="ok") {
|
||||||
if(!$success=="ok"){
|
if(!$success=="ok"){
|
||||||
|
@ -96,7 +107,7 @@
|
||||||
<td>$num</td>
|
<td>$num</td>
|
||||||
<td> $row->code_membre </td>
|
<td> $row->code_membre </td>
|
||||||
<td >$row->category</td>
|
<td >$row->category</td>
|
||||||
<td>$row->date_creation</td>
|
<td>".toLocateDate($row->date_creation,$this->session->userdata('timezone'))."</td>
|
||||||
<td>$statut</td>
|
<td>$statut</td>
|
||||||
<td>
|
<td>
|
||||||
<a href='#myModal-2".$num."' role='button' data-toggle='modal'><i class='fa fa-remove'></i></a>
|
<a href='#myModal-2".$num."' role='button' data-toggle='modal'><i class='fa fa-remove'></i></a>
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
use Carbon\Carbon;
|
||||||
function duree($time) {
|
function duree($time) {
|
||||||
$tabTemps = array("jours" => 86400,
|
$tabTemps = array("jours" => 86400,
|
||||||
"h" => 3600,
|
"h" => 3600,
|
||||||
|
@ -58,6 +59,14 @@
|
||||||
return duree($time);
|
return duree($time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function toLocateDate($date , $timezone){
|
||||||
|
if($date){
|
||||||
|
$carbon = Carbon::createFromFormat('Y-m-d H:i:s', $date, 'UTC');
|
||||||
|
$carbon->setTimezone($timezone);
|
||||||
|
return $carbon->toDateTimeString();
|
||||||
|
}
|
||||||
|
return $date;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
|
@ -88,12 +97,12 @@
|
||||||
<div class="info-box">
|
<div class="info-box">
|
||||||
<span class="info-box-icon bg-aqua"><i class="ion ion-android-time"></i></span>
|
<span class="info-box-icon bg-aqua"><i class="ion ion-android-time"></i></span>
|
||||||
<div class="info-box-content">
|
<div class="info-box-content">
|
||||||
<?php
|
<!-- --><?php
|
||||||
if($this->session->userdata('category') == "super"){
|
// if($this->session->userdata('category') == "super"){
|
||||||
if(isset($nameOfcurentGeolocatedUser))
|
// if(isset($nameOfcurentGeolocatedUser))
|
||||||
echo "<span class='info-box-number'>".$nameOfcurentGeolocatedUser."</span>";
|
// echo "<span class='info-box-number'>".$nameOfcurentGeolocatedUser."</span>";
|
||||||
}
|
// }
|
||||||
?>
|
// ?>
|
||||||
<span class="info-box-text"> <?php echo $this->lang->line('Période') ?> </span>
|
<span class="info-box-text"> <?php echo $this->lang->line('Période') ?> </span>
|
||||||
<span class="info-box-number">
|
<span class="info-box-number">
|
||||||
<input id="picker" style="background: #fff; cursor: pointer; padding: 1px 1px; border: 1px solid #ccc; width: 100%" type="text" name="daterange" data-lang="<?php echo $this->session->userdata('site_lang') ?>"
|
<input id="picker" style="background: #fff; cursor: pointer; padding: 1px 1px; border: 1px solid #ccc; width: 100%" type="text" name="daterange" data-lang="<?php echo $this->session->userdata('site_lang') ?>"
|
||||||
|
@ -162,8 +171,8 @@
|
||||||
<td> $row->phone </td>
|
<td> $row->phone </td>
|
||||||
<td >Super </td>
|
<td >Super </td>
|
||||||
<td>$row->code_membre</td>
|
<td>$row->code_membre</td>
|
||||||
<td>$row->date_creation </td>
|
<td>".toLocateDate($row->date_creation,$this->session->userdata('timezone'))."</td>
|
||||||
<td > $row->date_modified</td>
|
<td > ".toLocateDate($row->date_modified,$this->session->userdata('timezone'))."</td>
|
||||||
<td>$etat</td>
|
<td>$etat</td>
|
||||||
<td>".traitementTemps($row->temps,$row->date_creation)."</td>
|
<td>".traitementTemps($row->temps,$row->date_creation)."</td>
|
||||||
|
|
||||||
|
@ -237,8 +246,8 @@
|
||||||
<td>$num</td>
|
<td>$num</td>
|
||||||
<td>$row->emetteur</td>
|
<td>$row->emetteur</td>
|
||||||
<td>$superviseur</td>
|
<td>$superviseur</td>
|
||||||
<td>$row->dateA</td>
|
<td>".toLocateDate($row->dateA,$this->session->userdata('timezone'))."</td>
|
||||||
<td>$row->dateM</td>
|
<td > ".toLocateDate($row->dateM,$this->session->userdata('timezone'))."</td>
|
||||||
<td>".duree($row->temps)."</td>
|
<td>".duree($row->temps)."</td>
|
||||||
|
|
||||||
</tr>";
|
</tr>";
|
||||||
|
@ -305,30 +314,17 @@
|
||||||
if($row->superviseur==$this->session->userdata('member_code')){
|
if($row->superviseur==$this->session->userdata('member_code')){
|
||||||
$superviseur = $this->lang->line('Vous');
|
$superviseur = $this->lang->line('Vous');
|
||||||
}
|
}
|
||||||
if($type==$this->lang->line('Adhésion')){
|
|
||||||
echo "<tr>
|
echo "<tr>
|
||||||
|
|
||||||
<td>$num</td>
|
<td>$num</td>
|
||||||
<td>$row->emetteur</td>
|
<td>$row->emetteur</td>
|
||||||
<td>$superviseur</td>
|
<td>$superviseur</td>
|
||||||
<td>$row->dateA</td>
|
<td>".toLocateDate($row->dateA,$this->session->userdata('timezone'))."</td>
|
||||||
<td>$row->dateM</td>
|
<td> ".toLocateDate($row->dateM,$this->session->userdata('timezone'))."</td>
|
||||||
<td>".duree($row->temps)."</td>
|
|
||||||
|
|
||||||
</tr>";}else{
|
|
||||||
echo "<tr>
|
|
||||||
|
|
||||||
<td>$num</td>
|
|
||||||
<td>$row->emetteur</td>
|
|
||||||
<td>$superviseur</td>
|
|
||||||
<td>$row->montant</td>
|
|
||||||
<td>$row->dateA</td>
|
|
||||||
<td>$row->dateM</td>
|
|
||||||
<td>".duree($row->temps)."</td>
|
<td>".duree($row->temps)."</td>
|
||||||
|
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
use Carbon\Carbon;
|
||||||
function duree($time)
|
function duree($time)
|
||||||
{
|
{
|
||||||
$tabTemps = array("jours" => 86400,
|
$tabTemps = array("jours" => 86400,
|
||||||
|
@ -61,6 +62,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toLocateDate($date , $timezone){
|
||||||
|
if($date){
|
||||||
|
$carbon = Carbon::createFromFormat('Y-m-d H:i:s', $date, 'UTC');
|
||||||
|
$carbon->setTimezone($timezone);
|
||||||
|
return $carbon->toDateTimeString();
|
||||||
|
}
|
||||||
|
return $date;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
|
@ -216,26 +226,6 @@
|
||||||
// output data of each row
|
// output data of each row
|
||||||
foreach ($result->result() as $row) {
|
foreach ($result->result() as $row) {
|
||||||
$num++;
|
$num++;
|
||||||
if ($type == $this->lang->line('Adhésion')) {
|
|
||||||
$etat = $this->lang->line("Non traitée");
|
|
||||||
if ($row->etat == 1) {
|
|
||||||
$etat = $this->lang->line("traitée");
|
|
||||||
}
|
|
||||||
$code = $row->code_membre;
|
|
||||||
if ($row->code_membre == $this->session->userdata('member_code')) {
|
|
||||||
$code = $this->lang->line('Vous');
|
|
||||||
}
|
|
||||||
echo "<tr>
|
|
||||||
|
|
||||||
<td> $row->phone </td>
|
|
||||||
<td>$code</td>
|
|
||||||
<td>$row->dateAjout </td>
|
|
||||||
<td > $row->dateModif</td>
|
|
||||||
<td>$etat</td>
|
|
||||||
<td>" . traitementTemps($row->temps, $row->dateAjout) . "</td>
|
|
||||||
|
|
||||||
</tr>";
|
|
||||||
} else {
|
|
||||||
$etat = $this->lang->line("Non traitée");
|
$etat = $this->lang->line("Non traitée");
|
||||||
if ($row->statut == 1) {
|
if ($row->statut == 1) {
|
||||||
$etat = $this->lang->line("Acceptée");
|
$etat = $this->lang->line("Acceptée");
|
||||||
|
@ -251,17 +241,16 @@
|
||||||
$destination = $this->lang->line('Vous');
|
$destination = $this->lang->line('Vous');
|
||||||
}
|
}
|
||||||
echo "<tr>
|
echo "<tr>
|
||||||
|
|
||||||
<td> $row->phone</td>
|
<td> $row->phone</td>
|
||||||
<td >$origin </td>
|
<td >$origin </td>
|
||||||
<td > $row->montant</td>
|
<td > $row->montant</td>
|
||||||
<td>$row->dateAjout </td>
|
<td>".toLocateDate($row->dateAjout,$this->session->userdata('timezone'))."</td>
|
||||||
<td > $row->dateModif</td>
|
<td > ".toLocateDate($row->dateModif,$this->session->userdata('timezone'))."</td>
|
||||||
<td>$etat</td>
|
<td>$etat</td>
|
||||||
<td>" . traitementTemps($row->temps, $row->dateAjout) . "</td>
|
<td>" . traitementTemps($row->temps, $row->dateAjout) . "</td>
|
||||||
|
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -325,27 +314,7 @@
|
||||||
// output data of each row
|
// output data of each row
|
||||||
foreach ($result->result() as $row) {
|
foreach ($result->result() as $row) {
|
||||||
$num++;
|
$num++;
|
||||||
if ($type == $this->lang->line('Adhésion')) {
|
|
||||||
$etat = $this->lang->line("Non traitée");
|
|
||||||
if ($row->etat == 1) {
|
|
||||||
$etat = $this->lang->line("traitée");
|
|
||||||
}
|
|
||||||
$code = $row->code;
|
|
||||||
if ($row->code == $this->session->userdata('member_code')) {
|
|
||||||
$code = $this->lang->line('Vous');
|
|
||||||
}
|
|
||||||
echo "<tr>
|
|
||||||
|
|
||||||
<td> $row->phone </td>
|
|
||||||
<td >$row->categorie </td>
|
|
||||||
<td>$code</td>
|
|
||||||
<td>$row->dateAjout </td>
|
|
||||||
<td > $row->dateModif</td>
|
|
||||||
<td>$etat</td>
|
|
||||||
<td>" . traitementTemps($row->temps, $row->dateAjout) . "</td>
|
|
||||||
|
|
||||||
</tr>";
|
|
||||||
} else {
|
|
||||||
$etat = $this->lang->line("Non traitée");
|
$etat = $this->lang->line("Non traitée");
|
||||||
if ($row->statut == 1) {
|
if ($row->statut == 1) {
|
||||||
$etat = $this->lang->line("Acceptée");
|
$etat = $this->lang->line("Acceptée");
|
||||||
|
@ -363,13 +332,13 @@
|
||||||
echo "<tr>
|
echo "<tr>
|
||||||
|
|
||||||
<td > $row->montant</td>
|
<td > $row->montant</td>
|
||||||
<td>$row->dateAjout </td>
|
<td>".toLocateDate($row->dateAjout,$this->session->userdata('timezone'))."</td>
|
||||||
<td > $row->dateModif</td>
|
<td > ".toLocateDate($row->dateModif,$this->session->userdata('timezone'))."</td>
|
||||||
<td>$etat</td>
|
<td>$etat</td>
|
||||||
<td>" . traitementTemps($row->temps, $row->dateAjout) . "</td>
|
<td>" . traitementTemps($row->temps, $row->dateAjout) . "</td>
|
||||||
|
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -439,35 +408,19 @@
|
||||||
if ($row->superviseur == $this->session->userdata('member_code')) {
|
if ($row->superviseur == $this->session->userdata('member_code')) {
|
||||||
$superviseur = $this->lang->line('Vous');
|
$superviseur = $this->lang->line('Vous');
|
||||||
}
|
}
|
||||||
if ($type == $this->lang->line('Adhésion')) {
|
|
||||||
$etat = $this->lang->line("Non traitée");
|
|
||||||
if ($row->etat == 1) {
|
|
||||||
$etat = $this->lang->line("traitée");
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "<tr>
|
echo "<tr>
|
||||||
|
|
||||||
<td>$num</td>
|
|
||||||
<td>$row->emetteur</td>
|
|
||||||
<td>$superviseur</td>
|
|
||||||
<td>$row->dateA</td>
|
|
||||||
<td>$row->dateM</td>
|
|
||||||
<td>" . duree($row->temps) . "</td>
|
|
||||||
|
|
||||||
</tr>";
|
|
||||||
} else {
|
|
||||||
echo "<tr>
|
|
||||||
|
|
||||||
<td>$num</td>
|
<td>$num</td>
|
||||||
<td>$row->emetteur</td>
|
<td>$row->emetteur</td>
|
||||||
<td>$superviseur</td>
|
<td>$superviseur</td>
|
||||||
<td>$row->montant</td>
|
<td>$row->montant</td>
|
||||||
<td>$row->dateA</td>
|
<td>".toLocateDate($row->dateA,$this->session->userdata('timezone'))."</td>
|
||||||
<td>$row->dateM</td>
|
<td > ".toLocateDate($row->dateM,$this->session->userdata('timezone'))."</td>
|
||||||
<td>" . duree($row->temps) . "</td>
|
<td>" . duree($row->temps) . "</td>
|
||||||
|
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -535,31 +488,19 @@
|
||||||
if ($row->superviseur == $this->session->userdata('member_code')) {
|
if ($row->superviseur == $this->session->userdata('member_code')) {
|
||||||
$superviseur = $this->lang->line('Vous');
|
$superviseur = $this->lang->line('Vous');
|
||||||
}
|
}
|
||||||
if ($type == $this->lang->line('Adhésion')) {
|
|
||||||
|
|
||||||
echo "<tr>
|
echo "<tr>
|
||||||
|
|
||||||
<td>$num</td>
|
|
||||||
<td>$row->emetteur</td>
|
|
||||||
<td>$superviseur</td>
|
|
||||||
<td>$row->dateA</td>
|
|
||||||
<td>$row->dateM</td>
|
|
||||||
<td>" . duree($row->temps) . "</td>
|
|
||||||
|
|
||||||
</tr>";
|
|
||||||
} else {
|
|
||||||
echo "<tr>
|
|
||||||
|
|
||||||
<td>$num</td>
|
<td>$num</td>
|
||||||
<td>$row->emetteur</td>
|
<td>$row->emetteur</td>
|
||||||
<td>$superviseur</td>
|
<td>$superviseur</td>
|
||||||
<td>$row->montant</td>
|
<td>$row->montant</td>
|
||||||
<td>$row->dateA</td>
|
<td>".toLocateDate($row->dateA,$this->session->userdata('timezone'))."</td>
|
||||||
<td>$row->dateM</td>
|
<td> ".toLocateDate($row->dateM,$this->session->userdata('timezone'))."</td>
|
||||||
<td>" . duree($row->temps) . "</td>
|
<td>" . duree($row->temps) . "</td>
|
||||||
|
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -629,30 +570,19 @@
|
||||||
if ($row->superviseur == $this->session->userdata('member_code')) {
|
if ($row->superviseur == $this->session->userdata('member_code')) {
|
||||||
$superviseur = $this->lang->line('Vous');
|
$superviseur = $this->lang->line('Vous');
|
||||||
}
|
}
|
||||||
if ($type == $this->lang->line('Adhésion')) {
|
|
||||||
echo "<tr>
|
|
||||||
|
|
||||||
<td>$num</td>
|
|
||||||
<td>$row->emetteur</td>
|
|
||||||
<td>$superviseur</td>
|
|
||||||
<td>$row->dateA</td>
|
|
||||||
<td>$row->dateM</td>
|
|
||||||
<td>" . duree($row->temps) . "</td>
|
|
||||||
|
|
||||||
</tr>";
|
|
||||||
} else {
|
|
||||||
echo "<tr>
|
echo "<tr>
|
||||||
|
|
||||||
<td>$num</td>
|
<td>$num</td>
|
||||||
<td>$row->emetteur</td>
|
<td>$row->emetteur</td>
|
||||||
<td>$superviseur</td>
|
<td>$superviseur</td>
|
||||||
<td>$row->montant</td>
|
<td>$row->montant</td>
|
||||||
<td>$row->dateA</td>
|
<td>".toLocateDate($row->dateA,$this->session->userdata('timezone'))."</td>
|
||||||
<td>$row->dateM</td>
|
<td> ".toLocateDate($row->dateM,$this->session->userdata('timezone'))."</td>
|
||||||
<td>" . duree($row->temps) . "</td>
|
<td>" . duree($row->temps) . "</td>
|
||||||
|
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -732,30 +662,19 @@
|
||||||
if ($row->superviseur == $this->session->userdata('member_code')) {
|
if ($row->superviseur == $this->session->userdata('member_code')) {
|
||||||
$superviseur = $this->lang->line('Vous');
|
$superviseur = $this->lang->line('Vous');
|
||||||
}
|
}
|
||||||
if ($type == $this->lang->line('Adhésion')) {
|
|
||||||
echo "<tr>
|
|
||||||
|
|
||||||
<td>$num</td>
|
|
||||||
<td>$row->emetteur</td>
|
|
||||||
<td>$superviseur</td>
|
|
||||||
<td>$row->dateA</td>
|
|
||||||
<td>$row->dateM</td>
|
|
||||||
<td>" . duree($row->temps) . "</td>
|
|
||||||
|
|
||||||
</tr>";
|
|
||||||
} else {
|
|
||||||
echo "<tr>
|
echo "<tr>
|
||||||
|
|
||||||
<td>$num</td>
|
<td>$num</td>
|
||||||
<td>$row->emetteur</td>
|
<td>$row->emetteur</td>
|
||||||
<td>$superviseur</td>
|
<td>$superviseur</td>
|
||||||
<td>$row->montant</td>
|
<td>$row->montant</td>
|
||||||
<td>$row->dateA</td>
|
<td>".toLocateDate($row->dateA,$this->session->userdata('timezone'))."</td>
|
||||||
<td>$row->dateM</td>
|
<td> ".toLocateDate($row->dateM,$this->session->userdata('timezone'))."</td>
|
||||||
<td>" . duree($row->temps) . "</td>
|
<td>" . duree($row->temps) . "</td>
|
||||||
|
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -843,8 +762,8 @@
|
||||||
<td >$origin </td>
|
<td >$origin </td>
|
||||||
<td>$destination</td>
|
<td>$destination</td>
|
||||||
<td > $row->montant</td>
|
<td > $row->montant</td>
|
||||||
<td>$row->dateAjout </td>
|
<td>".toLocateDate($row->dateAjout,$this->session->userdata('timezone'))."</td>
|
||||||
<td > $row->dateModif</td>
|
<td> ".toLocateDate($row->dateModif,$this->session->userdata('timezone'))."</td>
|
||||||
<td>$etat</td>
|
<td>$etat</td>
|
||||||
<td>" . traitementTemps($row->temps, $row->dateAjout) . "</td>
|
<td>" . traitementTemps($row->temps, $row->dateAjout) . "</td>
|
||||||
|
|
||||||
|
@ -923,8 +842,8 @@
|
||||||
<td>$row->emetteur</td>
|
<td>$row->emetteur</td>
|
||||||
<td>$superviseur</td>
|
<td>$superviseur</td>
|
||||||
<td>$row->montant</td>
|
<td>$row->montant</td>
|
||||||
<td>$row->dateA</td>
|
<td>".toLocateDate($row->dateA,$this->session->userdata('timezone'))."</td>
|
||||||
<td>$row->dateM</td>
|
<td> ".toLocateDate($row->dateM,$this->session->userdata('timezone'))."</td>
|
||||||
<td>" . duree($row->temps) . "</td>
|
<td>" . duree($row->temps) . "</td>
|
||||||
|
|
||||||
</tr>";
|
</tr>";
|
||||||
|
@ -1001,8 +920,8 @@
|
||||||
<td>$row->emetteur</td>
|
<td>$row->emetteur</td>
|
||||||
<td>$superviseur</td>
|
<td>$superviseur</td>
|
||||||
<td>$row->montant</td>
|
<td>$row->montant</td>
|
||||||
<td>$row->dateA</td>
|
<td>".toLocateDate($row->dateA,$this->session->userdata('timezone'))."</td>
|
||||||
<td>$row->dateM</td>
|
<td> ".toLocateDate($row->dateM,$this->session->userdata('timezone'))."</td>
|
||||||
<td>" . duree($row->temps) . "</td>
|
<td>" . duree($row->temps) . "</td>
|
||||||
|
|
||||||
</tr>";
|
</tr>";
|
||||||
|
|
|
@ -4,7 +4,17 @@
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css"/>
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css"/>
|
||||||
|
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
<?php
|
||||||
|
use Carbon\Carbon;
|
||||||
|
function toLocateDate($date , $timezone){
|
||||||
|
if($date){
|
||||||
|
$carbon = Carbon::createFromFormat('Y-m-d H:i:s', $date, 'UTC');
|
||||||
|
$carbon->setTimezone($timezone);
|
||||||
|
return $carbon->toDateTimeString();
|
||||||
|
}
|
||||||
|
return $date;
|
||||||
|
}
|
||||||
|
?>
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
|
|
||||||
|
@ -92,7 +102,7 @@
|
||||||
echo "<tr>
|
echo "<tr>
|
||||||
<td align='center' >$num</td>
|
<td align='center' >$num</td>
|
||||||
<td>".$fmt->format($row->montant)."</td>
|
<td>".$fmt->format($row->montant)."</td>
|
||||||
<td> $row->date</td>
|
<td>".toLocateDate($row->date,$this->session->userdata('timezone'))."</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -4,7 +4,17 @@
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css"/>
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css"/>
|
||||||
|
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
<?php
|
||||||
|
use Carbon\Carbon;
|
||||||
|
function toLocateDate($date , $timezone){
|
||||||
|
if($date){
|
||||||
|
$carbon = Carbon::createFromFormat('Y-m-d H:i:s', $date, 'UTC');
|
||||||
|
$carbon->setTimezone($timezone);
|
||||||
|
return $carbon->toDateTimeString();
|
||||||
|
}
|
||||||
|
return $date;
|
||||||
|
}
|
||||||
|
?>
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
|
|
||||||
|
@ -103,7 +113,7 @@
|
||||||
<td>".$fmt->format( $row->commission_hyp)."</td>
|
<td>".$fmt->format( $row->commission_hyp)."</td>
|
||||||
<td>".$fmt->format( $row->commission_sup)."</td>
|
<td>".$fmt->format( $row->commission_sup)."</td>
|
||||||
<td>".$fmt->format( $row->commission_ag)."</td>
|
<td>".$fmt->format( $row->commission_ag)."</td>
|
||||||
<td> $row->date_created</td>
|
<td>".toLocateDate($row->date_created,$this->session->userdata('timezone'))."</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form action="<?php echo base_url('index.php/login_user') ?>" method="post" class="bottom-75">
|
<form id="loginForm" action="<?php echo base_url('index.php/login_user') ?>" method="post" class="bottom-75">
|
||||||
<div class="table-form">
|
<div class="table-form">
|
||||||
<div class="form-groups">
|
<div class="form-groups">
|
||||||
<div class="input-group date" style="margin-bottom : 10px;">
|
<div class="input-group date" style="margin-bottom : 10px;">
|
||||||
|
@ -164,6 +164,22 @@
|
||||||
<script src="<?php echo base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
|
<script src="<?php echo base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
|
||||||
<!-- iCheck -->
|
<!-- iCheck -->
|
||||||
<script src="<?php echo base_url('plugins/iCheck/icheck.min.js') ?>"></script>
|
<script src="<?php echo base_url('plugins/iCheck/icheck.min.js') ?>"></script>
|
||||||
|
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jstimezonedetect/1.0.7/jstz.min.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
var tz = jstz.determine(); // Determines the time zone of the browser client
|
||||||
|
var timezone = tz.name(); //For e.g.:"Asia/Kolkata" for the Indian Time.
|
||||||
|
// Insert client timezone on login
|
||||||
|
$("#loginForm").submit( function(eventObj) {
|
||||||
|
$("<input />").attr("type", "hidden")
|
||||||
|
.attr("name", "timezone")
|
||||||
|
.attr("value", timezone)
|
||||||
|
.appendTo("#loginForm");
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$('input').iCheck({
|
$('input').iCheck({
|
||||||
|
|
|
@ -3,6 +3,18 @@
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<?php
|
<?php
|
||||||
|
use Carbon\Carbon;
|
||||||
|
function toLocateDate($date , $timezone){
|
||||||
|
if($date){
|
||||||
|
$carbon = Carbon::createFromFormat('Y-m-d H:i:s', $date, 'UTC');
|
||||||
|
$carbon->setTimezone($timezone);
|
||||||
|
return $carbon->toDateTimeString();
|
||||||
|
}
|
||||||
|
return $date;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
$site_url = base_url();
|
$site_url = base_url();
|
||||||
|
|
||||||
if($alert=="ok") {
|
if($alert=="ok") {
|
||||||
|
@ -86,7 +98,7 @@
|
||||||
<td >$row->code_membre </td>
|
<td >$row->code_membre </td>
|
||||||
<td>$row->network</td>
|
<td>$row->network</td>
|
||||||
<td>$etat</td>
|
<td>$etat</td>
|
||||||
<td >$row->date_creation</td>";
|
<td >".toLocateDate($row->date_creation,$this->session->userdata('timezone'))."</td>";
|
||||||
if($row->etat==0){
|
if($row->etat==0){
|
||||||
echo "
|
echo "
|
||||||
<td>
|
<td>
|
||||||
|
@ -186,7 +198,7 @@
|
||||||
<td> $row->code_membre</td>
|
<td> $row->code_membre</td>
|
||||||
<td>$row->category </td>
|
<td>$row->category </td>
|
||||||
<td>$etat</td>
|
<td>$etat</td>
|
||||||
<td>$row->date_creation</td>
|
<td >".toLocateDate($row->date_creation,$this->session->userdata('timezone'))."</td>
|
||||||
<td>$row->code_parrain</td>
|
<td>$row->code_parrain</td>
|
||||||
<td>";
|
<td>";
|
||||||
if($row->etat==0){
|
if($row->etat==0){
|
||||||
|
|
|
@ -12,7 +12,8 @@
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.4",
|
"php": ">=5.4",
|
||||||
"spatie/async": "^1.4"
|
"spatie/async": "^1.4",
|
||||||
|
"nesbot/carbon": "^2.33"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"paragonie/random_compat": "Provides better randomness in PHP 5.x"
|
"paragonie/random_compat": "Provides better randomness in PHP 5.x"
|
||||||
|
|
Loading…
Reference in New Issue