backoffice/application/views/gestion_wallet_ilink_hyp.php

594 lines
21 KiB
PHP
Raw Permalink Normal View History

2022-04-18 11:39:19 +00:00
<link rel="stylesheet" href="<?= base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>">
<link rel="stylesheet" href="<?= base_url('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?= base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
<link rel="stylesheet" href="<?= base_url('bower_components/toastr/toastr.css') ?>">
<link rel="stylesheet" href="<?= base_url('bower_components/google-material-icons/google-material-icons.min.css') ?>">
2020-06-01 11:21:06 +00:00
<style type="text/css">
.table-wrapper {
width: 700px;
margin: 30px auto;
background: #fff;
padding: 20px;
box-shadow: 0 1px 1px rgba(0,0,0,.05);
}
.table-title {
padding-bottom: 10px;
margin: 0 0 10px;
}
.table-title h2 {
margin: 6px 0 0;
font-size: 22px;
}
.table-title .add-new {
float: right;
height: 30px;
font-weight: bold;
font-size: 12px;
text-shadow: none;
min-width: 100px;
border-radius: 50px;
line-height: 13px;
}
.table-title .add-new i {
margin-right: 4px;
}
table.table {
table-layout: fixed;
}
table.table tr th, table.table tr td {
border-color: #e9e9e9;
}
table.table th i {
font-size: 13px;
margin: 0 5px;
cursor: pointer;
}
table.table th:last-child {
width: 100px;
}
table.table td a {
cursor: pointer;
display: inline-block;
margin: 0 5px;
min-width: 24px;
}
table.table td a.add {
color: #27C46B;
}
table.table td a.edit {
color: #FFC107;
}
table.table td a.delete {
color: #E34724;
}
table.table td i {
font-size: 19px;
}
table.table td a.add i {
font-size: 24px;
margin-right: -1px;
position: relative;
top: 3px;
}
table.table .form-control {
height: 32px;
line-height: 32px;
box-shadow: none;
border-radius: 2px;
}
/*table.table .form-control.error {*/
/* border-color: #f50000;*/
/*}*/
.error {
border-color: #f50000;
}
table.table td .add {
display: none;
}
</style>
<?php
2020-06-25 11:05:34 +00:00
2020-06-25 08:08:10 +00:00
use Brick\Money\Money;
2020-10-29 19:07:19 +00:00
2020-06-25 19:27:43 +00:00
$context = new \Brick\Money\Context\AutoContext();
2020-06-01 11:21:06 +00:00
$month = time();
$months[]=convertDate(date("M"));
$label_months [] = date("M")." ".date("Y");
$years[]= date("Y");
for ($i = 1; $i <= 11; $i++) {
$month = strtotime('last month', $month);
$months [] = convertDate(date("M", $month));
$years[] = date("Y", $month);
$label_months [] = date("M", $month)." ".date("Y", $month);
}
/**
** Retraits
**/
$date = date("Y");
$retraits_data[] = '';
$retraits_data =array();
for ($i = 1; $i <= 12; $i++) {
$retraits_query_mounth = array_filter($transactions, function ($trans) use ($i, $months ,$years){
$month = date("m",strtotime($trans->date));
$year = date("Y",strtotime($trans->date));
2020-06-24 12:06:52 +00:00
return $month == $months[$i-1] && $year == $years[$i-1] && $trans->type_transaction == 'retrait' ;
2020-06-01 11:21:06 +00:00
});
$retraits_data[] = sizeof($retraits_query_mounth);
}
$startDate = (new DateTime('01-'.$months[11].'-'.$years[11]))-> format('Y-m-d H:i:s');
$endDate = date_create_from_format ('m/Y',$months[0].'/'.$years[0])-> format('Y-m-d H:i:s');
$retraits = array_filter($transactions, function ($trans) use ($i, $endDate ,$startDate){
$date = strtotime($trans->date);
// return $date >= strtotime($startDate) && $date <= strtotime($endDate) && $trans->type == 'debit' ;
2020-06-24 12:06:52 +00:00
return $trans->type_transaction == 'retrait' ;
2020-06-01 11:21:06 +00:00
});
/**
** Dépots
**/
$date = date("Y");
$depots_data[] = '';
$depots_data =array();
for ($i = 1; $i <= 12; $i++) {
$depots_query_mounth= array_filter($transactions, function ($trans) use ($i, $months ,$years){
$month = date("m",strtotime($trans->date));
$year = date("Y",strtotime($trans->date));
2020-06-24 12:06:52 +00:00
return $month == $months[$i-1] && $year == $years[$i-1] && $trans->type_transaction == 'depot' ;
2020-06-01 11:21:06 +00:00
});
$depots_data[] = sizeof($depots_query_mounth);
}
$depots = array_filter($transactions, function ($trans) use ($i, $endDate ,$startDate){
$date = strtotime($trans->date);
// return $date >= strtotime($startDate) && $date <= strtotime($endDate) && $trans->type == 'credit' ;
2020-06-24 12:06:52 +00:00
return $trans->type_transaction == 'depot' ;
2020-06-01 11:21:06 +00:00
});
if($transactions!=false){
$transac=sizeof($transactions);
$array_transac = array();
$num = 0;
if ($transac > 0) {
foreach($transactions as $row) {
$num++;
2020-06-24 12:06:52 +00:00
$array_transac[] = $row->type_transaction;
2020-06-01 11:21:06 +00:00
}
$vals_transac = array_count_values($array_transac);
$pieChart = array();
foreach(array_keys($vals_transac) as $paramName) {
$color = dechex(rand(0x000000, 0xFFFFFF));
$trash = array("value" => $vals_transac[$paramName],
"color" => "#".$color,
"highlight" => "#".$color,
"label" => $paramName);
2020-06-01 11:21:06 +00:00
$pieChart[]= $trash;
}
}
}else{
$pieChart = array();
}
$fmt = new NumberFormatter( 'fr_FR', NumberFormatter::DECIMAL );
?>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
2022-04-18 11:39:19 +00:00
Wallet <?= $network . ' - ' .$country; ?>
2020-06-01 11:21:06 +00:00
</h1>
<?php
$site_url = base_url();
if($alert=="ok") {
if(!$success=="ok"){
?>
<div class='alert alert-danger alert-dismissible col-xs-6'>
<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>
<h4><i class='icon fa fa-ban'></i> Erreur!</h4>
2022-04-18 11:39:19 +00:00
<?= $message; ?>
2020-06-01 11:21:06 +00:00
</div>
<?php
} else {
?>
<div class="alert alert-success alert-dismissible col-xs-6">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<h4><i class="icon fa fa-check"></i> Success!</h4>
2022-04-18 11:39:19 +00:00
<?= $message; ?>
2020-06-01 11:21:06 +00:00
</div>
<?php
}
}
?>
</section>
<section class="content">
<div class="row">
<div class="col-lg-4 col-xs-6">
<div class="small-box bg-aqua">
<div class="inner">
2022-04-18 11:39:19 +00:00
<h3><?= $principal ?></h3>
<p><?= $this->lang->line('Solde Principal') ?></p>
2020-06-01 11:21:06 +00:00
</div>
<div class="icon">
<i class="ion ion-cash"></i>
</div>
</div>
</div>
<div class="col-lg-4 col-xs-6">
<div class="small-box bg-green">
<div class="inner">
2022-04-18 11:39:19 +00:00
<h3><?= $commission; ?></h3>
<p><?= $this->lang->line('Solde Commission') ?></p>
2020-06-01 11:21:06 +00:00
</div>
<div class="icon">
<i class="ion ion-cash"></i>
</div>
</div>
</div>
<div class="col-lg-4 col-xs-6">
<div class="small-box bg-yellow">
<div class="inner">
2022-04-18 11:39:19 +00:00
<h3><?= $totalCommissionBanque; ?></h3>
<p><?= $this->lang->line('Total commission de la banque') ?></p>
2020-06-01 11:21:06 +00:00
</div>
<div class="icon">
<i class="ion ion-cash"></i>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3">
2020-06-10 14:20:30 +00:00
<div class="margin">
2022-04-18 11:39:19 +00:00
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#rechargeAccount"><?= $this->lang->line('recharge_hypervisor_account') ?> </button>
2020-06-10 14:20:30 +00:00
</div>
</div>
<div class="col-lg-3">
2020-06-10 14:20:30 +00:00
<div class="margin">
2022-04-18 11:39:19 +00:00
<a class="btn btn-info" href="<?= current_url().($network_id ? '?config=taxes' : '')?>"
style="width: 100%"><?= $this->lang->line('edit_tax') ?></a>
2020-06-10 14:20:30 +00:00
</div>
2020-06-22 11:39:55 +00:00
</div>
<div class="col-lg-3">
2020-06-22 11:39:55 +00:00
<div class="margin">
2022-04-18 11:39:19 +00:00
<a href="<?= current_url().($network_id ? '?config=paying_networks' : '')?>" class="btn btn-success"
style="width: 100%"><?= $this->lang->line('edit_paying_and_transmitting_networks') ?></a>
2020-06-22 11:39:55 +00:00
</div>
2020-06-01 11:21:06 +00:00
</div>
<div class="col-lg-3">
<div class="margin">
<a href="<?= current_url().($network_id ? '?config=customers_accounts' : '')?>" class="btn btn-primary"
style="width: 100%"><?= $this->lang->line('customers_accounts_configuration') ?></a>
</div>
</div>
2020-06-01 11:21:06 +00:00
</div>
<div class="row">
<div class="col-lg-3 col-xs-6">
<a class="small-box bg-yellow-active"
2022-04-18 11:39:19 +00:00
href="<?= current_url() . ($network_id ? '?config=user_wallet_wallet' : '') ?>">
2020-06-01 11:21:06 +00:00
<div class="inner">
2022-04-18 11:39:19 +00:00
<h5><?= $this->lang->line('config_user')?></h5>
<h4><?= $this->lang->line('config_ilink_user_wallet_wallet') ?></h4>
2020-06-01 11:21:06 +00:00
</div>
</a>
2020-06-01 11:21:06 +00:00
</div>
<div class="col-lg-3 col-xs-6">
<a class="small-box bg-yellow-active"
2022-04-18 11:39:19 +00:00
href="<?= current_url() . ($network_id ? '?config=user_wallet_carte' : '') ?>">
2020-06-01 11:21:06 +00:00
<div class="inner">
2022-04-18 11:39:19 +00:00
<h5><?= $this->lang->line('config_user')?></h5>
<h4><?= $this->lang->line('config_ilink_user_wallet_carte') ?></h4>
2020-06-01 11:21:06 +00:00
</div>
</a>
2020-06-01 11:21:06 +00:00
</div>
<div class="col-lg-3 col-xs-6">
<a class="small-box bg-yellow-active"
2022-04-18 11:39:19 +00:00
href="<?= current_url() . ($network_id ? '?config=user_wallet_cash' : '') ?>">
2020-06-01 11:21:06 +00:00
<div class="inner">
2022-04-18 11:39:19 +00:00
<h5><?= $this->lang->line('config_user')?></h5>
<h4><?= $this->lang->line('config_ilink_user_wallet_cash') ?></h4>
2020-06-01 11:21:06 +00:00
</div>
</a>
2020-06-01 11:21:06 +00:00
</div>
<div class="col-lg-3 col-xs-6">
<a class="small-box bg-yellow-active"
2022-04-18 11:39:19 +00:00
href="<?= current_url() . ($network_id ? '?config=user_carte_wallet' : '') ?>">
2020-06-01 11:21:06 +00:00
<div class="inner">
2022-04-18 11:39:19 +00:00
<h5><?= $this->lang->line('config_user')?></h5>
<h4><?= $this->lang->line('config_ilink_user_carte_wallet') ?></h4>
2020-06-01 11:21:06 +00:00
</div>
</a>
2020-06-01 11:21:06 +00:00
</div>
<div class="col-lg-3 col-xs-6">
<a class="small-box bg-yellow-active"
href="<?= current_url() . ($network_id ? '?config=user_cart_autre_wallet' : '') ?>">
<div class="inner">
<h5><?= $this->lang->line('config_user')?></h5>
<h4><?= $this->lang->line('config_ilink_user_cart_autre_wallet') ?></h4>
</div>
</a>
</div>
<div class="col-lg-3 col-xs-6">
<a class="small-box bg-blue-active"
2022-04-18 11:39:19 +00:00
href="<?= current_url() . ($network_id ? '?config=agent_remove_cash' : '') ?>">
2020-06-01 11:21:06 +00:00
<div class="inner">
2022-04-18 11:39:19 +00:00
<h5><?= $this->lang->line('config_agent')?></h5>
<h4><?= $this->lang->line('config_ilink_agent_remove_cash') ?></h4>
2020-06-01 11:21:06 +00:00
</div>
</a>
2020-06-01 11:21:06 +00:00
</div>
<div class="col-lg-3 col-xs-6">
<a class="small-box bg-blue-active"
2022-04-18 11:39:19 +00:00
href="<?= current_url() . ($network_id ? '?config=agent_remove_carte_cash' : '') ?>">
2020-06-01 11:21:06 +00:00
<div class="inner">
2022-04-18 11:39:19 +00:00
<h5><?= $this->lang->line('config_agent')?></h5>
<h4><?= $this->lang->line('config_ilink_agent_remove_carte_cash') ?></h4>
2020-06-01 11:21:06 +00:00
</div>
</a>
2020-06-01 11:21:06 +00:00
</div>
<div class="col-lg-3 col-xs-6">
<a class="small-box bg-blue-active"
2022-04-18 11:39:19 +00:00
href="<?= current_url() . ($network_id ? '?config=agent_send_cash_canal' : '') ?>">
2020-06-01 11:21:06 +00:00
<div class="inner">
2022-04-18 11:39:19 +00:00
<h5><?= $this->lang->line('config_agent')?></h5>
<h4><?= $this->lang->line('config_ilink_agent_send_cash_canal') ?></h4>
2020-06-01 11:21:06 +00:00
</div>
</a>
2020-06-01 11:21:06 +00:00
</div>
<div class="col-lg-3 col-xs-6">
<a class="small-box bg-blue-active"
2022-04-18 11:39:19 +00:00
href="<?= current_url() . ($network_id ? '?config=agent_send_cash_carte' : '') ?>">
2020-06-01 11:21:06 +00:00
<div class="inner">
2022-04-18 11:39:19 +00:00
<h5><?= $this->lang->line('config_agent')?></h5>
<h4><?= $this->lang->line('config_ilink_agent_send_cash_carte') ?></h4>
2020-06-01 11:21:06 +00:00
</div>
</a>
2020-06-10 14:20:30 +00:00
</div>
</div>
2020-06-01 11:21:06 +00:00
<div class="row">
<div class="col-xs-12">
<div class="box box-success">
<div class="box-header with-border">
2022-04-18 11:39:19 +00:00
<h3 class="box-title"><?= $this->lang->line('Historique des 12 derniers mois'); ?></h3>
2020-06-01 11:21:06 +00:00
<div class="box-tools">
2022-04-18 11:39:19 +00:00
<a class="btn btn-success" href="<?= current_url().($network_id ? '?show=paying_networks' : '')?>">
<?= $this->lang->line('paying_and_transmitting_networks_accounts'); ?>
2020-06-23 15:49:59 +00:00
</a>
2022-04-18 11:39:19 +00:00
<a class="btn btn-primary" href="<?= current_url().($network_id ? '?history=transaction_ilink' : '')?>">
<?= $this->lang->line('transactions_historic'); ?>
2020-06-01 11:21:06 +00:00
</a>
2022-04-18 11:39:19 +00:00
<a class="btn btn-info" href="<?= current_url().($network_id ? '?history=recharge' : '')?>">
<?= $this->lang->line('recharge_historic'); ?>
2020-06-01 11:21:06 +00:00
</a>
</div>
</div>
<div class="box-body">
<div class="chart" id="chart">
<canvas id="barChart" style="height:230px"></canvas>
</div>
</div>
</div>
</div>
</div>
<div class="row">
2020-06-01 11:21:06 +00:00
<div class="col-xs-6">
<div class="box box-danger">
<div class="box-header with-border">
2022-04-18 11:39:19 +00:00
<h3 class="box-title"><?= $this->lang->line("Parts dépots & retraits"); ?></h3>
2020-06-01 11:21:06 +00:00
</div>
<div class="box-body" id="chart2">
<canvas id="pieChart" style="height:250px"></canvas>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="box">
<div class="box-header">
2022-04-18 11:39:19 +00:00
<h3 class="box-title"><?= $this->lang->line('Commissions Superviseurs') ?></h3>
<div class="box-tools">
2022-04-18 11:39:19 +00:00
<a class="btn btn-primary" href="<?= current_url().($network_id ? '?history=commission_transfer' : '')?>">
<?= $this->lang->line('commission_transfer_historic'); ?>
</a>
2022-04-18 11:39:19 +00:00
<a class="btn btn-success" href="<?= current_url().($network_id ? '?history=balance_statement' : '')?>">
<?= $this->lang->line('balance_statement'); ?>
</a>
</div>
2020-06-01 11:21:06 +00:00
</div>
<div class="box-body" style="overflow-x:auto;">
2020-06-01 11:21:06 +00:00
<table id="example1" class="table table-bordered table-hover">
<thead>
<tr>
<?php
echo "<th>".$this->lang->line('Nom')."</th>
<th>".$this->lang->line('Solde Principal')."</th>
<th>".$this->lang->line('Solde Commission')."</th>
<th>".$this->lang->line('Commission banque')."</th>
<th>".$this->lang->line('DEPOT'). 's'."</th>
<th>".$this->lang->line('RETRAIT').'s'."</th>";
?>
</tr>
</thead>
<tbody>
<?php
if($superviseurs!=false){
foreach($superviseurs->result() as $row) {
$wallet = null;
foreach ($agentWalletInfos->result() as $value) {
if ($value->agent_id == $row->agent_id) {
$wallet = $value;
break;
}
}
$com = 0;
$princ = 0;
if($wallet) {
$com = $wallet->balance_com;
$princ = $wallet->balance_princ;
}
echo "<tr>
<td>".$row->lastname."</td>
2020-06-25 16:57:44 +00:00
<td>".Money::of(round($princ,2), $this->session->userdata('currency_code'),$context)->formatTo('fr_FR')."</td>
<td>".Money::of(round($com,2), $this->session->userdata('currency_code'),$context)->formatTo('fr_FR')."</td>";
2020-06-01 11:21:06 +00:00
$nb_depots = 0;
$nb_retraits = 0;
$commission_banque = 0;
foreach($depots as $depot){
if($depot->code_parrain == $row->member_code) {
$nb_depots ++;
$commission_banque+= $depot->commission_banque;
}
}
foreach($retraits as $retrait){
if($retrait->code_parrain == $row->member_code) {
$nb_retraits ++;
$commission_banque+= $retrait->commission_banque;
}
}
echo "<td>".Money::of(round($commission_banque,2), $this->session->userdata('currency_code'),$context)->formatTo('fr_FR')."</td>
<td>".$nb_depots."</td>
<td>".$nb_retraits."</td>
</tr>";
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php $this->load->view('include/recharge_account_modal',['walletPassword' => $walletPassword, 'network' => $network, 'country' => $country, 'wallet_id' => $wallet_id]) ?>
</section>
2020-06-01 11:21:06 +00:00
</div>
<!-- jQuery 3 -->
2022-04-18 11:39:19 +00:00
<script src="<?= base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script>
2020-06-01 11:21:06 +00:00
<!-- Bootstrap 3.3.7 -->
2022-04-18 11:39:19 +00:00
<script src="<?= base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
2020-06-01 11:21:06 +00:00
<!-- DataTables -->
2022-04-18 11:39:19 +00:00
<script src="<?= base_url('bower_components/datatables.net/js/jquery.dataTables.min.js') ?>"></script>
<script src="<?= base_url('bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js') ?>"></script>
2020-06-01 11:21:06 +00:00
<!-- Slimscroll -->
2022-04-18 11:39:19 +00:00
<script src="<?= base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script>
2020-06-01 11:21:06 +00:00
<!-- FastClick -->
2022-04-18 11:39:19 +00:00
<script src="<?= base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
2020-06-01 11:21:06 +00:00
<!-- AdminLTE App -->
2022-04-18 11:39:19 +00:00
<script src="<?= base_url('dist/js/adminlte.min.js') ?>"></script>
2020-06-01 11:21:06 +00:00
<!-- AdminLTE for demo purposes -->
2022-04-18 11:39:19 +00:00
<script src="<?= base_url('dist/js/demo.js') ?>"></script>
2020-06-01 11:21:06 +00:00
2022-04-18 11:39:19 +00:00
<script src="<?= base_url('bower_components/moment/min/moment.min.js') ?>"></script>
<script src="<?= base_url('bower_components/bootstrap-daterangepicker/daterangepicker.js') ?>"></script>
<script src="<?= base_url('bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js') ?>"></script>
2020-06-01 11:21:06 +00:00
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
<!-- ChartJS -->
2022-04-18 11:39:19 +00:00
<script src="<?= base_url('bower_components/chart.js/Chart.js') ?>"></script>
<script src="<?= base_url('bower_components/toastr/toastr.js') ?>"></script>
<script src="<?= base_url('dist/js/sweetalert2.js') ?>"></script>
2020-06-01 11:21:06 +00:00
<script>
var areaChartData = {
2022-04-18 11:39:19 +00:00
labels : <?= json_encode($label_months) ?>,
2020-06-01 11:21:06 +00:00
datasets: [
{
label : 'Electronics',
fillColor : 'rgba(255, 162, 0, 1)',
strokeColor : 'rgba(255, 162, 0, 1)',
pointColor : 'rgba(255, 162, 0, 1)',
pointStrokeColor : '#ffa200',
pointHighlightFill : '#fff',
pointHighlightStroke: 'rgba(220,220,220,1)',
2022-04-18 11:39:19 +00:00
data: <?= json_encode($depots_data) ?>
2020-06-01 11:21:06 +00:00
},
{
label : 'Digital Goods',
fillColor : 'rgba(0, 187, 255, 1)',
strokeColor : 'rgba(0, 187, 255, 1)',
pointColor : '#00bbff',
pointStrokeColor : 'rgba(0, 187, 255, 1)',
pointHighlightFill : '#fff',
pointHighlightStroke: 'rgba(0, 187, 255, 1)',
2022-04-18 11:39:19 +00:00
data : <?= json_encode($retraits_data) ?>
2020-06-01 11:21:06 +00:00
}
]
};
2022-04-18 11:39:19 +00:00
var Pie = '<?= json_encode($pieChart) ?>';
2020-06-01 11:21:06 +00:00
if(Pie==='[]'){
var select = document.getElementById('chart2');
$(select.children).hide();
$(select).append("<p>Aucune transaction</p>");
}else{
Pie = JSON.parse(Pie);
}
</script>
<script>
toastr.options.closeButton = true;
toastr.options.closeMethod = 'fadeOut';
toastr.options.closeDuration = 5000;
toastr.options.closeEasing = 'swing';
$('#resetPassword').click(function () {
const wallet_password_id = $(this).data('wallet_password_id');
const network = $(this).data('network');
const country = $(this).data('country');
const email = $(this).data('email');
$.ajax({
2022-04-18 11:39:19 +00:00
url: '<?= base_url('Hyperviseur_dash/resetWalletPassword')?>',
2020-06-01 11:21:06 +00:00
type: 'POST',
dataType: 'json',
data: {
"wallet_password_id": wallet_password_id,
"email": email,
"network" : network ,
"country" : country
},
success: function (data) {
if(data=='200'){
Swal.fire({
icon: 'success',
2022-04-18 11:39:19 +00:00
title: "<?= $this->lang->line('password_has_been_reset')?>",
text:"<?= $this->lang->line('informations_updated')?>",
2020-06-01 11:21:06 +00:00
timer: 3000
}).then(()=>{
location.reload();
});
// alert("Les informations ont été mises à jour.") ? "" :
}else{
2022-04-18 11:39:19 +00:00
toastr.error("<?= $this->lang->line('error_message')?>" , "<?= $this->lang->line('request_error')?>");
2020-06-01 11:21:06 +00:00
}
},
error: function (resultat, statut, error) {
console.log(resultat + " " + error);
2022-04-18 11:39:19 +00:00
toastr.error("<?= $this->lang->line('error_message')?>" , "<?= $this->lang->line('request_error')?>");
2020-06-01 11:21:06 +00:00
}
});
});
</script>
<!-- Page script -->
2022-04-18 11:39:19 +00:00
<script src="<?= base_url('dist/js/custom.js') ?>"></script>