+ Add wallet module
This commit is contained in:
parent
c1c1940258
commit
89ff6e9025
|
@ -23,7 +23,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||
| a PHP script and you can easily do that on your own.
|
||||
|
|
||||
*/
|
||||
$config['base_url'] = 'https://'.$_SERVER['SERVER_NAME'].'/backofficeiLinkTest';
|
||||
$config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/backofficeiLinkTest';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -77,7 +77,7 @@ $db['default'] = array(
|
|||
'dsn' => '',
|
||||
'hostname' => 'localhost',
|
||||
'username' => 'root',
|
||||
'password' => 'vps@2017GA',
|
||||
'password' => '',
|
||||
'database' => 'iLink_test2',
|
||||
'dbdriver' => 'mysqli',
|
||||
'dbprefix' => '',
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,329 +1,346 @@
|
|||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Hanry Nzale
|
||||
* Date: 03/08/2018
|
||||
* Time: 02:03
|
||||
*/
|
||||
|
||||
class Hyperviseur_dash extends CI_Controller
|
||||
{
|
||||
public function _contruct()
|
||||
{
|
||||
parent::_contruct();
|
||||
$this->load->model('user_model');
|
||||
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
if (!$this->session->userdata('email')) {
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
|
||||
redirect('index.php', $data);
|
||||
} else {
|
||||
|
||||
$count_d_traite = $this->user_model->getCountDemandeByStatut($this->session->userdata('member_code'),1);
|
||||
$count_d_no_traite = $this->user_model->getCountDemandeByStatut($this->session->userdata('member_code'),0);
|
||||
$count_d = $this->user_model->getCountDemande($this->session->userdata('member_code'));
|
||||
|
||||
$data['active'] = "dash";
|
||||
$data['list_geolocated_users'] = $this->user_model->getAllGeolocatedUsersForHyp($this->session->userdata('member_code'));
|
||||
$data['listdem'] = $this->user_model->getDemandes($this->session->userdata('member_code'));
|
||||
$data['allGeo'] = $this->user_model->getAllUserGeoForHyp($this->session->userdata('member_code'));
|
||||
$data['allDem'] = $this->user_model->getDemandes($this->session->userdata('member_code'));
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['member_code'] = $this->session->userdata('member_code');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'],$this->session->userdata('current_pays'));
|
||||
$data['count_geo'] = $this->user_model->countUserGeoForHyp($this->session->userdata('member_code'));
|
||||
$data['count_sup'] = $this->user_model->countUser("super",'all',$this->session->userdata('member_code'));
|
||||
$data['count_d_traite'] = $count_d_traite;
|
||||
$data['count_d_no_traite'] = $count_d_no_traite;
|
||||
$data['count_d_users'] = $count_d;
|
||||
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('hyperviseur_dash');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
|
||||
public function getAllUser_g(){
|
||||
|
||||
if (!$this->session->userdata('email')) {
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
|
||||
redirect('index.php', $data);
|
||||
}
|
||||
else {
|
||||
|
||||
if($this->input->post('ville'))
|
||||
{
|
||||
$this->session->set_userdata('current_ville', $this->input->post('ville'));
|
||||
}
|
||||
|
||||
$data['active'] = "geolocated";
|
||||
$data['total_points'] = $this->user_model->getCoutGeolocatedUsersForHyper($this->session->userdata('member_code'),$this->session->userdata('current_ville'));
|
||||
$data['map_title'] = $this->lang->line('utilisateurs géolocalisés à')." ".$this->session->userdata('current_ville');
|
||||
$data['tab'] = $this->user_model->getUsersGeolocatedByVilleForHyp($this->session->userdata('current_ville'),$this->session->userdata('member_code'));
|
||||
$data['positions'] = $this->user_model->getUsersGeolocatedPositionByVilleForHyp($this->session->userdata('current_ville'),$this->session->userdata('member_code'));
|
||||
$data['latitude'] = $this->session->userdata('latitude');
|
||||
$data['longitude'] = $this->session->userdata('longitude');
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'],$this->session->userdata('current_pays'));
|
||||
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||
$data['alert'] = "";
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('listeadmin');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getAllSupervisor(){
|
||||
|
||||
if (!$this->session->userdata('email')) {
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
|
||||
|
||||
redirect('index.php', $data);
|
||||
}
|
||||
else {
|
||||
|
||||
/*$this->db->select('*');
|
||||
$this->db->from('users');
|
||||
$this->db->where('category','super');
|
||||
$this->db->where('network',$this->session->userdata('network'));
|
||||
$this->db->where('code_parrain',$this->session->userdata('code_parrain'));*/
|
||||
$query = $this->user_model->getSupervisorsForHyp($this->session->userdata('member_code'));
|
||||
|
||||
$network = $this->session->userdata('network');
|
||||
$category = 'super';
|
||||
$position = $this->user_model->getAllpositions($network,$category,$this->session->userdata('member_code'));
|
||||
if($position!=null){
|
||||
//var_dump($position);
|
||||
//echo json_encode($position);
|
||||
}
|
||||
$data['total_points'] = $this->user_model->getCoutSuperForHyper($this->session->userdata('member_code'));
|
||||
$data['positions'] = $position;
|
||||
$data['active'] = "super";
|
||||
$data['map_title'] = $this->lang->line('Superviseurs');
|
||||
$data['tab'] = $query;
|
||||
$data['latitude'] = $this->session->userdata('latitude');
|
||||
$data['longitude'] = $this->session->userdata('longitude');
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'],$this->session->userdata('current_pays'));
|
||||
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
|
||||
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||
$data['alert'] = "";
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('listeadmin');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
|
||||
public function getAllSupervisorPositions(){
|
||||
if (!$this->session->userdata('email')) {
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
|
||||
|
||||
redirect('index.php', $data);
|
||||
}
|
||||
else {
|
||||
$network = $this->session->userdata('network');
|
||||
$category = 'super';
|
||||
|
||||
$position = $this->user_model->getAllpositions($network,$category,$this->session->userdata('member_code'));
|
||||
if($position!=null){
|
||||
return $position;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getDemandes(){
|
||||
|
||||
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($this->input->post('super'))
|
||||
{
|
||||
//$this->session->set_userdata('current_demande_ville', $this->input->post('ville'));
|
||||
|
||||
$ville = $this->session->userdata('ville');
|
||||
$data['active'] = "demandes";
|
||||
$data['type'] = $this->lang->line('crédits');
|
||||
$data['alert'] = "";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'],$this->session->userdata('current_pays'));
|
||||
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
|
||||
$data['tab_fastDemande'] = $this->user_model->getRangeASCDemandesByNetwork($this->session->userdata('member_code'),$this->session->userdata('current_demande_ville'),$this->input->post('super'));
|
||||
$data['tab_slowDemande'] = $this->user_model->getRangeDESCDemandesByNetwork($this->session->userdata('member_code'),$this->session->userdata('current_demande_ville'),$this->input->post('super'));
|
||||
$data['list'] = $this->user_model->getDemandesBySuper($this->session->userdata('member_code'),$this->input->post('super'));
|
||||
$data['temp_moyen'] = $this->user_model->getTempsMoyenByVille($this->session->userdata('member_code'),$this->input->post('super'));
|
||||
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('demande');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function addvilles(){
|
||||
$id = 1;
|
||||
$date = "2018-08-29";
|
||||
for ($i = 1; $i <= 267; $i++) {
|
||||
$newdate = date("Y-m-d", strtotime($date." + 1 day + 1 hour"));
|
||||
$data = array(
|
||||
'dateAjout' => $date,
|
||||
'dateModif' => $newdate,
|
||||
);
|
||||
|
||||
|
||||
$newdate = date("Y-m-d", strtotime($date." + 1 day + 3 hour"));
|
||||
$date = $newdate;
|
||||
|
||||
$this->db->update('demande_superviseur', $data);
|
||||
}
|
||||
}
|
||||
|
||||
public function getDemandesAd(){
|
||||
|
||||
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 {
|
||||
$network = $this->session->userdata('network');
|
||||
|
||||
$data['active'] = "demandesAd";
|
||||
$data['alert'] = "";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['tab_fastDemande'] = $this->user_model->getRangeASCDemandesAd($this->session->userdata('member_code'));
|
||||
$data['tab_slowDemande'] = $this->user_model->getRangeDESCDemandesAd($this->session->userdata('member_code'));
|
||||
$data['temp_moyen'] = $this->user_model->getTempsMoyenAd($this->session->userdata('member_code'));
|
||||
$data['list'] = $this->user_model->getDemandesAdForSuper($this->session->userdata('member_code'));
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'],$this->session->userdata('current_pays'));
|
||||
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
|
||||
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||
$data['type'] = $this->lang->line('Adhésion');
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('demande');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
|
||||
public function wallet(){
|
||||
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(!empty($_GET))
|
||||
{ //
|
||||
$id_network = $this->input->get('r');
|
||||
$data["taux_com_retrait"] = "";
|
||||
$data["taux_com_ag_retrait"] = "";
|
||||
$data["taux_com_ag_depot"] = "";
|
||||
$data["com_depot"] = "";
|
||||
$data["transactions"] = "";
|
||||
$res = $this->user_model->getTaux($id_network);
|
||||
if ($res!=null){
|
||||
foreach ($res->result() AS $row){
|
||||
$data["taux_com_retrait"] = $row->taux_r;
|
||||
$data["taux_com_ag_depot"] = $row->taux_ag_d;
|
||||
$data["taux_com_ag_retrait"] = $row->taux_ag_r;
|
||||
$data["com_depot"] = $row->taux_d;
|
||||
}
|
||||
$data["transactions"] = $this->user_model->getTransactions($id_network);
|
||||
}else{
|
||||
$data["taux_com_retrait"] = "N/A";
|
||||
$data["taux_com_ag_retrait"] = "N/A";
|
||||
$data["taux_com_ag_depot"] = "N/A";
|
||||
$data["com_depot"] = "N/A";
|
||||
$data["transactions"] = false;
|
||||
}
|
||||
|
||||
$data['alert'] = "";
|
||||
$data['active'] = "wallet";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['network_id'] = $id_network;
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'],$this->session->userdata('current_pays'));
|
||||
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
|
||||
$data['pays'] = $this->user_model->getAllGameCountries();
|
||||
$data['networks'] = $this->user_model->getActiveNetwork();
|
||||
$data['agentWalletInfos'] = $this->user_model->getInfosWalletAgentForHyper($id_network);
|
||||
$this->load->view('header_hyp',$data);
|
||||
$this->load->view('gestion_wallet');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Hanry Nzale
|
||||
* Date: 03/08/2018
|
||||
* Time: 02:03
|
||||
*/
|
||||
|
||||
class Hyperviseur_dash extends CI_Controller
|
||||
{
|
||||
public function _contruct()
|
||||
{
|
||||
parent::_contruct();
|
||||
$this->load->model('user_model');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
if (!$this->session->userdata('email')) {
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
|
||||
redirect('index.php', $data);
|
||||
} else {
|
||||
$count_d_traite = $this->user_model->getCountDemandeByStatut($this->session->userdata('member_code'),1);
|
||||
$count_d_no_traite = $this->user_model->getCountDemandeByStatut($this->session->userdata('member_code'),0);
|
||||
$count_d = $this->user_model->getCountDemande($this->session->userdata('member_code'));
|
||||
|
||||
$data['active'] = "dash";
|
||||
$data['list_geolocated_users'] = $this->user_model->getAllGeolocatedUsersForHyp($this->session->userdata('member_code'));
|
||||
$data['listdem'] = $this->user_model->getDemandes($this->session->userdata('member_code'));
|
||||
$data['allGeo'] = $this->user_model->getAllUserGeoForHyp($this->session->userdata('member_code'));
|
||||
$data['allDem'] = $this->user_model->getDemandes($this->session->userdata('member_code'));
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['member_code'] = $this->session->userdata('member_code');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'],$this->session->userdata('current_pays'));
|
||||
$data['count_geo'] = $this->user_model->countUserGeoForHyp($this->session->userdata('member_code'));
|
||||
$data['count_sup'] = $this->user_model->countUser("super",'all',$this->session->userdata('member_code'));
|
||||
$data['count_d_traite'] = $count_d_traite;
|
||||
$data['count_d_no_traite'] = $count_d_no_traite;
|
||||
$data['count_d_users'] = $count_d;
|
||||
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||
$data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('hyperviseur_dash');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
|
||||
public function getAllUser_g(){
|
||||
|
||||
if (!$this->session->userdata('email')) {
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
|
||||
redirect('index.php', $data);
|
||||
}
|
||||
else {
|
||||
|
||||
if($this->input->post('ville'))
|
||||
{
|
||||
$this->session->set_userdata('current_ville', $this->input->post('ville'));
|
||||
}
|
||||
|
||||
$data['active'] = "geolocated";
|
||||
$data['total_points'] = $this->user_model->getCoutGeolocatedUsersForHyper($this->session->userdata('member_code'),$this->session->userdata('current_ville'));
|
||||
$data['map_title'] = $this->lang->line('utilisateurs géolocalisés à')." ".$this->session->userdata('current_ville');
|
||||
$data['tab'] = $this->user_model->getUsersGeolocatedByVilleForHyp($this->session->userdata('current_ville'),$this->session->userdata('member_code'));
|
||||
$data['positions'] = $this->user_model->getUsersGeolocatedPositionByVilleForHyp($this->session->userdata('current_ville'),$this->session->userdata('member_code'));
|
||||
$data['latitude'] = $this->session->userdata('latitude');
|
||||
$data['longitude'] = $this->session->userdata('longitude');
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'],$this->session->userdata('current_pays'));
|
||||
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||
$data['alert'] = "";
|
||||
$data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('listeadmin');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getAllSupervisor(){
|
||||
|
||||
if (!$this->session->userdata('email')) {
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
|
||||
|
||||
redirect('index.php', $data);
|
||||
}
|
||||
else {
|
||||
|
||||
/*$this->db->select('*');
|
||||
$this->db->from('users');
|
||||
$this->db->where('category','super');
|
||||
$this->db->where('network',$this->session->userdata('network'));
|
||||
$this->db->where('code_parrain',$this->session->userdata('code_parrain'));*/
|
||||
$query = $this->user_model->getSupervisorsForHyp($this->session->userdata('member_code'));
|
||||
|
||||
$network = $this->session->userdata('network');
|
||||
$category = 'super';
|
||||
$position = $this->user_model->getAllpositions($network,$category,$this->session->userdata('member_code'));
|
||||
if($position!=null){
|
||||
//var_dump($position);
|
||||
//echo json_encode($position);
|
||||
}
|
||||
$data['total_points'] = $this->user_model->getCoutSuperForHyper($this->session->userdata('member_code'));
|
||||
$data['positions'] = $position;
|
||||
$data['active'] = "super";
|
||||
$data['map_title'] = $this->lang->line('Superviseurs');
|
||||
$data['tab'] = $query;
|
||||
$data['latitude'] = $this->session->userdata('latitude');
|
||||
$data['longitude'] = $this->session->userdata('longitude');
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'],$this->session->userdata('current_pays'));
|
||||
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
|
||||
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||
$data['alert'] = "";
|
||||
$data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('listeadmin');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
|
||||
public function getAllSupervisorPositions(){
|
||||
if (!$this->session->userdata('email')) {
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
|
||||
|
||||
redirect('index.php', $data);
|
||||
}
|
||||
else {
|
||||
$network = $this->session->userdata('network');
|
||||
$category = 'super';
|
||||
|
||||
$position = $this->user_model->getAllpositions($network,$category,$this->session->userdata('member_code'));
|
||||
if($position!=null){
|
||||
return $position;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getDemandes(){
|
||||
|
||||
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($this->input->post('super'))
|
||||
{
|
||||
//$this->session->set_userdata('current_demande_ville', $this->input->post('ville'));
|
||||
|
||||
$ville = $this->session->userdata('ville');
|
||||
$data['active'] = "demandes";
|
||||
$data['type'] = $this->lang->line('crédits');
|
||||
$data['alert'] = "";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'],$this->session->userdata('current_pays'));
|
||||
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
|
||||
$data['tab_fastDemande'] = $this->user_model->getRangeASCDemandesByNetwork($this->session->userdata('member_code'),$this->session->userdata('current_demande_ville'),$this->input->post('super'));
|
||||
$data['tab_slowDemande'] = $this->user_model->getRangeDESCDemandesByNetwork($this->session->userdata('member_code'),$this->session->userdata('current_demande_ville'),$this->input->post('super'));
|
||||
$data['list'] = $this->user_model->getDemandesBySuper($this->session->userdata('member_code'),$this->input->post('super'));
|
||||
$data['temp_moyen'] = $this->user_model->getTempsMoyenByVille($this->session->userdata('member_code'),$this->input->post('super'));
|
||||
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||
$data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('demande');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function addvilles(){
|
||||
$id = 1;
|
||||
$date = "2018-08-29";
|
||||
for ($i = 1; $i <= 267; $i++) {
|
||||
$newdate = date("Y-m-d", strtotime($date." + 1 day + 1 hour"));
|
||||
$data = array(
|
||||
'dateAjout' => $date,
|
||||
'dateModif' => $newdate,
|
||||
);
|
||||
|
||||
|
||||
$newdate = date("Y-m-d", strtotime($date." + 1 day + 3 hour"));
|
||||
$date = $newdate;
|
||||
|
||||
$this->db->update('demande_superviseur', $data);
|
||||
}
|
||||
}
|
||||
|
||||
public function getDemandesAd(){
|
||||
|
||||
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 {
|
||||
$network = $this->session->userdata('network');
|
||||
|
||||
$data['active'] = "demandesAd";
|
||||
$data['alert'] = "";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['tab_fastDemande'] = $this->user_model->getRangeASCDemandesAd($this->session->userdata('member_code'));
|
||||
$data['tab_slowDemande'] = $this->user_model->getRangeDESCDemandesAd($this->session->userdata('member_code'));
|
||||
$data['temp_moyen'] = $this->user_model->getTempsMoyenAd($this->session->userdata('member_code'));
|
||||
$data['list'] = $this->user_model->getDemandesAdForSuper($this->session->userdata('member_code'));
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'],$this->session->userdata('current_pays'));
|
||||
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
|
||||
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||
$data['type'] = $this->lang->line('Adhésion');
|
||||
$data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('demande');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
|
||||
// Wallet
|
||||
public function wallet(){
|
||||
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 {
|
||||
$id_network = $this->session->userdata('network_id');
|
||||
$data["commission"] = "";
|
||||
$data["principal"] = "";
|
||||
$data["transactions"] = "";
|
||||
$agent_id = $this->session->userdata('agent_id');
|
||||
$data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
|
||||
$res = $this->user_model->getWallet($agent_id);
|
||||
if ($res!=null){
|
||||
$row = $res->first_row();
|
||||
$data["commission"] = $row->balance_com;
|
||||
$data["principal"] = $row->balance_princ;
|
||||
$agents_g = $this->user_model->getAllGeolocatedUsersForHyp($this->session->userdata('member_code'));
|
||||
|
||||
//Fetch all transactions of any geolocated agent of the network
|
||||
$data["transactions"] = array();
|
||||
if($agents_g){
|
||||
foreach($agents_g->result() AS $row){
|
||||
$wallet = $this->user_model->getWallet($row->agent_id);
|
||||
if($wallet){
|
||||
$transactions = $this->user_model->getAgentTransactions($wallet->first_row()->wallet_id);
|
||||
if($transactions){
|
||||
foreach($transactions->result() AS $trans){
|
||||
$trans->code_parrain = $row->code_parrain ; // Add code parrain to transaction
|
||||
array_push( $data['transactions'], $trans);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
$data["commission"] = "N/A";
|
||||
$data["principal"] = "N/A";
|
||||
$data["transactions"] = false;
|
||||
}
|
||||
|
||||
|
||||
$data['alert'] = "";
|
||||
$data['active'] = "wallet";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['network_id'] = $id_network;
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'],$this->session->userdata('current_pays'));
|
||||
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
|
||||
$data['pays'] = $this->user_model->getAllGameCountries();
|
||||
$data['networks'] = $this->user_model->getActiveNetwork();
|
||||
$data['agentWalletInfos'] = $this->user_model->getInfosWalletAgentForHyper($id_network);
|
||||
$this->load->view('header_hyp',$data);
|
||||
$this->load->view('gestion_wallet_hyp');
|
||||
$this->load->view('footer');
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,165 +1,240 @@
|
|||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Superviseur_dash extends CI_Controller
|
||||
{
|
||||
|
||||
public function __construct(){
|
||||
parent::__construct();
|
||||
$this->load->model('Users_simple');
|
||||
$this->load->model('User_model');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
if (!$this->session->userdata('email')) {
|
||||
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
redirect('index.php', $data);
|
||||
|
||||
} else {
|
||||
|
||||
$count_g = $this->User_model->geolocatedCountByParrain($this->session->userdata('member_code'));
|
||||
$count_d = $this->User_model->getCountDemande($this->session->userdata('member_code'));
|
||||
$count_d_traite = $this->User_model->getCountDemandeByStatut($this->session->userdata('member_code'),1);
|
||||
$count_d_no_traite = $this->User_model->getCountDemandeByStatut($this->session->userdata('member_code'),0);
|
||||
|
||||
$data['list_geolocated_users'] = $this->user_model->getUsersGeolocatedForSup($this->session->userdata('member_code'));
|
||||
|
||||
$data['active'] = "dash";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['member_code'] = $this->session->userdata('member_code');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['code_parrain'] = $this->session->userdata('parrain');
|
||||
$data['listdem'] = $this->user_model->getDemandesForSuper($this->session->userdata('member_code'));
|
||||
$data['count_g_users'] = $count_g;
|
||||
$data['count_d_users'] = $count_d;
|
||||
$data['count_d_traite'] = $count_d_traite;
|
||||
$data['count_d_no_traite'] = $count_d_no_traite;
|
||||
$this->load->view('header_sup', $data);
|
||||
$this->load->view('superviseur_dash');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
|
||||
public function getAllUser_g(){
|
||||
|
||||
if (!$this->session->userdata('email')) {
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
|
||||
|
||||
redirect('index.php', $data);
|
||||
}
|
||||
else {
|
||||
|
||||
$position = $this->user_model->getAllpositions($this->session->userdata('network'),'geolocated',$this->session->userdata('member_code'));
|
||||
|
||||
$data['active'] = "geolocated";
|
||||
$data['positions']= $position;
|
||||
$numberGeo = $this->user_model->getNumberGeoBySuper($this->session->userdata('member_code'));
|
||||
if($numberGeo!=false){
|
||||
$data['numberGeo'] = $numberGeo;
|
||||
}else{
|
||||
$data['numberGeo'] = "";
|
||||
}
|
||||
$data['map_title'] = $this->lang->line('Utilisateurs géolocalisés');
|
||||
$data['total_points'] = $this->user_model->getCoutGeolocatedUsersForSuper($this->session->userdata('member_code'));
|
||||
$data['tab'] = $this->user_model->getUsersGeolocatedForSup($this->session->userdata('member_code'));
|
||||
$data['latitude'] = $this->session->userdata('latitude');
|
||||
$data['longitude'] = $this->session->userdata('longitude');
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['alert'] = "";
|
||||
$this->load->view('header_sup', $data);
|
||||
$this->load->view('listeadmin');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
|
||||
public function getDemandes(){
|
||||
|
||||
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 {
|
||||
$network = $this->session->userdata('network');
|
||||
|
||||
$data['active'] = "demandes";
|
||||
$data['type'] = $this->lang->line('crédits');
|
||||
$data['alert'] = "";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['tab_fastDemande'] = $this->user_model->getRangeASCDemandes($this->session->userdata('member_code'));
|
||||
$data['tab_fastDemande_s'] = $this->user_model->getRangeASCDemandesOut($this->session->userdata('member_code'));
|
||||
$data['tab_slowDemande'] = $this->user_model->getRangeDESCDemandes($this->session->userdata('member_code'));
|
||||
$data['tab_slowDemande_s'] = $this->user_model->getRangeDESCDemandesOut($this->session->userdata('member_code'));
|
||||
$data['mydem'] = $this->user_model->getDemandesHyperForSuper($this->session->userdata('member_code'));
|
||||
$data['temp_moyen'] = $this->user_model->getTempsMoyen($this->session->userdata('member_code'));
|
||||
$data['temp_moyen_mine'] = $this->user_model->getTempsMoyenDemandeSup($this->session->userdata('member_code'));
|
||||
$data['list'] = $this->user_model->getDemandesForSuper($this->session->userdata('member_code'));
|
||||
$this->load->view('header_sup', $data);
|
||||
$this->load->view('demande');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
|
||||
public function getDemandesAd(){
|
||||
|
||||
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 {
|
||||
$network = $this->session->userdata('network');
|
||||
|
||||
$data['active'] = "demandesAd";
|
||||
$data['alert'] = "";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['tab_fastDemande'] = $this->user_model->getRangeASCDemandesAd($this->session->userdata('member_code'));
|
||||
$data['tab_slowDemande'] = $this->user_model->getRangeDESCDemandesAd($this->session->userdata('member_code'));
|
||||
$data['mydem'] = $this->user_model->getDemandesHyperForSuper($this->session->userdata('member_code'));
|
||||
$data['temp_moyen'] = $this->user_model->getTempsMoyenAd($this->session->userdata('member_code'));
|
||||
$data['list'] = $this->user_model->getDemandesAdForSuper($this->session->userdata('member_code'));
|
||||
$data['type'] = 'adhésions';
|
||||
$this->load->view('header_sup', $data);
|
||||
$this->load->view('demande');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Superviseur_dash extends CI_Controller
|
||||
{
|
||||
|
||||
public function __construct(){
|
||||
parent::__construct();
|
||||
$this->load->model('Users_simple');
|
||||
$this->load->model('User_model');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
if (!$this->session->userdata('email')) {
|
||||
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
redirect('index.php', $data);
|
||||
|
||||
} else {
|
||||
|
||||
$count_g = $this->User_model->geolocatedCountByParrain($this->session->userdata('member_code'));
|
||||
$count_d = $this->User_model->getCountDemande($this->session->userdata('member_code'));
|
||||
$count_d_traite = $this->User_model->getCountDemandeByStatut($this->session->userdata('member_code'),1);
|
||||
$count_d_no_traite = $this->User_model->getCountDemandeByStatut($this->session->userdata('member_code'),0);
|
||||
|
||||
$data['list_geolocated_users'] = $this->user_model->getUsersGeolocatedForSup($this->session->userdata('member_code'));
|
||||
|
||||
$data['active'] = "dash";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['member_code'] = $this->session->userdata('member_code');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['code_parrain'] = $this->session->userdata('parrain');
|
||||
$data['listdem'] = $this->user_model->getDemandesForSuper($this->session->userdata('member_code'));
|
||||
$data['count_g_users'] = $count_g;
|
||||
$data['count_d_users'] = $count_d;
|
||||
$data['count_d_traite'] = $count_d_traite;
|
||||
$data['count_d_no_traite'] = $count_d_no_traite;
|
||||
$data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$this->load->view('header_sup', $data);
|
||||
$this->load->view('superviseur_dash');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
|
||||
public function getAllUser_g(){
|
||||
|
||||
if (!$this->session->userdata('email')) {
|
||||
$this->session->set_flashdata('error', 'log in first');
|
||||
|
||||
$data['alert'] = "ok";
|
||||
$data['message'] = "Login first!";
|
||||
|
||||
|
||||
redirect('index.php', $data);
|
||||
}
|
||||
else {
|
||||
|
||||
$position = $this->user_model->getAllpositions($this->session->userdata('network'),'geolocated',$this->session->userdata('member_code'));
|
||||
|
||||
$data['active'] = "geolocated";
|
||||
$data['positions']= $position;
|
||||
$numberGeo = $this->user_model->getNumberGeoBySuper($this->session->userdata('member_code'));
|
||||
if($numberGeo!=false){
|
||||
$data['numberGeo'] = $numberGeo;
|
||||
}else{
|
||||
$data['numberGeo'] = "";
|
||||
}
|
||||
$data['map_title'] = $this->lang->line('Utilisateurs géolocalisés');
|
||||
$data['total_points'] = $this->user_model->getCoutGeolocatedUsersForSuper($this->session->userdata('member_code'));
|
||||
$data['tab'] = $this->user_model->getUsersGeolocatedForSup($this->session->userdata('member_code'));
|
||||
$data['latitude'] = $this->session->userdata('latitude');
|
||||
$data['longitude'] = $this->session->userdata('longitude');
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['alert'] = "";
|
||||
$data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$this->load->view('header_sup', $data);
|
||||
$this->load->view('listeadmin');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
|
||||
public function getDemandes(){
|
||||
|
||||
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 {
|
||||
$network = $this->session->userdata('network');
|
||||
|
||||
$data['active'] = "demandes";
|
||||
$data['type'] = $this->lang->line('crédits');
|
||||
$data['alert'] = "";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['tab_fastDemande'] = $this->user_model->getRangeASCDemandes($this->session->userdata('member_code'));
|
||||
$data['tab_fastDemande_s'] = $this->user_model->getRangeASCDemandesOut($this->session->userdata('member_code'));
|
||||
$data['tab_slowDemande'] = $this->user_model->getRangeDESCDemandes($this->session->userdata('member_code'));
|
||||
$data['tab_slowDemande_s'] = $this->user_model->getRangeDESCDemandesOut($this->session->userdata('member_code'));
|
||||
$data['mydem'] = $this->user_model->getDemandesHyperForSuper($this->session->userdata('member_code'));
|
||||
$data['temp_moyen'] = $this->user_model->getTempsMoyen($this->session->userdata('member_code'));
|
||||
$data['temp_moyen_mine'] = $this->user_model->getTempsMoyenDemandeSup($this->session->userdata('member_code'));
|
||||
$data['list'] = $this->user_model->getDemandesForSuper($this->session->userdata('member_code'));
|
||||
$data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$this->load->view('header_sup', $data);
|
||||
$this->load->view('demande');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
|
||||
public function getDemandesAd(){
|
||||
|
||||
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 {
|
||||
$network = $this->session->userdata('network');
|
||||
|
||||
$data['active'] = "demandesAd";
|
||||
$data['alert'] = "";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['tab_fastDemande'] = $this->user_model->getRangeASCDemandesAd($this->session->userdata('member_code'));
|
||||
$data['tab_slowDemande'] = $this->user_model->getRangeDESCDemandesAd($this->session->userdata('member_code'));
|
||||
$data['mydem'] = $this->user_model->getDemandesHyperForSuper($this->session->userdata('member_code'));
|
||||
$data['temp_moyen'] = $this->user_model->getTempsMoyenAd($this->session->userdata('member_code'));
|
||||
$data['list'] = $this->user_model->getDemandesAdForSuper($this->session->userdata('member_code'));
|
||||
$data['type'] = 'adhésions';
|
||||
$data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$this->load->view('header_sup', $data);
|
||||
$this->load->view('demande');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
|
||||
// Wallet
|
||||
public function wallet(){
|
||||
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 {
|
||||
$id_network = $this->session->userdata('network_id');
|
||||
$data["commission"] = "";
|
||||
$data["principal"] = "";
|
||||
$data["transactions"] = "";
|
||||
$agent_id = $this->session->userdata('agent_id');
|
||||
$data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
|
||||
$res = $this->user_model->getWallet($agent_id);
|
||||
if ($res!=null){
|
||||
$row = $res->first_row();
|
||||
$data["commission"] = $row->balance_com;
|
||||
$data["principal"] = $row->balance_princ;
|
||||
$agents_g = $this->user_model->getUsersGeolocatedForSup($this->session->userdata('member_code'));
|
||||
$data['agents_g'] = $agents_g;
|
||||
|
||||
//Fetch all transactions of any geolocated agent of the network
|
||||
$data["transactions"] = array();
|
||||
if($agents_g){
|
||||
foreach($agents_g->result() AS $row){
|
||||
$wallet = $this->user_model->getWallet($row->agent_id);
|
||||
if($wallet){
|
||||
$transactions = $this->user_model->getAgentTransactions($wallet->first_row()->wallet_id);
|
||||
if($transactions){
|
||||
foreach($transactions->result() AS $trans){
|
||||
$trans->agent_id = $row->agent_id ; // Add agent id to transaction
|
||||
array_push( $data['transactions'], $trans);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
$data["commission"] = "N/A";
|
||||
$data["principal"] = "N/A";
|
||||
$data["transactions"] = false;
|
||||
}
|
||||
|
||||
|
||||
$data['alert'] = "";
|
||||
$data['active'] = "wallet";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['network_id'] = $id_network;
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'],$this->session->userdata('current_pays'));
|
||||
$data['pays'] = $this->user_model->getAllGameCountries();
|
||||
$data['networks'] = $this->user_model->getActiveNetwork();
|
||||
$data['agentWalletInfos'] = $this->user_model->getInfosWalletAgentForHyper($id_network);
|
||||
$this->load->view('header_sup',$data);
|
||||
$this->load->view('gestion_wallet_sup');
|
||||
$this->load->view('footer');
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,6 +86,7 @@
|
|||
$this->session->set_userdata('firstname', $data->firstname);
|
||||
$this->session->set_userdata('lastname', $data->lastname);
|
||||
$this->session->set_userdata('adresse', $data->adresse);
|
||||
$this->session->set_userdata('agent_id', $data->agent_id);
|
||||
|
||||
if($user_login['user_role']==1){
|
||||
$this->session->set_userdata('country', $data->country);
|
||||
|
|
|
@ -219,4 +219,16 @@ $lang['Utilisateur simple'] = 'Simple user';
|
|||
$lang['Statut du compte'] = 'Account status';
|
||||
$lang['Publicité'] = 'Publicity';
|
||||
$lang['Gestion de la publicité'] = 'Advertising Management';
|
||||
|
||||
//Wallet
|
||||
$lang['Gestion des wallets'] = 'Wallet Management';
|
||||
$lang['Réseaux activés'] = 'Activated networks';
|
||||
$lang['Configuration du wallet'] = 'Wallet configuration';
|
||||
$lang['Taux de commission client sur retrait'] = 'Customer commission rate on withdrawal';
|
||||
$lang['Taux de commission client sur dépot'] = 'Client commission rate on deposit';
|
||||
$lang['Taux de commission agent géolocalisé sur retrait'] = 'Geolocated agent commission rate on withdrawal';
|
||||
$lang['Taux de commission agent géolocalisé sur dépot'] = 'Geolocated agent commission rate on deposit';
|
||||
$lang['Taux de commission superviseur sur retrait'] = 'Supervisor commission rate on withdrawal';
|
||||
$lang['Taux de commission superviseur sur dépot'] = 'Supervisor commission rate on deposit';
|
||||
$lang['Suppression du wallet'] = 'Removal of the wallet';
|
||||
?>
|
||||
|
|
|
@ -235,4 +235,23 @@
|
|||
$lang[''] = '';
|
||||
$lang[''] = '';
|
||||
$lang[''] = '';
|
||||
|
||||
//Wallet
|
||||
$lang['Gestion des wallets'] = 'Gestion des wallets';
|
||||
$lang['Réseaux activés'] = 'Réseaux activés';
|
||||
$lang['Configuration du wallet'] = 'Configuration du wallet';
|
||||
$lang['Taux de commission client sur retrait'] = 'Taux de commission client sur retrait';
|
||||
$lang['Taux de commission client sur dépot'] = 'Taux de commission client sur dépot';
|
||||
$lang['Taux de commission agent géolocalisé sur retrait'] = 'Taux de commission agent géolocalisé sur retrait';
|
||||
$lang['Taux de commission agent géolocalisé sur dépot'] = 'Taux de commission agent géolocalisé sur dépot';
|
||||
$lang['Taux de commission superviseur sur retrait'] = 'Taux de commission superviseur sur retrait';
|
||||
$lang['Taux de commission superviseur sur dépot'] = 'Taux de commission superviseur sur dépot';
|
||||
$lang['Part de la banque sur le retrait'] = 'Part de la banque partenaire sur le retrait';
|
||||
$lang['Part de la banque sur le dépot'] = 'Part de la banque partenaire sur le dépot';
|
||||
$lang['Frais minimun de la banque sur le dépot'] = 'Frais minimun de la banque sur le dépot du client';
|
||||
$lang['Suppression du wallet'] = 'Suppression du wallet';
|
||||
$lang['Modifier la configuration'] = 'Modifier la configuration';
|
||||
$lang['Commissions Hyperviseur'] = 'Commissions Hyperviseur';
|
||||
$lang['Commissions Superviseurs'] = 'Commissions Superviseurs';
|
||||
$lang['Commissions Agents']= 'Commissions Agents';
|
||||
?>
|
||||
|
|
|
@ -198,7 +198,7 @@ class User_model extends CI_Model
|
|||
|
||||
public function getUsersGeolocatedByVilleForHyp($ville,$codeHyp){
|
||||
|
||||
$query = $this->db->query("SELECT child.adresse AS adresse,child.category AS childcat,child.lastname AS lastname,child.solde AS solde,
|
||||
$query = $this->db->query("SELECT child.adresse AS adresse,child.category AS childcat,child.lastname AS lastname,
|
||||
child.latitude AS latitude, child.longitude AS longitude,
|
||||
child.etat AS active, child.code_parrain AS code_parrain,child.code_membre AS member_code,
|
||||
child.network AS network, child.phone AS phone, child.email AS email,dad.adresse AS supadresse,
|
||||
|
@ -332,7 +332,7 @@ class User_model extends CI_Model
|
|||
|
||||
public function getSupervisorsForHyp($codeHyp){
|
||||
|
||||
$query = $this->db->query("SELECT child.adresse AS adresse,child.category AS childcat,child.lastname AS lastname,child.solde AS solde,
|
||||
$query = $this->db->query("SELECT child.adresse AS adresse,child.category AS childcat,child.lastname AS lastname,
|
||||
child.etat AS active, child.code_parrain AS code_parrain,child.code_membre AS member_code,
|
||||
child.network AS network, child.phone AS phone, child.email AS email,dad.adresse AS supadresse,
|
||||
dad.lastname AS suplastname, dad.code_membre AS sup_code_membre,dad.code_membre AS sup_code_parrain,
|
||||
|
@ -352,7 +352,7 @@ class User_model extends CI_Model
|
|||
|
||||
public function getUsersGeolocatedForSup($codeSup){
|
||||
|
||||
$query = $this->db->query("SELECT child.adresse AS adresse,child.category AS childcat,child.lastname AS lastname,child.solde AS solde,
|
||||
$query = $this->db->query("SELECT child.adresse AS adresse,child.category AS childcat,child.lastname AS lastname,child.agent_id,
|
||||
child.etat AS active, child.code_parrain AS code_parrain,child.code_membre AS member_code,
|
||||
child.network AS network, child.phone AS phone, child.email AS email,dad.adresse AS supadresse,
|
||||
dad.lastname AS suplastname, dad.code_membre AS sup_code_membre,dad.code_parrain AS sup_code_parrain,
|
||||
|
@ -1652,7 +1652,7 @@ class User_model extends CI_Model
|
|||
|
||||
public function getSuperNameAndCodeForHyp($codeHyp){
|
||||
|
||||
$query = $this->db->query("SELECT child.lastname AS lastname, child.code_membre AS member_code
|
||||
$query = $this->db->query("SELECT child.lastname AS lastname, child.code_membre AS member_code, child.agent_id
|
||||
FROM super_infos AS child
|
||||
INNER JOIN hyper_infos AS dad
|
||||
ON child.code_parrain='".$codeHyp."'
|
||||
|
@ -1827,11 +1827,7 @@ class User_model extends CI_Model
|
|||
}
|
||||
}
|
||||
public function getTaux($id_network){
|
||||
$query = $this->db->query("SELECT configWallet.id,
|
||||
taux_com_retrait AS taux_r,
|
||||
taux_com_ag_retrait AS taux_ag_r,
|
||||
com_depot AS taux_d,
|
||||
taux_com_ag_depot AS taux_ag_d
|
||||
$query = $this->db->query("SELECT *
|
||||
FROM configWallet
|
||||
WHERE `id_network`=".$id_network);
|
||||
if($query->num_rows()>0){
|
||||
|
@ -2010,4 +2006,106 @@ class User_model extends CI_Model
|
|||
$query = $this->db->query("INSERT INTO publiciteConfig(id_config,id_country, valeur_bool) VALUE (2,".$id_country.",1)");
|
||||
return $query;
|
||||
}
|
||||
|
||||
// Wallet
|
||||
|
||||
public function getAllActivatedNetworks(){
|
||||
$query = $this->db->query("SELECT networks.name AS network,networks.status AS status,networks.id,countries.name AS country,networks.country_id , configWallet.id_network FROM `networks`
|
||||
INNER JOIN countries ON networks.country_id=countries.id LEFT JOIN configWallet ON configWallet.id_network = networks.id WHERE status = 1");
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getConfigWallet($id_network){
|
||||
$sql = "SELECT * FROM `configWallet` WHERE id_network = ?";
|
||||
$query = $this->db->query($sql , array($id_network));
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function addConfigWallet($network_id , $taux_client_r , $taux_client_d, $taux_ag_r , $taux_ag_d , $taux_sup_r , $taux_sup_d , $taux_bq_r , $taux_bq_d , $frais_d ){
|
||||
$sql='INSERT INTO `configWallet` (`taux_com_client_retrait`, `taux_com_client_depot`, `taux_com_ag_retrait`, `taux_com_ag_depot`, `taux_com_sup_depot`, `taux_com_sup_retrait`, `part_banque_retrait`, `part_banque_depot`, `frais_min_banque_depot`, `id_network`) VALUES ( ?, ?, ?, ?, ?, ?, ? , ? , ? ,?);' ;
|
||||
$query = $this->db->query($sql , array($taux_client_r,$taux_client_d,$taux_ag_r,$taux_ag_d,$taux_sup_r,$taux_sup_d, $taux_bq_r , $taux_bq_d , $frais_d , $network_id));
|
||||
return $query;
|
||||
}
|
||||
|
||||
public function updateConfigWallet($network_id , $taux_client_r , $taux_client_d, $taux_ag_r , $taux_ag_d , $taux_sup_r , $taux_sup_d , $taux_bq_r , $taux_bq_d , $frais_d ){
|
||||
$sql= 'UPDATE `configWallet` SET `taux_com_client_retrait` = ?, `taux_com_client_depot` = ?, `taux_com_ag_retrait` = ?, `taux_com_ag_depot` = ?, `taux_com_sup_retrait` = ? , `taux_com_sup_depot` = ?, `part_banque_retrait` = ?, `part_banque_depot` = ?, `frais_min_banque_depot` = ? WHERE (`id_network` = ?);';
|
||||
$query = $this->db->query($sql , array($taux_client_r,$taux_client_d,$taux_ag_r,$taux_ag_d,$taux_sup_r,$taux_sup_d, $taux_bq_r , $taux_bq_d , $frais_d , $network_id));
|
||||
return $query;
|
||||
}
|
||||
|
||||
public function deleteConfigWallet($network_id){
|
||||
$query = $this->db->query("DELETE FROM `configWallet` WHERE `configWallet`.`id_network` = '".$network_id."'");
|
||||
return $query;
|
||||
}
|
||||
|
||||
public function getWallet($id_agent){
|
||||
$sql = "SELECT * FROM `wallet_agent` WHERE agent_id = ?";
|
||||
$query = $this->db->query($sql , array($id_agent));
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function addWallet($id_agent){
|
||||
|
||||
$sql = "SELECT * FROM `networks_agents` WHERE agent_id = ?";
|
||||
$query = $this->db->query($sql , array($id_agent));
|
||||
if($query->num_rows()>0){
|
||||
$id_networkAgent = $query->first_row()->id;
|
||||
$sql = "INSERT INTO `wallets` (`id_networkAgent`) VALUES (?);";
|
||||
$query = $this->db->query($sql , array($id_networkAgent));
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getAgentTransactions($id_wallet){
|
||||
$query = $this->db->query("SELECT *
|
||||
FROM wallet_transaction
|
||||
WHERE `id_wallet`= '".$id_wallet."'");
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getNetworkHyper($id_network){
|
||||
$sql = "SELECT * FROM `hyper_infos` WHERE network_id = ?";
|
||||
$query = $this->db->query($sql , array($id_network));
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getAllAgentsForNetwork($id_network){
|
||||
$sql = "SELECT * FROM super_infos WHERE network_id = ?";
|
||||
$query = $this->db->query($sql , array($id_network));
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function reinitializeWallet($id_wallet){
|
||||
$sql = "UPDATE `wallets` SET `balance_princ` = '0', `balance_com` = '0', `created_date` = ? WHERE (`id` = ?)";
|
||||
$query = $this->db->query($sql , array(new DateTime(),$id_wallet));
|
||||
return $query;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,387 +1,605 @@
|
|||
<link rel="stylesheet" href="<?php echo base_url('bower_components/jvectormap/jquery-jvectormap.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/bootstrap-daterangepicker/daterangepicker.css') ?>">
|
||||
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
|
||||
<script src="<?php echo base_url('bower_components/chart.js/Chart.js') ?>"></script>
|
||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
|
||||
|
||||
<?php
|
||||
function convertDate($date){
|
||||
$month = null;
|
||||
switch ($date) {
|
||||
case "Jan":
|
||||
$month = 1;
|
||||
break;
|
||||
case "Feb":
|
||||
$month = 2;
|
||||
break;
|
||||
case "Mar":
|
||||
$month = 3;
|
||||
break;
|
||||
case "Apr":
|
||||
$month = 4;
|
||||
break;
|
||||
case "May":
|
||||
$month = 5;
|
||||
break;
|
||||
case "Jun":
|
||||
$month = 6;
|
||||
break;
|
||||
case "Jul":
|
||||
$month = 7;
|
||||
break;
|
||||
case "Aug":
|
||||
$month = 8;
|
||||
break;
|
||||
case "Sep":
|
||||
$month = 9;
|
||||
break;
|
||||
case "Oct":
|
||||
$month = 10;
|
||||
break;
|
||||
case "Nov":
|
||||
$month = 11;
|
||||
break;
|
||||
case "Dec":
|
||||
$month = 12;
|
||||
break;
|
||||
}
|
||||
return $month;
|
||||
}
|
||||
|
||||
$month = time();
|
||||
$months[]=convertDate(date("M"));
|
||||
$label_months [] = date("M")." ".date("Y");
|
||||
$years[]= date("Y");
|
||||
for ($i = 1; $i <= 11; $i++) {
|
||||
$month = strtotime('last month', $month);
|
||||
$months [] = convertDate(date("M", $month));
|
||||
$years[] = date("Y", $month);
|
||||
$label_months [] = date("M", $month)." ".date("Y", $month);
|
||||
}
|
||||
|
||||
/**
|
||||
** Retraits
|
||||
**/
|
||||
$date = date("Y");
|
||||
|
||||
$retraits_data[] = '';
|
||||
$retraits_data =array();
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$retraits_query_mounth = $this->db->query("SELECT id FROM infos_transaction
|
||||
WHERE network_id='".$network_id."'
|
||||
AND MONTH(date_created) = '".$months[$i-1]."'
|
||||
AND YEAR(date_created) = '".$years[$i-1]."'
|
||||
AND type_transac='debit'");
|
||||
$retraits_data[] = $retraits_query_mounth->num_rows();
|
||||
}
|
||||
/**
|
||||
** Dépots
|
||||
**/
|
||||
$date = date("Y");
|
||||
|
||||
$depots_data[] = '';
|
||||
$depots_data =array();
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$depots_query_mounth = $this->db->query("SELECT id FROM infos_transaction
|
||||
WHERE network_id='".$network_id."'
|
||||
AND MONTH(date_created) = '".$months[$i-1]."'
|
||||
AND YEAR(date_created) = '".$years[$i-1]."'
|
||||
AND type_transac='credit'");
|
||||
$depots_data[] = $depots_query_mounth->num_rows();
|
||||
}
|
||||
|
||||
if($transactions!=false){
|
||||
$transac=$transactions->num_rows();
|
||||
$array_transac = array();
|
||||
$num = 0;
|
||||
if ($transac > 0) {
|
||||
foreach($transactions->result() as $row) {
|
||||
$num++;
|
||||
$array_transac[] = $row->type_transac;
|
||||
}
|
||||
$vals_transac = array_count_values($array_transac);
|
||||
$pieChart = array();
|
||||
foreach(array_keys($vals_transac) as $paramName) {
|
||||
$color = dechex(rand(0x000000, 0xFFFFFF));
|
||||
$trash = array("value" => $vals_transac[$paramName],
|
||||
"color" => "#".$color,
|
||||
"highlight" => "#".$color,
|
||||
"label" => $paramName);
|
||||
|
||||
$pieChart[]= $trash;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$pieChart = array();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
|
||||
<h1>
|
||||
Gestion des wallets <?php echo $network; ?>
|
||||
</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="row">
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<div class="small-box bg-aqua">
|
||||
<div class="inner">
|
||||
<h3><?php echo $taux_com_retrait; ?><sup style="font-size: 20px">%</sup></h3>
|
||||
<p>Taux de commission sur retraits</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-android-arrow-up"></i>
|
||||
</div>
|
||||
<a href="#" data-toggle="modal" data-target="#modal-update" data-type="com_ret" class="small-box-footer">Modifier <i class="fa fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<div class="small-box bg-green">
|
||||
<div class="inner">
|
||||
<h3><?php echo $taux_com_ag_retrait; ?><sup style="font-size: 20px">%</sup></h3>
|
||||
<p>Comission agent sur retrait</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-android-arrow-up"></i>
|
||||
</div>
|
||||
<a href="#" data-toggle="modal" data-target="#modal-update" data-type="com_ag_ret" class="small-box-footer">Modifier <i class="fa fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<div class="small-box bg-yellow">
|
||||
<div class="inner">
|
||||
<h3><?php echo $com_depot; ?> <sup style="font-size: 20px">FCFA</sup></h3>
|
||||
<p>Comission sur dépot</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-android-arrow-down"></i>
|
||||
</div>
|
||||
<a href="#" data-toggle="modal" data-target="#modal-update" data-type="com_dep" class="small-box-footer">Modifier <i class="fa fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<div class="small-box bg-red">
|
||||
<div class="inner">
|
||||
<h3><?php echo $taux_com_ag_depot; ?><sup style="font-size: 20px">%</sup></h3>
|
||||
<p>Comission agent sur dépot</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-android-arrow-down"></i>
|
||||
</div>
|
||||
<a href="#" data-toggle="modal" data-target="#modal-update" data-type="com_ag_dep" class="small-box-footer">Modifier <i class="fa fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Retraits et dépots des 12 derniers mois<?php //echo $this->lang->line('Souscription des 12 derniers mois'); ?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="chart" id="chart">
|
||||
<canvas id="barChart" style="height:230px"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="box box-danger">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Parts dépots & retraits<?php //echo $this->lang->line("Utilisateurs géolocalisés par ville"); ?></h3>
|
||||
</div>
|
||||
<div class="box-body" id="chart2">
|
||||
<canvas id="pieChart" style="height:250px"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Commissions Superviseurs</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table id="example1" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Solde Com.</th>
|
||||
<th>Dépots</th>
|
||||
<th>Retraits</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$data = $agentWalletInfos;
|
||||
if($data!=false){
|
||||
|
||||
$numrows=$data->num_rows();
|
||||
$num = 0;
|
||||
if ($numrows > 0) {
|
||||
foreach($data->result() as $row) {
|
||||
$num++;
|
||||
echo "<tr>
|
||||
<td>".$row->lastname."</td>
|
||||
<td>".$row->balance_com."</td>
|
||||
<td> 4</td>
|
||||
<td>X</td>
|
||||
</tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td>Trident</td>
|
||||
<td>Win 7</td>
|
||||
<td> 4</td>
|
||||
<td>X</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="modal-update">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form action="<?php echo base_url('index.php/Gestion/updateTaux')?>" method="post">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">Définissez la nouvelle valeur<?php //echo $this->lang->line('Sélectionnez le pays'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<input class="form-control" type="number" value="" name="taux" id="taux">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
|
||||
<button type="submit" class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</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>
|
||||
<!-- ChartJS -->
|
||||
<script src="<?php echo base_url('bower_components/chart.js/Chart.js') ?>"></script>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('#example1').DataTable({
|
||||
"aLengthMenu": [[5, 10, 15, -1], [5, 10, 5, "All"]],
|
||||
"iDisplayLength": 5
|
||||
})
|
||||
$('#example2').DataTable({
|
||||
'paging' : true,
|
||||
'lengthChange': false,
|
||||
'searching' : false,
|
||||
'ordering' : true,
|
||||
'info' : true,
|
||||
'autoWidth' : false
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var areaChartData = {
|
||||
labels : <?php echo json_encode($label_months) ?>,
|
||||
datasets: [
|
||||
{
|
||||
label : 'Electronics',
|
||||
fillColor : 'rgba(255, 162, 0, 1)',
|
||||
strokeColor : 'rgba(255, 162, 0, 1)',
|
||||
pointColor : 'rgba(255, 162, 0, 1)',
|
||||
pointStrokeColor : '#ffa200',
|
||||
pointHighlightFill : '#fff',
|
||||
pointHighlightStroke: 'rgba(220,220,220,1)',
|
||||
data: <?php echo json_encode($depots_data) ?>
|
||||
},
|
||||
{
|
||||
label : 'Digital Goods',
|
||||
fillColor : 'rgba(0, 187, 255, 1)',
|
||||
strokeColor : 'rgba(0, 187, 255, 1)',
|
||||
pointColor : '#00bbff',
|
||||
pointStrokeColor : 'rgba(0, 187, 255, 1)',
|
||||
pointHighlightFill : '#fff',
|
||||
pointHighlightStroke: 'rgba(0, 187, 255, 1)',
|
||||
data : <?php echo json_encode($retraits_data) ?>
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
var Pie = '<?php echo json_encode($pieChart) ?>';
|
||||
if(Pie==='[]'){
|
||||
var select = document.getElementById('chart2');
|
||||
$(select.children).hide();
|
||||
$(select).append("<p>Aucune transaction</p>");
|
||||
}else{
|
||||
Pie = JSON.parse(Pie);
|
||||
}
|
||||
</script>
|
||||
<!-- Page script -->
|
||||
<script src="<?php echo base_url('dist/js/custom.js') ?>"></script>
|
||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/jvectormap/jquery-jvectormap.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/bootstrap-daterangepicker/daterangepicker.css') ?>">
|
||||
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
|
||||
<link rel="stylesheet"
|
||||
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
|
||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/toastr/toastr.css') ?>">
|
||||
|
||||
<?php
|
||||
function convertDate($date)
|
||||
{
|
||||
$month = null;
|
||||
switch ($date) {
|
||||
case "Jan":
|
||||
$month = 1;
|
||||
break;
|
||||
case "Feb":
|
||||
$month = 2;
|
||||
break;
|
||||
case "Mar":
|
||||
$month = 3;
|
||||
break;
|
||||
case "Apr":
|
||||
$month = 4;
|
||||
break;
|
||||
case "May":
|
||||
$month = 5;
|
||||
break;
|
||||
case "Jun":
|
||||
$month = 6;
|
||||
break;
|
||||
case "Jul":
|
||||
$month = 7;
|
||||
break;
|
||||
case "Aug":
|
||||
$month = 8;
|
||||
break;
|
||||
case "Sep":
|
||||
$month = 9;
|
||||
break;
|
||||
case "Oct":
|
||||
$month = 10;
|
||||
break;
|
||||
case "Nov":
|
||||
$month = 11;
|
||||
break;
|
||||
case "Dec":
|
||||
$month = 12;
|
||||
break;
|
||||
}
|
||||
return $month;
|
||||
}
|
||||
|
||||
$month = time();
|
||||
$months[] = convertDate(date("M"));
|
||||
$label_months [] = date("M") . " " . date("Y");
|
||||
$years[] = date("Y");
|
||||
for ($i = 1; $i <= 11; $i++) {
|
||||
$month = strtotime('last month', $month);
|
||||
$months [] = convertDate(date("M", $month));
|
||||
$years[] = date("Y", $month);
|
||||
$label_months [] = date("M", $month) . " " . date("Y", $month);
|
||||
}
|
||||
|
||||
/**
|
||||
** Retraits
|
||||
**/
|
||||
$date = date("Y");
|
||||
|
||||
$retraits_data[] = '';
|
||||
$retraits_data = array();
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$retraits_query_mounth = $this->db->query("SELECT id FROM infos_transaction
|
||||
WHERE network_id='" . $network_id . "'
|
||||
AND MONTH(date_created) = '" . $months[$i - 1] . "'
|
||||
AND YEAR(date_created) = '" . $years[$i - 1] . "'
|
||||
AND type_transac='debit'");
|
||||
$retraits_data[] = $retraits_query_mounth->num_rows();
|
||||
}
|
||||
|
||||
$startDate = (new DateTime('01-' . $months[11] . '-' . $years[11]))->format('Y-m-d H:i:s');
|
||||
$endDate = date_create_from_format('m/Y', $months[0] . '/' . $years[0])->format('Y-m-d H:i:s');
|
||||
|
||||
$retraits = $this->db->query("SELECT * FROM infos_transaction
|
||||
WHERE network_id='" . $network_id . "'
|
||||
AND date_created BETWEEN '" . $startDate . "' AND '" . $endDate . "'
|
||||
AND type_transac='debit'");
|
||||
|
||||
/**
|
||||
** Dépots
|
||||
**/
|
||||
$date = date("Y");
|
||||
|
||||
$depots_data[] = '';
|
||||
$depots_data = array();
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$depots_query_mounth = $this->db->query("SELECT id FROM infos_transaction
|
||||
WHERE network_id='" . $network_id . "'
|
||||
AND MONTH(date_created) = '" . $months[$i - 1] . "'
|
||||
AND YEAR(date_created) = '" . $years[$i - 1] . "'
|
||||
AND type_transac='credit'");
|
||||
$depots_data[] = $depots_query_mounth->num_rows();
|
||||
}
|
||||
$depots = $this->db->query("SELECT * FROM infos_transaction
|
||||
WHERE network_id='" . $network_id . "'
|
||||
AND date_created BETWEEN '" . $startDate . "' AND '" . $endDate . "'
|
||||
AND type_transac='credit'");
|
||||
|
||||
if ($transactions != false) {
|
||||
$transac = $transactions->num_rows();
|
||||
$array_transac = array();
|
||||
$num = 0;
|
||||
if ($transac > 0) {
|
||||
foreach ($transactions->result() as $row) {
|
||||
$num++;
|
||||
$array_transac[] = $row->type_transac;
|
||||
}
|
||||
$vals_transac = array_count_values($array_transac);
|
||||
$pieChart = array();
|
||||
foreach (array_keys($vals_transac) as $paramName) {
|
||||
$color = dechex(rand(0x000000, 0xFFFFFF));
|
||||
$trash = array("value" => $vals_transac[$paramName],
|
||||
"color" => "#" . $color,
|
||||
"highlight" => "#" . $color,
|
||||
"label" => $paramName);
|
||||
|
||||
$pieChart[] = $trash;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$pieChart = array();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
|
||||
<h1>
|
||||
Gestion des wallets <?php echo $network; ?>
|
||||
</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="row">
|
||||
<div class="margin">
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modal-update"
|
||||
style="width: 100%"><?php echo $this->lang->line('Modifier la configuration') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row centered">
|
||||
<div class="col-lg-2 col-lg-offset-2 col-xs-6">
|
||||
<div class="small-box bg-red-active">
|
||||
<div class="inner">
|
||||
<h3><?php echo $taux_client_r; ?><sup style="font-size: 20px">%</sup></h3>
|
||||
<p><?php echo $this->lang->line('Taux de commission client sur retrait') ?></p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-android-arrow-up"></i>
|
||||
</div>
|
||||
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="taux_client_r" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 col-xs-6">
|
||||
<div class="small-box bg-aqua-active">
|
||||
<div class="inner">
|
||||
<h3><?php echo $taux_ag_r; ?><sup style="font-size: 20px">%</sup></h3>
|
||||
<p><?php echo $this->lang->line('Taux de commission agent géolocalisé sur retrait') ?> </p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-android-arrow-up"></i>
|
||||
</div>
|
||||
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="taux_ag_r" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 col-xs-6">
|
||||
<div class="small-box bg-aqua-active">
|
||||
<div class="inner">
|
||||
<h3><?php echo $taux_sup_r; ?><sup style="font-size: 20px">%</sup></h3>
|
||||
<p><?php echo $this->lang->line('Taux de commission superviseur sur retrait') ?> </p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-android-arrow-up"></i>
|
||||
</div>
|
||||
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="taux_sup_r" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-xs-6">
|
||||
<div class="small-box bg-aqua-active">
|
||||
<div class="inner">
|
||||
<h3><?php echo $taux_bq_r; ?><sup style="font-size: 20px">%</sup></h3>
|
||||
<p><?php echo $this->lang->line('Part de la banque sur le retrait') ?> </p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-android-arrow-up"></i>
|
||||
</div>
|
||||
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="taux_bq_r" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-2 col-lg-offset-1 col-xs-6">
|
||||
<div class="small-box bg-green-active">
|
||||
<div class="inner">
|
||||
<h3><?php echo $taux_client_d; ?><sup style="font-size: 20px">%</sup></h3>
|
||||
<p><?php echo $this->lang->line('Taux de commission client sur dépot') ?></p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-android-arrow-down"></i>
|
||||
</div>
|
||||
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="taux_client_d" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 col-xs-6">
|
||||
<div class="small-box bg-green-active">
|
||||
<div class="inner">
|
||||
<h3><?php echo $frais_d; ?><sup style="font-size: 20px">FCFA</sup></h3>
|
||||
<p><?php echo $this->lang->line('Frais minimun de la banque sur le dépot') ?> </p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-android-arrow-down"></i>
|
||||
</div>
|
||||
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="frais_d" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 col-xs-6">
|
||||
<div class="small-box bg-yellow-active">
|
||||
<div class="inner">
|
||||
<h3><?php echo $taux_ag_d; ?><sup style="font-size: 20px">%</sup></h3>
|
||||
<p><?php echo $this->lang->line('Taux de commission agent géolocalisé sur dépot') ?> </p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-android-arrow-down"></i>
|
||||
</div>
|
||||
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="taux_ag_d" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 col-xs-6">
|
||||
<div class="small-box bg-yellow-active">
|
||||
<div class="inner">
|
||||
<h3><?php echo $taux_sup_d; ?><sup style="font-size: 20px">%</sup></h3>
|
||||
<p><?php echo $this->lang->line('Taux de commission superviseur sur dépot') ?> </p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-android-arrow-down"></i>
|
||||
</div>
|
||||
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="taux_sup_d" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-2 col-xs-6">
|
||||
<div class="small-box bg-yellow-active">
|
||||
<div class="inner">
|
||||
<h3><?php echo $taux_bq_d; ?><sup style="font-size: 20px">%</sup></h3>
|
||||
<p><?php echo $this->lang->line('Part de la banque sur le dépot') ?> </p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-android-arrow-down"></i>
|
||||
</div>
|
||||
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="taux_bq_d" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Retraits et dépots des 12 derniers
|
||||
mois<?php //echo $this->lang->line('Souscription des 12 derniers mois'); ?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="chart" id="chart">
|
||||
<canvas id="barChart" style="height:230px"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="box box-danger">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Parts dépots &
|
||||
retraits<?php //echo $this->lang->line("Utilisateurs géolocalisés par ville"); ?></h3>
|
||||
</div>
|
||||
<div class="box-body" id="chart2">
|
||||
<canvas id="pieChart" style="height:250px"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?php echo $this->lang->line('Commissions Hyperviseur') ?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table id="example1" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Solde Princ.</th>
|
||||
<th>Solde Com.</th>
|
||||
<th>Dépots</th>
|
||||
<th>Retraits</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($walletHyper) {
|
||||
echo "<tr>
|
||||
<td>" . $walletHyper->first_row()->lastname . "</td>
|
||||
<td>" . $walletHyper->first_row()->balance_princ . "</td>
|
||||
<td>" . $walletHyper->first_row()->balance_com . "</td>";
|
||||
|
||||
echo "<td>" . $depots->num_rows() . "</td>
|
||||
<td>" . $retraits->num_rows() . "</td>
|
||||
</tr>";
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="modal-update">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h3 class="modal-title"><?php echo $this->lang->line('Configuration du wallet'); ?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="walletForm">
|
||||
<div class="form-group">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?php echo $this->lang->line('Taux de commission client sur retrait') . ' (%)'; ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control"
|
||||
id="taux_client_r" name="taux_client_r" value="<?= $taux_client_r ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email"
|
||||
class="col-form-label"><?php echo $this->lang->line('Taux de commission agent géolocalisé sur retrait') . ' (%)'; ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control"
|
||||
name="taux_ag_r" id="taux_ag_r" value="<?= $taux_ag_r ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email"
|
||||
class="col-form-label"><?php echo $this->lang->line('Taux de commission superviseur sur retrait') . ' (%)'; ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control"
|
||||
name="taux_sup_r" id="taux_sup_r" value="<?= $taux_sup_r ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email"
|
||||
class="col-form-label"><?php echo $this->lang->line('Part de la banque sur le retrait') . ' (%)'; ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control" id="taux_bq_r"
|
||||
name="taux_bq_r" value="<?= $taux_bq_r ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="adresse"
|
||||
class="col-form-label"><?php echo $this->lang->line('Taux de commission client sur dépot') . ' (%)'; ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control"
|
||||
id="taux_client_d" name="taux_client_d" value="<?= $taux_client_d ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email"
|
||||
class="col-form-label"><?php echo $this->lang->line('Frais minimun de la banque sur le dépot') . ' (FCFA)'; ?></label>
|
||||
<input type="number" min="0" required class="form-control" id="frais_d"
|
||||
name="frais_d" value="<?= $frais_d ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email"
|
||||
class="col-form-label"><?php echo $this->lang->line('Taux de commission agent géolocalisé sur dépot') . ' (%)'; ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control" id="taux_ag_d"
|
||||
name="taux_ag_d" value="<?= $taux_ag_d ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email"
|
||||
class="col-form-label"><?php echo $this->lang->line('Taux de commission superviseur sur dépot') . ' (%)'; ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control"
|
||||
id="taux_sup_d" name="taux_sup_d" value="<?= $taux_sup_d ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email"
|
||||
class="col-form-label"><?php echo $this->lang->line('Part de la banque sur le dépot') . ' (%)'; ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control"
|
||||
name="taux_bq_d" id="taux_bq_d" value="<?= $taux_bq_d ?>">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left"
|
||||
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
|
||||
<button type="button" id="updateWallet" data-network-id="<?= $network_id ?>"
|
||||
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
|
||||
</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('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>
|
||||
<scriptf
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></scriptf>
|
||||
<!-- ChartJS -->
|
||||
<script src="<?php echo base_url('bower_components/chart.js/Chart.js') ?>"></script>
|
||||
<script src="<?php echo base_url('bower_components/toastr/toastr.js') ?>"></script>
|
||||
<script src="<?php echo base_url('dist/js/sweetalert2.js') ?>"></script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('#example1').DataTable();
|
||||
// $('#example1').DataTable({
|
||||
// "aLengthMenu": [[5, 10, 15, -1], [5, 10, 5, "All"]],
|
||||
// "iDisplayLength": 5
|
||||
// });
|
||||
// $('#example2').DataTable({
|
||||
// 'paging' : true,
|
||||
// 'lengthChange': false,
|
||||
// 'searching' : false,
|
||||
// 'ordering' : true,
|
||||
// 'info' : true,
|
||||
// 'autoWidth' : false
|
||||
// })
|
||||
})
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var areaChartData = {
|
||||
labels: <?php echo json_encode($label_months) ?>,
|
||||
datasets: [
|
||||
{
|
||||
label: 'Electronics',
|
||||
fillColor: 'rgba(255, 162, 0, 1)',
|
||||
strokeColor: 'rgba(255, 162, 0, 1)',
|
||||
pointColor: 'rgba(255, 162, 0, 1)',
|
||||
pointStrokeColor: '#ffa200',
|
||||
pointHighlightFill: '#fff',
|
||||
pointHighlightStroke: 'rgba(220,220,220,1)',
|
||||
data: <?php echo json_encode($depots_data) ?>
|
||||
},
|
||||
{
|
||||
label: 'Digital Goods',
|
||||
fillColor: 'rgba(0, 187, 255, 1)',
|
||||
strokeColor: 'rgba(0, 187, 255, 1)',
|
||||
pointColor: '#00bbff',
|
||||
pointStrokeColor: 'rgba(0, 187, 255, 1)',
|
||||
pointHighlightFill: '#fff',
|
||||
pointHighlightStroke: 'rgba(0, 187, 255, 1)',
|
||||
data: <?php echo json_encode($retraits_data) ?>
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
var Pie = '<?php echo json_encode($pieChart) ?>';
|
||||
if (Pie === '[]') {
|
||||
var select = document.getElementById('chart2');
|
||||
$(select.children).hide();
|
||||
$(select).append("<p>Aucune transaction</p>");
|
||||
} else {
|
||||
Pie = JSON.parse(Pie);
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
toastr.options.closeButton = true;
|
||||
toastr.options.closeMethod = 'fadeOut';
|
||||
toastr.options.closeDuration = 5000;
|
||||
toastr.options.closeEasing = 'swing';
|
||||
|
||||
$('#updateWallet').click(function () {
|
||||
|
||||
var network_id = $(this).data('network-id');
|
||||
|
||||
if ($('#walletForm')[0].checkValidity()) {
|
||||
var taux_client_r = parseFloat($('#taux_client_r').val());
|
||||
var taux_client_d = parseFloat($('#taux_client_d').val());
|
||||
var taux_ag_r = parseFloat($('#taux_ag_r').val());
|
||||
var taux_ag_d = parseFloat($('#taux_ag_d').val());
|
||||
var taux_sup_r = parseFloat($('#taux_sup_r').val());
|
||||
var taux_sup_d = parseFloat($('#taux_sup_d').val());
|
||||
var taux_bq_d = parseFloat($('#taux_bq_d').val());
|
||||
var taux_bq_r = parseFloat($('#taux_bq_r').val());
|
||||
var frais_d = $('#frais_d').val();
|
||||
|
||||
var sommeRetrait = taux_ag_r + taux_sup_r + taux_bq_r;
|
||||
var sommeDepot = taux_ag_d + taux_sup_d + taux_bq_d;
|
||||
|
||||
if((taux_ag_r + taux_sup_r) > 100){
|
||||
toastr.error("La somme des % des retraits de l'agent et du superviseur doit être inférieur à 100.", 'Règle de gestion');
|
||||
}else if((taux_ag_d + taux_sup_d) > 100){
|
||||
toastr.error("La somme des % des dépots de l'agent et du superviseur doit être inférieur à 100.", 'Règle de gestion');
|
||||
}else if(sommeRetrait >= taux_client_r){
|
||||
toastr.error('La somme des % des retraits doit être inférieur au taux client de retrait.', 'Règle de gestion')
|
||||
}else if(sommeDepot >= 100){
|
||||
toastr.error("La somme des % des dépots doit être inférieur à 100.", 'Règle de gestion');
|
||||
}else{
|
||||
$.ajax({
|
||||
url: '<?php echo base_url('index.php/Gestion/config_wallet/update')?>',
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
"network_id": network_id,
|
||||
"taux_client_r": taux_client_r,
|
||||
"taux_client_d": taux_client_d,
|
||||
"taux_ag_r": taux_ag_r,
|
||||
"taux_ag_d": taux_ag_d,
|
||||
"taux_sup_r": taux_sup_r,
|
||||
"taux_sup_d": taux_sup_d,
|
||||
"taux_bq_r": taux_bq_r,
|
||||
"taux_bq_d": taux_bq_d,
|
||||
"frais_d": frais_d
|
||||
},
|
||||
success: function (data) {
|
||||
if(data=='200'){
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Mise à jour du wallet',
|
||||
text:'Les informations ont été mises à jour',
|
||||
timer: 3000
|
||||
}).then(()=>{
|
||||
location.reload();
|
||||
});
|
||||
// alert("Les informations ont été mises à jour.") ? "" :
|
||||
}else{
|
||||
toastr.error("Une erreur s'est produite." , 'Erreur requete');
|
||||
}
|
||||
},
|
||||
|
||||
error: function (resultat, statut, error) {
|
||||
console.log(resultat + " " + error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
$('#walletForm')[0].reportValidity();
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
<!-- Page script -->
|
||||
<script src="<?php echo base_url('dist/js/custom.js') ?>"></script>
|
||||
|
|
|
@ -0,0 +1,373 @@
|
|||
<link rel="stylesheet" href="<?php echo base_url('bower_components/jvectormap/jquery-jvectormap.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/bootstrap-daterangepicker/daterangepicker.css') ?>">
|
||||
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
|
||||
<script src="<?php echo base_url('bower_components/chart.js/Chart.js') ?>"></script>
|
||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
|
||||
|
||||
<?php
|
||||
function convertDate($date){
|
||||
$month = null;
|
||||
switch ($date) {
|
||||
case "Jan":
|
||||
$month = 1;
|
||||
break;
|
||||
case "Feb":
|
||||
$month = 2;
|
||||
break;
|
||||
case "Mar":
|
||||
$month = 3;
|
||||
break;
|
||||
case "Apr":
|
||||
$month = 4;
|
||||
break;
|
||||
case "May":
|
||||
$month = 5;
|
||||
break;
|
||||
case "Jun":
|
||||
$month = 6;
|
||||
break;
|
||||
case "Jul":
|
||||
$month = 7;
|
||||
break;
|
||||
case "Aug":
|
||||
$month = 8;
|
||||
break;
|
||||
case "Sep":
|
||||
$month = 9;
|
||||
break;
|
||||
case "Oct":
|
||||
$month = 10;
|
||||
break;
|
||||
case "Nov":
|
||||
$month = 11;
|
||||
break;
|
||||
case "Dec":
|
||||
$month = 12;
|
||||
break;
|
||||
}
|
||||
return $month;
|
||||
}
|
||||
|
||||
$month = time();
|
||||
$months[]=convertDate(date("M"));
|
||||
$label_months [] = date("M")." ".date("Y");
|
||||
$years[]= date("Y");
|
||||
for ($i = 1; $i <= 11; $i++) {
|
||||
$month = strtotime('last month', $month);
|
||||
$months [] = convertDate(date("M", $month));
|
||||
$years[] = date("Y", $month);
|
||||
$label_months [] = date("M", $month)." ".date("Y", $month);
|
||||
}
|
||||
|
||||
/**
|
||||
** Retraits
|
||||
**/
|
||||
$date = date("Y");
|
||||
|
||||
$retraits_data[] = '';
|
||||
$retraits_data =array();
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$retraits_query_mounth = array_filter($transactions, function ($trans) use ($i, $months ,$years){
|
||||
$month = date("m",strtotime($trans->date));
|
||||
$year = date("Y",strtotime($trans->date));
|
||||
return $month == $months[$i-1] && $year == $years[$i-1] && $trans->type == 'debit' ;
|
||||
});
|
||||
$retraits_data[] = sizeof($retraits_query_mounth);
|
||||
}
|
||||
|
||||
$startDate = (new DateTime('01-'.$months[11].'-'.$years[11]))-> format('Y-m-d H:i:s');
|
||||
$endDate = date_create_from_format ('m/Y',$months[0].'/'.$years[0])-> format('Y-m-d H:i:s');
|
||||
|
||||
$retraits = array_filter($transactions, function ($trans) use ($i, $endDate ,$startDate){
|
||||
$date = strtotime($trans->date);
|
||||
return $date >= strtotime($startDate) && $date <= strtotime($endDate) && $trans->type == 'debit' ;
|
||||
});
|
||||
|
||||
/**
|
||||
** Dépots
|
||||
**/
|
||||
$date = date("Y");
|
||||
|
||||
$depots_data[] = '';
|
||||
$depots_data =array();
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$depots_query_mounth= array_filter($transactions, function ($trans) use ($i, $months ,$years){
|
||||
$month = date("m",strtotime($trans->date));
|
||||
$year = date("Y",strtotime($trans->date));
|
||||
return $month == $months[$i-1] && $year == $years[$i-1] && $trans->type == 'credit' ;
|
||||
});
|
||||
$depots_data[] = sizeof($depots_query_mounth);
|
||||
}
|
||||
$depots = array_filter($transactions, function ($trans) use ($i, $endDate ,$startDate){
|
||||
$date = strtotime($trans->date);
|
||||
return $date >= strtotime($startDate) && $date <= strtotime($endDate) && $trans->type == 'credit' ;
|
||||
});
|
||||
|
||||
if($transactions!=false){
|
||||
$transac=sizeof($transactions);
|
||||
$array_transac = array();
|
||||
$num = 0;
|
||||
if ($transac > 0) {
|
||||
foreach($transactions as $row) {
|
||||
$num++;
|
||||
$array_transac[] = $row->type;
|
||||
}
|
||||
$vals_transac = array_count_values($array_transac);
|
||||
$pieChart = array();
|
||||
foreach(array_keys($vals_transac) as $paramName) {
|
||||
$color = dechex(rand(0x000000, 0xFFFFFF));
|
||||
$trash = array("value" => $vals_transac[$paramName],
|
||||
"color" => "#".$color,
|
||||
"highlight" => "#".$color,
|
||||
"label" => $paramName);
|
||||
|
||||
$pieChart[]= $trash;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$pieChart = array();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
|
||||
<h1>
|
||||
Wallet <?php echo $network; ?>
|
||||
</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="row">
|
||||
|
||||
<div class="col-lg-4 col-xs-6">
|
||||
<div class="small-box bg-aqua">
|
||||
<div class="inner">
|
||||
<h3><?php echo $principal; ?><sup style="font-size: 20px">FCFA</sup></h3>
|
||||
<p>Solde principal</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-cash"></i>
|
||||
</div>
|
||||
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="taux_client_r" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-4 col-xs-6">
|
||||
<div class="small-box bg-green">
|
||||
<div class="inner">
|
||||
<h3><?php echo $commission; ?><sup style="font-size: 20px">FCFA</sup></h3>
|
||||
<p>Solde commission</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-cash"></i>
|
||||
</div>
|
||||
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="taux_client_r" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Retraits et dépots des 12 derniers mois<?php //echo $this->lang->line('Souscription des 12 derniers mois'); ?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="chart" id="chart">
|
||||
<canvas id="barChart" style="height:230px"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="box box-danger">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Parts dépots & retraits<?php //echo $this->lang->line("Utilisateurs géolocalisés par ville"); ?></h3>
|
||||
</div>
|
||||
<div class="box-body" id="chart2">
|
||||
<canvas id="pieChart" style="height:250px"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?php echo $this->lang->line('Commissions Superviseurs') ?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table id="example1" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Solde Princ.</th>
|
||||
<th>Solde Com.</th>
|
||||
<th>Dépots</th>
|
||||
<th>Retraits</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
if($superviseurs!=false){
|
||||
foreach($superviseurs->result() as $row) {
|
||||
$wallet = null;
|
||||
foreach ($agentWalletInfos->result() as $value) {
|
||||
if ($value->agent_id == $row->agent_id) {
|
||||
$wallet = $value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$com = 0;
|
||||
$princ = 0;
|
||||
if($wallet) {
|
||||
$com = $wallet->balance_com;
|
||||
$princ = $wallet->balance_princ;
|
||||
}
|
||||
echo "<tr>
|
||||
<td>".$row->lastname."</td>
|
||||
<td>".$princ."</td>
|
||||
<td>".$com."</td>";
|
||||
$nb_depots = 0;
|
||||
$nb_retraits = 0;
|
||||
foreach($depots as $depot){
|
||||
if($depot->code_parrain == $row->member_code) {
|
||||
$nb_depots ++;
|
||||
}
|
||||
}
|
||||
foreach($retraits as $retrait){
|
||||
if($retrait->code_parrain == $row->member_code) {
|
||||
$nb_retraits ++;
|
||||
}
|
||||
}
|
||||
echo "<td>".$nb_depots."</td>
|
||||
<td>".$nb_retraits."</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</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>
|
||||
<!-- ChartJS -->
|
||||
<script src="<?php echo base_url('bower_components/chart.js/Chart.js') ?>"></script>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('#example1').DataTable();
|
||||
// $('#example1').DataTable({
|
||||
// "aLengthMenu": [[5, 10, 15, -1], [5, 10, 5, "All"]],
|
||||
// "iDisplayLength": 5
|
||||
// });
|
||||
// $('#example2').DataTable({
|
||||
// 'paging' : true,
|
||||
// 'lengthChange': false,
|
||||
// 'searching' : false,
|
||||
// 'ordering' : true,
|
||||
// 'info' : true,
|
||||
// 'autoWidth' : false
|
||||
// })
|
||||
})
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var areaChartData = {
|
||||
labels : <?php echo json_encode($label_months) ?>,
|
||||
datasets: [
|
||||
{
|
||||
label : 'Electronics',
|
||||
fillColor : 'rgba(255, 162, 0, 1)',
|
||||
strokeColor : 'rgba(255, 162, 0, 1)',
|
||||
pointColor : 'rgba(255, 162, 0, 1)',
|
||||
pointStrokeColor : '#ffa200',
|
||||
pointHighlightFill : '#fff',
|
||||
pointHighlightStroke: 'rgba(220,220,220,1)',
|
||||
data: <?php echo json_encode($depots_data) ?>
|
||||
},
|
||||
{
|
||||
label : 'Digital Goods',
|
||||
fillColor : 'rgba(0, 187, 255, 1)',
|
||||
strokeColor : 'rgba(0, 187, 255, 1)',
|
||||
pointColor : '#00bbff',
|
||||
pointStrokeColor : 'rgba(0, 187, 255, 1)',
|
||||
pointHighlightFill : '#fff',
|
||||
pointHighlightStroke: 'rgba(0, 187, 255, 1)',
|
||||
data : <?php echo json_encode($retraits_data) ?>
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
var Pie = '<?php echo json_encode($pieChart) ?>';
|
||||
if(Pie==='[]'){
|
||||
var select = document.getElementById('chart2');
|
||||
$(select.children).hide();
|
||||
$(select).append("<p>Aucune transaction</p>");
|
||||
}else{
|
||||
Pie = JSON.parse(Pie);
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
|
||||
</script>
|
||||
<!-- Page script -->
|
||||
<script src="<?php echo base_url('dist/js/custom.js') ?>"></script>
|
|
@ -0,0 +1,371 @@
|
|||
<link rel="stylesheet" href="<?php echo base_url('bower_components/jvectormap/jquery-jvectormap.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/bootstrap-daterangepicker/daterangepicker.css') ?>">
|
||||
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
|
||||
<script src="<?php echo base_url('bower_components/chart.js/Chart.js') ?>"></script>
|
||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
|
||||
|
||||
<?php
|
||||
function convertDate($date){
|
||||
$month = null;
|
||||
switch ($date) {
|
||||
case "Jan":
|
||||
$month = 1;
|
||||
break;
|
||||
case "Feb":
|
||||
$month = 2;
|
||||
break;
|
||||
case "Mar":
|
||||
$month = 3;
|
||||
break;
|
||||
case "Apr":
|
||||
$month = 4;
|
||||
break;
|
||||
case "May":
|
||||
$month = 5;
|
||||
break;
|
||||
case "Jun":
|
||||
$month = 6;
|
||||
break;
|
||||
case "Jul":
|
||||
$month = 7;
|
||||
break;
|
||||
case "Aug":
|
||||
$month = 8;
|
||||
break;
|
||||
case "Sep":
|
||||
$month = 9;
|
||||
break;
|
||||
case "Oct":
|
||||
$month = 10;
|
||||
break;
|
||||
case "Nov":
|
||||
$month = 11;
|
||||
break;
|
||||
case "Dec":
|
||||
$month = 12;
|
||||
break;
|
||||
}
|
||||
return $month;
|
||||
}
|
||||
|
||||
$month = time();
|
||||
$months[]=convertDate(date("M"));
|
||||
$label_months [] = date("M")." ".date("Y");
|
||||
$years[]= date("Y");
|
||||
for ($i = 1; $i <= 11; $i++) {
|
||||
$month = strtotime('last month', $month);
|
||||
$months [] = convertDate(date("M", $month));
|
||||
$years[] = date("Y", $month);
|
||||
$label_months [] = date("M", $month)." ".date("Y", $month);
|
||||
}
|
||||
|
||||
/**
|
||||
** Retraits
|
||||
**/
|
||||
$date = date("Y");
|
||||
|
||||
$retraits_data[] = '';
|
||||
$retraits_data =array();
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$retraits_query_mounth = array_filter($transactions, function ($trans) use ($i, $months ,$years){
|
||||
$month = date("m",strtotime($trans->date));
|
||||
$year = date("Y",strtotime($trans->date));
|
||||
return $month == $months[$i-1] && $year == $years[$i-1] && $trans->type == 'debit' ;
|
||||
});
|
||||
$retraits_data[] = sizeof($retraits_query_mounth);
|
||||
}
|
||||
|
||||
$startDate = (new DateTime('01-'.$months[11].'-'.$years[11]))-> format('Y-m-d H:i:s');
|
||||
$endDate = date_create_from_format ('m/Y',$months[0].'/'.$years[0])-> format('Y-m-d H:i:s');
|
||||
|
||||
$retraits = array_filter($transactions, function ($trans) use ($i, $endDate ,$startDate){
|
||||
$date = strtotime($trans->date);
|
||||
return $date >= strtotime($startDate) && $date <= strtotime($endDate) && $trans->type == 'debit' ;
|
||||
});
|
||||
|
||||
/**
|
||||
** Dépots
|
||||
**/
|
||||
$date = date("Y");
|
||||
|
||||
$depots_data[] = '';
|
||||
$depots_data =array();
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$depots_query_mounth= array_filter($transactions, function ($trans) use ($i, $months ,$years){
|
||||
$month = date("m",strtotime($trans->date));
|
||||
$year = date("Y",strtotime($trans->date));
|
||||
return $month == $months[$i-1] && $year == $years[$i-1] && $trans->type == 'credit' ;
|
||||
});
|
||||
$depots_data[] = sizeof($depots_query_mounth);
|
||||
}
|
||||
$depots = array_filter($transactions, function ($trans) use ($i, $endDate ,$startDate){
|
||||
$date = strtotime($trans->date);
|
||||
return $date >= strtotime($startDate) && $date <= strtotime($endDate) && $trans->type == 'credit' ;
|
||||
});
|
||||
|
||||
if($transactions!=false){
|
||||
$transac=sizeof($transactions);
|
||||
$array_transac = array();
|
||||
$num = 0;
|
||||
if ($transac > 0) {
|
||||
foreach($transactions as $row) {
|
||||
$num++;
|
||||
$array_transac[] = $row->type;
|
||||
}
|
||||
$vals_transac = array_count_values($array_transac);
|
||||
$pieChart = array();
|
||||
foreach(array_keys($vals_transac) as $paramName) {
|
||||
$color = dechex(rand(0x000000, 0xFFFFFF));
|
||||
$trash = array("value" => $vals_transac[$paramName],
|
||||
"color" => "#".$color,
|
||||
"highlight" => "#".$color,
|
||||
"label" => $paramName);
|
||||
|
||||
$pieChart[]= $trash;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$pieChart = array();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
|
||||
<h1>
|
||||
Wallet <?php echo $network; ?>
|
||||
</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="row">
|
||||
<div class="col-lg-4 col-xs-6">
|
||||
<div class="small-box bg-aqua">
|
||||
<div class="inner">
|
||||
<h3><?php echo $principal; ?><sup style="font-size: 20px">FCFA</sup></h3>
|
||||
<p>Solde principal</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-cash"></i>
|
||||
</div>
|
||||
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="taux_client_r" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-xs-6">
|
||||
<div class="small-box bg-green">
|
||||
<div class="inner">
|
||||
<h3><?php echo $commission; ?><sup style="font-size: 20px">FCFA</sup></h3>
|
||||
<p>Solde commission</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-cash"></i>
|
||||
</div>
|
||||
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="taux_client_r" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Retraits et dépots des 12 derniers mois<?php //echo $this->lang->line('Souscription des 12 derniers mois'); ?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="chart" id="chart">
|
||||
<canvas id="barChart" style="height:230px"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="box box-danger">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Parts dépots & retraits<?php //echo $this->lang->line("Utilisateurs géolocalisés par ville"); ?></h3>
|
||||
</div>
|
||||
<div class="box-body" id="chart2">
|
||||
<canvas id="pieChart" style="height:250px"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?php echo $this->lang->line('Commissions Agents') ?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table id="example1" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Solde Princ.</th>
|
||||
<th>Solde Com.</th>
|
||||
<th>Dépots</th>
|
||||
<th>Retraits</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
if($agents_g){
|
||||
foreach($agents_g->result() as $row) {
|
||||
$wallet = null;
|
||||
foreach ($agentWalletInfos->result() as $value) {
|
||||
if ($value->agent_id == $row->agent_id) {
|
||||
$wallet = $value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$com = 0;
|
||||
$princ = 0;
|
||||
if($wallet) {
|
||||
$com = $wallet->balance_com;
|
||||
$princ = $wallet->balance_princ;
|
||||
}
|
||||
echo "<tr>
|
||||
<td>".$row->lastname."</td>
|
||||
<td>".$princ."</td>
|
||||
<td>".$com."</td>";
|
||||
$nb_depots = 0;
|
||||
$nb_retraits = 0;
|
||||
foreach($depots as $depot){
|
||||
if($depot->agent_id == $row->agent_id) {
|
||||
$nb_depots ++;
|
||||
}
|
||||
}
|
||||
foreach($retraits as $retrait){
|
||||
if($retrait->agent_id == $row->agent_id) {
|
||||
$nb_retraits ++;
|
||||
}
|
||||
}
|
||||
echo "<td>".$nb_depots."</td>
|
||||
<td>".$nb_retraits."</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</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>
|
||||
<!-- ChartJS -->
|
||||
<script src="<?php echo base_url('bower_components/chart.js/Chart.js') ?>"></script>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('#example1').DataTable();
|
||||
// $('#example1').DataTable({
|
||||
// "aLengthMenu": [[5, 10, 15, -1], [5, 10, 5, "All"]],
|
||||
// "iDisplayLength": 5
|
||||
// });
|
||||
// $('#example2').DataTable({
|
||||
// 'paging' : true,
|
||||
// 'lengthChange': false,
|
||||
// 'searching' : false,
|
||||
// 'ordering' : true,
|
||||
// 'info' : true,
|
||||
// 'autoWidth' : false
|
||||
// })
|
||||
})
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var areaChartData = {
|
||||
labels : <?php echo json_encode($label_months) ?>,
|
||||
datasets: [
|
||||
{
|
||||
label : 'Electronics',
|
||||
fillColor : 'rgba(255, 162, 0, 1)',
|
||||
strokeColor : 'rgba(255, 162, 0, 1)',
|
||||
pointColor : 'rgba(255, 162, 0, 1)',
|
||||
pointStrokeColor : '#ffa200',
|
||||
pointHighlightFill : '#fff',
|
||||
pointHighlightStroke: 'rgba(220,220,220,1)',
|
||||
data: <?php echo json_encode($depots_data) ?>
|
||||
},
|
||||
{
|
||||
label : 'Digital Goods',
|
||||
fillColor : 'rgba(0, 187, 255, 1)',
|
||||
strokeColor : 'rgba(0, 187, 255, 1)',
|
||||
pointColor : '#00bbff',
|
||||
pointStrokeColor : 'rgba(0, 187, 255, 1)',
|
||||
pointHighlightFill : '#fff',
|
||||
pointHighlightStroke: 'rgba(0, 187, 255, 1)',
|
||||
data : <?php echo json_encode($retraits_data) ?>
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
var Pie = '<?php echo json_encode($pieChart) ?>';
|
||||
if(Pie==='[]'){
|
||||
var select = document.getElementById('chart2');
|
||||
$(select.children).hide();
|
||||
$(select).append("<p>Aucune transaction</p>");
|
||||
}else{
|
||||
Pie = JSON.parse(Pie);
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
|
||||
</script>
|
||||
<!-- Page script -->
|
||||
<script src="<?php echo base_url('dist/js/custom.js') ?>"></script>
|
|
@ -0,0 +1,335 @@
|
|||
<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="<?php echo base_url('bower_components/toastr/toastr.css') ?>">
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
|
||||
<h1>
|
||||
<?php echo $this->lang->line('Gestion des wallets'); ?>
|
||||
<input type="button" class="btn btn-primary pull-right" id="Bactiver" value="Activer/Désactiver le(s) réseau(x)" style="display: none;" />
|
||||
</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="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?php echo $this->lang->line('Réseaux activés'); ?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
<?php
|
||||
|
||||
$sql2 = $networks;
|
||||
if($sql2!=false){
|
||||
$numrows=$sql2->num_rows();
|
||||
$num = 0;
|
||||
if ($numrows > 0) {
|
||||
?>
|
||||
<table id="validated" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align='center'>N°</th>
|
||||
<th><?php echo $this->lang->line('Reseau'); ?></th>
|
||||
<th><?php echo $this->lang->line('Pays'); ?></th>
|
||||
<th align='center'> Wallet </th>
|
||||
<th align='center'><?php echo $this->lang->line('Activer/Désactiver'); ?></th>
|
||||
<th align='center'> Action </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach($sql2->result() as $row) {
|
||||
$num ++;
|
||||
//$member_code = randomString1(10);
|
||||
echo "<tr>
|
||||
<td align='center'>$num</td>
|
||||
<td >$row->network</td>
|
||||
<td>$row->country</td>";
|
||||
?>
|
||||
<?php
|
||||
if($row->id_network){
|
||||
?>
|
||||
<td><span class="label label-success"><?php echo $this->lang->line('Actif'); ?></span></td>
|
||||
<td><button type="button" data-toggle="modal" data-target="#disableWallet" data-network-id="<?php echo $row->id ?>" class="btn btn-danger openModal"><?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-toggle="modal" data-target="#enableWallet" data-network-id="<?php echo $row->id ?>" class="btn btn-primary openModal"><?php echo $this->lang->line('Activer'); ?></button></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<td>
|
||||
<a href="<?php echo current_url().($row->id_network ? '?id='.$row->id_network : '')?>" class="btn btn-primary btn-block" <?php if(!$row->id_network) echo "disabled"?> >
|
||||
<b><?php echo $this->lang->line('Voir plus...'); ?></b>
|
||||
</a>
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
echo $this->lang->line('Aucun réseau');
|
||||
}
|
||||
}else {
|
||||
echo $this->lang->line('Aucun réseau');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="enableWallet" tabindex="-1" role="dialog" 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('Configuration du wallet'); ?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="walletForm">
|
||||
<div class="form-group">
|
||||
<label for="nom" class="col-form-label"><?php echo $this->lang->line('Taux de commission client sur retrait').' (%)'; ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control" id="taux_client_r" name="taux_client_r" value="0">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-form-label"><?php echo $this->lang->line('Taux de commission agent géolocalisé sur retrait').' (%)'; ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control" name="taux_ag_r" id="taux_ag_r" value="0">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-form-label"><?php echo $this->lang->line('Taux de commission superviseur sur retrait').' (%)'; ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control" name="taux_sup_r" id="taux_sup_r" value="0">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-form-label"><?php echo $this->lang->line('Part de la banque sur le retrait').' (%)'; ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control" id="taux_bq_r" name="taux_bq_r" value="0">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="adresse" class="col-form-label"><?php echo $this->lang->line('Taux de commission client sur dépot') .' (%)'; ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control" id="taux_client_d" name="taux_client_d" value="0">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-form-label"><?php echo $this->lang->line('Frais minimun de la banque sur le dépot').' (FCFA)'; ?></label>
|
||||
<input type="number" min="0" required class="form-control" id="frais_d" name="frais_d" value="0">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-form-label"><?php echo $this->lang->line('Taux de commission agent géolocalisé sur dépot').' (%)'; ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control" id="taux_ag_d" name="taux_ag_d" value="0">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-form-label"><?php echo $this->lang->line('Taux de commission superviseur sur dépot').' (%)'; ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control" id="taux_sup_d" name="taux_sup_d" value="0">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-form-label"><?php echo $this->lang->line('Part de la banque sur le dépot').' (%)'; ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control" name="taux_bq_d" id="taux_bq_d" value="0">
|
||||
</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" id="addWallet" > <?php echo $this->lang->line('Valider'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="disableWallet" tabindex="-1" role="dialog" 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('Suppression du wallet'); ?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h4> Etes vous certain de vouloir ?</h4>
|
||||
</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" id="deleteWallet" > <?php echo $this->lang->line('Valider'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="alert alert-info alert-dismissible" aria-hidden="true">-->
|
||||
<!-- <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>-->
|
||||
<!-- <h4><i class="icon fa fa-info"></i>Info!</h4>-->
|
||||
<!-- Data is Saved-->
|
||||
<!-- </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('bower_components/toastr/toastr.js') ?>"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.15/js/bootstrap-multiselect.js"></script>
|
||||
<script src="<?php echo base_url('dist/js/sweetalert2.js') ?>"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#unvalidated').DataTable();
|
||||
$('#validated').DataTable();
|
||||
})
|
||||
</script>
|
||||
|
||||
<script>
|
||||
toastr.options.closeButton = true;
|
||||
toastr.options.closeMethod = 'fadeOut';
|
||||
toastr.options.closeDuration = 5000;
|
||||
toastr.options.closeEasing = 'swing';
|
||||
|
||||
var network_id = null;
|
||||
|
||||
$(document).on("click", ".openModal", function () {
|
||||
network_id = $(this).data('network-id');
|
||||
});
|
||||
|
||||
$('#addWallet').click(function(){
|
||||
|
||||
if($('#walletForm')[0].checkValidity()) {
|
||||
var taux_client_r = parseFloat($('#taux_client_r').val());
|
||||
var taux_client_d = parseFloat($('#taux_client_d').val());
|
||||
var taux_ag_r = parseFloat($('#taux_ag_r').val());
|
||||
var taux_ag_d = parseFloat($('#taux_ag_d').val());
|
||||
var taux_sup_r = parseFloat($('#taux_sup_r').val());
|
||||
var taux_sup_d = parseFloat($('#taux_sup_d').val());
|
||||
var taux_bq_d = parseFloat($('#taux_bq_d').val());
|
||||
var taux_bq_r = parseFloat($('#taux_bq_r').val());
|
||||
var frais_d =$('#frais_d').val();
|
||||
|
||||
var sommeRetrait = taux_ag_r + taux_sup_r +taux_bq_r ;
|
||||
var sommeDepot = taux_ag_d + taux_sup_d + taux_bq_d ;
|
||||
|
||||
if((taux_ag_r + taux_sup_r) > 100){
|
||||
toastr.error("La somme des % des retraits de l'agent et du superviseur doit être inférieur à 100.", 'Règle de gestion');
|
||||
}else if((taux_ag_d + taux_sup_d) > 100){
|
||||
toastr.error("La somme des % des dépots de l'agent et du superviseur doit être inférieur à 100.", 'Règle de gestion');
|
||||
}else if(sommeRetrait >= taux_client_r){
|
||||
// alert("La somme des % des retraits doit être inférieur au taux client de retrait.");
|
||||
toastr.error('La somme des % des retraits doit être inférieur au taux client de retrait.', 'Règle de gestion')
|
||||
}else if(sommeDepot >= 100){
|
||||
toastr.error("La somme des % des dépots doit être inférieur à 100.", 'Règle de gestion');
|
||||
}else{
|
||||
$.ajax({
|
||||
url : '<?php echo base_url('index.php/Gestion/config_wallet/create')?>',
|
||||
type : 'POST',
|
||||
dataType : 'json',
|
||||
data: {"network_id": network_id ,"taux_client_r": taux_client_r, "taux_client_d": taux_client_d,"taux_ag_r": taux_ag_r, "taux_ag_d": taux_ag_d , "taux_sup_r": taux_sup_r , "taux_sup_d": taux_sup_d,
|
||||
"taux_bq_r": taux_bq_r, "taux_bq_d":taux_bq_d, "frais_d": frais_d},
|
||||
success : function(data){
|
||||
if(data=='200'){
|
||||
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Nouveau wallet',
|
||||
text:'Les informations ont été mises à jour',
|
||||
timer: 3000
|
||||
}).then(()=>{
|
||||
location.reload();
|
||||
});
|
||||
// alert("Les informations ont été mises à jour.") ? "" :
|
||||
}else{
|
||||
toastr.error("Une erreur s'est produite." , 'Erreur requete');
|
||||
}
|
||||
},
|
||||
error : function(resultat, statut, error){
|
||||
console.log(resultat+" "+error );
|
||||
}
|
||||
}).done(function () {
|
||||
$.ajax({
|
||||
url : '<?php echo base_url('index.php/Gestion/generateAllWallets')?>',
|
||||
type : 'POST',
|
||||
dataType : 'json',
|
||||
data : {"network_id": network_id},
|
||||
timeout : 0,
|
||||
async : true ,
|
||||
success : function () {
|
||||
console.log("All wallets are generated");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}else {
|
||||
$('#walletForm')[0].reportValidity();
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
$('#deleteWallet').click(function(){
|
||||
$.ajax({
|
||||
url : '<?php echo base_url('index.php/Gestion/delete_config_wallet')?>',
|
||||
type : 'POST',
|
||||
dataType : 'json',
|
||||
data: {"network_id": network_id },
|
||||
success : function(data, statut){
|
||||
if(data=='200'){
|
||||
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Suppression wallet',
|
||||
text: 'Les informations ont été mises à jour',
|
||||
timer: 3000
|
||||
}).then(()=>{
|
||||
location.reload();
|
||||
});
|
||||
// alert("Les informations ont été mises à jour.") ? "" : location.reload();
|
||||
}else{
|
||||
toastr.error("Une erreur s'est produite.", 'Erreur requete');
|
||||
}
|
||||
},
|
||||
|
||||
error : function(resultat, statut, erreur){
|
||||
console.log(resultat+" "+erreur);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
|
@ -143,7 +143,7 @@
|
|||
</a>
|
||||
</li>
|
||||
<li class="<?php if($active=="wallet"){echo "active";} ?>">
|
||||
<a href="#" data-toggle="modal" data-target="#modal-choix-network">
|
||||
<a href="<?php echo base_url('index.php/Gestion/wallet') ?>">
|
||||
<i class="glyphicon glyphicon-credit-card"></i> <span>Wallet<?php //echo $this->lang->line('Game'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -199,47 +199,47 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="modal-choix-network">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form action="<?php echo base_url('index.php/Gestion/wallet')?>" method="post">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">Sélectionnez le réseau<?php //echo $this->lang->line('Sélectionnez le pays'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$result=$networks;
|
||||
|
||||
$numrows=$result->num_rows();
|
||||
|
||||
if ($numrows > 0) { ?>
|
||||
<select class="form-control input-lg" name="id" required>
|
||||
<?php foreach($result->result() as $row) {
|
||||
|
||||
echo "<option value=".$row->id.">".$row->name." - ".$row->country."</option>";
|
||||
} ?>
|
||||
</select>
|
||||
<?php }else{
|
||||
echo "Aucun réseau";
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
|
||||
<button type="submit" class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="modal fade" id="modal-choix-network">-->
|
||||
<!-- <div class="modal-dialog">-->
|
||||
<!-- <div class="modal-content">-->
|
||||
<!-- <form action="--><?php //echo base_url('index.php/Gestion/wallet')?><!--" method="post">-->
|
||||
<!-- <div class="modal-header">-->
|
||||
<!-- <button type="button" class="close" data-dismiss="modal" aria-label="Close">-->
|
||||
<!-- <span aria-hidden="true">×</span>-->
|
||||
<!-- </button>-->
|
||||
<!-- <h4 class="modal-title">Sélectionnez le réseau--><?php ////echo $this->lang->line('Sélectionnez le pays'); ?><!--</h4>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="modal-body">-->
|
||||
<!---->
|
||||
<!-- <div class="form-group">-->
|
||||
<!---->
|
||||
<!-- --><?php
|
||||
// $result=$networks;
|
||||
//
|
||||
// $numrows=$result->num_rows();
|
||||
//
|
||||
// if ($numrows > 0) { ?>
|
||||
<!-- <select class="form-control input-lg" name="id" required>-->
|
||||
<!-- --><?php //foreach($result->result() as $row) {
|
||||
//
|
||||
// echo "<option value=".$row->id.">".$row->name." - ".$row->country."</option>";
|
||||
// } ?>
|
||||
<!-- </select>-->
|
||||
<!-- --><?php //}else{
|
||||
// echo "Aucun réseau";
|
||||
// }
|
||||
// ?>
|
||||
<!---->
|
||||
<!-- </div>-->
|
||||
<!---->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="modal-footer">-->
|
||||
<!-- <button type="button" class="btn btn-default pull-left" data-dismiss="modal">--><?php //echo $this->lang->line('Fermer'); ?><!--</button>-->
|
||||
<!-- <button type="submit" class="btn btn-primary">--><?php //echo $this->lang->line('Continuer'); ?><!--</button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </form>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
|
||||
|
|
|
@ -1,245 +1,245 @@
|
|||
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>iLink | Hyperviseur</title>
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap/dist/css/bootstrap.min.css') ?>">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/font-awesome/css/font-awesome.min.css') ?>">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/Ionicons/css/ionicons.min.css') ?>">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('dist/css/AdminLTE.css') ?>">
|
||||
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
||||
folder instead of downloading all of them to reduce the load. -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('dist/css/skins/_all-skins.min.css') ?>">
|
||||
<link rel="shortcut icon" href="<?php echo base_url('favicon.ico') ?>" type="image/x-icon">
|
||||
<link rel="icon" href="<?php echo base_url('favicon.ico') ?>" type="image/x-icon">
|
||||
|
||||
|
||||
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<style media="screen">
|
||||
.img-dash {
|
||||
height: 50px !important;
|
||||
float: left !important;
|
||||
padding: 1% !important;
|
||||
}
|
||||
|
||||
.table_modified {
|
||||
font-size: 11px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="hold-transition skin-blue sidebar-mini">
|
||||
<div class="wrapper">
|
||||
|
||||
<header class="main-header">
|
||||
<!-- Logo -->
|
||||
<a href="#" class="logo">
|
||||
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||
<span class="logo-mini"><b>iLink</b></span>
|
||||
<!-- logo for regular state and mobile devices -->
|
||||
<span class="logo-lg">
|
||||
<img class="img img-responsive img-dash" src="<?php echo base_url('images/logo.png') ?>">
|
||||
<b>iLink</b> World
|
||||
</span>
|
||||
|
||||
</a>
|
||||
<!-- Header Navbar: style can be found in header.less -->
|
||||
<nav class="navbar navbar-static-top">
|
||||
<!-- Sidebar toggle button-->
|
||||
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
</a>
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<!-- User Account: style can be found in dropdown.less -->
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<?php echo $this->lang->line('Bienvenue'); ?> <span class="hidden-xs"><b><?php echo $firstname.' '.$lastname;?></b></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- User image -->
|
||||
<li class="user-header">
|
||||
|
||||
<p>
|
||||
<?php echo $network.' - '.$this->session->userdata('member_code');?>
|
||||
<small><?php echo $email;?></small>
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="user-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-center">
|
||||
<?php echo $this->session->userdata('current_pays');?>
|
||||
</div>
|
||||
<div class="col-xs-6 text-center">
|
||||
<?php echo $this->session->userdata('phone');?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</li>
|
||||
<li class="user-footer">
|
||||
|
||||
<div class="pull-right">
|
||||
<a href="<?php echo base_url('index.php/Users/logout') ?>" class="btn btn-default btn-flat"><?php echo $this->lang->line('Déconnexion'); ?></a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<!-- Left side column. contains the logo and sidebar -->
|
||||
<aside class="main-sidebar">
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar">
|
||||
<!-- sidebar menu: : style can be found in sidebar.less -->
|
||||
<ul class="sidebar-menu" data-widget="tree">
|
||||
|
||||
<li class="<?php if($active=="dash"){echo "active ";} ?>">
|
||||
|
||||
|
||||
<a href="<?php echo base_url('index.php/Hyperviseur_dash') ?>">
|
||||
<i class="fa fa-dashboard"></i> <span><?php echo $this->lang->line('Tableau de bord'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="<?php if($active=="geolocated"){echo "active ";} ?>">
|
||||
<a href="#" data-toggle="modal" data-target="#modal-default">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Utilisateurs géolocalisés'); ?></span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li class="<?php if($active=="super"){echo "active ";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Hyperviseur_dash/getAllSupervisor') ?>">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Superviseur'); ?></span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li class="<?php if($active=="demandes"){echo "active ";} ?>">
|
||||
<a href="#" data-toggle="modal" data-target="#modal-default2">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Demandes de crédits'); ?></span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li class="<?php if($active=="demandesAd"){echo "active ";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Hyperviseur_dash/getDemandesAd') ?>">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Demandes adhésion'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if($this->session->userdata('network_id') == 118){
|
||||
?>
|
||||
<li class="<?php if($active=="wallet"){echo "active";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Hyperviseur_dash/wallet?r='.$this->session->userdata('network_id')) ?>">
|
||||
<i class="glyphicon glyphicon-credit-card"></i> <span>Wallet<?php //echo $this->lang->line('Game'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
|
||||
<div class="modal fade" id="modal-default">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form action="<?php echo base_url('index.php/Hyperviseur_dash/getAllUser_g')?>" method="post">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('Sélectionnez la ville'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$result=$villes;
|
||||
|
||||
$numrows=$result->num_rows();
|
||||
|
||||
if ($numrows > 0) { ?>
|
||||
<select class="form-control input-lg" name="ville" required>
|
||||
<?php foreach($result->result() as $row) {
|
||||
|
||||
echo "<option>".$row->ville."</option>";
|
||||
} ?>
|
||||
</select>
|
||||
<?php }else{
|
||||
echo "Aucun utilisateur géolocalisé";
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
|
||||
<button type="submit" class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="modal-default2">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form action="<?php echo base_url('index.php/Hyperviseur_dash/getDemandes')?>" method="post">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('Superviseur'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$result=$superviseurs;
|
||||
|
||||
$numrows=$result->num_rows();
|
||||
|
||||
if ($numrows > 0) { ?>
|
||||
<select class="form-control input-lg" name="super" required>
|
||||
<?php foreach($result->result() as $row) {
|
||||
|
||||
echo "<option value='".$row->member_code."'>".$row->lastname." - ".$row->member_code."</option>";
|
||||
} ?>
|
||||
</select>
|
||||
<?php }else{
|
||||
echo "Aucun superviseur";
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
|
||||
<button type="submit" class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal -->
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>iLink | Hyperviseur</title>
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap/dist/css/bootstrap.min.css') ?>">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/font-awesome/css/font-awesome.min.css') ?>">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/Ionicons/css/ionicons.min.css') ?>">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('dist/css/AdminLTE.css') ?>">
|
||||
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
||||
folder instead of downloading all of them to reduce the load. -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('dist/css/skins/_all-skins.min.css') ?>">
|
||||
<link rel="shortcut icon" href="<?php echo base_url('favicon.ico') ?>" type="image/x-icon">
|
||||
<link rel="icon" href="<?php echo base_url('favicon.ico') ?>" type="image/x-icon">
|
||||
|
||||
|
||||
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<style media="screen">
|
||||
.img-dash {
|
||||
height: 50px !important;
|
||||
float: left !important;
|
||||
padding: 1% !important;
|
||||
}
|
||||
|
||||
.table_modified {
|
||||
font-size: 11px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="hold-transition skin-blue sidebar-mini">
|
||||
<div class="wrapper">
|
||||
|
||||
<header class="main-header">
|
||||
<!-- Logo -->
|
||||
<a href="#" class="logo">
|
||||
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||
<span class="logo-mini"><b>iLink</b></span>
|
||||
<!-- logo for regular state and mobile devices -->
|
||||
<span class="logo-lg">
|
||||
<img class="img img-responsive img-dash" src="<?php echo base_url('images/logo.png') ?>">
|
||||
<b>iLink</b> World
|
||||
</span>
|
||||
|
||||
</a>
|
||||
<!-- Header Navbar: style can be found in header.less -->
|
||||
<nav class="navbar navbar-static-top">
|
||||
<!-- Sidebar toggle button-->
|
||||
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
</a>
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<!-- User Account: style can be found in dropdown.less -->
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<?php echo $this->lang->line('Bienvenue'); ?> <span class="hidden-xs"><b><?php echo $firstname.' '.$lastname;?></b></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- User image -->
|
||||
<li class="user-header">
|
||||
|
||||
<p>
|
||||
<?php echo $network.' - '.$this->session->userdata('member_code');?>
|
||||
<small><?php echo $email;?></small>
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li class="user-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-center">
|
||||
<?php echo $this->session->userdata('current_pays');?>
|
||||
</div>
|
||||
<div class="col-xs-6 text-center">
|
||||
<?php echo $this->session->userdata('phone');?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</li>
|
||||
<li class="user-footer">
|
||||
|
||||
<div class="pull-right">
|
||||
<a href="<?php echo base_url('index.php/Users/logout') ?>" class="btn btn-default btn-flat"><?php echo $this->lang->line('Déconnexion'); ?></a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<!-- Left side column. contains the logo and sidebar -->
|
||||
<aside class="main-sidebar">
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar">
|
||||
<!-- sidebar menu: : style can be found in sidebar.less -->
|
||||
<ul class="sidebar-menu" data-widget="tree">
|
||||
|
||||
<li class="<?php if($active=="dash"){echo "active ";} ?>">
|
||||
|
||||
|
||||
<a href="<?php echo base_url('index.php/Hyperviseur_dash') ?>">
|
||||
<i class="fa fa-dashboard"></i> <span><?php echo $this->lang->line('Tableau de bord'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="<?php if($active=="geolocated"){echo "active ";} ?>">
|
||||
<a href="#" data-toggle="modal" data-target="#modal-default">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Utilisateurs géolocalisés'); ?></span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li class="<?php if($active=="super"){echo "active ";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Hyperviseur_dash/getAllSupervisor') ?>">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Superviseur'); ?></span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li class="<?php if($active=="demandes"){echo "active ";} ?>">
|
||||
<a href="#" data-toggle="modal" data-target="#modal-default2">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Demandes de crédits'); ?></span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li class="<?php if($active=="demandesAd"){echo "active ";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Hyperviseur_dash/getDemandesAd') ?>">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Demandes adhésion'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if($hasWallet){
|
||||
?>
|
||||
<li class="<?php if($active=="wallet"){echo "active";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Hyperviseur_dash/wallet') ?>">
|
||||
<i class="glyphicon glyphicon-credit-card"></i> <span>Wallet<?php //echo $this->lang->line('Game'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
|
||||
<div class="modal fade" id="modal-default">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form action="<?php echo base_url('index.php/Hyperviseur_dash/getAllUser_g')?>" method="post">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('Sélectionnez la ville'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$result=$villes;
|
||||
|
||||
$numrows=$result->num_rows();
|
||||
|
||||
if ($numrows > 0) { ?>
|
||||
<select class="form-control input-lg" name="ville" required>
|
||||
<?php foreach($result->result() as $row) {
|
||||
|
||||
echo "<option>".$row->ville."</option>";
|
||||
} ?>
|
||||
</select>
|
||||
<?php }else{
|
||||
echo "Aucun utilisateur géolocalisé";
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
|
||||
<button type="submit" class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="modal-default2">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form action="<?php echo base_url('index.php/Hyperviseur_dash/getDemandes')?>" method="post">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title"><?php echo $this->lang->line('Superviseur'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$result=$superviseurs;
|
||||
|
||||
$numrows=$result->num_rows();
|
||||
|
||||
if ($numrows > 0) { ?>
|
||||
<select class="form-control input-lg" name="super" required>
|
||||
<?php foreach($result->result() as $row) {
|
||||
|
||||
echo "<option value='".$row->member_code."'>".$row->lastname." - ".$row->member_code."</option>";
|
||||
} ?>
|
||||
</select>
|
||||
<?php }else{
|
||||
echo "Aucun superviseur";
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
|
||||
<button type="submit" class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal -->
|
||||
|
|
|
@ -1,128 +1,136 @@
|
|||
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>iLink | Superviseur</title>
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap/dist/css/bootstrap.min.css') ?>">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/font-awesome/css/font-awesome.min.css') ?>">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/Ionicons/css/ionicons.min.css') ?>">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('dist/css/AdminLTE.css') ?>">
|
||||
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
||||
folder instead of downloading all of them to reduce the load. -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('dist/css/skins/_all-skins.min.css') ?>">
|
||||
<link rel="shortcut icon" href="<?php echo base_url('favicon.ico') ?>" type="image/x-icon">
|
||||
<link rel="icon" href="<?php echo base_url('favicon.ico') ?>" type="image/x-icon">
|
||||
|
||||
|
||||
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<style media="screen">
|
||||
.img-dash {
|
||||
height: 50px !important;
|
||||
float: left !important;
|
||||
padding: 1% !important;
|
||||
}
|
||||
|
||||
.table_modified {
|
||||
font-size: 11px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body class="hold-transition skin-blue sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<header class="main-header">
|
||||
<!-- Logo -->
|
||||
<a href="#" class="logo">
|
||||
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||
<span class="logo-mini"><b>iLink</b></span>
|
||||
<!-- logo for regular state and mobile devices -->
|
||||
<span class="logo-lg">
|
||||
<img class="img img-responsive img-dash" src="<?php echo base_url('images/logo.png') ?>">
|
||||
<b>iLink</b> World
|
||||
</span>
|
||||
</a>
|
||||
<!-- Header Navbar: style can be found in header.less -->
|
||||
<nav class="navbar navbar-static-top">
|
||||
<!-- Sidebar toggle button-->
|
||||
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
</a>
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
<!-- User Account: style can be found in dropdown.less -->
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<?php echo $this->lang->line('Bienvenue'); ?> <span class="hidden-xs"><b><?php echo $firstname.' '.$lastname;?></b></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- User image -->
|
||||
<li class="user-header">
|
||||
<p>
|
||||
<?php echo $network.' - '.$this->session->userdata('member_code');?>
|
||||
<small><?php echo $email;?></small>
|
||||
</p>
|
||||
</li>
|
||||
<li class="user-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-center">
|
||||
<?php echo $this->session->userdata('current_pays');?>
|
||||
</div>
|
||||
<div class="col-xs-6 text-center">
|
||||
<?php echo $this->session->userdata('phone');?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</li>
|
||||
<li class="user-footer">
|
||||
<div class="pull-right">
|
||||
<a href="<?php echo base_url('index.php/Users/logout') ?>" class="btn btn-default btn-flat"><?php echo $this->lang->line('Déconnexion'); ?></a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<!-- Left side column. contains the logo and sidebar -->
|
||||
<aside class="main-sidebar">
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar">
|
||||
<!-- sidebar menu: : style can be found in sidebar.less -->
|
||||
<ul class="sidebar-menu" data-widget="tree">
|
||||
<li class="<?php if($active=="dash"){echo "active ";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Superviseur_dash') ?>">
|
||||
<i class="fa fa-dashboard"></i> <span><?php echo $this->lang->line('Tableau de bord'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<?php if($active=="geolocated"){echo "active ";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Superviseur_dash/getAllUser_g') ?>">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Utilisateurs géolocalisés'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<?php if($active=="demandes"){echo "active ";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Superviseur_dash/getDemandes') ?>">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Demandes de crédits'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- <li class="<?php // if($active=="demandesAd"){echo "active ";} ?>">
|
||||
<a href="<?php // echo base_url('index.php/Superviseur_dash/getDemandesAd') ?>">
|
||||
<i class="fa fa-users"></i> <span>Demandes d'adhésion</span>
|
||||
</a>
|
||||
</li>-->
|
||||
</ul>
|
||||
</section>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>iLink | Superviseur</title>
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap/dist/css/bootstrap.min.css') ?>">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/font-awesome/css/font-awesome.min.css') ?>">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('bower_components/Ionicons/css/ionicons.min.css') ?>">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('dist/css/AdminLTE.css') ?>">
|
||||
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
||||
folder instead of downloading all of them to reduce the load. -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('dist/css/skins/_all-skins.min.css') ?>">
|
||||
<link rel="shortcut icon" href="<?php echo base_url('favicon.ico') ?>" type="image/x-icon">
|
||||
<link rel="icon" href="<?php echo base_url('favicon.ico') ?>" type="image/x-icon">
|
||||
|
||||
|
||||
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<style media="screen">
|
||||
.img-dash {
|
||||
height: 50px !important;
|
||||
float: left !important;
|
||||
padding: 1% !important;
|
||||
}
|
||||
|
||||
.table_modified {
|
||||
font-size: 11px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body class="hold-transition skin-blue sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<header class="main-header">
|
||||
<!-- Logo -->
|
||||
<a href="#" class="logo">
|
||||
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||
<span class="logo-mini"><b>iLink</b></span>
|
||||
<!-- logo for regular state and mobile devices -->
|
||||
<span class="logo-lg">
|
||||
<img class="img img-responsive img-dash" src="<?php echo base_url('images/logo.png') ?>">
|
||||
<b>iLink</b> World
|
||||
</span>
|
||||
</a>
|
||||
<!-- Header Navbar: style can be found in header.less -->
|
||||
<nav class="navbar navbar-static-top">
|
||||
<!-- Sidebar toggle button-->
|
||||
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
</a>
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
<!-- User Account: style can be found in dropdown.less -->
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<?php echo $this->lang->line('Bienvenue'); ?> <span class="hidden-xs"><b><?php echo $firstname.' '.$lastname;?></b></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- User image -->
|
||||
<li class="user-header">
|
||||
<p>
|
||||
<?php echo $network.' - '.$this->session->userdata('member_code');?>
|
||||
<small><?php echo $email;?></small>
|
||||
</p>
|
||||
</li>
|
||||
<li class="user-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-center">
|
||||
<?php echo $this->session->userdata('current_pays');?>
|
||||
</div>
|
||||
<div class="col-xs-6 text-center">
|
||||
<?php echo $this->session->userdata('phone');?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</li>
|
||||
<li class="user-footer">
|
||||
<div class="pull-right">
|
||||
<a href="<?php echo base_url('index.php/Users/logout') ?>" class="btn btn-default btn-flat"><?php echo $this->lang->line('Déconnexion'); ?></a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<!-- Left side column. contains the logo and sidebar -->
|
||||
<aside class="main-sidebar">
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar">
|
||||
<!-- sidebar menu: : style can be found in sidebar.less -->
|
||||
<ul class="sidebar-menu" data-widget="tree">
|
||||
<li class="<?php if($active=="dash"){echo "active ";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Superviseur_dash') ?>">
|
||||
<i class="fa fa-dashboard"></i> <span><?php echo $this->lang->line('Tableau de bord'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<?php if($active=="geolocated"){echo "active ";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Superviseur_dash/getAllUser_g') ?>">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Utilisateurs géolocalisés'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="<?php if($active=="demandes"){echo "active ";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Superviseur_dash/getDemandes') ?>">
|
||||
<i class="fa fa-users"></i> <span><?php echo $this->lang->line('Demandes de crédits'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- <li class="<?php // if($active=="demandesAd"){echo "active ";} ?>">
|
||||
<a href="<?php // echo base_url('index.php/Superviseur_dash/getDemandesAd') ?>">
|
||||
<i class="fa fa-users"></i> <span>Demandes d'adhésion</span>
|
||||
</a>
|
||||
</li>-->
|
||||
<?php if($hasWallet){
|
||||
?>
|
||||
<li class="<?php if($active=="wallet"){echo "active";} ?>">
|
||||
<a href="<?php echo base_url('index.php/Superviseur_dash/wallet') ?>">
|
||||
<i class="glyphicon glyphicon-credit-card"></i> <span>Wallet<?php //echo $this->lang->line('Game'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"source": "https://github.com/bcit-ci/CodeIgniter"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.7"
|
||||
"php": ">=5.4"
|
||||
},
|
||||
"suggest": {
|
||||
"paragonie/random_compat": "Provides better randomness in PHP 5.x"
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue