Implements configuration of nano health wallet

This commit is contained in:
Djery-Tom 2021-10-11 01:14:08 +01:00
parent a377a99f4d
commit 1bd5022833
39 changed files with 2831 additions and 2221 deletions

View File

@ -1546,6 +1546,7 @@ class Gestion extends CI_Controller
if ($taux != null) {
$taux = $taux->first_row();
$data['idConfig'] = $taux->id;
$data['type'] = $taux->type;
if ($taux->type == 'visa'){
$data['taux_client_r'] = $taux->taux_com_client_retrait;
$data['taux_client_d'] = $taux->taux_com_client_depot;
@ -1617,7 +1618,12 @@ class Gestion extends CI_Controller
$res = $this->wallet_model->getSharingRateByNetwork($network_id);
$data['commission'] = $res ? $res->first_row()->balance_com : 0 ;
}elseif($taux->type == 'ilink_sante'){
$nh_config = $this->nano_health_model->getConfig($network_id);
$data['nh_config'] = $nh_config ? $nh_config->first_row() : null ;
$data['config_id'] = $data['nh_config'] ? $data['nh_config']->id : null ;
$data['years_prices_grid'] = $this->nano_health_model->getConfigYearsPricesGrid($data['config_id']);
$data['months_prices_grid'] = $this->nano_health_model->getConfigMonthsPricesGrid($data['config_id']);
$data['acts'] = $this->nano_health_model->getConfigActs($data['config_id']);
}
@ -1640,8 +1646,8 @@ class Gestion extends CI_Controller
$this->load->view('gestion_wallet');
elseif ($taux->type == 'ilink')
$this->load->view('gestion_wallet_ilink');
// elseif ($taux->type == 'ilink_sante')
// $this->load->view('nano_health/admin/gestion_wallet_ilink_sante');
elseif ($taux->type == 'ilink_sante')
$this->load->view('nano_health/admin/gestion_wallet');
elseif ($taux->type == 'autre')
$this->load->view('gestion_wallet_autre');
$this->load->view('footer');
@ -1666,11 +1672,12 @@ class Gestion extends CI_Controller
{
if($this->isLogged()){
if (isset($_POST)) {
$country_id = $_POST['country_id'];
$network_id = $_POST['network_id'];
$type = $_POST['type'];
$res = false;
if($method == 'create') {
$country_id = $_POST['country_id'];
$network_id = $_POST['network_id'];
if($type == 'ilink'){
$exist = $this->wallet_model->verifyConfigWalletInCountry($type,$country_id);
if($exist){
@ -1682,6 +1689,8 @@ class Gestion extends CI_Controller
} else if($method == 'update'){
$idConfig = $_POST['id_config'];
if($type == 'visa'){
$taux_client_r = $_POST['taux_client_r'];
$taux_client_d = $_POST['taux_client_d'];
@ -1693,10 +1702,10 @@ class Gestion extends CI_Controller
$taux_bq_r = $_POST['taux_bq_r'];
$frais_d = $_POST['frais_d'];
$res = $this->wallet_model->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);
$res = $this->wallet_model->updateConfigWallet($idConfig , $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);
}else if ($type == 'ilink'){
$idConfig = $_POST['id_config'];
$config = $_POST['config'];
$fields = isset($_POST['fields']) ? $_POST['fields'] : [];
@ -1767,6 +1776,10 @@ class Gestion extends CI_Controller
break;
}
$res = true;
}else if($type == 'ilink_sante'){
unset($_POST['id_config'],$_POST['type']);
$this->nano_health_model->updateConfig($idConfig,$_POST);
$res = true;
}
@ -2241,81 +2254,6 @@ class Gestion extends CI_Controller
}
}
public function nano_health(){
if ($this->isLogged()) {
$data['active'] = "nano_health";
$data['alert'] = "";
$data['game_pays'] = $this->user_model->getGameCountry();
if ($this->input->get('id')) {
$data['network_id'] = $this->input->get('id');
if ($this->input->get('history')) {
$this->historique_nano_credit($data['network_id'], $this->input->get('d'), $this->input->get('f'), $this->input->get('history'));
} elseif ($this->input->get('group')) {
$this->users_group_details($data['network_id'],$this->input->get('group'));
} else {
$data['insurances'] = $this->nano_health_model->getAllInsurances($data['network_id']);
$data['configWallet'] = $this->wallet_model->getConfigWallet($data['network_id'])->first_row();
$networkDetails = $this->user_model->getNetworkDetails($data['network_id']);
if ($networkDetails) {
$data['network'] = $networkDetails->first_row()->network;
$data['country'] = $networkDetails->first_row()->country;
$data['currency_code'] = $networkDetails->first_row()->currency_code;
}
$data['rates_nano_credit'] = $this->nano_credit_model->getNanoCreditRates($data['configWallet']->id);
$data['taxes_nano_credit'] = $this->wallet_model->getTaxes($data['configWallet']->id, 'nano_credit');
$data['rates_epargne'] = $this->nano_credit_model->getNanoCreditRates($data['configWallet']->id, 'epargne');
$data['taxes_epargne'] = $this->wallet_model->getTaxes($data['configWallet']->id, 'epargne');
$this->load->view('header_gestion', $data);
$this->load->view('nano_health/config_nano_health');
$this->load->view('footer');
}
} else {
$data['networks'] = $this->nano_health_model->getAllIlinkWorldNetworks();
$this->load->view('header_gestion', $data);
$this->load->view('nano_health/gestion_nano_health');
$this->load->view('footer');
}
}
}
public function activate_nano_health()
{
if ($this->isLogged()) {
if (isset($_POST)) {
$data = array('has_nano_health' => 1);
$this->db->where('id_network', $_POST['id_network']);
$res = $this->db->update('configWallet', $data);
if ($res) {
echo json_encode("200");
} else {
echo json_encode("500");
}
}
}
}
public function deactivate_nano_health()
{
if ($this->isLogged()) {
if (isset($_POST)) {
$data = array('has_nano_health' => 0);
$this->db->where('id_network', $_POST['id_network']);
$res = $this->db->update('configWallet', $data);
if ($res) {
echo json_encode("200");
} else {
echo json_encode("500");
}
}
}
}
public function regulations()
{

View File

@ -460,6 +460,16 @@ class Hyperviseur_dash extends CI_Controller
}
$data["totalCommissionBanque"] = Money::of(round($totalCommissionBanque,2), $this->session->userdata('currency_code'), $context )->formatTo('fr_FR');
}elseif($data['hasWallet']->first_row()->type == 'ilink_sante'){
$nh_config = $this->nano_health_model->getConfig($id_network);
$data['nh_config'] = $nh_config ? $nh_config->first_row() : null ;
$data['config_id'] = $data['nh_config'] ? $data['nh_config']->id : null ;
$data['provider_billing_periods'] = $this->user_model->getEnumValues('nh_networks_configs','provider_billing_period');
$data['years_prices_grid'] = $this->nano_health_model->getConfigYearsPricesGrid($data['config_id']);
$data['months_prices_grid'] = $this->nano_health_model->getConfigMonthsPricesGrid($data['config_id']);
$data['acts'] = $this->nano_health_model->getConfigActs($data['config_id']);
$data['billing_types'] = $this->user_model->getEnumValues('nh_acts','billing_type');
$data['authorization_types'] = $this->user_model->getEnumValues('nh_acts','authorization_type');
}
//Create wallet if it not exist
@ -501,6 +511,8 @@ class Hyperviseur_dash extends CI_Controller
$this->load->view('gestion_wallet_hyp');
elseif ($data['hasWallet']->first_row()->type == 'ilink')
$this->load->view('gestion_wallet_ilink_hyp');
elseif ($data['hasWallet']->first_row()->type == 'ilink_sante')
$this->load->view('nano_health/hyper/gestion_wallet');
$this->load->view('footer');
}
}

