Updated compared to the production version
|
|
@ -1263,5 +1263,265 @@ class Gestion extends CI_Controller
|
|||
}
|
||||
}
|
||||
|
||||
public function recherche(){
|
||||
|
||||
if (!$this->session->userdata('email')) {
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
$this->load->view('login', $data);
|
||||
} else {
|
||||
|
||||
$ville = $this->session->userdata('current_ville');
|
||||
$hyper = $this->session->userdata('current_hyper');
|
||||
$pays = $this->session->userdata('current_pays');
|
||||
|
||||
$data['alert'] = "";
|
||||
$data['active'] = "recherche";
|
||||
$data['result_search'] = 0;
|
||||
$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_gestion', $data);
|
||||
$this->load->view('gestion_recherche');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
|
||||
public function get_user(){
|
||||
|
||||
if (!$this->session->userdata('email')) {
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
|
||||
$this->load->view('login', $data);
|
||||
} else {
|
||||
|
||||
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);
|
||||
}elseif ($phone!='' && $nom=='') {
|
||||
$phone_condition = "phone LIKE '".$phone."%'";
|
||||
$nom_condition = 'AND lastname IS NOT NULL';
|
||||
$simple_users = $this->user_model->get_simple_user($phone,'%');
|
||||
}elseif ($phone=='' && $nom!='') {
|
||||
$phone_condition = 'phone IS NOT NULL';
|
||||
$nom_condition = "AND lastname LIKE '%".$nom."%'";
|
||||
$simple_users = $this->user_model->get_simple_user('%',$nom);
|
||||
}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';
|
||||
}
|
||||
|
||||
$where_clause = "WHERE ".$phone_condition.' '.$transac_condition.' '.$code_condition.' '.$nom_condition;
|
||||
|
||||
$res = $this->user_model->get_user($where_clause);
|
||||
|
||||
if($res!=false){
|
||||
$ville = $this->session->userdata('current_ville');
|
||||
$hyper = $this->session->userdata('current_hyper');
|
||||
$pays = $this->session->userdata('current_pays');
|
||||
$count_users = $res->num_rows();
|
||||
if($simple_users != null){
|
||||
$count_users = $res->num_rows()+$simple_users->num_rows();
|
||||
}
|
||||
|
||||
$data['alert'] = "";
|
||||
$data['active'] = "recherche";
|
||||
$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_gestion', $data);
|
||||
$this->load->view('gestion_recherche');
|
||||
$this->load->view('footer');
|
||||
}else{
|
||||
$ville = $this->session->userdata('current_ville');
|
||||
$hyper = $this->session->userdata('current_hyper');
|
||||
$pays = $this->session->userdata('current_pays');
|
||||
|
||||
$data['alert'] = "";
|
||||
$data['active'] = "recherche";
|
||||
$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_gestion', $data);
|
||||
$this->load->view('gestion_recherche');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function update_info_user(){
|
||||
|
||||
if (!$this->session->userdata('email')) {
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
|
||||
$this->load->view('login', $data);
|
||||
} else {
|
||||
if(isset($_POST)){
|
||||
$id= $_POST['user_id'];
|
||||
$phone = $_POST['contact'];
|
||||
$adresse = $_POST['adresse'];
|
||||
$email = $_POST['email'];
|
||||
$nom = $_POST['nom'];
|
||||
$res = $this->user_model->update_user_infos($nom,$adresse,$email,$phone,$id);
|
||||
if($res!=false){
|
||||
echo json_encode("200");
|
||||
}else{
|
||||
echo json_encode("500");
|
||||
}
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function update_info_geolocated(){
|
||||
|
||||
if (!$this->session->userdata('email')) {
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
|
||||
$this->load->view('login', $data);
|
||||
} else {
|
||||
if(isset($_POST)){
|
||||
$id_agent= $_POST['user_id'];
|
||||
$id_netAg= $_POST['id_netAg'];
|
||||
$phone = $_POST['contact'];
|
||||
$transac = $_POST['transac'];
|
||||
$adresse = $_POST['adresse'];
|
||||
$email = $_POST['email'];
|
||||
$nom = $_POST['nom'];
|
||||
$res = $this->user_model->update_geolocated_infos($nom,$adresse,$email,$id_agent,$transac,$phone,$id_netAg);
|
||||
if($res!=false){
|
||||
echo json_encode("200");
|
||||
}else{
|
||||
echo json_encode("500");
|
||||
}
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function pub(){
|
||||
|
||||
if (!$this->session->userdata('email')) {
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
$this->load->view('login', $data);
|
||||
} else {
|
||||
|
||||
$data['countries_list'] =$this->user_model->getPubCountries();
|
||||
$data['active'] = "pub";
|
||||
$data['alert'] = "";
|
||||
$data['game_pays'] = $this->user_model->getGameCountry();
|
||||
$data['networks'] = $this->user_model->getActiveNetwork();
|
||||
|
||||
$this->load->view('header_gestion', $data);
|
||||
$this->load->view('gestion_publicite');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
|
||||
public function changePubState(){
|
||||
|
||||
if (!$this->session->userdata('email')) {
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
|
||||
$this->load->view('login', $data);
|
||||
} else {
|
||||
if(isset($_POST)){
|
||||
$id_pub= $_POST['pub_id'];
|
||||
$etat= $_POST['etat'];
|
||||
if($etat == 0){
|
||||
$res = $this->user_model->updateStatePub($id_pub,1);
|
||||
}elseif($etat == 1){
|
||||
$res = $this->user_model->updateStatePub($id_pub,0);
|
||||
}
|
||||
if($res!=false){
|
||||
echo json_encode("200");
|
||||
}else{
|
||||
echo json_encode("500");
|
||||
}
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function addPubRow(){
|
||||
if (!$this->session->userdata('email')) {
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
|
||||
$this->load->view('login', $data);
|
||||
} else {
|
||||
if(isset($_POST)){
|
||||
$id_country= $_POST['country_id'];
|
||||
$res = $this->user_model->createPubRow($id_country);
|
||||
if($res!=false){
|
||||
echo json_encode("200");
|
||||
}else{
|
||||
echo json_encode("500");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,5 +205,18 @@ $lang['Pour se déconnecter, le Superviseur clique sur son nom d’utilisateur d
|
|||
$lang['faire apparaitre le menu de déconnexion lui présentant : Le réseau courant, son code parrain, son'] = 'to display the disconnection menu presenting: The current network, his sponsor code, his';
|
||||
$lang['adresse email, son pays, son numéro de téléphone et'] = 'email address, country, phone number and';
|
||||
$lang['le bouton de déconnexion'] = 'the disconnect button';
|
||||
$lang['Solde'] = 'Balance';
|
||||
$lang['Rechercher'] = 'Search';
|
||||
$lang['Rechercher un utilisateur'] = 'Search a user';
|
||||
$lang['utilisateur trouvé'] = 'user found';
|
||||
$lang['Aucun utilisateur trouvé'] = 'No users found';
|
||||
$lang['Voir plus...'] = 'See more...';
|
||||
$lang['Informations de l utilisateur'] = "User information";
|
||||
$lang['Valider'] = 'Validate';
|
||||
$lang['Numéro de transaction'] = 'Transaction number';
|
||||
$lang['Catégorie'] = 'Category';
|
||||
$lang['Date inscription'] = "Registration date";
|
||||
$lang['Utilisateur simple'] = 'Simple user';
|
||||
$lang['Statut du compte'] = 'Account status';
|
||||
$lang['Publicité'] = 'Publicity';
|
||||
$lang['Gestion de la publicité'] = 'Advertising Management';
|
||||
?>
|
||||
|
|
@ -204,7 +204,20 @@
|
|||
$lang['faire apparaitre le menu de déconnexion lui présentant : Le réseau courant, son code parrain, son'] = 'faire apparaitre le menu de déconnexion lui présentant : Le réseau courant, son code parrain, son';
|
||||
$lang['adresse email, son pays, son numéro de téléphone et'] = 'adresse email, son pays, son numéro de téléphone et';
|
||||
$lang['le bouton de déconnexion'] = 'le bouton de déconnexion';
|
||||
$lang['Solde'] = 'Solde';
|
||||
$lang['Rechercher'] = 'Rechercher';
|
||||
$lang['Rechercher un utilisateur'] = 'Rechercher un utilisateur';
|
||||
$lang['utilisateur trouvé'] = 'utilisateur trouvé';
|
||||
$lang['Aucun utilisateur trouvé'] = 'Aucun utilisateur trouvé';
|
||||
$lang['Voir plus...'] = 'Voir plus...';
|
||||
$lang['Informations de l utilisateur'] = "Informations de l'utilisateur";
|
||||
$lang['Valider'] = 'Valider';
|
||||
$lang['Numéro de transaction'] = 'Numéro de transaction';
|
||||
$lang['Catégorie'] = 'Catégorie';
|
||||
$lang['Date inscription'] = "Date d'inscription";
|
||||
$lang['Utilisateur simple'] = 'Utilisateur simple';
|
||||
$lang['Statut du compte'] = 'Statut du compte';
|
||||
$lang['Publicité'] = 'Publicité';
|
||||
$lang['Gestion de la publicité'] = 'Gestion de la publicité';
|
||||
|
||||
//GAME
|
||||
$lang['Game'] = 'Jeux';
|
||||
|
|
|
|||
|
|
@ -1873,4 +1873,141 @@ class User_model extends CI_Model
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $where_clause
|
||||
* @return bool
|
||||
*/
|
||||
public function get_user($where_clause){
|
||||
$query = $this->db->query("SELECT agents.lastname, agents.adresse,agents.email,agents.date_created,agents.id AS userID,
|
||||
codeGenerer.category,
|
||||
networks.name AS network_name,towns.name AS town_name,
|
||||
codeGenerer.code_parrain AS parrain,codeGenerer.code_membre AS code,
|
||||
networks_agents.id AS networkAgent_id,networks_agents.phone,networks_agents.transactionNumber AS transac
|
||||
FROM agents
|
||||
INNER JOIN networks_agents ON agents.id=networks_agents.agent_id
|
||||
INNER JOIN codeGenerer ON codeGenerer.id=networks_agents.codeGenerer_id
|
||||
INNER JOIN networks ON networks.id =networks_agents.network_id
|
||||
INNER JOIN towns ON towns.id=agents.town_id
|
||||
".$where_clause);
|
||||
$statement = "SELECT agents.lastname, agents.adresse,agents.email,agents.date_created,agents.id AS userID,
|
||||
codeGenerer.category,
|
||||
networks.name AS network_name,towns.name AS town_name,
|
||||
codeGenerer.code_parrain AS parrain,codeGenerer.code_membre AS code,
|
||||
networks_agents.id AS networkAgent_id,networks_agents.phone,networks_agents.transactionNumber AS transac
|
||||
FROM agents
|
||||
INNER JOIN networks_agents ON agents.id=networks_agents.agent_id
|
||||
INNER JOIN codeGenerer ON codeGenerer.id=networks_agents.codeGenerer_id
|
||||
INNER JOIN networks ON networks.id =networks_agents.network_id
|
||||
INNER JOIN towns ON towns.id=agents.town_id
|
||||
".$where_clause;
|
||||
//var_dump($statement);
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $phone
|
||||
* @param $name
|
||||
* @return |null
|
||||
*/
|
||||
public function get_simple_user($phone, $name){
|
||||
$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
|
||||
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."%'");
|
||||
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $nom
|
||||
* @param $adresse
|
||||
* @param $email
|
||||
* @param $phone
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function update_user_infos($nom, $adresse, $email, $phone, $id){
|
||||
$query = $this->db->query("UPDATE `users` SET `lastname`='".$nom."',`phone`='".$phone."',`email`='".$email."',`adresse`='".$adresse."' WHERE users.id=".$id);
|
||||
$sql = "UPDATE `users` SET `lastname`='".$nom."',`phone`='".$phone."',`email`='".$email."',`adresse`='".$adresse."' WHERE users.id=".$id;
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $nom
|
||||
* @param $adresse
|
||||
* @param $email
|
||||
* @param int $id_agent
|
||||
* @param $transac
|
||||
* @param $phone
|
||||
* @param int $id_netAg
|
||||
* @return bool
|
||||
*/
|
||||
public function update_geolocated_infos($nom, $adresse, $email, $id_agent, $transac, $phone, $id_netAg){
|
||||
$this->db->trans_begin();
|
||||
|
||||
$this->db->query("UPDATE `agents` SET `lastname`='".$nom."',`email`='".$email."',`adresse`='".$adresse."' WHERE `id`=".$id_agent);
|
||||
$this->db->query("UPDATE `networks_agents` SET `phone`='".$phone."',`transactionNumber`='".$transac."' WHERE `id`=".$id_netAg);
|
||||
$this->db->trans_complete();
|
||||
if ($this->db->trans_status() === FALSE)
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->trans_commit();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function getPubCountries(){
|
||||
$query = $this->db->query("SELECT countries.id AS id_country,countries.name AS pays,publiciteConfig.id,publiciteConfig.date_update AS maj ,publiciteConfig.partenariat,publiciteConfig.valeur_bool AS etat
|
||||
FROM countries
|
||||
INNER JOIN towns ON countries.id = towns.country_id
|
||||
LEFT JOIN publiciteConfig ON countries.id=publiciteConfig.id_country AND publiciteConfig.id_config=2
|
||||
WHERE towns.status=1
|
||||
GROUP BY countries.id");
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Met a jour l'etat de la publicite
|
||||
* @param int $id ID de la configuration
|
||||
* @param $newState Nouvel etat
|
||||
* @return mixed
|
||||
*/
|
||||
public function updateStatePub($id, $newState){
|
||||
$query = $this->db->query("UPDATE publiciteConfig SET date_update = NOW(),valeur_bool = ".$newState." WHERE id =".$id);
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajoute une nouvelle ligne de publicite
|
||||
* @param int $id_country ID du pays
|
||||
* @return mixed
|
||||
*/
|
||||
public function createPubRow($id_country){
|
||||
$query = $this->db->query("INSERT INTO publiciteConfig(id_config,id_country, valeur_bool) VALUE (2,".$id_country.",1)");
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,165 @@
|
|||
<div class="content-wrapper">
|
||||
<section class="content-header">
|
||||
|
||||
<h1>
|
||||
<?php echo $this->lang->line('Gestion de la publicité'); ?>
|
||||
</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>
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<div class="alert alert-success alert-dismissible col-xs-6">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-check"></i> Success!</h4>
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Publicité interstitielle</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Pays</th>
|
||||
<th>Opérateur</th>
|
||||
<th>Date de mise à jour</th>
|
||||
<th>Statut</th>
|
||||
<th>Activer/Desactiver</th>
|
||||
</tr>
|
||||
<?php $countries = $countries_list;
|
||||
if($countries!=false){
|
||||
$numrows= $countries->num_rows();
|
||||
$num = 0;
|
||||
if ($numrows > 0) {
|
||||
foreach($countries->result() as $row) {
|
||||
$num ++;
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $row->pays ?></td>
|
||||
<td><?php echo $row->partenariat ?></td>
|
||||
<td><?php echo $row->maj ?></td>
|
||||
<?php
|
||||
if($row->etat==1){
|
||||
?>
|
||||
<td><span class="label label-success"><?php echo $this->lang->line('Actif'); ?></span></td>
|
||||
<td><button type="button" data-countryid="<?php echo $row->id_country; ?>" data-etat="<?php echo $row->etat; ?>" data-idpub="<?php echo $row->id; ?>" class="btn btn-danger changeStatePub"><?php echo $this->lang->line('Désactiver'); ?></button></td>
|
||||
<?php
|
||||
}else{
|
||||
?>
|
||||
<td><span class="label label-danger"><?php echo $this->lang->line('Inactif'); ?></span></td>
|
||||
<td><button type="button" data-countryid="<?php echo $row->id_country; ?>" data-etat="<?php echo $row->etat; ?>" data-idpub="<?php echo $row->id; ?>" class="btn btn-primary changeStatePub"><?php echo $this->lang->line('Activer'); ?></button></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!-- jQuery 3 -->
|
||||
<script src="<?php echo base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script>
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
<script src="<?php echo base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
|
||||
<!-- DataTables -->
|
||||
<script src="<?php echo base_url('bower_components/datatables.net/js/jquery.dataTables.min.js') ?>"></script>
|
||||
<script src="<?php echo base_url('bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js') ?>"></script>
|
||||
<!-- Slimscroll -->
|
||||
<script src="<?php echo base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script>
|
||||
<!-- FastClick -->
|
||||
<script src="<?php echo base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="<?php echo base_url('dist/js/adminlte.min.js') ?>"></script>
|
||||
<!-- AdminLTE for demo purposes -->
|
||||
<script src="<?php echo base_url('dist/js/demo.js') ?>"></script>
|
||||
|
||||
<script src="<?php echo base_url('dist/js/demo.js') ?>"></script>
|
||||
|
||||
<script src="<?php echo base_url('bower_components/moment/min/moment.min.js') ?>"></script>
|
||||
<script src="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.js') ?>"></script>
|
||||
<script src="<?php echo base_url('bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js') ?>"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
|
||||
|
||||
<script>
|
||||
$('.changeStatePub').click(function(){
|
||||
|
||||
var pub_id = $(this).data('idpub');
|
||||
var etat = $(this).data('etat');
|
||||
var country_id = $(this).data('countryid');
|
||||
//alert(etat);
|
||||
|
||||
if(etat === ''){
|
||||
$.ajax({
|
||||
url : '<?php echo base_url('index.php/Gestion/addPubRow')?>',
|
||||
type : 'POST',
|
||||
dataType : 'json',
|
||||
data: {"country_id": country_id},
|
||||
success : function(data, statut){
|
||||
if(data=='200'){
|
||||
alert("Les informations ont été mises à jour.") ? "" : location.reload(true);
|
||||
}else{
|
||||
alert("Une erreur s'est produite.");
|
||||
}
|
||||
},
|
||||
|
||||
error : function(resultat, statut, erreur){
|
||||
console.log(resultat+" "+erreur);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$.ajax({
|
||||
url : '<?php echo base_url('index.php/Gestion/changePubState')?>',
|
||||
type : 'POST',
|
||||
dataType : 'json',
|
||||
data: {"pub_id": pub_id,"etat": etat},
|
||||
success : function(data, statut){
|
||||
if(data=='200'){
|
||||
alert("Les informations ont été mises à jour.") ? "" : location.reload(true);
|
||||
}else{
|
||||
alert("Une erreur s'est produite.");
|
||||
}
|
||||
},
|
||||
|
||||
error : function(resultat, statut, erreur){
|
||||
console.log(resultat+" "+erreur);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
@ -0,0 +1,654 @@
|
|||
|
||||
<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
|
||||
{
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
.form-style{
|
||||
display: block;
|
||||
width: 50%;
|
||||
height: 34px;
|
||||
padding: 6px 12px;
|
||||
font-size: 14px;
|
||||
line-height: 1.42857143;
|
||||
color: #555;
|
||||
background-color: #fff;
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
<section class="content-header">
|
||||
|
||||
<h1>
|
||||
<?php echo $this->lang->line('Rechercher un utilisateur'); ?>
|
||||
</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>
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<div class="alert alert-success alert-dismissible col-xs-6">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-check"></i> Success!</h4>
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<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">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<label>Numéro de téléphone :</label>
|
||||
<div class="input-group date" >
|
||||
<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?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-sm-3'>
|
||||
<div class="form-group">
|
||||
<label>Numéro de transaction :</label>
|
||||
<div class="input-group date" >
|
||||
<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?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-sm-3'>
|
||||
<div class="form-group">
|
||||
<label>Code membre :</label>
|
||||
<div class="input-group date">
|
||||
<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?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-sm-3'>
|
||||
<div class="form-group">
|
||||
<label>Nom :</label>
|
||||
<div class="input-group date">
|
||||
<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?>">
|
||||
</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'); ?>'/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box box-primary">
|
||||
<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>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<?php $users = $res_users;
|
||||
if($users!=false){
|
||||
$numrows= $users->num_rows();
|
||||
$num = 0;
|
||||
if ($numrows > 0) {
|
||||
foreach($users->result() as $row) {
|
||||
$num ++;
|
||||
?>
|
||||
|
||||
<div class="col-md-3">
|
||||
<!-- 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">
|
||||
|
||||
<h3 class="profile-username text-center"><?php echo $row->lastname ?></h3>
|
||||
|
||||
<p class="text-muted text-center"><?php echo $row->category ?></p>
|
||||
|
||||
<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>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<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>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<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>
|
||||
</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-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"><?php echo $this->lang->line('Informations de l utilisateur'); ?></h3>
|
||||
</div>
|
||||
<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 ?>">
|
||||
</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 ?>">
|
||||
</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 ?>">
|
||||
</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 ?>">
|
||||
</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 ?>">
|
||||
</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 ?>">
|
||||
</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 ?>">
|
||||
</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 ?>">
|
||||
</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 ?>">
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php $simple_users = $res_simple_users;
|
||||
if($simple_users!=null){
|
||||
$numrows= $simple_users->num_rows();
|
||||
$num = 0;
|
||||
if ($numrows > 0) {
|
||||
foreach($simple_users->result() as $row) {
|
||||
$num ++;
|
||||
?>
|
||||
|
||||
<div class="col-md-3">
|
||||
<!-- 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">
|
||||
|
||||
<h3 class="profile-username text-center"><?php echo $row->lastname ?></h3>
|
||||
|
||||
<p class="text-muted text-center"><?php echo $this->lang->line('Utilisateur simple'); ?></p>
|
||||
|
||||
<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>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<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>
|
||||
</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>
|
||||
</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>
|
||||
</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-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"><?php echo $this->lang->line('Informations de l utilisateur'); ?></h3>
|
||||
</div>
|
||||
<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 ?>">
|
||||
</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 ?>">
|
||||
</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 ?>">
|
||||
</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 ?>">
|
||||
</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" id="valid-infos-s" class="btn btn-primary"><?php echo $this->lang->line('Valider'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php }elseif($result_search == 2){ ?>
|
||||
<?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>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<?php
|
||||
$numrows= $simple_users->num_rows();
|
||||
$num = 0;
|
||||
if ($numrows > 0) {
|
||||
foreach($simple_users->result() as $row) {
|
||||
$num ++;
|
||||
?>
|
||||
|
||||
<div class="col-md-3">
|
||||
<!-- 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">
|
||||
|
||||
<h3 class="profile-username text-center"><?php echo $row->lastname ?></h3>
|
||||
|
||||
<p class="text-muted text-center"><?php echo $this->lang->line('Utilisateur simple'); ?></p>
|
||||
|
||||
<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>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<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>
|
||||
</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>
|
||||
</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>
|
||||
</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-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"><?php echo $this->lang->line('Informations de l utilisateur'); ?></h3>
|
||||
</div>
|
||||
<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 ?>">
|
||||
</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 ?>">
|
||||
</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 ?>">
|
||||
</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 ?>">
|
||||
</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" id="valid-infos-s" class="btn btn-primary"><?php echo $this->lang->line('Valider'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}else{
|
||||
?>
|
||||
<h3 class="box-title"><?php echo $this->lang->line('Aucun utilisateur trouvé'); ?></h3>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php }elseif($result_search == 0){ ?>
|
||||
<div class="conteneur-img">
|
||||
<img class="img-style" src="../../dist/img/search.png" alt="icon search">
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!-- jQuery 3 -->
|
||||
<script src="<?php echo base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script>
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
<script src="<?php echo base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
|
||||
<!-- DataTables -->
|
||||
<script src="<?php echo base_url('bower_components/datatables.net/js/jquery.dataTables.min.js') ?>"></script>
|
||||
<script src="<?php echo base_url('bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js') ?>"></script>
|
||||
<!-- Slimscroll -->
|
||||
<script src="<?php echo base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script>
|
||||
<!-- FastClick -->
|
||||
<script src="<?php echo base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="<?php echo base_url('dist/js/adminlte.min.js') ?>"></script>
|
||||
<!-- AdminLTE for demo purposes -->
|
||||
<script src="<?php echo base_url('dist/js/demo.js') ?>"></script>
|
||||
|
||||
<script src="<?php echo base_url('dist/js/demo.js') ?>"></script>
|
||||
|
||||
<script src="<?php echo base_url('bower_components/moment/min/moment.min.js') ?>"></script>
|
||||
<script src="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.js') ?>"></script>
|
||||
<script src="<?php echo base_url('bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js') ?>"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//Date picker
|
||||
//$('#date-debut').datepicker({autoclose: true,format: 'yyyy-mm-dd'});
|
||||
$("#date-debut").datetimepicker({
|
||||
format:'YYYY-MM-DD HH:mm:ss',
|
||||
locale: moment.locale('fr')
|
||||
});
|
||||
$('#date-fin').datetimepicker({
|
||||
format:'YYYY-MM-DD HH:mm:ss'
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$('#pays').change(function(){
|
||||
var pays = $(this).val();
|
||||
$.ajax({
|
||||
url:'<?php echo base_url('index.php/Gestion/getVilleByPays')?>',
|
||||
type: 'post',
|
||||
data: {pays: pays},
|
||||
dataType: 'json',
|
||||
success: function(list){
|
||||
var len = list.length;
|
||||
|
||||
if(len > 0){
|
||||
|
||||
var select = document.getElementById('ville');
|
||||
$(select).empty();
|
||||
|
||||
for (var i in list) {
|
||||
$(select).append("<option value='" + list[i].id + "'>" + list[i].name +"</option>");
|
||||
}
|
||||
|
||||
var id_ville = list[0].id;
|
||||
|
||||
$.ajax({
|
||||
url:'<?php echo base_url('index.php/Gestion/getAgentByVilles')?>',
|
||||
type: 'post',
|
||||
data: {id_ville: id_ville},
|
||||
dataType: 'json',
|
||||
success: function(list){
|
||||
var len = list.length;
|
||||
|
||||
if(len > 0){
|
||||
|
||||
var select = document.getElementById('agent');
|
||||
|
||||
$(select).empty();
|
||||
|
||||
for (var i in list) {
|
||||
$(select).append("<option value='" + list[i].lastname + "'>" + list[i].lastname +"</option>");
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
var select = document.getElementById('agent');
|
||||
$(select).empty();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
var select = document.getElementById('ville');
|
||||
$(select).empty();
|
||||
|
||||
var select2 = document.getElementById('agent');
|
||||
$(select2).empty();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#ville').change(function(){
|
||||
var ville = $(this).val();
|
||||
$.ajax({
|
||||
url:'<?php echo base_url('index.php/Gestion/getAgentByVilles')?>',
|
||||
type: 'post',
|
||||
data: {id_ville: ville},
|
||||
dataType: 'json',
|
||||
success: function(list){
|
||||
var len = list.length;
|
||||
|
||||
if(len > 0){
|
||||
|
||||
var select = document.getElementById('agent');
|
||||
|
||||
$(select).empty();
|
||||
|
||||
for (var i in list) {
|
||||
$(select).append("<option value='" + list[i].lastname + "'>" + list[i].lastname +"</option>");
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
var select = document.getElementById('agent');
|
||||
$(select).empty();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#phone').change(function(){
|
||||
if($(this).val() !==''){
|
||||
$('#search').prop('disabled', false );
|
||||
}else{
|
||||
if($('#transac').val() =='' && $('#code').val() =='' && $('#nom').val() ==''){
|
||||
$('#search').prop('disabled', true );
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#nom').change(function(){
|
||||
if($(this).val() !==''){
|
||||
$('#search').prop('disabled', false );
|
||||
}else{
|
||||
if($('#transac').val() =='' && $('#code').val() =='' && $('#phone').val() ==''){
|
||||
$('#search').prop('disabled', true );
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#transac').change(function(){
|
||||
if($(this).val() !==''){
|
||||
$('#search').prop('disabled', false );
|
||||
}else{
|
||||
if($('#phone').val() =='' && $('#code').val() =='' && $('#nom').val() ==''){
|
||||
$('#search').prop('disabled', true );
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#code').change(function(){
|
||||
if($(this).val() !==''){
|
||||
$('#search').prop('disabled', false );
|
||||
}else{
|
||||
if($('#transac').val() =='' && $('#phone').val() =='' && $('#nom').val() ==''){
|
||||
$('#search').prop('disabled', true );
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#valid-infos-s').click(function(){
|
||||
|
||||
var user_id = $('#infos-s').data('id');
|
||||
var nom = $('#nom-s').val();
|
||||
var adresse =$('#adresse-s').val();
|
||||
var contact =$('#phone-s').val();
|
||||
var email =$('#email-s').val();
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
url : '<?php echo base_url('index.php/Gestion/update_info_user')?>',
|
||||
type : 'POST',
|
||||
dataType : 'json',
|
||||
data: {"user_id": user_id,"nom": nom, "adresse": adresse, "contact": contact, "email": email},
|
||||
success : function(data, statut){
|
||||
if(data=='200'){
|
||||
alert("Les informations ont été mises à jour.") ? "" : location.reload(true);
|
||||
}else{
|
||||
alert("Une erreur s'est produite.");
|
||||
}
|
||||
},
|
||||
|
||||
error : function(resultat, statut, erreur){
|
||||
console.log(resultat+" "+erreur);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
$('.valid-infos-g').click(function(){
|
||||
|
||||
var num = $(this).attr('data-num');
|
||||
var user_id = $(this).attr('data-idUser');
|
||||
var net_ag_id = $(this).attr('data-idnetworkAgent');
|
||||
var nom = $('#nom-g'+num).val();
|
||||
var adresse =$('#adresse-g'+num).val();
|
||||
var email =$('#email-g'+num).val();
|
||||
var contact =$('#phone-g'+num).val();
|
||||
var transac =$('#transac-g'+num).val();
|
||||
|
||||
$.ajax({
|
||||
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},
|
||||
success : function(data, statut){
|
||||
if(data=='200'){
|
||||
alert("Les informations ont été mises à jour.") ? "" : location.reload(true);
|
||||
}else{
|
||||
alert("Une erreur s'est produite.");
|
||||
}
|
||||
},
|
||||
|
||||
error : function(resultat, statut, erreur){
|
||||
alert("Une erreur s'est produite.");
|
||||
console.log(resultat+" "+erreur);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
@ -127,6 +127,16 @@
|
|||
<i class="glyphicon glyphicon-list-alt"></i> <span><?php echo $this->lang->line('Campagne'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<?php if($active=="recherche"){echo "active";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Gestion/recherche') ?>">
|
||||
<i class="glyphicon glyphicon-search"></i> <span><?php echo $this->lang->line('Rechercher'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<?php if($active=="pub"){echo "active";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Gestion/pub') ?>">
|
||||
<i class="glyphicon glyphicon-tags"></i> <span><?php echo $this->lang->line('Publicité'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<?php if($active=="game"){echo "active";} ?>">
|
||||
<a href="#" data-toggle="modal" data-target="#modal-default">
|
||||
<i class="glyphicon glyphicon-phone"></i> <span><?php echo $this->lang->line('Game'); ?></span>
|
||||
|
|
|
|||
|
|
@ -63,13 +63,17 @@
|
|||
<form action="<?php echo base_url('index.php/login_user') ?>" method="post" class="bottom-75">
|
||||
<div class="table-form">
|
||||
<div class="form-groups">
|
||||
<div class="form-group has-feedback">
|
||||
<div class="input-group date" style="margin-bottom : 10px;">
|
||||
<input name="user_mail" id="user_mail" type="text" class="form-control input-lg" placeholder="<?php echo $this->lang->line('identifiant'); ?>" required>
|
||||
<span class="glyphicon glyphicon-user form-control-feedback"></span>
|
||||
<div class="input-group-addon" style="border-color: #0A639C; background-color: #0A639C; color: #fff;">
|
||||
<i class="glyphicon glyphicon-user"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group has-feedback">
|
||||
<div class="input-group date">
|
||||
<input type="password" name="user_password" id="user_password" class="form-control input-lg" placeholder="<?php echo $this->lang->line('mot de passe'); ?>" required>
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
<div id='div-eyes' class="input-group-addon" style="border-color: #0A639C; background-color: #0A639C; color: #fff;">
|
||||
<i id='eyes' class="glyphicon glyphicon-eye-close"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<select class="form-control input-lg" name="user_role" required>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 184 B After Width: | Height: | Size: 184 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 656 KiB After Width: | Height: | Size: 656 KiB |
|
Before Width: | Height: | Size: 412 KiB After Width: | Height: | Size: 412 KiB |
|
Before Width: | Height: | Size: 383 KiB After Width: | Height: | Size: 383 KiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |