diff --git a/application/controllers/Admin_dash.php b/application/controllers/Admin_dash.php
index 51cc558a..c82c9136 100755
--- a/application/controllers/Admin_dash.php
+++ b/application/controllers/Admin_dash.php
@@ -225,6 +225,7 @@ class Admin_dash extends CI_Controller
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('current_hyper_member_code'));
$data['agentWalletInfos'] = $this->user_model->getInfosWalletAgentForHyper($id_network);
+
$this->load->view('header', $data);
if ($data['hasWallet']?->type == 'visa')
$this->load->view('gestion_wallet_hyp');
diff --git a/application/controllers/Gestion.php b/application/controllers/Gestion.php
index 9728bcc0..cdb9741d 100755
--- a/application/controllers/Gestion.php
+++ b/application/controllers/Gestion.php
@@ -2571,7 +2571,8 @@ class Gestion extends CI_Controller
public function agency_banking(){
if ($this->isLogged()) {
- $data['accounts'] = $this->user_model->getAllRequests();
+ $data['request_bank_accounts'] = $this->user_model->getAllRequests();
+ $data['request_links_bank_accounts'] = $this->user_model->getAllLinksBankAccounts();
$data['alert'] = "";
$data['active'] = "agency_banking";
$data['game_pays'] = $this->user_model->getGameCountry();
diff --git a/application/controllers/Users.php b/application/controllers/Users.php
index 39a22d39..bef6992e 100755
--- a/application/controllers/Users.php
+++ b/application/controllers/Users.php
@@ -69,7 +69,7 @@
public function login()
{
$user_login = [
- 'user_email' => $this->input->post('user_mail'),
+ 'user_email' => trim($this->input->post('user_mail')),
'user_password' => $this->input->post('user_password'),
'user_role' => $this->input->post('user_role')
];
@@ -77,6 +77,7 @@
$email = $user_login['user_email'];
$password = $user_login['user_password'];
$role = $user_login['user_role'];
+
// CAS 1 : Agents valideurs – iLink Santé / World (role = 2)
if ($role == 2 && filter_var($email, FILTER_VALIDATE_EMAIL)) {
diff --git a/application/helpers/functions_helper.php b/application/helpers/functions_helper.php
index 06f30ce0..7cfd2574 100755
--- a/application/helpers/functions_helper.php
+++ b/application/helpers/functions_helper.php
@@ -207,26 +207,39 @@ if (!function_exists('makeRequest')) {
}
}
-function getStatusBadge($status, $lang)
-{
- $label = $lang->line('status_'.$status);
+if (!function_exists('getStatusBadge')) {
+ function getStatusBadge($status, $lang)
+ {
+ // On s'assure que le statut est propre
+ $statusKey = strtolower(trim($status));
+
+ $line = $lang->line('status_' . $statusKey);
+ $label = (!empty($line)) ? $line : ucfirst($statusKey);
- switch (strtolower($status)) {
+ // Style commun pour garder l'effet "pillule" arrondi que vous aviez
+ $style = 'padding: 6px 12px; border-radius: 20px; font-size: 12px;';
- case 'pending':
- return ''.$label.'';
+ switch ($statusKey) {
- case 'active':
- return ''.$label.'';
+ case 'pending':
+ return ''.$label.'';
- case 'close':
- return ''.$label.'';
+ case 'active':
+ return ''.$label.'';
- case 'rejected':
- return ''.$label.'';
+ case 'validated':
+ return ''.$label.'';
- default:
- return ''.$status.'';
- }
+ case 'close':
+ case 'closed':
+ return ''.$label.'';
+
+ case 'rejected':
+ return ''.$label.'';
+
+ default:
+ return ''.$label.'';
+ }
+ }
}
diff --git a/application/language/english/message_lang.php b/application/language/english/message_lang.php
index 58962262..4ce84bdd 100755
--- a/application/language/english/message_lang.php
+++ b/application/language/english/message_lang.php
@@ -1099,5 +1099,7 @@ $lang['status_pending'] = 'Pending';
$lang['status_active'] = 'Active';
$lang['status_close'] = 'Closed';
$lang['status_rejected'] = 'Rejected';
-
+$lang['status_validated'] = 'Validated';
+$lang['subscriptions_history'] = "Subscription history";
+$lang["list_of_request_opening_bank_accounts"] = "List of bank account opening requests";
?>
diff --git a/application/language/french/message_lang.php b/application/language/french/message_lang.php
index e2abce04..683058f6 100755
--- a/application/language/french/message_lang.php
+++ b/application/language/french/message_lang.php
@@ -1102,10 +1102,12 @@ $lang["update_failed_one_error_occurred"] = "Mise à jour échouée, une erreur
$lang["deletion_successfully"] = "Suppression effectuée avec succès";
$lang["deletion_failed_one_error_occurred"] = "Une erreur s'est produite lors de la suppression";
$lang["management_bank_accounts"] = "Gestion des comptes bancaires";
-$lang["list_bank_accounts"] = "Liste des comptes bancaires";
+$lang["list_of_request_opening_bank_accounts"] = "Liste des demandes d'ouverture de compte bancaire";
$lang['status_pending'] = 'En attente';
$lang['status_active'] = 'Actif';
$lang['status_close'] = 'Fermé';
$lang['status_rejected'] = 'Rejeté';
+$lang['status_validated'] = 'Validé';
+$lang['subscriptions_history'] = 'Historique des souscriptions';
?>
diff --git a/application/models/User_model.php b/application/models/User_model.php
index 7d72750c..36124216 100755
--- a/application/models/User_model.php
+++ b/application/models/User_model.php
@@ -2343,4 +2343,32 @@ class User_model extends CI_Model
->get('user_bank_accounts')
->row();
}
+
+ public function getAllLinksBankAccounts()
+ {
+ $this->db->select('
+ v.id_transaction,
+ v.user_code,
+ v.iban,
+ v.is_verified,
+ v.created_at,
+ u.firstname,
+ u.lastname,
+ u.email,
+ u.phone,
+ op.nom as bank_name,
+ opc.adresse as bank_address
+ ');
+ $this->db->from('users_banking_account_verification v');
+
+ $this->db->join('users u', 'u.user_code = v.user_code', 'left');
+
+ $this->db->join('operators_countries opc', 'opc.id = v.id_bank_country', 'left');
+ $this->db->join('operators op', 'op.id = opc.id_operator', 'left');
+
+ $this->db->order_by('v.created_at', 'ASC');
+
+ $query = $this->db->get();
+ return $query->num_rows() > 0 ? $query->result() : []; // Retourne un tableau d'objets
+ }
}
diff --git a/application/views/gestion_agency_banking.php b/application/views/gestion_agency_banking.php
index dc9eeafa..a0a0328a 100755
--- a/application/views/gestion_agency_banking.php
+++ b/application/views/gestion_agency_banking.php
@@ -4,44 +4,43 @@
Agency | Banking Management
- ') ?>">
+
+
+
+
-
+
+
@@ -53,82 +52,186 @@
= $this->lang->line('firstname'); ?> |
= $this->lang->line('account'); ?> |
IBAN |
- Swift |
- = $this->lang->line('reason') ?> |
Type |
= $this->lang->line('balance'); ?> |
= $this->lang->line('status'); ?> |
Actions |
-
-
-
- | = $a->id ?> |
- = $a->lastname ?> |
- = $a->firstname ?> |
- = $a->account_number ?> |
- = $a->iban ?> |
- = $a->swift_code ?> |
- = $a->reason ?? '-' ?> |
- = $a->account_type ?> |
- = number_format($a->balance,0,',',' ') ?> |
-
- = getStatusBadge($a->status, $this->lang) ?>
- |
-
- |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | ID |
+ Nom complet |
+ User Code |
+ Client |
+ Téléphone |
+ Banque |
+ IBAN / Compte |
+ = $this->lang->line('status'); ?> |
+ Actions |
+
+
+
+
+
+
+ is_verified == 1) $statusStr = 'active';
+ if($l->is_verified == 2) $statusStr = 'rejected';
+ ?>
+
+ | = $i++; ?> |
+ = $l->lastname .' '. $l->firstname ?> |
+ = $l->user_code ?> |
+
+ = $l->lastname ?> = $l->firstname ?>
+ = $l->email ?>
+ |
+ = $l->phone ?> |
+
+ = $l->bank_name ?>
+ = substr($l->bank_address, 0, 20) ?>...
+ |
+ = $l->iban ?> |
+
+ = getStatusBadge($statusStr, $this->lang) ?>
+ |
+
+
+
+
+ |
+
+
+
+
@@ -136,7 +239,99 @@
-
+
+
+
+
+
+
+
+
+
+
Nom :
+
Prénom :
+
Date Nais. :
+
Nationalité :
+
Matrimonial :
+
Ville de Naissance :
+
Pays de Naissance :
+
Nom de la mere :
+
Prénom de la mere :
+
Nom du père :
+
Prénom du père :
+
+
+
Numéro :
+
Type :
+
Solde :
+
IBAN :
+
Code Swift :
+
+
+
Profession :
+
Secteur :
+
Employeur :
+
Adresse employeur:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Code Utilisateur :
+
Nom Complet :
+
Email :
+
Téléphone :
+
+
+
Nom de la Banque :
+
Adresse Banque :
+
IBAN / Numéro Carte :
+
+
Date Demande :
+
Statut Actuel :
+
+
+
+
+
+
+
+
@@ -152,96 +347,38 @@
-
Enregistrer
Fermer
-
-
-
+
-
-
-
-
-
Voulez-vous vraiment supprimer ce compte ?
-
-
-
+
+
Voulez-vous vraiment supprimer ce compte ?
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
+