View File

@ -0,0 +1,73 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class NanoHealthController extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->model('wallet_model');
$this->load->model('nano_health_model');
}
public function updateConfigYearsPricesGrid(){
if($this->isLogged()) {
if (isset($_POST)) {
$configId = $_POST['config_id'];
$grid = $_POST['grid'] ?? [];
$this->db->delete('nh_years_prices_grid',['nh_network_config_id' => $configId]);
$this->db->insert_batch('nh_years_prices_grid',$grid);
echo json_encode("200");
}
}
}
public function updateConfigMonthsPricesGrid(){
if($this->isLogged()) {
if (isset($_POST)) {
$configId = $_POST['config_id'];
$grid = $_POST['grid'] ?? [];
$this->db->delete('nh_months_prices_grid',['nh_network_config_id' => $configId]);
$this->db->insert_batch('nh_months_prices_grid',$grid);
echo json_encode("200");
}
}
}
public function storeAct(){
if($this->isLogged()) {
if (isset($_POST)) {
$id = $_POST['id'];
$_POST['nh_network_config_id'] = $_POST['config_id'];
unset($_POST['config_id']);
if(!empty($id)){
$this->db->where('id',$id);
$this->db->update('nh_acts',$_POST);
}else{
$this->db->insert('nh_acts',$_POST);
}
echo json_encode("200");
}
}
}
private function isLogged()
{
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);
return false;
}
return true;
}
}

View File

@ -79,7 +79,7 @@ if (!function_exists('getDelayOfTreatmentInSeconds')) {
}
}
if ( ! function_exists('line_with_arguments'))
if (!function_exists('line_with_arguments'))
{
function line_with_arguments($line, $args = array())
{
@ -88,3 +88,49 @@ if ( ! function_exists('line_with_arguments'))
}
}
if (!function_exists('convertDate')) {
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;
}
}

View File

@ -634,5 +634,42 @@ $lang['nano_health_management'] = 'Nano health management';
$lang['edit_nano_health'] = 'nano health configuration';
$lang['insurances_list'] = 'Insurance list';
$lang['add_insurance'] = 'Add an insurance';
$lang['wallet_disabled'] = "Wallet disabled"
$lang['wallet_disabled'] = "Wallet disabled";
$lang['provider_billing_period'] = "Provider billing period";
$lang['max_number_of_beneficiaries'] = "Maximum number of beneficiaries";
$lang['age_limit_of_child_beneficiary'] = "Age limit of child beneficiary";
$lang['support_type'] = "Type of support";
$lang['percentage_insurer'] = "Insurer share";
$lang['percentage_insured'] = "Insured share";
$lang['list_of_acts'] = "List of acts";
$lang['WEEKLY'] = "Weekly";
$lang['BIMONTHLY'] = "Bimonthly";
$lang['MONTHLY'] = "Monthly";
$lang['current_affection'] = "Current Affection";
$lang['long_term_affection'] = "Long-term condition";
$lang['exoneration'] = "Exoneration";
$lang['years_price_grid'] = "Age-based rate grid";
$lang['months_price_grid'] = "Rate grid by minimum number of months";
$lang['min_age'] = "Minimum age";
$lang['max_age'] = "Max. age";
$lang['markup_percentage'] = "Markup percentage";
$lang['min_amount'] = "Minimum amount";
$lang['number_of_months'] = "Number of months";
$lang['edit_years_prices_grid'] = "Edit age-based rate grid";
$lang['edit_months_prices_grid'] = "Modify the rate grid by minimum number of months";
$lang['coverage_limit_per_insured_per_year'] = "Coverage limit per insured per year";
$lang['current_affection_rule'] = "The sum of the % of current affection must equal 100%";
$lang['long_term_affection_rule'] = "The sum of the % of long term condition must equal 100%";
$lang['exoneration_rule'] = "The sum of the % of long term exoneration must equal 100%";
$lang['add_act'] = "Add a procedure";
$lang['edit_act'] = "Edit an act";
$lang['billing_type'] = "Billing type";
$lang['authorization_type'] = "authorization type";
$lang['subscriptions_of_the_last_12_months'] = "Subscriptions of the last 12 months";
$lang['subscriptions_historic'] = "Subscription history";
$lang['PACKAGE'] = "Package";
$lang['UNIT_PRICE'] = "Unit price";
$lang['FREE'] = "Free";
$lang['PRIOR'] = "Prerequisite";
?>

View File

@ -646,5 +646,41 @@ $lang['nano_health_management'] = 'Gestion du nano santé';
$lang['edit_nano_health'] = 'Configuration du nano santé';
$lang['insurances_list'] = 'Liste des assurances';
$lang['add_insurance'] = "Ajouter une assurance";
$lang['wallet_disabled'] = "Wallet désactivé"
$lang['wallet_disabled'] = "Wallet désactivé";
$lang['provider_billing_period'] = "Période de facturation des prestataires";
$lang['max_number_of_beneficiaries'] = "Nombre maximum dayants droit";
$lang['age_limit_of_child_beneficiary'] = "Age limite de layant droit enfant";
$lang['support_type'] = "Type de prise en charges";
$lang['percentage_insurer'] = "Part assureur";
$lang['percentage_insured'] = "Part assuré";
$lang['list_of_acts'] = "Liste des actes";
$lang['WEEKLY'] = "Hebdomadaire";
$lang['BIMONTHLY'] = "Bimensuel";
$lang['MONTHLY'] = "Mensuel";
$lang['current_affection'] = "Affection courante";
$lang['long_term_affection'] = "Affection longue durée";
$lang['exoneration'] = "Exonération";
$lang['years_price_grid'] = "Grille des tarifs par paliers d'age";
$lang['months_price_grid'] = "Grille des tarifs par nombre de mois minimun";
$lang['min_age'] = "Age Min.";
$lang['max_age'] = "Age Max.";
$lang['markup_percentage'] = "Pourcentage de majoration";
$lang['min_amount'] = "Montant minimum";
$lang['number_of_months'] = "Nombre de mois";
$lang['edit_years_prices_grid'] = "Modifier la grille des tarifs par paliers d'age";
$lang['edit_months_prices_grid'] = "Modifier la grille des tarifs par nombre de mois minimun";
$lang['coverage_limit_per_insured_per_year'] = "Limite couverture par assuré par an";
$lang['current_affection_rule'] = "La somme des % d'affection courante doit être égale à 100%";
$lang['long_term_affection_rule'] = "La somme des % d'affection longue durée doit être égale à 100%";
$lang['exoneration_rule'] = "La somme des % d'exonération durée doit être égale à 100%";
$lang['add_act'] = "Ajouter un acte";
$lang['edit_act'] = "Modifier un acte";
$lang['billing_type'] = "Type de facturation";
$lang['authorization_type'] = "Type d'autorisation";
$lang['subscriptions_of_the_last_12_months'] = "Souscriptions des 12 derniers mois";
$lang['subscriptions_historic'] = "Historique des souscriptions";
$lang['PACKAGE'] = "Forfait";
$lang['UNIT_PRICE'] = "Prix unitaire";
$lang['FREE'] = "Libre";
$lang['PRIOR'] = "Préalable";
?>

View File

@ -12,14 +12,29 @@ class Nano_health_model extends CI_Model
{
public function createConfig($id_network){
$this->db->query("INSERT INTO nh_networks_configs (network_id) VALUES ($id_network)");
$this->db->insert('nh_networks_configs', ['network_id' => $id_network]);
return $this->db->insert_id();
}
public function getAllInsurances($id_network)
{
$query = $this->db->query("SELECT * FROM nh_insurances WHERE network_id = $id_network");
return $query->num_rows() > 0 ? $query : false ;
public function getConfig($id_network){
return $this->db->get_where('nh_networks_configs',['network_id'=> $id_network]);
}
public function updateConfig($configId, $data){
$this->db->where('id', $configId);
return $this->db->update('nh_networks_configs', $data);
}
public function getConfigYearsPricesGrid($configId){
return $this->db->get_where('nh_years_prices_grid',['nh_network_config_id'=> $configId]);
}
public function getConfigMonthsPricesGrid($configId){
return $this->db->get_where('nh_months_prices_grid',['nh_network_config_id'=> $configId]);
}
public function getConfigActs($configId){
return $this->db->get_where('nh_acts',['nh_network_config_id'=> $configId]);
}
// Nano sante

View File

@ -1876,11 +1876,7 @@ class User_model extends CI_Model
$query = $this->db->query("SELECT *
FROM infos_transaction
WHERE deleted = 1 AND `network_id`=".$id_network.$chain);
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function getTransactionsSup($debut , $fin , $codeMembre){
@ -2649,4 +2645,11 @@ class User_model extends CI_Model
$query = $this->db->query("SELECT * FROM agents WHERE id ='".$id_agent."'");
return $query->num_rows()>0 ? $query->first_row() : false;
}
function getEnumValues($table, $field)
{
$type = $this->db->query( "SHOW COLUMNS FROM {$table} WHERE Field = '{$field}'" )->row( 0 )->Type;
preg_match("/^enum\(\'(.*)\'\)$/", $type, $matches);
return explode("','", $matches[1]);
}
}

View File

@ -65,11 +65,7 @@ class Wallet_model extends CI_Model
$query = $this->db->query("SELECT *
FROM infos_transaction
WHERE `codeParrain`='".$codeMembre."'".$chain);
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function getInfosWalletAgentForHyper($id_network){
@ -111,11 +107,7 @@ class Wallet_model extends CI_Model
INNER JOIN towns ON towns.id=agents.town_id
".$where_clause;
//var_dump($statement);
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
/**
@ -192,11 +184,7 @@ class Wallet_model extends CI_Model
LEFT JOIN publiciteConfig ON countries.id=publiciteConfig.id_country AND publiciteConfig.id_config=2
WHERE towns.status=1
GROUP BY countries.id");
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
/**
@ -229,11 +217,7 @@ class Wallet_model extends CI_Model
WHERE child.category='geolocated' AND dad.category='super' AND dad.code_membre='".$codeSup."'
");
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function nameOfCurrentGeolocatedUser_forSuper($geolocatedUser_memberCode){
@ -251,21 +235,12 @@ class Wallet_model extends CI_Model
$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 , configWallet.type , configWallet.enabled 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;
}
return $query->num_rows() > 0 ? $query : 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;
}
$query = $this->db->get_where('configWallet' , ['id_network' => $id_network]);
return $query->num_rows() > 0 ? $query : false ;
}
public function verifyConfigWalletInCountry($type, $country_id){
@ -276,26 +251,38 @@ class Wallet_model extends CI_Model
}
public function addConfigWallet($network_id , $type){
$sql='SELECT * FROM `configWallet` WHERE id_network = ?' ;
$existQuery = $this->db->query($sql , array($network_id));
$this->db->trans_start();
$existQuery = $this->db->get_where('configWallet' , ['id_network' => $network_id]);
if($existQuery->num_rows() > 0){
$query = $this->db->query("UPDATE `configWallet` SET enabled = 1 AND type = $type WHERE id_network = '".$network_id."'");
$this->db->where('id_network', $network_id);
$this->db->update('configWallet', ['enabled' => 1 , 'type' => $type]);
$query = $nhConfigExist = $this->db->get_where('nh_networks_configs' , ['network_id' => $network_id]);
if($nhConfigExist->num_rows() == 0 && $type == 'ilink_sante'){
$this->createNanoHealthWalletConfig($network_id);
}
$this->db->trans_complete();
return $query;
}else{
$sql='INSERT INTO `configWallet` (`id_network`, `type`) VALUES (?,?);' ;
$query = $this->db->query($sql , array($network_id, $type));
$query = $this->db->insert('configWallet' , ['id_network' => $network_id, 'type' => $type]);
if($query && $type == 'ilink_sante'){
// Creer la config du nano santé
$configID = $this->nano_health_model->createConfig($network_id);
$query = $this->db->query("UPDATE `configWallet` SET nh_network_config_id = $configID WHERE id_network = '".$network_id."'");
$this->createNanoHealthWalletConfig($network_id);
}
$this->db->trans_complete();
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));
private function createNanoHealthWalletConfig($network_id){
// Creer la config du nano santé
$configID = $this->nano_health_model->createConfig($network_id);
$this->db->where('id_network', $network_id);
$this->db->update('configWallet', ['nh_network_config_id' => $configID]);
}
public function updateConfigWallet($config_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` = ?);';
$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 , $config_id));
return $query;
}
@ -310,70 +297,39 @@ class Wallet_model extends CI_Model
}
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;
}
$query = $this->db->get_where('wallet_agent' , ['agent_id' => $id_agent]);
return $query->num_rows() > 0 ? $query : false ;
}
public function addWallet($id_agent){
$sql = "SELECT * FROM `networks_agents` WHERE agent_id = ?";
$query = $this->db->query($sql , array($id_agent));
$query = $this->db->get_where('networks_agents' , ['agent_id' => $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));
$query = $this->db->insert('wallets' , ['id_networkAgent' => $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;
}
$query = $this->db->get_where('wallet_transaction' , ['id_wallet' => $id_wallet]);
return $query->num_rows() > 0 ? $query : false ;
}
public function getAgentiLinkTransactions($id_wallet){
$query = $this->db->query("SELECT *
FROM infos_ilink_transaction
WHERE `id_wallet_ag`= '".$id_wallet."'");
if($query->num_rows()>0){
return $query;
}else{
return false;
}
$query = $this->db->get_where('infos_ilink_transaction' , ['id_wallet_ag' => $id_wallet]);
return $query->num_rows() > 0 ? $query : 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;
}
$query = $this->db->get_where('hyper_infos' , ['network_id' => $id_network]);
return $query->num_rows() > 0 ? $query : 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;
}
$query = $this->db->get_where('hyper_infos' , ['network_id' => $id_network]);
return $query->num_rows() > 0 ? $query : false ;
}
public function reinitializeWallet($id_wallet){
@ -387,11 +343,7 @@ class Wallet_model extends CI_Model
$query = $this->db->query("SELECT n.id AS id_network , n.name AS network,n.status AS status,c.name AS country,c.currency_name_fr, c.currency_name_en , c.currency_code, wp.id AS wallet_password FROM networks n
INNER JOIN countries_currencies c ON n.country_id=c.id INNER JOIN configWallet cw ON cw.id_network = n.id
LEFT JOIN walletsPassword wp ON wp.network_id = n.id WHERE status = 1;");
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function addWalletPassword($network_id, $encrypted_password, $salt, $email)
@ -424,11 +376,7 @@ class Wallet_model extends CI_Model
$query = $this->db->query("SELECT *
FROM infos_recharges
WHERE `network_id`=".$id_network.$chain);
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function addWalletRecharge($montant,$wallet_id , $id_network){
@ -492,11 +440,7 @@ class Wallet_model extends CI_Model
{
$sql = "SELECT * FROM `paliersConfigWallet` WHERE (`id` = ?);";
$query = $this->db->query($sql, array($id));
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function deletePalierConfigWallet($type, $idConfig)
@ -565,11 +509,7 @@ class Wallet_model extends CI_Model
)
) AND code <> ? ;";
$query = $this->db->query($sql, array($code));
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
//Liste des monnaies pour les pays dont un wallet est actif
@ -580,11 +520,7 @@ class Wallet_model extends CI_Model
)
) AND code <> ? ;";
$query = $this->db->query($sql, array($code));
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function insertExchangeRate($currency ,$rate){
@ -596,11 +532,7 @@ class Wallet_model extends CI_Model
public function getExchangeRate($currency){
$sql = "SELECT * FROM `exchange_rate` WHERE `target_currency` = ?;";
$query = $this->db->query($sql , array($currency));
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function updateExchangeRate($currency,$rate){
@ -615,11 +547,7 @@ class Wallet_model extends CI_Model
SELECT distinct c.id FROM networks n INNER JOIN countries_currencies c ON n.country_id=c.id INNER JOIN configWallet cw ON cw.id_network = n.id WHERE status = 1
);";
$query = $this->db->query($sql);
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function getActiveCountries(){
@ -627,21 +555,13 @@ class Wallet_model extends CI_Model
SELECT distinct n.country_id FROM networks n WHERE n.status = 1
);";
$query = $this->db->query($sql);
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function getCountry($id){
$sql= "SELECT name FROM countries WHERE id = $id";
$query = $this->db->query($sql);
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function cancelCreditRequest($id_demand){
@ -684,11 +604,7 @@ class Wallet_model extends CI_Model
public function getSimulateur($code){
$sql = "SELECT * FROM `simulateur` WHERE `code` = ?;";
$query = $this->db->query($sql , array($code));
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function setSharingRate($network_id,$config_id,$rate, $url){
@ -707,21 +623,13 @@ class Wallet_model extends CI_Model
public function getSharingRate($id_network ,$idConfig){
$sql = "SELECT taux_partage , url FROM `paying_networks` WHERE `id_network` = ? AND id_configWallet = ? ;";
$query = $this->db->query($sql , array($id_network,$idConfig));
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function getSharingRateByNetwork($id_network){
$sql = "SELECT balance_com FROM `paying_networks` WHERE `id_network` = ? ;";
$query = $this->db->query($sql , array($id_network));
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function countPayingNetworks($id_country ,$idConfig){
@ -729,21 +637,13 @@ class Wallet_model extends CI_Model
networks n ON n.country_id = c.id WHERE n.status = 1 AND c.id = ?
) AND id_configWallet = ? ;";
$query = $this->db->query($sql , array($id_country, $idConfig));
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function getActiveNetworksByCountry($country_id , $network_id){
$query = $this->db->query("SELECT networks.name , networks.id , configWallet.type FROM `networks` INNER JOIN countries ON networks.country_id=countries.id
INNER JOIN configWallet ON configWallet.id_network = networks.id WHERE status = 1 AND networks.id <> $network_id AND countries.id = $country_id");
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function getPayingNetworksByConfigWallet($id_config)
@ -761,11 +661,7 @@ class Wallet_model extends CI_Model
$query = $this->db->query("SELECT *
FROM infos_ilink_transaction
WHERE `network_emetteur`= '".$id_network."'");
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function getCurrency($id_network){
@ -783,11 +679,7 @@ class Wallet_model extends CI_Model
$query = $this->db->query("SELECT *
FROM infos_transferts_commission
WHERE `codeParrain`='".$codeMembre."'".$chain);
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function getCommissionTransfersByNetwork($debut , $fin , $id_network){
@ -795,11 +687,7 @@ class Wallet_model extends CI_Model
$query = $this->db->query("SELECT *
FROM infos_transferts_commission
WHERE `network_id`='".$id_network."'".$chain);
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function getIlinkTransactionsSup($debut , $fin , $codeMembre){
@ -807,11 +695,7 @@ class Wallet_model extends CI_Model
$query = $this->db->query("SELECT *
FROM infos_ilink_transaction
WHERE `code_parrain`='".$codeMembre."'".$chain);
if($query->num_rows()>0){
return $query;
}else{
return false;
}
return $query->num_rows() > 0 ? $query : false ;
}
public function getInfosWalletAgentForSuper($codeMembre)

View File

@ -1,56 +1,9 @@
<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>
<?php
include 'ChromePhp.php';
ChromePhp::log('hello world');
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;
}
//include 'ChromePhp.php';
$month = time();
$months[]=convertDate(date("M"));

View File

@ -1,12 +1,7 @@
<!-- jvectormap -->
<link rel="stylesheet" href="<?php echo base_url('bower_components/jvectormap/jquery-jvectormap.css') ?>">
<!-- Date Picker -->
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>">
<!-- Daterange picker -->
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<!-- bootstrap wysihtml5 - text editor -->
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<!-- ChartJS -->
<script src="<?php echo base_url('bower_components/Chart.js/Chart.js') ?>"></script>
<?php

View File

@ -1,8 +1,6 @@
<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') ?>">
@ -184,7 +182,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="updateWallet" data-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>"
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
class="btn btn-primary"><?php echo $this->lang->line('save'); ?></button>
</div>
</div>
</div>

View File

@ -1,8 +1,6 @@
<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') ?>">
@ -146,7 +144,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="updateWallet" data-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>"
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
class="btn btn-primary"><?php echo $this->lang->line('save'); ?></button>
</div>
</div>
</div>

View File

@ -1,8 +1,6 @@
<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') ?>">
@ -694,7 +692,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="updateWallet" data-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>"
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
class="btn btn-primary"><?php echo $this->lang->line('save'); ?></button>
</div>
</div>
</div>

View File

@ -1,8 +1,6 @@
<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') ?>">
@ -185,7 +183,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="updateWallet" data-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>"
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
class="btn btn-primary"><?php echo $this->lang->line('save'); ?></button>
</div>
</div>
</div>

View File

@ -1,8 +1,6 @@
<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') ?>">
@ -10,106 +8,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<style type="text/css">
.table-wrapper {
width: 700px;
margin: 30px auto;
background: #fff;
padding: 20px;
box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}
.table-title {
padding-bottom: 10px;
margin: 0 0 10px;
}
.table-title h2 {
margin: 6px 0 0;
font-size: 22px;
}
.table-title .add-new {
float: right;
height: 30px;
font-weight: bold;
font-size: 12px;
text-shadow: none;
min-width: 100px;
border-radius: 50px;
line-height: 13px;
}
.table-title .add-new i {
margin-right: 4px;
}
table.table {
table-layout: fixed;
}
table.table tr th, table.table tr td {
border-color: #e9e9e9;
}
table.table th i {
font-size: 13px;
margin: 0 5px;
cursor: pointer;
}
table.table th:last-child {
width: 100px;
}
table.table td a {
cursor: pointer;
display: inline-block;
margin: 0 5px;
min-width: 24px;
}
table.table td a.add {
color: #27C46B;
}
table.table td a.edit {
color: #FFC107;
}
table.table td a.delete {
color: #E34724;
}
table.table td i {
font-size: 19px;
}
table.table td a.add i {
font-size: 24px;
margin-right: -1px;
position: relative;
top: 3px;
}
table.table .form-control {
height: 32px;
line-height: 32px;
box-shadow: none;
border-radius: 2px;
}
/*table.table .form-control.error {*/
/* border-color: #f50000;*/
/*}*/
.error {
border-color: #f50000;
}
table.table td .add {
display: none;
}
</style>
<link rel="stylesheet" href="<?= base_url('dist/css/custom/levels-table.css') ?>">
<?php
use Brick\Money\Context\CustomContext;
@ -260,7 +159,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<button type="button" class="btn btn-default pull-left"
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="saveTaxes" data-network-id="<?= $network_id ?>" data-id-config="<?= $idConfig ?>"
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
class="btn btn-primary"><?php echo $this->lang->line('save'); ?></button>
</div>
</div>
</div>

View File

@ -1,8 +1,6 @@
<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') ?>">
@ -166,7 +164,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="updateWallet" data-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>"
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
class="btn btn-primary"><?php echo $this->lang->line('save'); ?></button>
</div>
</div>
</div>

View File

@ -1,8 +1,6 @@
<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') ?>">
@ -150,7 +148,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="updateWallet" data-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>"
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
class="btn btn-primary"><?php echo $this->lang->line('save'); ?></button>
</div>
</div>
</div>

View File

@ -1,8 +1,6 @@
<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') ?>">
@ -344,7 +342,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="updateWallet" data-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>"
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
class="btn btn-primary"><?php echo $this->lang->line('save'); ?></button>
</div>
</div>
</div>

View File

@ -1,8 +1,6 @@
<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') ?>">
@ -342,7 +340,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="updateWallet" data-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>"
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
class="btn btn-primary"><?php echo $this->lang->line('save'); ?></button>
</div>
</div>
</div>

View File

@ -1,8 +1,6 @@
<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/toastr/toastr.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
<style type="text/css">

View File

@ -1,5 +1,3 @@
<link rel="stylesheet" href="<?php echo base_url('bower_components/jvectormap/jquery-jvectormap.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/toastr/toastr.css') ?>">
<!-- Date Picker -->
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>">

View File

@ -1,56 +1,10 @@
<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') ?>">
<?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");

View File

@ -1,8 +1,6 @@
<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') ?>">
@ -12,50 +10,6 @@
use Brick\Money\Context\CustomContext;
use Brick\Money\Money;
$context = new \Brick\Money\Context\AutoContext();
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");
@ -144,6 +98,7 @@ $fmt = new NumberFormatter( 'fr_FR', NumberFormatter::DECIMAL );
<h1>
<?php echo $this->lang->line('Gestion des wallets'). ' '. $network .' - '.$country; ?>
<span class="label label-success pull-right"><?= strtoupper(str_replace('_',' ',$type)) ?></span>
</h1>
<?php
$site_url = base_url();

View File

@ -1,58 +1,12 @@
<link rel="stylesheet" href="<?php use Brick\Money\Context\AutoContext;
use Brick\Money\Money;
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') ?>">
<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;
}
use Brick\Money\Context\AutoContext;
use Brick\Money\Money;
$month = time();
$months[]=convertDate(date("M"));
$label_months [] = date("M")." ".date("Y");
@ -520,7 +474,7 @@ echo base_url('bower_components/jvectormap/jquery-jvectormap.css') ?>">
<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 ?>"
<button type="button" id="updateWallet" data-config-id="<?= $idConfig ?>"
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
</div>
</div>
@ -686,7 +640,7 @@ echo base_url('bower_components/jvectormap/jquery-jvectormap.css') ?>">
$('#updateWallet').click(function () {
var network_id = $(this).data('network-id');
var id_config = $(this).data('config-id');
if ($('#walletForm')[0].checkValidity()) {
var taux_client_r = parseFloat($('#taux_client_r').val());
@ -716,7 +670,7 @@ echo base_url('bower_components/jvectormap/jquery-jvectormap.css') ?>">
type: 'POST',
dataType: 'json',
data: {
"network_id": network_id,
"id_config": id_config,
"taux_client_r": taux_client_r,
"taux_client_d": taux_client_d,
"taux_ag_r": taux_ag_r,

View File

@ -1,8 +1,6 @@
<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') ?>">
@ -11,50 +9,6 @@
use Brick\Money\Context\CustomContext;
use Brick\Money\Money;
$context = new \Brick\Money\Context\AutoContext();
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");
@ -142,6 +96,7 @@ $fmt = new NumberFormatter( 'fr_FR', NumberFormatter::DECIMAL );
<h1>
<?php echo $this->lang->line('Gestion des wallets'). ' '. $network .' - '.$country; ?>
<span class="label label-success pull-right"><?= strtoupper(str_replace('_',' ',$type)) ?></span>
</h1>
<?php
$site_url = base_url();

View File

@ -1,7 +1,5 @@
<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') ?>">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Varela+Round|Open+Sans">
@ -96,49 +94,6 @@
use Brick\Money\Money;
$context = new \Brick\Money\Context\AutoContext();
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");

View File

@ -1,54 +1,9 @@
<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");

View File

@ -1,7 +1,5 @@
<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') ?>">
@ -9,49 +7,6 @@
use Brick\Money\Context\CustomContext;
use Brick\Money\Money;
$context = new \Brick\Money\Context\AutoContext();
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");

View File

@ -1,60 +1,12 @@
<!-- jvectormap -->
<link rel="stylesheet" href="<?php echo base_url('bower_components/jvectormap/jquery-jvectormap.css') ?>">
<!-- Date Picker -->
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>">
<!-- Daterange picker -->
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<!-- bootstrap wysihtml5 - text editor -->
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<!-- ChartJS -->
<script src="<?php echo base_url('bower_components/Chart.js/Chart.js') ?>"></script>
<?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");

View File

@ -1,8 +1,6 @@
<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') ?>">
@ -341,7 +339,7 @@ $context = new \Brick\Money\Context\AutoContext();
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="saveRates" data-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>"
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
class="btn btn-primary"><?php echo $this->lang->line('save'); ?></button>
</div>
</div>
</div>
@ -407,7 +405,7 @@ $context = new \Brick\Money\Context\AutoContext();
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="saveTaxes" data-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>"
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
class="btn btn-primary"><?php echo $this->lang->line('save'); ?></button>
</div>
</div>
</div>
@ -450,7 +448,7 @@ $context = new \Brick\Money\Context\AutoContext();
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="updateWallet" data-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>"
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
class="btn btn-primary"><?php echo $this->lang->line('save'); ?></button>
</div>
</div>
</div>

View File

@ -1,8 +1,6 @@
<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') ?>">
@ -293,7 +291,7 @@ $context = new \Brick\Money\Context\AutoContext();
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="saveRates" data-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>"
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
class="btn btn-primary"><?php echo $this->lang->line('save'); ?></button>
</div>
</div>
</div>
@ -359,7 +357,7 @@ $context = new \Brick\Money\Context\AutoContext();
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="saveTaxes" data-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>"
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
class="btn btn-primary"><?php echo $this->lang->line('save'); ?></button>
</div>
</div>
</div>

View File

@ -1,8 +1,6 @@
<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') ?>">

View File

@ -1,8 +1,6 @@
<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') ?>">
@ -217,7 +215,7 @@ $context = new \Brick\Money\Context\AutoContext();
<button type="button" class="btn btn-default pull-left"
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="saveLimit" data-network-id="<?= $network_id ?>"
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
class="btn btn-primary"><?php echo $this->lang->line('save'); ?></button>
</div>
</div>
</div>

View File

@ -0,0 +1,424 @@
<link rel="stylesheet" href="<?= base_url('bower_components/jvectormap/jquery-jvectormap.css') ?>">
<link rel="stylesheet"
href="<?= base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>">
<link rel="stylesheet" href="<?= base_url('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?= base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet"
href="<?= base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
<link rel="stylesheet" href="<?= base_url('dist/css/custom/levels-table.css') ?>">
<?php
use Brick\Money\Money;
$context = new \Brick\Money\Context\AutoContext();
$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>
<?= $this->lang->line('Gestion des wallets'). ' '. $network .' - '.$country; ?>
<span class="label label-success pull-right"><?= strtoupper(str_replace('_',' ',$type)) ?></span>
</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>
<?= $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">&times;</button>
<h4><i class="icon fa fa-check"></i> Success!</h4>
<?= $message; ?>
</div>
<?php
}
}
?>
</section>
<section class="content">
<div class="row centered">
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-red-active">
<div class="inner">
<h3><?= $this->lang->line($nh_config->provider_billing_period ?? ''); ?></h3>
<p><?= $this->lang->line('provider_billing_period') ?></p>
</div>
<div class="icon">
<i class="ion ion-ios-timer"></i>
</div>
</div>
</div>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-aqua-active">
<div class="inner">
<h3><?= $nh_config->max_number_of_beneficiaries ?? ''; ?></h3>
<p><?= $this->lang->line('max_number_of_beneficiaries') ?> </p>
</div>
<div class="icon">
<i class="fa fa-sort-numeric-desc"></i>
</div>
</div>
</div>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-aqua-active">
<div class="inner">
<h3><?= $nh_config->age_limit_of_child_beneficiary ?? ''; ?></h3>
<p><?= $this->lang->line('age_limit_of_child_beneficiary') ?> </p>
</div>
<div class="icon">
<i class="ion ion-android-calendar"></i>
</div>
</div>
</div>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-orange">
<div class="inner">
<h3><?= Money::of(round($nh_config->coverage_limit_per_insured_per_year ?? 0, 2), $currency->code, $context)->formatTo('fr_FR'); ?></h3>
<p><?= $this->lang->line('coverage_limit_per_insured_per_year') ?> </p>
</div>
<div class="icon">
<i class="ion ion-cash"></i>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-2 col-xs-6">
<div class="small-box bg-green-active">
<div class="inner">
<h3><?= $nh_config->current_affection_percentage_insurer ?? ''; ?><sup style="font-size: 20px">%</sup></h3>
<p><?= $this->lang->line('current_affection').' : '.$this->lang->line('percentage_insurer') ?></p>
</div>
<div class="icon">
<i class="ion ion-pie-graph"></i>
</div>
</div>
</div>
<div class="col-lg-2 col-xs-6">
<div class="small-box bg-green-active">
<div class="inner">
<h3><?= $nh_config->current_affection_percentage_insured ?? ''; ?><sup style="font-size: 20px">%</sup></h3>
<p><?= $this->lang->line('current_affection').' : '.$this->lang->line('percentage_insured') ?></p>
</div>
<div class="icon">
<i class="ion ion-pie-graph"></i>
</div>
</div>
</div>
<div class="col-lg-2 col-xs-6">
<div class="small-box bg-light-blue-active">
<div class="inner">
<h3><?= $nh_config->long_term_affection_percentage_insurer ?? ''; ?><sup style="font-size: 20px">%</sup></h3>
<p><?= $this->lang->line('long_term_affection').' : '.$this->lang->line('percentage_insurer') ?></p>
</div>
<div class="icon">
<i class="ion ion-pie-graph"></i>
</div>
</div>
</div>
<div class="col-lg-2 col-xs-6">
<div class="small-box bg-light-blue-active">
<div class="inner">
<h3><?= $nh_config->long_term_affection_percentage_insured ?? ''; ?><sup style="font-size: 20px">%</sup></h3>
<p><?= $this->lang->line('long_term_affection').' : '.$this->lang->line('percentage_insured') ?></p>
</div>
<div class="icon">
<i class="ion ion-pie-graph"></i>
</div>
</div>
</div>
<div class="col-lg-2 col-xs-6">
<div class="small-box bg-aqua">
<div class="inner">
<h3><?= $nh_config->exoneration_percentage_insurer ?? ''; ?><sup style="font-size: 20px">%</sup></h3>
<p><?= $this->lang->line('exoneration').' : '.$this->lang->line('percentage_insurer') ?></p>
</div>
<div class="icon">
<i class="ion ion-pie-graph"></i>
</div>
</div>
</div>
<div class="col-lg-2 col-xs-6">
<div class="small-box bg-aqua">
<div class="inner">
<h3><?= $nh_config->exoneration_percentage_insured ?? ''; ?><sup style="font-size: 20px">%</sup></h3>
<p><?= $this->lang->line('exoneration').' : '.$this->lang->line('percentage_insured') ?></p>
</div>
<div class="icon">
<i class="ion ion-pie-graph"></i>
</div>
</div>
</div>
</div>
<div class="row centered">
<div class="col-lg-6 col-xs-12">
<div class="box">
<div class="box-header">
<h3 class="box-title"><?= $this->lang->line('years_price_grid') ?></h3>
</div>
<div class="box-body" style="overflow-x:auto;">
<table class="table table-bordered" >
<thead>
<tr>
<th width="20"><?= $this->lang->line('min_age')?></th>
<th width="20"><?= $this->lang->line('max_age') ?> </th>
<th><?= $this->lang->line('markup_percentage') ; ?></th>
</tr>
</thead>
<tbody>
<?php
if(isset($years_prices_grid)){
foreach($years_prices_grid->result() as $i => $row) { ?>
<tr>
<td><?= $row->min_age ?></td>
<td><?= $row->max_age ?></td>
<td><?= $row->markup_percentage.'%' ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-lg-6 col-xs-12">
<div class="box">
<div class="box-header">
<h3 class="box-title"><?= $this->lang->line('months_price_grid') ?></h3>
</div>
<div class="box-body" style="overflow-x:auto;">
<table class="table table-bordered" >
<thead>
<tr>
<th width="50"><?= $this->lang->line('number_of_months') ?> </th>
<th><?= $this->lang->line('min_amount') ?> </th>
</tr>
</thead>
<tbody>
<?php
if(isset($months_prices_grid)){
foreach($months_prices_grid->result() as $i => $row) { ?>
<tr>
<td><?= $row->number_of_months ?></td>
<td><?= Money::of(round($row->min_amount, 2), $currency->code, $context)->formatTo('fr_FR'); ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</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">
<?= $this->lang->line('subscriptions_of_the_last_12_months'); ?></h3>
<div class="box-tools">
<a class="btn btn-primary" href="<?= current_url().($network_id ? '?id='.$network_id . '&history=subscriptions' : '')?>">
<?= $this->lang->line('subscriptions_historic'); ?>
</a>
</div>
</div>
<div class="box-body">
<div class="chart" id="chart">
<canvas id="barChart" style="height:230px"></canvas>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-8">
<div class="box">
<div class="box-header">
<h3 class="box-title"><?= $this->lang->line('list_of_acts') ?></h3>
<div class="box-tools">
</div>
</div>
<div class="box-body" style="overflow-x:auto;">
<table id="example1" class="table table-bordered table-hover">
<thead>
<tr>
<?php
echo "<th>".$this->lang->line('Nom')."</th>
<th>".$this->lang->line('billing_type')."</th>
<th>".$this->lang->line('authorization_type')."</th>";
?>
</tr>
</thead>
<tbody>
<?php
if(isset($acts)){
foreach($acts->result() as $i => $row) { ?>
<tr>
<td><?= $row->name ?></td>
<td><?= $this->lang->line($row->billing_type); ?></td>
<td><?= $this->lang->line($row->authorization_type); ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
<!-- jQuery 3 -->
<script src="<?= base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script>
<!-- Bootstrap 3.3.7 -->
<script src="<?= base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
<!-- DataTables -->
<script src="<?= base_url('bower_components/datatables.net/js/jquery.dataTables.min.js') ?>"></script>
<script src="<?= base_url('bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js') ?>"></script>
<!-- Slimscroll -->
<script src="<?= base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script>
<!-- FastClick -->
<script src="<?= base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
<!-- AdminLTE App -->
<script src="<?= base_url('dist/js/adminlte.min.js') ?>"></script>
<!-- AdminLTE for demo purposes -->
<script src="<?= base_url('dist/js/demo.js') ?>"></script>
<script src="<?= base_url('bower_components/moment/min/moment.min.js') ?>"></script>
<script src="<?= base_url('bower_components/bootstrap-daterangepicker/daterangepicker.js') ?>"></script>
<script
src="<?= base_url('bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js') ?>"></script>
<scriptf
src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></scriptf>
<!-- ChartJS -->
<script src="<?= 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>
<!-- Page script -->
<script src="<?= base_url('dist/js/custom.js') ?>"></script>

View File

@ -1,456 +0,0 @@
<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') ?>">
<?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>
<?php echo $this->lang->line('Gestion des wallets'). ' '. $network .' - '.$country; ?>
</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">&times;</button>
<h4><i class="icon fa fa-check"></i> Success!</h4>
<?php echo $message; ?>
</div>
<?php
}
}
?>
</section>
<section class="content">
<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">
<?php echo $this->lang->line('Historique des 12 derniers mois'); ?></h3>
<div class="box-tools">
<a class="btn btn-primary" href="<?php echo current_url().($network_id ? '?id='.$network_id . '&history=transaction' : '')?>">
<?php echo $this->lang->line('transactions_historic'); ?>
</a>
<a class="btn btn-info" href="<?php echo current_url().($network_id ? '?id='.$network_id . '&history=recharge' : '')?>">
<?php echo $this->lang->line('recharge_historic'); ?>
</a>
</div>
</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">
<?php echo $this->lang->line("Parts dépots & retraits"); ?></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('Commission Hyperviseur') ?></h3>
</div>
<div class="box-body" style="overflow-x:auto;">
<table id="example1" class="table table-bordered table-hover">
<thead>
<tr>
<?php
echo "<th>".$this->lang->line('Nom')."</th>
<th>".$this->lang->line('Solde Principal')."</th>
<th>".$this->lang->line('Solde Commission')."</th>
<th>".$this->lang->line('Commission banque')."</th>
<th>".$this->lang->line('DEPOT'). 's'."</th>
<th>".$this->lang->line('RETRAIT').'s'."</th>";
?>
</tr>
</thead>
<tbody>
<?php
if ($walletHyper) {
$fmt = new NumberFormatter( 'fr_FR', NumberFormatter::DECIMAL );
echo "<tr>
<td>" . $walletHyper->first_row()->lastname . "</td>
<td>" . $fmt->format($walletHyper->first_row()->balance_princ) . "</td>
<td>" . $fmt->format($walletHyper->first_row()->balance_com) . "</td>
<td>" . $fmt->format($totalCommissionBanque) . "</td>";
echo "<td>" . $depots->num_rows() . "</td>
<td>" . $retraits->num_rows() . "</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('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>
$(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>
<!-- Page script -->
<script src="<?php echo base_url('dist/js/custom.js') ?>"></script>

File diff suppressed because it is too large Load Diff

View File

@ -1,60 +1,11 @@
<!-- jvectormap -->
<link rel="stylesheet" href="<?php echo base_url('bower_components/jvectormap/jquery-jvectormap.css') ?>">
<!-- Date Picker -->
<!-- Date Picker -->
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>">
<!-- Daterange picker -->
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<!-- bootstrap wysihtml5 - text editor -->
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<!-- ChartJS -->
<script src="<?php echo base_url('bower_components/Chart.js/Chart.js') ?>"></script>
<?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");

98
dist/css/custom/levels-table.css vendored Normal file
View File

@ -0,0 +1,98 @@
.table-wrapper {
width: 700px;
margin: 30px auto;
background: #fff;
/*padding: 20px;*/
box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}
.table-title {
padding-bottom: 10px;
margin: 0 0 10px;
}
.table-title h2 {
margin: 6px 0 0;
font-size: 22px;
}
.table-title .add-new {
float: right;
height: 30px;
font-weight: bold;
font-size: 12px;
text-shadow: none;
min-width: 100px;
border-radius: 50px;
line-height: 13px;
}
.table-title .add-new i {
margin-right: 4px;
}
table.table {
table-layout: fixed;
}
table.table tr th, table.table tr td {
border-color: #e9e9e9;
}
table.table th i {
font-size: 13px;
margin: 0 5px;
cursor: pointer;
}
table.table th:last-child {
width: 100px;
}
table.table td a {
cursor: pointer;
display: inline-block;
margin: 0 5px;
min-width: 24px;
}
table.table td a.add {
color: #27C46B;
}
table.table td a.edit {
color: #FFC107;
}
table.table td a.delete {
color: #E34724;
}
table.table td i {
font-size: 19px;
}
table.table td a.add i {
font-size: 24px;
margin-right: -1px;
position: relative;
top: 3px;
}
table.table .form-control {
height: 32px;
line-height: 32px;
box-shadow: none;
border-radius: 2px;
}
/*table.table .form-control.error {*/
/* border-color: #f50000;*/
/*}*/
.error {
border-color: #f50000;
}
table.table td .add {
display: none;
}