+ Adding of the search menu in the hyper and super dashboard

This commit is contained in:
Djery-Tom 2020-10-20 16:25:11 +01:00
parent 86a4a55fae
commit b4776d9566
9 changed files with 1177 additions and 575 deletions

View File

@ -1411,6 +1411,134 @@ class Hyperviseur_dash extends CI_Controller
$this->load->view('nano_credit/users_group_detail');
$this->load->view('footer');
}
public function recherche()
{
if ($this->isLogged()) {
$data['active'] = "recherche";
$data['alert'] = "";
$data['firstname'] = $this->session->userdata('firstname');
$data['lastname'] = $this->session->userdata('lastname');
$data['email'] = $this->session->userdata('email');
$data['network'] = $this->session->userdata('network');
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
$data['networks'] = $this->user_model->getActiveNetwork();
$data['currency_code'] = $this->session->userdata('currency_code');
$data['category'] = $this->session->userdata('category');
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
$data['result_search'] = 0;
$data['default_phone'] = '';
$data['default_transac'] = '';
$data['default_code'] = '';
$data['default_nom'] = '';
$this->load->view('header_hyp', $data);
$this->load->view('gestion_recherche');
$this->load->view('footer');
}
}
public function get_user()
{
if ($this->isLogged()) {
if (isset($_POST)) {
$nom = $this->input->post('nom');
$phone = $this->input->post('phone');
$simple_users = null;
if ($phone != '' && $nom != '') {
$phone_condition = "phone LIKE '" . $phone . "%'";
$nom_condition = "AND lastname LIKE '%" . $nom . "%'";
$simple_users = $this->user_model->get_simple_user($phone, $nom,$this->session->userdata('current_pays'));
} elseif ($phone != '' && $nom == '') {
$phone_condition = "phone LIKE '" . $phone . "%'";
$nom_condition = 'AND lastname IS NOT NULL';
$simple_users = $this->user_model->get_simple_user($phone, '%',$this->session->userdata('current_pays'));
} elseif ($phone == '' && $nom != '') {
$phone_condition = 'phone IS NOT NULL';
$nom_condition = "AND lastname LIKE '%" . $nom . "%'";
$simple_users = $this->user_model->get_simple_user('%', $nom,$this->session->userdata('current_pays'));
} elseif ($phone == '' && $nom == '') {
$phone_condition = 'phone IS NOT NULL';
$nom_condition = 'AND lastname IS NOT NULL';
}
$transac = $this->input->post('transac');
if ($transac != '') {
$transac_condition = "AND transactionNumber LIKE'" . $transac . "%'";
} else {
$transac_condition = 'AND transactionNumber IS NOT NULL';
}
$code = $this->input->post('code');
if ($code != '') {
$code_condition = "AND code_membre = '" . $code . "'";
} else {
$code_condition = 'AND code_membre IS NOT NULL';
}
$network_condition = ' AND network_id = '.$this->session->userdata('network_id');
$where_clause = "WHERE " . $phone_condition . ' ' . $transac_condition . ' ' . $code_condition . ' ' . $nom_condition.$network_condition;
$res = $this->user_model->get_user($where_clause);
$data['active'] = "recherche";
$data['alert'] = "";
$data['firstname'] = $this->session->userdata('firstname');
$data['lastname'] = $this->session->userdata('lastname');
$data['email'] = $this->session->userdata('email');
$data['network'] = $this->session->userdata('network');
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
$data['networks'] = $this->user_model->getActiveNetwork();
$data['currency_code'] = $this->session->userdata('currency_code');
$data['category'] = $this->session->userdata('category');
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
if ($res != false) {
$count_users = $res->num_rows();
if ($simple_users != null) {
$count_users = $res->num_rows() + $simple_users->num_rows();
}
$data['result_search'] = 1;
$data['res_users'] = $res;
$data['res_simple_users'] = $simple_users;
$data['num_res'] = $count_users;
$data['default_phone'] = $phone;
$data['default_nom'] = $nom;
$data['default_transac'] = $transac;
$data['default_code'] = $code;
$data['game_pays'] = $this->user_model->getGameCountry();
$data['networks'] = $this->user_model->getActiveNetwork();
$this->load->view('header_hyp', $data);
$this->load->view('gestion_recherche');
$this->load->view('footer');
} else {
$data['result_search'] = 2;
$data['res_simple_users'] = $simple_users;
$data['default_phone'] = '';
$data['default_transac'] = '';
$data['default_code'] = '';
$data['default_nom'] = '';
$data['game_pays'] = $this->user_model->getGameCountry();
$data['networks'] = $this->user_model->getActiveNetwork();
$this->load->view('header_hyp', $data);
$this->load->view('gestion_recherche');
$this->load->view('footer');
}
}
}
}
}
class Operation

View File

@ -332,7 +332,7 @@ class Superviseur_dash extends CI_Controller
$data['network'] = $this->session->userdata('network');
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
$data['networks'] = $this->user_model->getActiveNetwork();
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
// $data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
$data['country'] = $this->session->userdata('current_pays');
$data['category'] = $this->session->userdata('category');
@ -374,7 +374,7 @@ class Superviseur_dash extends CI_Controller
$data['network'] = $this->session->userdata('network');
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
$data['networks'] = $this->user_model->getActiveNetwork();
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
// $data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
$data['country'] = $this->session->userdata('current_pays');
$data['category'] = $this->session->userdata('category');
@ -399,4 +399,132 @@ class Superviseur_dash extends CI_Controller
return true;
}
public function recherche()
{
if ($this->isLogged()) {
$data['active'] = "recherche";
$data['alert'] = "";
$data['firstname'] = $this->session->userdata('firstname');
$data['lastname'] = $this->session->userdata('lastname');
$data['email'] = $this->session->userdata('email');
$data['network'] = $this->session->userdata('network');
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
$data['networks'] = $this->user_model->getActiveNetwork();
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
$data['country'] = $this->session->userdata('current_pays');
$data['category'] = $this->session->userdata('category');
$data['result_search'] = 0;
$data['default_phone'] = '';
$data['default_transac'] = '';
$data['default_code'] = '';
$data['default_nom'] = '';
$this->load->view('header_sup', $data);
$this->load->view('gestion_recherche');
$this->load->view('footer');
}
}
public function get_user()
{
if ($this->isLogged()) {
if (isset($_POST)) {
$nom = $this->input->post('nom');
$phone = $this->input->post('phone');
$simple_users = null;
if ($phone != '' && $nom != '') {
$phone_condition = "phone LIKE '" . $phone . "%'";
$nom_condition = "AND lastname LIKE '%" . $nom . "%'";
$simple_users = $this->user_model->get_simple_user($phone, $nom,$this->session->userdata('current_pays'));
} elseif ($phone != '' && $nom == '') {
$phone_condition = "phone LIKE '" . $phone . "%'";
$nom_condition = 'AND lastname IS NOT NULL';
$simple_users = $this->user_model->get_simple_user($phone, '%',$this->session->userdata('current_pays'));
} elseif ($phone == '' && $nom != '') {
$phone_condition = 'phone IS NOT NULL';
$nom_condition = "AND lastname LIKE '%" . $nom . "%'";
$simple_users = $this->user_model->get_simple_user('%', $nom,$this->session->userdata('current_pays'));
} elseif ($phone == '' && $nom == '') {
$phone_condition = 'phone IS NOT NULL';
$nom_condition = 'AND lastname IS NOT NULL';
}
$transac = $this->input->post('transac');
if ($transac != '') {
$transac_condition = "AND transactionNumber LIKE'" . $transac . "%'";
} else {
$transac_condition = 'AND transactionNumber IS NOT NULL';
}
$code = $this->input->post('code');
if ($code != '') {
$code_condition = "AND code_membre = '" . $code . "'";
} else {
$code_condition = 'AND code_membre IS NOT NULL';
}
$godfather_condition = " AND code_parrain = '".$this->session->userdata('member_code')."'";
$where_clause = "WHERE " . $phone_condition . ' ' . $transac_condition . ' ' . $code_condition . ' ' . $nom_condition.$godfather_condition;
$res = $this->user_model->get_user($where_clause);
$data['active'] = "recherche";
$data['alert'] = "";
$data['firstname'] = $this->session->userdata('firstname');
$data['lastname'] = $this->session->userdata('lastname');
$data['email'] = $this->session->userdata('email');
$data['network'] = $this->session->userdata('network');
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
$data['networks'] = $this->user_model->getActiveNetwork();
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
$data['country'] = $this->session->userdata('current_pays');
$data['category'] = $this->session->userdata('category');
if ($res != false) {
$count_users = $res->num_rows();
if ($simple_users != null) {
$count_users = $res->num_rows() + $simple_users->num_rows();
}
$data['result_search'] = 1;
$data['res_users'] = $res;
$data['res_simple_users'] = $simple_users;
$data['num_res'] = $count_users;
$data['default_phone'] = $phone;
$data['default_nom'] = $nom;
$data['default_transac'] = $transac;
$data['default_code'] = $code;
$data['game_pays'] = $this->user_model->getGameCountry();
$data['networks'] = $this->user_model->getActiveNetwork();
$this->load->view('header_sup', $data);
$this->load->view('gestion_recherche');
$this->load->view('footer');
} else {
$data['result_search'] = 2;
$data['res_simple_users'] = $simple_users;
$data['default_phone'] = '';
$data['default_transac'] = '';
$data['default_code'] = '';
$data['default_nom'] = '';
$data['game_pays'] = $this->user_model->getGameCountry();
$data['networks'] = $this->user_model->getActiveNetwork();
$this->load->view('header_sup', $data);
$this->load->view('gestion_recherche');
$this->load->view('footer');
}
}
}
}
}

View File

@ -506,4 +506,13 @@ $lang['end_date'] = "End date";
$lang['cash_withdrawal'] = "Withdrawal in cash";
$lang['validation_date'] = "Date of validation";
$lang['repayment_date'] = "Repayment date";
$lang['identified'] = 'Identified';
$lang['document_image_front'] = 'Front side of the document';
$lang['document_image_back'] = 'Back side of the document';
$lang['birth_date'] = 'Date of birth';
$lang['identity_document'] = "Identity document";
$lang['id_identity_document'] = "Identity document number";
$lang['expiry_date_document'] = "Document expiration date";
$lang['user_image'] = "Profile picture";
$lang['users_found'] = 'users found';
?>

View File

@ -518,4 +518,13 @@ $lang['end_date'] = "Date de fin";
$lang['cash_withdrawal'] = "Retrait en cash";
$lang['validation_date'] = "Date de la validation";
$lang['repayment_date'] = "Date de remboursement";
$lang['identified'] = 'Identifié';
$lang['document_image_front'] = 'Face avant du document';
$lang['document_image_back'] = 'Face arrière du document';
$lang['birth_date'] = 'Date de naissance';
$lang['identity_document'] = "Pièce d'identité";
$lang['id_identity_document'] = "Numero de la pièce d'identité";
$lang['expiry_date_document'] = "Date d'expiration du document";
$lang['user_image'] = "Photo de profil";
$lang['users_found'] = 'utilisateurs trouvés';
?>

View File

@ -1965,15 +1965,18 @@ class User_model extends CI_Model
/**
* @param $phone
* @param $name
* @return |null
* @param Pays $country
* @return |null |null
*/
public function get_simple_user($phone, $name){
public function get_simple_user($phone, $name , $country = null){
$end_query = $country ? "AND countries.name = '".$country."'" : '';
$query = $this->db->query("SELECT users.id AS id_user,users.active AS etat,users.lastname,users.phone,users.email,users.adresse,users.date_created,
networks.name AS network,countries.name AS country
networks.name AS network,countries.name AS country,i.firstname as id_firstname , i.lastname as id_lastname , i.birth_date , i.town as id_town , i.country as id_country,
i.identity_document , i.id_identity_document ,i.expiry_date_document , i.status, i.user_image , i.document_image_back , i.document_image_front
FROM users
INNER JOIN networks ON networks.id=users.network_id
INNER JOIN countries ON countries.id=networks.country_id
WHERE phone LIKE '".$phone."%' AND lastname LIKE '".$name."%'");
INNER JOIN countries ON countries.id=networks.country_id LEFT JOIN identifications i ON i.id_user = users.id
WHERE users.phone LIKE '".$phone."%' AND users.lastname LIKE '".$name."%'".$end_query);
if($query->num_rows()>0){
return $query;

View File

@ -1,16 +1,19 @@
<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/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.15/css/bootstrap-multiselect.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css">
<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/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.15/css/bootstrap-multiselect.css">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<style>
.name-link
{
.name-link {
color: white;
text-decoration: none;
}
.form-style {
display: block;
width: 50%;
@ -23,23 +26,46 @@
background-image: none;
border: 1px solid #ccc;
}
.form-group-style {
margin-bottom: 15px;
width: 50%;
}
.img-style {
width: 20%;
margin: 5%;
}
.conteneur-img {
text-align: center;
}
.label-radio {
font-style: bold;
margin-right: 30px;
color: #444;
font-weight: 700;
}
img {
max-width: 100%;
max-height: 100%;
}
.portrait {
height: 80px;
width: 30px;
}
.landscape {
height: 30px;
width: 80px;
}
.square {
height: 75px;
width: 75px;
}
</style>
<section class="content-header">
@ -79,7 +105,14 @@
<div class="box-header with-border">
</div>
<div class="box-body">
<form name="form_login" action="<?php echo base_url('index.php/Gestion/get_user') ?>" method="post">
<?php
if(isset($category)){
$url = $category == 'hyper' ? 'index.php/Hyperviseur_dash/get_user' : 'index.php/Superviseur_dash/get_user';
}else{
$url = 'index.php/Gestion/get_user';
}
?>
<form name="form_login" action="<?php echo base_url($url) ?>" method="post">
<div class="row">
<div class="col-sm-3">
<div class="form-group">
@ -88,7 +121,8 @@
<div class="input-group-addon">
<i class="glyphicon glyphicon-earphone"></i>
</div>
<input type="text" class="form-control pull-right" id="phone" name="phone" value="<?php echo $default_phone?>">
<input type="text" class="form-control pull-right" id="phone" name="phone"
value="<?php echo $default_phone ?>">
</div>
</div>
</div>
@ -99,7 +133,8 @@
<div class="input-group-addon">
<i class="glyphicon glyphicon-usd"></i>
</div>
<input type="text" class="form-control pull-right" id="transac" name="transac" value="<?php echo $default_transac?>">
<input type="text" class="form-control pull-right" id="transac" name="transac"
value="<?php echo $default_transac ?>">
</div>
</div>
</div>
@ -110,7 +145,8 @@
<div class="input-group-addon">
<i class="glyphicon glyphicon-user"></i>
</div>
<input type="text" class="form-control pull-right" id="code" name="code" value="<?php echo $default_code?>">
<input type="text" class="form-control pull-right" id="code" name="code"
value="<?php echo $default_code ?>">
</div>
</div>
</div>
@ -121,12 +157,14 @@
<div class="input-group-addon">
<i class="glyphicon glyphicon-user"></i>
</div>
<input type="text" class="form-control pull-right" id="nom" name="nom" value="<?php echo $default_nom?>">
<input type="text" class="form-control pull-right" id="nom" name="nom"
value="<?php echo $default_nom ?>">
</div>
</div>
</div>
<div class="col-sm-4 col-sm-offset-4">
<input class="btn btn-primary btn-block" id='search' disabled='disabled' name='b' type='submit' value='<?php echo $this->lang->line('Rechercher'); ?>'/>
<input class="btn btn-primary btn-block" id='search' disabled='disabled' name='b'
type='submit' value='<?php echo $this->lang->line('Rechercher'); ?>'/>
</div>
</div>
</form>
@ -136,7 +174,7 @@
<div class="box-header with-border">
<?php if ($result_search == 1) { ?>
<h3 class="box-title"><?php echo $num_res.' '.$this->lang->line('utilisateur trouvé'); ?></h3>
<h3 class="box-title"><?= $num_res.' '.$this->lang->line($num_res == 1 ? 'utilisateur trouvé' : 'users_found') ?></h3>
<div class="box-body">
<div class="row">
<?php $users = $res_users;
@ -152,7 +190,8 @@
<!-- Profile Image -->
<div class="box box-primary">
<div class="box-body box-profile">
<img class="profile-user-img img-responsive img-circle" src="../../dist/img/user-g.png" alt="User profile picture">
<img class="profile-user-img img-responsive img-circle"
src="../../dist/img/user-g.png" alt="User profile picture">
<h3 class="profile-username text-center"><?php echo $row->lastname ?></h3>
@ -160,26 +199,32 @@
<ul class="list-group list-group-unbordered">
<li class="list-group-item">
<b><?php echo $this->lang->line('Reseau'); ?></b> <a class="pull-right"><?php echo $row->network_name ?></a>
<b><?php echo $this->lang->line('Reseau'); ?></b> <a
class="pull-right"><?php echo $row->network_name ?></a>
</li>
<li class="list-group-item">
<b><?php echo $this->lang->line('code membre'); ?></b> <a class="pull-right"><?php echo $row->code ?></a>
<b><?php echo $this->lang->line('code membre'); ?></b> <a
class="pull-right"><?php echo $row->code ?></a>
</li>
<li class="list-group-item">
<b><?php echo $this->lang->line('Ville'); ?></b> <a class="pull-right"><?php echo $row->town_name ?></a>
<b><?php echo $this->lang->line('Ville'); ?></b> <a
class="pull-right"><?php echo $row->town_name ?></a>
</li>
<li class="list-group-item">
<b><?php echo $this->lang->line('Contact'); ?></b> <a class="pull-right"><?php echo $row->phone ?></a>
<b><?php echo $this->lang->line('Contact'); ?></b> <a
class="pull-right"><?php echo $row->phone ?></a>
</li>
</ul>
<a href="#" class="btn btn-primary btn-block" data-toggle="modal" data-target="#infos<?php echo $num; ?>"><b><?php echo $this->lang->line('Voir plus...'); ?></b></a>
<a href="#" class="btn btn-primary btn-block" data-toggle="modal"
data-target="#infos<?php echo $num; ?>"><b><?php echo $this->lang->line('Voir plus...'); ?></b></a>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<div class="modal fade" id="infos<?php echo $num; ?>" tabindex="-1" role="dialog" aria-labelledby="infosModalLabel" aria-hidden="true">
<div class="modal fade" id="infos<?php echo $num; ?>" tabindex="-1"
role="dialog" aria-labelledby="infosModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
@ -188,46 +233,78 @@
<div class="modal-body">
<form>
<div class="form-group">
<label for="nom" class="col-form-label"><?php echo $this->lang->line('Nom'); ?></label>
<input type="text" class="form-control" id="nom-g<?php echo $num; ?>" name="nom" value="<?php echo $row->lastname ?>">
<label for="nom"
class="col-form-label"><?php echo $this->lang->line('Nom'); ?></label>
<input type="text" class="form-control"
id="nom-g<?php echo $num; ?>" name="nom"
value="<?php echo $row->lastname ?>">
</div>
<div class="form-group">
<label for="adresse" class="col-form-label"><?php echo $this->lang->line('Adresse'); ?></label>
<input class="form-control" id="adresse-g<?php echo $num; ?>" name="adresse-g" value="<?php echo $row->adresse ?>">
<label for="adresse"
class="col-form-label"><?php echo $this->lang->line('Adresse'); ?></label>
<input class="form-control"
id="adresse-g<?php echo $num; ?>"
name="adresse-g"
value="<?php echo $row->adresse ?>">
</div>
<div class="form-group">
<label for="email" class="col-form-label"><?php echo $this->lang->line('Email'); ?></label>
<input class="form-control" id="email-g<?php echo $num; ?>" name="email-g" value="<?php echo $row->email ?>">
<label for="email"
class="col-form-label"><?php echo $this->lang->line('Email'); ?></label>
<input class="form-control"
id="email-g<?php echo $num; ?>" name="email-g"
value="<?php echo $row->email ?>">
</div>
<div class="form-group col-sm-6">
<label for="m-phone" class="col-form-label"><?php echo $this->lang->line('Contact'); ?></label>
<input class="form-control" id="phone-g<?php echo $num; ?>" name="phone-g" value="<?php echo $row->phone ?>">
<label for="m-phone"
class="col-form-label"><?php echo $this->lang->line('Contact'); ?></label>
<input class="form-control"
id="phone-g<?php echo $num; ?>" name="phone-g"
value="<?php echo $row->phone ?>">
</div>
<div class="form-group col-sm-6">
<label for="m-transac" class="col-form-label"><?php echo $this->lang->line('Numéro de transaction'); ?></label>
<input class="form-control" id="transac-g<?php echo $num; ?>" name="transac-g" value="<?php echo $row->transac ?>">
<label for="m-transac"
class="col-form-label"><?php echo $this->lang->line('Numéro de transaction'); ?></label>
<input class="form-control"
id="transac-g<?php echo $num; ?>"
name="transac-g"
value="<?php echo $row->transac ?>">
</div>
<div class="form-group col-sm-6">
<label for="code-m" class="col-form-label"><?php echo $this->lang->line('code membre'); ?></label>
<input class="form-control" disabled id="code-m" name="code-m" value="<?php echo $row->code ?>">
<label for="code-m"
class="col-form-label"><?php echo $this->lang->line('code membre'); ?></label>
<input class="form-control" disabled id="code-m"
name="code-m" value="<?php echo $row->code ?>">
</div>
<div class="form-group col-sm-6">
<label for="code-p" class="col-form-label"><?php echo $this->lang->line('Code parrain'); ?></label>
<input class="form-control" disabled id="code-p" name="code-p" value="<?php echo $row->parrain ?>">
<label for="code-p"
class="col-form-label"><?php echo $this->lang->line('Code parrain'); ?></label>
<input class="form-control" disabled id="code-p"
name="code-p"
value="<?php echo $row->parrain ?>">
</div>
<div class="form-group col-sm-6">
<label for="category" class="col-form-label"><?php echo $this->lang->line('Catégorie'); ?></label>
<input class="form-control" disabled id="category" name="category" value="<?php echo $row->category ?>">
<label for="category"
class="col-form-label"><?php echo $this->lang->line('Catégorie'); ?></label>
<input class="form-control" disabled id="category"
name="category"
value="<?php echo $row->category ?>">
</div>
<div class="form-group col-sm-6">
<label for="date-ins" class="col-form-label"><?php echo $this->lang->line('Date inscription'); ?></label>
<input class="form-control" disabled id="date-ins" name="date-ins" value="<?php echo $row->date_created ?>">
<label for="date-ins"
class="col-form-label"><?php echo $this->lang->line('Date inscription'); ?></label>
<input class="form-control" disabled id="date-ins"
name="date-ins"
value="<?php echo $row->date_created ?>">
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" class="btn btn-primary valid-infos-g" data-num="<?php echo $num; ?>" data-idnetworkAgent="<?php echo $row->networkAgent_id ?>" data-idUser="<?php echo $row->userID ?>" ><?php echo $this->lang->line('Valider'); ?></button>
<button type="button" class="btn btn-secondary"
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" class="btn btn-primary valid-infos-g"
data-num="<?php echo $num; ?>"
data-idnetworkAgent="<?php echo $row->networkAgent_id ?>"
data-idUser="<?php echo $row->userID ?>"><?php echo $this->lang->line('Valider'); ?></button>
</div>
</div>
</div>
@ -250,7 +327,8 @@
<!-- Profile Image -->
<div class="box box-success">
<div class="box-body box-profile">
<img class="profile-user-img img-responsive img-circle" src="../../dist/img/user-s.png" alt="User profile picture">
<img class="profile-user-img img-responsive img-circle"
src="../../dist/img/user-s.png" alt="User profile picture">
<h3 class="profile-username text-center"><?php echo $row->lastname ?></h3>
@ -258,27 +336,38 @@
<ul class="list-group list-group-unbordered">
<li class="list-group-item">
<b><?php echo $this->lang->line('Reseau'); ?></b> <a class="pull-right"><?php echo $row->network ?></a>
<b><?php echo $this->lang->line('Reseau'); ?></b> <a
class="pull-right"><?php echo $row->network ?></a>
</li>
<li class="list-group-item">
<b><?php echo $this->lang->line('Pays'); ?></b> <a class="pull-right"><?php echo $row->country ?></a>
<b><?php echo $this->lang->line('Pays'); ?></b> <a
class="pull-right"><?php echo $row->country ?></a>
</li>
<li class="list-group-item">
<b><?php echo $this->lang->line('Contact'); ?></b> <a class="pull-right"><?php echo $row->phone ?></a>
<b><?php echo $this->lang->line('Contact'); ?></b> <a
class="pull-right"><?php echo $row->phone ?></a>
</li>
<li class="list-group-item">
<b><?php echo $this->lang->line('Date inscription'); ?></b> <a class="pull-right"><?php echo $row->date_created ?></a>
<b><?php echo $this->lang->line('Date inscription'); ?></b>
<a class="pull-right"><?php echo $row->date_created ?></a>
</li>
<li class="list-group-item">
<b><?php echo $this->lang->line('identified'); ?></b> <a
class="pull-right"><?= $row->status ? $this->lang->line('Oui') : $this->lang->line('Non') ?></a>
</li>
</ul>
<a href="#" class="btn btn-success btn-block" data-toggle="modal" data-target="#infos-s"><b><?php echo $this->lang->line('Voir plus...'); ?></b></a>
<a href="#" class="btn btn-success btn-block" data-toggle="modal"
data-target="#infos-s"><b><?php echo $this->lang->line('Voir plus...'); ?></b></a>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<div class="modal fade" id="infos-s" data-id="<?php echo $row->id_user; ?>" tabindex="-1" role="dialog" aria-labelledby="infos-s-ModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal fade" id="infos-s" data-id="<?php echo $row->id_user; ?>"
tabindex="-1" role="dialog" aria-labelledby="infos-s-ModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title"><?php echo $this->lang->line('Informations de l utilisateur'); ?></h3>
@ -286,26 +375,131 @@
<div class="modal-body">
<form>
<div class="form-group">
<label for="nom" class="col-form-label"><?php echo $this->lang->line('Nom'); ?></label>
<input type="text" class="form-control" id="nom-s" name="nom" value="<?php echo $row->lastname ?>">
<label for="nom"
class="col-form-label"><?php echo $this->lang->line('Nom'); ?></label>
<input type="text" class="form-control" id="nom-s"
name="nom" value="<?php echo $row->lastname ?>">
</div>
<div class="form-group">
<label for="adresse" class="col-form-label"><?php echo $this->lang->line('Adresse'); ?></label>
<input class="form-control" id="adresse-s" name="adresse" value="<?php echo $row->adresse ?>">
<label for="adresse"
class="col-form-label"><?php echo $this->lang->line('Adresse'); ?></label>
<input class="form-control" id="adresse-s"
name="adresse"
value="<?php echo $row->adresse ?>">
</div>
<div class="form-group">
<label for="email" class="col-form-label"><?php echo $this->lang->line('Email'); ?></label>
<input class="form-control" id="email-s" name="email" value="<?php echo $row->email ?>">
<label for="email"
class="col-form-label"><?php echo $this->lang->line('Email'); ?></label>
<input class="form-control" id="email-s" name="email"
value="<?php echo $row->email ?>">
</div>
<div class="form-group">
<label for="m-phone" class="col-form-label"><?php echo $this->lang->line('Contact'); ?></label>
<input class="form-control" id="phone-s" name="m-phone" value="<?php echo $row->phone ?>">
<label for="m-phone"
class="col-form-label"><?php echo $this->lang->line('Contact'); ?></label>
<input class="form-control" id="phone-s" name="m-phone"
value="<?php echo $row->phone ?>">
</div>
<?php if ($row->status) {
$user_image = $this->db->wallet_service_url . '/photos/'.$row->user_image;
$document_front = $this->db->wallet_service_url . '/documents/'.$row->document_image_front;
$document_back = $this->db->wallet_service_url . '/documents/'.$row->document_image_back;
?>
<label class="text-center text-muted" style="padding: 10px"> Identification </label>
<div class="row">
<div class="form-group col-sm-6">
<label for="m-transac"
class="col-form-label"><?php echo $this->lang->line('Nom'); ?></label>
<input class="form-control" disabled
value="<?php echo $row->id_firstname ?>">
</div>
<div class="form-group col-sm-6">
<label for="code-m"
class="col-form-label"><?php echo $this->lang->line('Prénom'); ?></label>
<input class="form-control" disabled
value="<?php echo $row->id_lastname ?>">
</div>
</div>
<div class="row">
<div class="form-group col-sm-4">
<label for="code-p"
class="col-form-label"><?php echo $this->lang->line('birth_date'); ?></label>
<input class="form-control" disabled name="code-p"
value="<?php echo $row->birth_date ?>">
</div>
<div class="form-group col-sm-4">
<label for="category"
class="col-form-label"><?php echo $this->lang->line('Ville'); ?></label>
<input class="form-control" disabled
value="<?php echo $row->id_town ?>">
</div>
<div class="form-group col-sm-4">
<label for="category"
class="col-form-label"><?php echo $this->lang->line('Pays'); ?></label>
<input class="form-control" disabled
value="<?php echo $row->id_country?>">
</div>
</div>
<div class="row">
<div class="form-group col-sm-4">
<label for="date-ins"
class="col-form-label"><?php echo $this->lang->line('identity_document'); ?></label>
<input class="form-control" disabled id="date-ins"
name="date-ins"
value="<?php echo $row->identity_document ?>">
</div>
<div class="form-group col-sm-4">
<label for="date-ins"
class="col-form-label"><?php echo $this->lang->line('id_identity_document'); ?></label>
<input class="form-control" disabled id="date-ins"
name="date-ins"
value="<?php echo $row->id_identity_document ?>">
</div>
<div class="form-group col-sm-4">
<label for="date-ins"
class="col-form-label"><?php echo $this->lang->line('expiry_date_document'); ?></label>
<input class="form-control" disabled id="date-ins"
name="date-ins"
value="<?php echo $row->expiry_date_document ?>">
</div>
</div>
<div class="row text-center">
<div class="col-12">
<label><?= $this->lang->line('user_image') ?></label>
<div>
<img src="<?= is_file($user_image) ? $user_image : '../../images/broken.png' ?>"
alt="user_image"/>
</div>
</div>
</div>
<div class="row" style="margin-top: 10px">
<div class="col-sm-6 text-center">
<label><?= $this->lang->line('document_image_front') ?></label>
<img src="<?= is_file($document_front) ? $document_front : '../../images/broken.png' ?>"
alt="document_front"/>
</div>
<div class="col-sm-6 text-center">
<label><?= $this->lang->line('document_image_back') ?></label>
<img src="<?= is_file($document_back) ? $document_back : '../../images/broken.png'?>"
alt="document_back"/>
</div>
</div>
<?php } ?>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="valid-infos-s" class="btn btn-primary"><?php echo $this->lang->line('Valider'); ?></button>
<button type="button" class="btn btn-secondary"
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<?php if(!isset($category)) { ?>
<button type="button" id="valid-infos-s"
class="btn btn-primary"><?php echo $this->lang->line('Valider'); ?></button>
<?php } ?>
</div>
</div>
</div>
@ -321,7 +515,7 @@
<?php $simple_users = $res_simple_users;
if ($simple_users != null) {
?>
<h3 class="box-title"><?php echo $simple_users->num_rows().' '.$this->lang->line('utilisateur trouvé'); ?></h3>
<h3 class="box-title"><?= $simple_users->num_rows().' '.$this->lang->line($simple_users->num_rows() == 1 ? 'utilisateur trouvé' : 'users_found') ?></h3>
<div class="box-body">
<div class="row">
<?php
@ -336,7 +530,8 @@
<!-- Profile Image -->
<div class="box box-success">
<div class="box-body box-profile">
<img class="profile-user-img img-responsive img-circle" src="../../dist/img/user-s.png" alt="User profile picture">
<img class="profile-user-img img-responsive img-circle"
src="../../dist/img/user-s.png" alt="User profile picture">
<h3 class="profile-username text-center"><?php echo $row->lastname ?></h3>
@ -344,27 +539,38 @@
<ul class="list-group list-group-unbordered">
<li class="list-group-item">
<b><?php echo $this->lang->line('Reseau'); ?></b> <a class="pull-right"><?php echo $row->network ?></a>
<b><?php echo $this->lang->line('Reseau'); ?></b> <a
class="pull-right"><?php echo $row->network ?></a>
</li>
<li class="list-group-item">
<b><?php echo $this->lang->line('Pays'); ?></b> <a class="pull-right"><?php echo $row->country ?></a>
<b><?php echo $this->lang->line('Pays'); ?></b> <a
class="pull-right"><?php echo $row->country ?></a>
</li>
<li class="list-group-item">
<b><?php echo $this->lang->line('Contact'); ?></b> <a class="pull-right"><?php echo $row->phone ?></a>
<b><?php echo $this->lang->line('Contact'); ?></b> <a
class="pull-right"><?php echo $row->phone ?></a>
</li>
<li class="list-group-item">
<b><?php echo $this->lang->line('Date inscription'); ?></b> <a class="pull-right"><?php echo $row->date_created ?></a>
<b><?php echo $this->lang->line('Date inscription'); ?></b>
<a class="pull-right"><?php echo $row->date_created ?></a>
</li>
<li class="list-group-item">
<b><?php echo $this->lang->line('identified'); ?></b> <a
class="pull-right"><?= $row->status ? $this->lang->line('Oui') : $this->lang->line('Non') ?></a>
</li>
</ul>
<a href="#" class="btn btn-success btn-block" data-toggle="modal" data-target="#infos-s"><b><?php echo $this->lang->line('Voir plus...'); ?></b></a>
<a href="#" class="btn btn-success btn-block" data-toggle="modal"
data-target="#infos-s"><b><?php echo $this->lang->line('Voir plus...'); ?></b></a>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<div class="modal fade" id="infos-s" data-id="<?php echo $row->id_user; ?>" tabindex="-1" role="dialog" aria-labelledby="infos-s-ModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal fade" id="infos-s" data-id="<?php echo $row->id_user; ?>"
tabindex="-1" role="dialog" aria-labelledby="infos-s-ModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title"><?php echo $this->lang->line('Informations de l utilisateur'); ?></h3>
@ -372,26 +578,127 @@
<div class="modal-body">
<form>
<div class="form-group">
<label for="nom" class="col-form-label"><?php echo $this->lang->line('Nom'); ?></label>
<input type="text" class="form-control" id="nom-s" name="nom" value="<?php echo $row->lastname ?>">
<label for="nom"
class="col-form-label"><?php echo $this->lang->line('Nom'); ?></label>
<input type="text" class="form-control" id="nom-s"
name="nom" value="<?php echo $row->lastname ?>">
</div>
<div class="form-group">
<label for="adresse" class="col-form-label"><?php echo $this->lang->line('Adresse'); ?></label>
<input class="form-control" id="adresse-s" name="adresse" value="<?php echo $row->adresse ?>">
<label for="adresse"
class="col-form-label"><?php echo $this->lang->line('Adresse'); ?></label>
<input class="form-control" id="adresse-s"
name="adresse"
value="<?php echo $row->adresse ?>">
</div>
<div class="form-group">
<label for="email" class="col-form-label"><?php echo $this->lang->line('Email'); ?></label>
<input class="form-control" id="email-s" name="email" value="<?php echo $row->email ?>">
<label for="email"
class="col-form-label"><?php echo $this->lang->line('Email'); ?></label>
<input class="form-control" id="email-s" name="email"
value="<?php echo $row->email ?>">
</div>
<div class="form-group">
<label for="m-phone" class="col-form-label"><?php echo $this->lang->line('Contact'); ?></label>
<input class="form-control" id="phone-s" name="m-phone" value="<?php echo $row->phone ?>">
<label for="m-phone"
class="col-form-label"><?php echo $this->lang->line('Contact'); ?></label>
<input class="form-control" id="phone-s" name="m-phone"
value="<?php echo $row->phone ?>">
</div>
<?php if ($row->status) {
$user_image = $this->db->wallet_service_url . '/photos/'.$row->user_image;
$document_front = $this->db->wallet_service_url . '/documents/'.$row->document_image_front;
$document_back = $this->db->wallet_service_url . '/documents/'.$row->document_image_back;
?>
<label class="text-center text-muted" style="padding: 10px"> Identification </label>
<div class="row">
<div class="form-group col-sm-6">
<label for="m-transac"
class="col-form-label"><?php echo $this->lang->line('Nom'); ?></label>
<input class="form-control" readonly
value="<?php echo $row->id_firstname ?>">
</div>
<div class="form-group col-sm-6">
<label for="code-m"
class="col-form-label"><?php echo $this->lang->line('Prénom'); ?></label>
<input class="form-control" readonly
value="<?php echo $row->id_lastname ?>">
</div>
</div>
<div class="row">
<div class="form-group col-sm-4">
<label for="code-p"
class="col-form-label"><?php echo $this->lang->line('birth_date'); ?></label>
<input class="form-control" readonly name="code-p"
value="<?php echo $row->birth_date ?>">
</div>
<div class="form-group col-sm-4">
<label for="category"
class="col-form-label"><?php echo $this->lang->line('Ville'); ?></label>
<input class="form-control" readonly
value="<?php echo $row->id_town ?>">
</div>
<div class="form-group col-sm-4">
<label for="category"
class="col-form-label"><?php echo $this->lang->line('Pays'); ?></label>
<input class="form-control" readonly
value="<?php echo $row->id_country?>">
</div>
</div>
<div class="row">
<div class="form-group col-sm-4">
<label for="date-ins"
class="col-form-label"><?php echo $this->lang->line('identity_document'); ?></label>
<input class="form-control" readonly
value="<?php echo $row->identity_document ?>">
</div>
<div class="form-group col-sm-4">
<label for="date-ins"
class="col-form-label"><?php echo $this->lang->line('id_identity_document'); ?></label>
<input class="form-control" readonly
value="<?php echo $row->id_identity_document ?>">
</div>
<div class="form-group col-sm-4">
<label for="date-ins"
class="col-form-label"><?php echo $this->lang->line('expiry_date_document'); ?></label>
<input class="form-control" readonly
value="<?php echo $row->expiry_date_document ?>">
</div>
</div>
<div class="row text-center">
<div class="col-12">
<label><?= $this->lang->line('user_image') ?></label>
<div>
<img src="<?= is_file($user_image) ? $user_image : '../../images/broken.png' ?>"
alt="user_image"/>
</div>
</div>
</div>
<div class="row" style="margin-top: 10px">
<div class="col-sm-6 text-center">
<label><?= $this->lang->line('document_image_front') ?></label>
<img src="<?= is_file($document_front) ? $document_front : '../../images/broken.png' ?>"
alt="document_front"/>
</div>
<div class="col-sm-6 text-center">
<label><?= $this->lang->line('document_image_back') ?></label>
<img src="<?= is_file($document_back) ? $document_back : '../../images/broken.png'?>"
alt="document_back"/>
</div>
</div>
<?php } ?>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="valid-infos-s" class="btn btn-primary"><?php echo $this->lang->line('Valider'); ?></button>
<button type="button" class="btn btn-secondary"
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<?php if(!isset($category)) { ?>
<button type="button" id="valid-infos-s"
class="btn btn-primary"><?php echo $this->lang->line('Valider'); ?></button>
<?php } ?>
</div>
</div>
</div>
@ -554,7 +861,7 @@
});
});
$('#phone').change(function(){
$('#phone').on('input', function () {
if ($(this).val() !== '') {
$('#search').prop('disabled', false);
} else {
@ -563,7 +870,7 @@
}
}
});
$('#nom').change(function(){
$('#nom').on('input', function () {
if ($(this).val() !== '') {
$('#search').prop('disabled', false);
} else {
@ -572,7 +879,7 @@
}
}
});
$('#transac').change(function(){
$('#transac').on('input', function () {
if ($(this).val() !== '') {
$('#search').prop('disabled', false);
} else {
@ -581,7 +888,7 @@
}
}
});
$('#code').change(function(){
$('#code').on('input', function () {
if ($(this).val() !== '') {
$('#search').prop('disabled', false);
} else {
@ -599,7 +906,6 @@
var email = $('#email-s').val();
$.ajax({
url: '<?php echo base_url('index.php/Gestion/update_info_user')?>',
type: 'POST',
@ -634,7 +940,15 @@
url: '<?php echo base_url('index.php/Gestion/update_info_geolocated')?>',
type: 'POST',
dataType: 'json',
data: {"user_id": user_id,"id_netAg": net_ag_id, "nom": nom, "adresse": adresse, "contact": contact, "transac":transac, "email": email},
data: {
"user_id": user_id,
"id_netAg": net_ag_id,
"nom": nom,
"adresse": adresse,
"contact": contact,
"transac": transac,
"email": email
},
success: function (data, statut) {
if (data == '200') {
alert("Les informations ont été mises à jour.") ? "" : location.reload(true);

View File

@ -203,6 +203,12 @@
</li>
<?php }?>
<?php } ?>
<li class="<?php if($active=="recherche"){echo "active";} ?>">
<a href="<?php echo base_url('index.php/Hyperviseur_dash/recherche') ?>">
<i class="glyphicon glyphicon-search"></i> <span><?php echo $this->lang->line('Rechercher'); ?></span>
</a>
</li>
</ul>
</section>

View File

@ -170,6 +170,11 @@
</li>
<?php }?>
<?php } ?>
<li class="<?php if($active=="recherche"){echo "active";} ?>">
<a href="<?php echo base_url('index.php/Superviseur_dash/recherche') ?>">
<i class="glyphicon glyphicon-search"></i> <span><?php echo $this->lang->line('Rechercher'); ?></span>
</a>
</li>
</ul>
</section>
<!-- /.sidebar -->

BIN
images/broken.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB