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) { if ($taux != null) {
$taux = $taux->first_row(); $taux = $taux->first_row();
$data['idConfig'] = $taux->id; $data['idConfig'] = $taux->id;
$data['type'] = $taux->type;
if ($taux->type == 'visa'){ if ($taux->type == 'visa'){
$data['taux_client_r'] = $taux->taux_com_client_retrait; $data['taux_client_r'] = $taux->taux_com_client_retrait;
$data['taux_client_d'] = $taux->taux_com_client_depot; $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); $res = $this->wallet_model->getSharingRateByNetwork($network_id);
$data['commission'] = $res ? $res->first_row()->balance_com : 0 ; $data['commission'] = $res ? $res->first_row()->balance_com : 0 ;
}elseif($taux->type == 'ilink_sante'){ }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'); $this->load->view('gestion_wallet');
elseif ($taux->type == 'ilink') elseif ($taux->type == 'ilink')
$this->load->view('gestion_wallet_ilink'); $this->load->view('gestion_wallet_ilink');
// elseif ($taux->type == 'ilink_sante') elseif ($taux->type == 'ilink_sante')
// $this->load->view('nano_health/admin/gestion_wallet_ilink_sante'); $this->load->view('nano_health/admin/gestion_wallet');
elseif ($taux->type == 'autre') elseif ($taux->type == 'autre')
$this->load->view('gestion_wallet_autre'); $this->load->view('gestion_wallet_autre');
$this->load->view('footer'); $this->load->view('footer');
@ -1666,11 +1672,12 @@ class Gestion extends CI_Controller
{ {
if($this->isLogged()){ if($this->isLogged()){
if (isset($_POST)) { if (isset($_POST)) {
$country_id = $_POST['country_id'];
$network_id = $_POST['network_id'];
$type = $_POST['type']; $type = $_POST['type'];
$res = false; $res = false;
if($method == 'create') { if($method == 'create') {
$country_id = $_POST['country_id'];
$network_id = $_POST['network_id'];
if($type == 'ilink'){ if($type == 'ilink'){
$exist = $this->wallet_model->verifyConfigWalletInCountry($type,$country_id); $exist = $this->wallet_model->verifyConfigWalletInCountry($type,$country_id);
if($exist){ if($exist){
@ -1682,6 +1689,8 @@ class Gestion extends CI_Controller
} else if($method == 'update'){ } else if($method == 'update'){
$idConfig = $_POST['id_config'];
if($type == 'visa'){ if($type == 'visa'){
$taux_client_r = $_POST['taux_client_r']; $taux_client_r = $_POST['taux_client_r'];
$taux_client_d = $_POST['taux_client_d']; $taux_client_d = $_POST['taux_client_d'];
@ -1693,10 +1702,10 @@ class Gestion extends CI_Controller
$taux_bq_r = $_POST['taux_bq_r']; $taux_bq_r = $_POST['taux_bq_r'];
$frais_d = $_POST['frais_d']; $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'){ }else if ($type == 'ilink'){
$idConfig = $_POST['id_config'];
$config = $_POST['config']; $config = $_POST['config'];
$fields = isset($_POST['fields']) ? $_POST['fields'] : []; $fields = isset($_POST['fields']) ? $_POST['fields'] : [];
@ -1767,6 +1776,10 @@ class Gestion extends CI_Controller
break; break;
} }
$res = true;
}else if($type == 'ilink_sante'){
unset($_POST['id_config'],$_POST['type']);
$this->nano_health_model->updateConfig($idConfig,$_POST);
$res = true; $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() 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'); $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 //Create wallet if it not exist
@ -501,6 +511,8 @@ class Hyperviseur_dash extends CI_Controller
$this->load->view('gestion_wallet_hyp'); $this->load->view('gestion_wallet_hyp');
elseif ($data['hasWallet']->first_row()->type == 'ilink') elseif ($data['hasWallet']->first_row()->type == 'ilink')
$this->load->view('gestion_wallet_ilink_hyp'); $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'); $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()) 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['edit_nano_health'] = 'nano health configuration';
$lang['insurances_list'] = 'Insurance list'; $lang['insurances_list'] = 'Insurance list';
$lang['add_insurance'] = 'Add an insurance'; $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['edit_nano_health'] = 'Configuration du nano santé';
$lang['insurances_list'] = 'Liste des assurances'; $lang['insurances_list'] = 'Liste des assurances';
$lang['add_insurance'] = "Ajouter une assurance"; $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){ 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(); return $this->db->insert_id();
} }
public function getAllInsurances($id_network) public function getConfig($id_network){
{ return $this->db->get_where('nh_networks_configs',['network_id'=> $id_network]);
$query = $this->db->query("SELECT * FROM nh_insurances WHERE network_id = $id_network"); }
return $query->num_rows() > 0 ? $query : false ;
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 // Nano sante

View File

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

View File

@ -1,509 +1,462 @@
<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-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('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>"> <script src="<?php echo base_url('bower_components/chart.js/Chart.js') ?>"></script>
<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';
<?php
include 'ChromePhp.php'; $month = time();
ChromePhp::log('hello world'); $months[]=convertDate(date("M"));
$label_months [] = date("M")." ".date("Y");
$years[]= date("Y");
function convertDate($date){ for ($i = 1; $i <= 11; $i++) {
$month = null; $month = strtotime('last month', $month);
switch ($date) { $months [] = convertDate(date("M", $month));
case "Jan": $years[] = date("Y", $month);
$month = 1; $label_months [] = date("M", $month)." ".date("Y", $month);
break; }
case "Feb": /**
$month = 2; ** Simple User Treatment
break; **/
case "Mar":
$month = 3; $date = date("Y");
break;
case "Apr": $users_simple_data[] = '';
$month = 4; $users_simple_data =array();
break; for ($i = 1; $i <= 12; $i++) {
case "May": $users_simple_query_mounth = $this->db->query("SELECT user_id FROM user_infos
$month = 5; WHERE country_id='".$this->session->userdata('current_pays')."' AND MONTH(date_created) = '".$months[$i-1]."' AND YEAR(date_created) = '".$years[$i-1]."' AND network_id IN (SELECT network_id
break; FROM hyper_infos
case "Jun": WHERE country_id ='".$this->session->userdata('current_pays')."'
$month = 6; AND code_membre ='".$this->session->userdata('current_hyper')."'
break; GROUP BY network_id)");
case "Jul": $users_simple_data[] = $users_simple_query_mounth->num_rows();
$month = 7; }
break;
case "Aug":
$month = 8; $users_simple_query = $list_simple_users;
break;
case "Sep": if($users_simple_query!=false){
$month = 9; $users_simple=$users_simple_query->num_rows();
break; // Count networks for simple users
case "Oct": $array_simple = array();
$month = 10; $num = 0;
break; if ($users_simple > 0) {
case "Nov": foreach($users_simple_query->result() as $row) {
$month = 11; $num++;
break; $array_simple[] = $row->network;
case "Dec": }
$month = 12;
break; $vals_simple = array_count_values($array_simple);
} //echo 'No. of NON Duplicate Items: '.count($vals_simple).'<br><br>';
return $month; //print_r($vals_simple);
} $pieChart2 = array();
foreach(array_keys($vals_simple) as $paramName2) {
$month = time(); $color2 = dechex(rand(0x000000, 0xFFFFFF));
$months[]=convertDate(date("M")); $trash2 = array("value" => $vals_simple[$paramName2],
$label_months [] = date("M")." ".date("Y"); "color" => "#".$color2,
$years[]= date("Y"); "highlight" => "#".$color2,
for ($i = 1; $i <= 11; $i++) { "label" => $paramName2);
$month = strtotime('last month', $month);
$months [] = convertDate(date("M", $month)); $pieChart2[]= $trash2;
$years[] = date("Y", $month);
$label_months [] = date("M", $month)." ".date("Y", $month); }
} }
/** }else{
** Simple User Treatment $pieChart2 = array();
**/ }
$date = date("Y"); /**
** Geolocated User Treatment
$users_simple_data[] = ''; **/
$users_simple_data =array(); $users_geolocated_query = $list_geolocated_users;
for ($i = 1; $i <= 12; $i++) {
$users_simple_query_mounth = $this->db->query("SELECT user_id FROM user_infos // Geolocated Users by month replace 2016 by NOW()
WHERE country_id='".$this->session->userdata('current_pays')."' AND MONTH(date_created) = '".$months[$i-1]."' AND YEAR(date_created) = '".$years[$i-1]."' AND network_id IN (SELECT network_id $users_geolocated_data[] = '';
FROM hyper_infos $users_geolocated_data =array();
WHERE country_id ='".$this->session->userdata('current_pays')."' for ($i = 1; $i <= 12; $i++) {
AND code_membre ='".$this->session->userdata('current_hyper')."' $users_geolocated_query_january = $this->db->query("SELECT agent_id FROM super_infos
GROUP BY network_id)"); WHERE category='geolocated' AND MONTH(date_created) = '".$months[$i-1]."' AND YEAR(date_created) = ".$years[$i-1]."
$users_simple_data[] = $users_simple_query_mounth->num_rows(); AND code_parrain IN (SELECT code_membre FROM super_infos WHERE category='super' AND code_parrain='".$this->session->userdata('current_hyper')."')");
} $users_geolocated_data[] = $users_geolocated_query_january->num_rows();
}
$users_simple_query = $list_simple_users; if($users_geolocated_query!=false){
$users_geolocated=$users_geolocated_query->num_rows();
if($users_simple_query!=false){ //$users_geolocated_query = json_encode($users_geolocated_query->result());
$users_simple=$users_simple_query->num_rows(); // Counts network for geolocated users
// Count networks for simple users $array_geolocated = array();
$array_simple = array(); $num = 0;
$num = 0; if ($users_geolocated > 0) {
if ($users_simple > 0) { foreach($users_geolocated_query->result() as $row) {
foreach($users_simple_query->result() as $row) { $num++;
$num++; $array_geolocated[] = $row->network;
$array_simple[] = $row->network; }
} $vals_geolocated = array_count_values($array_geolocated);
//echo 'No. of NON Duplicate Items: '.count($vals_geolocated).'<br><br>';
$vals_simple = array_count_values($array_simple); //print_r($vals_geolocated);
//echo 'No. of NON Duplicate Items: '.count($vals_simple).'<br><br>'; $pieChart = array();
//print_r($vals_simple); foreach(array_keys($vals_geolocated) as $paramName) {
$pieChart2 = array(); $color = dechex(rand(0x000000, 0xFFFFFF));
foreach(array_keys($vals_simple) as $paramName2) { $trash = array("value" => $vals_geolocated[$paramName],
$color2 = dechex(rand(0x000000, 0xFFFFFF)); "color" => "#".$color,
$trash2 = array("value" => $vals_simple[$paramName2], "highlight" => "#".$color,
"color" => "#".$color2, "label" => $paramName);
"highlight" => "#".$color2,
"label" => $paramName2); $pieChart[]= $trash;
}
$pieChart2[]= $trash2; }
}else{
} $pieChart = array();
} }
}else{ ?>
$pieChart2 = array();
} <div class="content-wrapper">
/** <!-- Content Header (Page header) -->
** Geolocated User Treatment <section class="content-header">
**/ <h1>
$users_geolocated_query = $list_geolocated_users; <?php echo $this->lang->line('administrateur'); ?>
<small><?php echo $this->lang->line('Tableau de bord'); ?></small>
// Geolocated Users by month replace 2016 by NOW() </h1>
$users_geolocated_data[] = ''; </section>
$users_geolocated_data =array();
for ($i = 1; $i <= 12; $i++) { <section class="content">
$users_geolocated_query_january = $this->db->query("SELECT agent_id FROM super_infos <!-- Small boxes (Stat box) -->
WHERE category='geolocated' AND MONTH(date_created) = '".$months[$i-1]."' AND YEAR(date_created) = ".$years[$i-1]." <div class="row">
AND code_parrain IN (SELECT code_membre FROM super_infos WHERE category='super' AND code_parrain='".$this->session->userdata('current_hyper')."')"); <div class="col-lg-3 col-xs-6">
$users_geolocated_data[] = $users_geolocated_query_january->num_rows(); <!-- small box -->
}
<div class="small-box bg-aqua">
if($users_geolocated_query!=false){ <div class="inner">
$users_geolocated=$users_geolocated_query->num_rows(); <h3><?php echo $c_users;?></h3>
//$users_geolocated_query = json_encode($users_geolocated_query->result());
// Counts network for geolocated users <p><?php echo $this->lang->line('Utilisateurs simples'); ?></p>
$array_geolocated = array(); </div>
$num = 0; <div class="icon">
if ($users_geolocated > 0) { <i class="ion ion-person-add"></i>
foreach($users_geolocated_query->result() as $row) { </div>
$num++;
$array_geolocated[] = $row->network; </div>
} </div>
$vals_geolocated = array_count_values($array_geolocated); <!-- ./col -->
//echo 'No. of NON Duplicate Items: '.count($vals_geolocated).'<br><br>'; <div class="col-lg-3 col-xs-6">
//print_r($vals_geolocated); <!-- small box -->
$pieChart = array(); <div class="small-box bg-yellow">
foreach(array_keys($vals_geolocated) as $paramName) { <div class="inner">
$color = dechex(rand(0x000000, 0xFFFFFF)); <h3><?php echo $c_geolocated;?></h3>
$trash = array("value" => $vals_geolocated[$paramName],
"color" => "#".$color, <p><?php echo $this->lang->line('Utilisateurs géolocalisés'); ?></p>
"highlight" => "#".$color, </div>
"label" => $paramName); <div class="icon">
<i class="ion ion-person-add"></i>
$pieChart[]= $trash; </div>
}
} </div>
}else{ </div>
$pieChart = array(); <!-- ./col -->
} <div class="col-lg-3 col-xs-6">
?> <!-- small box -->
<div class="small-box bg-green">
<div class="content-wrapper"> <div class="inner">
<h3><?php echo $c_code;?></h3>
<!-- Content Header (Page header) -->
<section class="content-header"> <p><?php echo $this->lang->line('Codes validés'); ?></p>
<h1> </div>
<?php echo $this->lang->line('administrateur'); ?> <div class="icon">
<small><?php echo $this->lang->line('Tableau de bord'); ?></small> <i class="ion ion-stats-bars"></i>
</h1> </div>
</section>
</div>
<section class="content"> </div>
<!-- Small boxes (Stat box) --> <!-- ./col -->
<div class="row"> <div class="col-lg-3 col-xs-6">
<div class="col-lg-3 col-xs-6"> <!-- small box -->
<!-- small box --> <div class="small-box bg-red">
<div class="inner">
<div class="small-box bg-aqua"> <h3><?php echo $c_generated; ?></h3>
<div class="inner">
<h3><?php echo $c_users;?></h3> <p><?php echo $this->lang->line('Codes générés'); ?></p>
</div>
<p><?php echo $this->lang->line('Utilisateurs simples'); ?></p> <div class="icon">
</div> <i class="ion ion-pie-graph"></i>
<div class="icon"> </div>
<i class="ion ion-person-add"></i>
</div> </div>
</div>
</div> <!-- ./col -->
</div>
<!-- ./col --> <div class="col-xs-12">
<div class="col-lg-3 col-xs-6"> <!-- BAR CHART -->
<!-- small box --> <div class="box box-success">
<div class="small-box bg-yellow"> <div class="box-header with-border">
<div class="inner"> <h3 class="box-title"><?php echo $this->lang->line('Souscription des 12 derniers mois'); ?></h3>
<h3><?php echo $c_geolocated;?></h3> </div>
<div class="box-body">
<p><?php echo $this->lang->line('Utilisateurs géolocalisés'); ?></p> <div class="chart" id="chart">
</div> <canvas id="barChart" style="height:230px"></canvas>
<div class="icon"> </div>
<i class="ion ion-person-add"></i> </div>
</div> <!-- /.box-body -->
</div>
</div> <!-- /.box -->
</div> </div>
<!-- ./col --> <!--
<div class="col-lg-3 col-xs-6"> <div class="col-xs-6">
<!-- small box --> <div class="box box-danger">
<div class="small-box bg-green"> <div class="box-header with-border">
<div class="inner"> <h3 class="box-title"><?php echo $this->lang->line('Utilisateurs simple par réseaux'); ?></h3>
<h3><?php echo $c_code;?></h3> <div class="box-tools pull-right">
</div>
<p><?php echo $this->lang->line('Codes validés'); ?></p> </div>
</div> <div class="box-body" id="chart2">
<div class="icon"> <canvas id="pieChart2" style="height:250px"></canvas>
<i class="ion ion-stats-bars"></i> </div>
</div> </div>
</div>
</div> <div class="col-xs-6">
</div> <div class="box box-danger">
<!-- ./col --> <div class="box-header with-border">
<div class="col-lg-3 col-xs-6"> <h3 class="box-title"><?php echo $this->lang->line('Utilisateurs géolocalisés par réseaux'); ?></h3>
<!-- small box -->
<div class="small-box bg-red"> <div class="box-tools pull-right">
<div class="inner"> </div>
<h3><?php echo $c_generated; ?></h3> </div>
<div class="box-body" id="chart1">
<p><?php echo $this->lang->line('Codes générés'); ?></p> <canvas id="pieChart" style="height:250px"></canvas>
</div> </div>
<div class="icon"> </div>
<i class="ion ion-pie-graph"></i> </div>
</div> -->
</div>
</div> <!-- /.row -->
</div> </section>
<!-- ./col -->
</div>
<div class="col-xs-12">
<!-- BAR CHART -->
<div class="box box-success"> <!-- jQuery 3 -->
<div class="box-header with-border"> <script src="<?php echo base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script>
<h3 class="box-title"><?php echo $this->lang->line('Souscription des 12 derniers mois'); ?></h3> <!-- jQuery UI 1.11.4 -->
</div> <script src="<?php echo base_url('bower_components/jquery-ui/jquery-ui.min.js') ?>"></script>
<div class="box-body"> <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<div class="chart" id="chart"> <script>
<canvas id="barChart" style="height:230px"></canvas> $.widget.bridge('uibutton', $.ui.button);
</div> </script>
</div> <!-- Bootstrap 3.3.7 -->
<!-- /.box-body --> <script src="<?php echo base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
</div> <!-- Morris.js charts -->
<!-- /.box --> <script src="<?php echo base_url('bower_components/raphael/raphael.min.js') ?>"></script>
</div> <!-- Sparkline -->
<!-- <script src="<?php echo base_url('bower_components/jquery-sparkline/dist/jquery.sparkline.min.js') ?>"></script>
<div class="col-xs-6"> <!-- jvectormap -->
<div class="box box-danger"> <script src="<?php echo base_url('plugins/jvectormap/jquery-jvectormap-1.2.2.min.js') ?>"></script>
<div class="box-header with-border"> <script src="<?php echo base_url('plugins/jvectormap/jquery-jvectormap-world-mill-en.js') ?>"></script>
<h3 class="box-title"><?php echo $this->lang->line('Utilisateurs simple par réseaux'); ?></h3> <!-- jQuery Knob Chart -->
<div class="box-tools pull-right"> <script src="<?php echo base_url('bower_components/jquery-knob/dist/jquery.knob.min.js') ?>"></script>
</div> <!-- daterangepicker -->
</div> <script src="<?php echo base_url('bower_components/moment/min/moment.min.js') ?>"></script>
<div class="box-body" id="chart2"> <script src="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.js') ?>"></script>
<canvas id="pieChart2" style="height:250px"></canvas> <!-- datepicker -->
</div> <script src="<?php echo base_url('bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js') ?>"></script>
</div> <!-- Bootstrap WYSIHTML5 -->
</div> <script src="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js') ?>"></script>
<div class="col-xs-6"> <!-- Slimscroll -->
<div class="box box-danger"> <script src="<?php echo base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script>
<div class="box-header with-border"> <!-- FastClick -->
<h3 class="box-title"><?php echo $this->lang->line('Utilisateurs géolocalisés par réseaux'); ?></h3> <script src="<?php echo base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
<!-- AdminLTE App -->
<div class="box-tools pull-right"> <script src="<?php echo base_url('dist/js/adminlte.min.js') ?>"></script>
</div> <!-- AdminLTE for demo purposes -->
</div> <script src="<?php echo base_url('dist/js/demo.js') ?>"></script>
<div class="box-body" id="chart1">
<canvas id="pieChart" style="height:250px"></canvas> <!-- ChartJS -->
</div> <script src="<?php echo base_url('bower_components/chart.js/Chart.js') ?>"></script>
</div>
</div>
-->
</div> <script type='text/javascript'>
<!-- /.row --> $(document).ready(function(){
</section> $('#gestion_btn').click(function(){
window.location.href = "<?php echo base_url('index.php/Gestion') ?>";
</div> });
$('#pays').change(function(){
<!-- jQuery 3 --> var pays = $(this).val();
<script src="<?php echo base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script> $.ajax({
<!-- jQuery UI 1.11.4 --> url:'<?php echo base_url('index.php/Admin/getHypByPays')?>',
<script src="<?php echo base_url('bower_components/jquery-ui/jquery-ui.min.js') ?>"></script> type: 'post',
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip --> data: {pays: pays},
<script> dataType: 'json',
$.widget.bridge('uibutton', $.ui.button); success: function(data){
</script> var len = data.length;
<!-- Bootstrap 3.3.7 -->
<script src="<?php echo base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
<!-- Morris.js charts --> if(len > 0){
<script src="<?php echo base_url('bower_components/raphael/raphael.min.js') ?>"></script>
<!-- Sparkline --> var select = document.getElementById('hyper');
<script src="<?php echo base_url('bower_components/jquery-sparkline/dist/jquery.sparkline.min.js') ?>"></script> if(select===null){
<!-- jvectormap --> var grpPays = document.getElementById('grp-pays');
<script src="<?php echo base_url('plugins/jvectormap/jquery-jvectormap-1.2.2.min.js') ?>"></script> $(grpPays).empty();
<script src="<?php echo base_url('plugins/jvectormap/jquery-jvectormap-world-mill-en.js') ?>"></script> $(grpPays).append("<select class='form-control input-lg' name='hyper' required id='hyper'></select>");
<!-- jQuery Knob Chart --> select = document.getElementById('hyper');
<script src="<?php echo base_url('bower_components/jquery-knob/dist/jquery.knob.min.js') ?>"></script> }
<!-- daterangepicker --> $(select).empty();
<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> for (var i in data) {
<!-- datepicker --> $(select).append('<option value=' + data[i].code_membre + '>' + data[i].lastname +'-' + data[i].network + ' ('+ data[i].code_membre +')</option>');
<script src="<?php echo base_url('bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js') ?>"></script> }
<!-- Bootstrap WYSIHTML5 -->
<script src="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js') ?>"></script> var code = data[0].code_membre;
<!-- Slimscroll -->
<script src="<?php echo base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script> $.ajax({
<!-- FastClick --> url:'<?php echo base_url('index.php/Admin/getVilleByHyp')?>',
<script src="<?php echo base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script> type: 'post',
<!-- AdminLTE App --> data: {code: code,pays:pays},
<script src="<?php echo base_url('dist/js/adminlte.min.js') ?>"></script> dataType: 'json',
<!-- AdminLTE for demo purposes --> success: function(list){
<script src="<?php echo base_url('dist/js/demo.js') ?>"></script> var len = list.length;
<!-- ChartJS --> if(len > 0){
<script src="<?php echo base_url('bower_components/chart.js/Chart.js') ?>"></script>
var select = document.getElementById('ville');
if(select===null){
var grpVille = document.getElementById('grp-ville');
<script type='text/javascript'> $(grpVille).empty();
$(document).ready(function(){ $(grpVille).append("<select class='form-control input-lg' name='ville' required id='ville'></select>");
$('#gestion_btn').click(function(){ select = document.getElementById('ville');
window.location.href = "<?php echo base_url('index.php/Gestion') ?>"; }
}); $(select).empty();
$('#pays').change(function(){ for (var i in list) {
var pays = $(this).val(); $(select).append('<option value=' + list[i].town_id + '>' + list[i].town +'</option>');
$.ajax({ }
url:'<?php echo base_url('index.php/Admin/getHypByPays')?>',
type: 'post',
data: {pays: pays}, }else{
dataType: 'json',
success: function(data){ var select = document.getElementById('ville');
var len = data.length; $(select).empty();
}
if(len > 0){
}
var select = document.getElementById('hyper'); });
if(select===null){
var grpPays = document.getElementById('grp-pays');
$(grpPays).empty(); }else{
$(grpPays).append("<select class='form-control input-lg' name='hyper' required id='hyper'></select>");
select = document.getElementById('hyper'); var select = document.getElementById('hyper');
} $(select).empty();
$(select).empty();
var select2 = document.getElementById('ville');
for (var i in data) { $(select2).empty();
$(select).append('<option value=' + data[i].code_membre + '>' + data[i].lastname +'-' + data[i].network + ' ('+ data[i].code_membre +')</option>'); }
}
}
var code = data[0].code_membre; });
});
$.ajax({
url:'<?php echo base_url('index.php/Admin/getVilleByHyp')?>', $('#hyper').change(function(){
type: 'post', var code = $(this).val();
data: {code: code,pays:pays}, $.ajax({
dataType: 'json', url:'<?php echo base_url('index.php/Admin/getVilleByHyp')?>',
success: function(list){ type: 'post',
var len = list.length; data: {code: code},
dataType: 'json',
if(len > 0){ success: function(list){
var len = list.length;
var select = document.getElementById('ville');
if(select===null){ if(len > 0){
var grpVille = document.getElementById('grp-ville');
$(grpVille).empty(); var select = document.getElementById('ville');
$(grpVille).append("<select class='form-control input-lg' name='ville' required id='ville'></select>"); $(select).empty();
select = document.getElementById('ville');
} for (var i in list) {
$(select).empty(); $(select).append('<option value=' + list[i].town_id + '>' + list[i].town +'</option>');
}
for (var i in list) {
$(select).append('<option value=' + list[i].town_id + '>' + list[i].town +'</option>'); }else{
}
var select = document.getElementById('ville');
$(select).empty();
}else{
}
var select = document.getElementById('ville');
$(select).empty(); }
});
} });
});
} </script>
});
<script >
/*
}else{
var cities = [];
var select = document.getElementById('hyper'); var cities_simple = [];
$(select).empty();
//console.log(geocodeposition(52.5487429714954,-1.81602098644987));
var select2 = document.getElementById('ville');
$(select2).empty();
} for(var i = 0 ; i < 1 ; i++ ) {
var cit;
} var latit = Number(users[i]['latitude']);
}); var longi = Number(users[i]['longitude']);
});
$('#hyper').change(function(){ //cit = geocodeposition(latit, longi);
var code = $(this).val(); cities[i] = {};
$.ajax({ cities[i] = cit;
url:'<?php echo base_url('index.php/Admin/getVilleByHyp')?>', }
type: 'post', */
data: {code: code}, //console.log(cities);
dataType: 'json',
success: function(list){ /*var Pie = '<?php echo json_encode($pieChart); ?>';
var len = list.length;
if(Pie==='[]'){
if(len > 0){ var select = document.getElementById('chart1');
$(select.children).hide();
var select = document.getElementById('ville'); $(select).append("<p>Aucun utilisateur géolocalisé dans tous les réseaux</p>");
$(select).empty(); }else{
Pie = JSON.parse(Pie);
for (var i in list) { }
$(select).append('<option value=' + list[i].town_id + '>' + list[i].town +'</option>');
} var Pie2 = '<?php echo json_encode($pieChart2); ?>';
if(Pie2==='[]') {
}else{ var select = document.getElementById('chart2');
$(select.children).hide();
var select = document.getElementById('ville'); $(select).append("<p>Aucun utilisateur simple dans tous les réseaux</p>");
$(select).empty(); }else{
Pie2 = JSON.parse(Pie2);
} }*/
}
}); var areaChartData = {
}); labels : <?php echo json_encode($label_months) ?>,
}); datasets: [
</script> {
label : 'Electronics',
<script > fillColor : 'rgba(255, 162, 0, 1)',
/* strokeColor : 'rgba(255, 162, 0, 1)',
pointColor : 'rgba(255, 162, 0, 1)',
var cities = []; pointStrokeColor : '#ffa200',
var cities_simple = []; pointHighlightFill : '#fff',
pointHighlightStroke: 'rgba(220,220,220,1)',
//console.log(geocodeposition(52.5487429714954,-1.81602098644987)); data: <?php echo json_encode($users_geolocated_data) ?>
},
{
for(var i = 0 ; i < 1 ; i++ ) { label : 'Digital Goods',
var cit; fillColor : 'rgba(0, 187, 255, 1)',
var latit = Number(users[i]['latitude']); strokeColor : 'rgba(0, 187, 255, 1)',
var longi = Number(users[i]['longitude']); pointColor : '#00bbff',
pointStrokeColor : 'rgba(0, 187, 255, 1)',
pointHighlightFill : '#fff',
//cit = geocodeposition(latit, longi); pointHighlightStroke: 'rgba(0, 187, 255, 1)',
cities[i] = {}; data : <?php echo json_encode($users_simple_data) ?>
cities[i] = cit; }
} ]
*/ }
//console.log(cities);
</script>
/*var Pie = '<?php echo json_encode($pieChart); ?>'; <!-- Page script -->
<script src="<?php echo base_url('dist/js/custom.js') ?>"></script>
if(Pie==='[]'){
var select = document.getElementById('chart1');
$(select.children).hide();
$(select).append("<p>Aucun utilisateur géolocalisé dans tous les réseaux</p>");
}else{
Pie = JSON.parse(Pie);
}
var Pie2 = '<?php echo json_encode($pieChart2); ?>';
if(Pie2==='[]') {
var select = document.getElementById('chart2');
$(select.children).hide();
$(select).append("<p>Aucun utilisateur simple dans tous les réseaux</p>");
}else{
Pie2 = JSON.parse(Pie2);
}*/
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($users_geolocated_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($users_simple_data) ?>
}
]
}
</script>
<!-- Page script -->
<script src="<?php echo base_url('dist/js/custom.js') ?>"></script>

View File

@ -1,418 +1,413 @@
<!-- Date Picker -->
<!-- jvectormap --> <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/jvectormap/jquery-jvectormap.css') ?>"> <!-- Daterange picker -->
<!-- Date Picker --> <link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> <!-- ChartJS -->
<!-- Daterange picker --> <script src="<?php echo base_url('bower_components/Chart.js/Chart.js') ?>"></script>
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>"> <?php
<!-- bootstrap wysihtml5 - text editor --> /**
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>"> ** Simple User Treatment
<!-- ChartJS --> **/
<script src="<?php echo base_url('bower_components/Chart.js/Chart.js') ?>"></script> $users_simple_query = $this->db->get('users_simple');
<?php
/** $users_simple=$users_simple_query->num_rows();
** Simple User Treatment //$users_simple_query = json_encode($users_simple_query->result());
**/ // simple Users by month replace 2016 by NOW()
$users_simple_query = $this->db->get('users_simple'); $users_simple_data =array();
$users_simple_query_january = $this->db->query('SELECT uid FROM users_simple
$users_simple=$users_simple_query->num_rows(); WHERE MONTH(created_at) = 1 AND YEAR(created_at) = 2016');
//$users_simple_query = json_encode($users_simple_query->result()); $users_simple_data[] = $users_simple_query_january->num_rows();
// simple Users by month replace 2016 by NOW() $users_simple_query_february = $this->db->query('SELECT uid FROM users_simple
$users_simple_data =array(); WHERE MONTH(created_at) = 2 AND YEAR(created_at) = 2016');
$users_simple_query_january = $this->db->query('SELECT uid FROM users_simple $users_simple_data[] = $users_simple_query_february->num_rows();
WHERE MONTH(created_at) = 1 AND YEAR(created_at) = 2016'); $users_simple_query_march = $this->db->query('SELECT uid FROM users_simple
$users_simple_data[] = $users_simple_query_january->num_rows(); WHERE MONTH(created_at) = 3 AND YEAR(created_at) = 2016');
$users_simple_query_february = $this->db->query('SELECT uid FROM users_simple $users_simple_data[] = $users_simple_query_march->num_rows();
WHERE MONTH(created_at) = 2 AND YEAR(created_at) = 2016'); $users_simple_query_april = $this->db->query('SELECT uid FROM users_simple
$users_simple_data[] = $users_simple_query_february->num_rows(); WHERE MONTH(created_at) = 4 AND YEAR(created_at) = 2016');
$users_simple_query_march = $this->db->query('SELECT uid FROM users_simple $users_simple_data[] = $users_simple_query_april->num_rows();
WHERE MONTH(created_at) = 3 AND YEAR(created_at) = 2016'); $users_simple_query_may = $this->db->query('SELECT uid FROM users_simple
$users_simple_data[] = $users_simple_query_march->num_rows(); WHERE MONTH(created_at) = 5 AND YEAR(created_at) = 2016');
$users_simple_query_april = $this->db->query('SELECT uid FROM users_simple $users_simple_data[] = $users_simple_query_may->num_rows();
WHERE MONTH(created_at) = 4 AND YEAR(created_at) = 2016'); $users_simple_query_june = $this->db->query('SELECT uid FROM users_simple
$users_simple_data[] = $users_simple_query_april->num_rows(); WHERE MONTH(created_at) = 6 AND YEAR(created_at) = 2016');
$users_simple_query_may = $this->db->query('SELECT uid FROM users_simple $users_simple_data[] = $users_simple_query_june->num_rows();
WHERE MONTH(created_at) = 5 AND YEAR(created_at) = 2016'); $users_simple_query_july = $this->db->query('SELECT uid FROM users_simple
$users_simple_data[] = $users_simple_query_may->num_rows(); WHERE MONTH(created_at) = 7 AND YEAR(created_at) = 2016');
$users_simple_query_june = $this->db->query('SELECT uid FROM users_simple $users_simple_data[] = $users_simple_query_july->num_rows();
WHERE MONTH(created_at) = 6 AND YEAR(created_at) = 2016'); $users_simple_query_august = $this->db->query('SELECT uid FROM users_simple
$users_simple_data[] = $users_simple_query_june->num_rows(); WHERE MONTH(created_at) = 8 AND YEAR(created_at) = 2016');
$users_simple_query_july = $this->db->query('SELECT uid FROM users_simple $users_simple_data[] = $users_simple_query_august->num_rows();
WHERE MONTH(created_at) = 7 AND YEAR(created_at) = 2016'); $users_simple_query_september = $this->db->query('SELECT uid FROM users_simple
$users_simple_data[] = $users_simple_query_july->num_rows(); WHERE MONTH(created_at) = 9 AND YEAR(created_at) = 2016');
$users_simple_query_august = $this->db->query('SELECT uid FROM users_simple $users_simple_data[] = $users_simple_query_september->num_rows();
WHERE MONTH(created_at) = 8 AND YEAR(created_at) = 2016'); $users_simple_query_october = $this->db->query('SELECT uid FROM users_simple
$users_simple_data[] = $users_simple_query_august->num_rows(); WHERE MONTH(created_at) = 10 AND YEAR(created_at) = 2016');
$users_simple_query_september = $this->db->query('SELECT uid FROM users_simple $users_simple_data[] = $users_simple_query_october->num_rows();
WHERE MONTH(created_at) = 9 AND YEAR(created_at) = 2016'); $users_simple_query_november = $this->db->query('SELECT uid FROM users_simple
$users_simple_data[] = $users_simple_query_september->num_rows(); WHERE MONTH(created_at) = 11 AND YEAR(created_at) = 2016');
$users_simple_query_october = $this->db->query('SELECT uid FROM users_simple $users_simple_data[] = $users_simple_query_november->num_rows();
WHERE MONTH(created_at) = 10 AND YEAR(created_at) = 2016'); $users_simple_query_december = $this->db->query('SELECT uid FROM users_simple
$users_simple_data[] = $users_simple_query_october->num_rows(); WHERE MONTH(created_at) = 12 AND YEAR(created_at) = 2016');
$users_simple_query_november = $this->db->query('SELECT uid FROM users_simple $users_simple_data[] = $users_simple_query_december->num_rows();
WHERE MONTH(created_at) = 11 AND YEAR(created_at) = 2016');
$users_simple_data[] = $users_simple_query_november->num_rows(); // Count networks for simple users
$users_simple_query_december = $this->db->query('SELECT uid FROM users_simple $array_simple = array();
WHERE MONTH(created_at) = 12 AND YEAR(created_at) = 2016'); $num = 0;
$users_simple_data[] = $users_simple_query_december->num_rows(); if ($users_simple > 0) {
foreach($users_simple_query->result() as $row) {
// Count networks for simple users $num++;
$array_simple = array(); $array_simple[] = $row->network;
$num = 0;
if ($users_simple > 0) {
foreach($users_simple_query->result() as $row) { }
$num++; $vals_simple = array_count_values($array_simple);
$array_simple[] = $row->network; //echo 'No. of NON Duplicate Items: '.count($vals_simple).'<br><br>';
//print_r($vals_simple);
$pieChart2 = array();
} foreach(array_keys($vals_simple) as $paramName2) {
$vals_simple = array_count_values($array_simple); $color2 = dechex(rand(0x000000, 0xFFFFFF));
//echo 'No. of NON Duplicate Items: '.count($vals_simple).'<br><br>'; $trash2 = array("value" => $vals_simple[$paramName2],
//print_r($vals_simple); "color" => "#".$color2,
$pieChart2 = array(); "highlight" => "#".$color2,
foreach(array_keys($vals_simple) as $paramName2) { "label" => $paramName2);
$color2 = dechex(rand(0x000000, 0xFFFFFF));
$trash2 = array("value" => $vals_simple[$paramName2], $pieChart2[]= $trash2;
"color" => "#".$color2,
"highlight" => "#".$color2, }
"label" => $paramName2); } else {
echo "error on database";
$pieChart2[]= $trash2; }
} /**
} else { ** Geolocated User Treatment
echo "error on database"; **/
} $users_geolocated_query = $this->db->get('users');
// Geolocated Users by month replace 2016 by NOW()
/** $users_geolocated_data =array();
** Geolocated User Treatment $users_geolocated_query_january = $this->db->query('SELECT uid FROM users
**/ WHERE MONTH(created_at) = 1 AND YEAR(created_at) = 2016');
$users_geolocated_query = $this->db->get('users'); $users_geolocated_data[] = $users_geolocated_query_january->num_rows();
// Geolocated Users by month replace 2016 by NOW() $users_geolocated_query_february = $this->db->query('SELECT uid FROM users
$users_geolocated_data =array(); WHERE MONTH(created_at) = 2 AND YEAR(created_at) = 2016');
$users_geolocated_query_january = $this->db->query('SELECT uid FROM users $users_geolocated_data[] = $users_geolocated_query_february->num_rows();
WHERE MONTH(created_at) = 1 AND YEAR(created_at) = 2016'); $users_geolocated_query_march = $this->db->query('SELECT uid FROM users
$users_geolocated_data[] = $users_geolocated_query_january->num_rows(); WHERE MONTH(created_at) = 3 AND YEAR(created_at) = 2016');
$users_geolocated_query_february = $this->db->query('SELECT uid FROM users $users_geolocated_data[] = $users_geolocated_query_march->num_rows();
WHERE MONTH(created_at) = 2 AND YEAR(created_at) = 2016'); $users_geolocated_query_april = $this->db->query('SELECT uid FROM users
$users_geolocated_data[] = $users_geolocated_query_february->num_rows(); WHERE MONTH(created_at) = 4 AND YEAR(created_at) = 2016');
$users_geolocated_query_march = $this->db->query('SELECT uid FROM users $users_geolocated_data[] = $users_geolocated_query_april->num_rows();
WHERE MONTH(created_at) = 3 AND YEAR(created_at) = 2016'); $users_geolocated_query_may = $this->db->query('SELECT uid FROM users
$users_geolocated_data[] = $users_geolocated_query_march->num_rows(); WHERE MONTH(created_at) = 5 AND YEAR(created_at) = 2016');
$users_geolocated_query_april = $this->db->query('SELECT uid FROM users $users_geolocated_data[] = $users_geolocated_query_may->num_rows();
WHERE MONTH(created_at) = 4 AND YEAR(created_at) = 2016'); $users_geolocated_query_june = $this->db->query('SELECT uid FROM users
$users_geolocated_data[] = $users_geolocated_query_april->num_rows(); WHERE MONTH(created_at) = 6 AND YEAR(created_at) = 2016');
$users_geolocated_query_may = $this->db->query('SELECT uid FROM users $users_geolocated_data[] = $users_geolocated_query_june->num_rows();
WHERE MONTH(created_at) = 5 AND YEAR(created_at) = 2016'); $users_geolocated_query_july = $this->db->query('SELECT uid FROM users
$users_geolocated_data[] = $users_geolocated_query_may->num_rows(); WHERE MONTH(created_at) = 7 AND YEAR(created_at) = 2016');
$users_geolocated_query_june = $this->db->query('SELECT uid FROM users $users_geolocated_data[] = $users_geolocated_query_july->num_rows();
WHERE MONTH(created_at) = 6 AND YEAR(created_at) = 2016'); $users_geolocated_query_august = $this->db->query('SELECT uid FROM users
$users_geolocated_data[] = $users_geolocated_query_june->num_rows(); WHERE MONTH(created_at) = 8 AND YEAR(created_at) = 2016');
$users_geolocated_query_july = $this->db->query('SELECT uid FROM users $users_geolocated_data[] = $users_geolocated_query_august->num_rows();
WHERE MONTH(created_at) = 7 AND YEAR(created_at) = 2016'); $users_geolocated_query_september = $this->db->query('SELECT uid FROM users
$users_geolocated_data[] = $users_geolocated_query_july->num_rows(); WHERE MONTH(created_at) = 9 AND YEAR(created_at) = 2016');
$users_geolocated_query_august = $this->db->query('SELECT uid FROM users $users_geolocated_data[] = $users_geolocated_query_september->num_rows();
WHERE MONTH(created_at) = 8 AND YEAR(created_at) = 2016'); $users_geolocated_query_october = $this->db->query('SELECT uid FROM users
$users_geolocated_data[] = $users_geolocated_query_august->num_rows(); WHERE MONTH(created_at) = 10 AND YEAR(created_at) = 2016');
$users_geolocated_query_september = $this->db->query('SELECT uid FROM users $users_geolocated_data[] = $users_geolocated_query_october->num_rows();
WHERE MONTH(created_at) = 9 AND YEAR(created_at) = 2016'); $users_geolocated_query_november = $this->db->query('SELECT uid FROM users
$users_geolocated_data[] = $users_geolocated_query_september->num_rows(); WHERE MONTH(created_at) = 11 AND YEAR(created_at) = 2016');
$users_geolocated_query_october = $this->db->query('SELECT uid FROM users $users_geolocated_data[] = $users_geolocated_query_november->num_rows();
WHERE MONTH(created_at) = 10 AND YEAR(created_at) = 2016'); $users_geolocated_query_december = $this->db->query('SELECT uid FROM users
$users_geolocated_data[] = $users_geolocated_query_october->num_rows(); WHERE MONTH(created_at) = 12 AND YEAR(created_at) = 2016');
$users_geolocated_query_november = $this->db->query('SELECT uid FROM users $users_geolocated_data[] = $users_geolocated_query_december->num_rows();
WHERE MONTH(created_at) = 11 AND YEAR(created_at) = 2016');
$users_geolocated_data[] = $users_geolocated_query_november->num_rows();
$users_geolocated_query_december = $this->db->query('SELECT uid FROM users
WHERE MONTH(created_at) = 12 AND YEAR(created_at) = 2016');
$users_geolocated_data[] = $users_geolocated_query_december->num_rows(); $users_geolocated=$users_geolocated_query->num_rows();
//$users_geolocated_query = json_encode($users_geolocated_query->result());
$validated_codes_query = $this->db->get('codemembre');
$validated_codes=$validated_codes_query->num_rows();
$users_geolocated=$users_geolocated_query->num_rows();
//$users_geolocated_query = json_encode($users_geolocated_query->result()); $generated_codes_query = $this->db->get('codeGenerer');
$generated_codes=$generated_codes_query->num_rows();
$validated_codes_query = $this->db->get('codemembre');
$validated_codes=$validated_codes_query->num_rows();
// Counts network for geolocated users
$generated_codes_query = $this->db->get('codeGenerer'); $array_geolocated = array();
$generated_codes=$generated_codes_query->num_rows(); $num = 0;
if ($users_geolocated > 0) {
foreach($users_geolocated_query->result() as $row) {
// Counts network for geolocated users $num++;
$array_geolocated = array(); $array_geolocated[] = $row->network;
$num = 0;
if ($users_geolocated > 0) {
foreach($users_geolocated_query->result() as $row) { }
$num++; $vals_geolocated = array_count_values($array_geolocated);
$array_geolocated[] = $row->network; //echo 'No. of NON Duplicate Items: '.count($vals_geolocated).'<br><br>';
//print_r($vals_geolocated);
$pieChart = array();
} foreach(array_keys($vals_geolocated) as $paramName) {
$vals_geolocated = array_count_values($array_geolocated); $color = dechex(rand(0x000000, 0xFFFFFF));
//echo 'No. of NON Duplicate Items: '.count($vals_geolocated).'<br><br>'; $trash = array("value" => $vals_geolocated[$paramName],
//print_r($vals_geolocated); "color" => "#".$color,
$pieChart = array(); "highlight" => "#".$color,
foreach(array_keys($vals_geolocated) as $paramName) { "label" => $paramName);
$color = dechex(rand(0x000000, 0xFFFFFF));
$trash = array("value" => $vals_geolocated[$paramName], $pieChart[]= $trash;
"color" => "#".$color,
"highlight" => "#".$color, }
"label" => $paramName); } else {
echo "error on database";
$pieChart[]= $trash; }
?>
} <div class="content-wrapper">
} else {
echo "error on database"; <!-- Content Header (Page header) -->
} <section class="content-header">
?> <h1>
<div class="content-wrapper"> Hypervisors
<small>Control panel</small>
<!-- Content Header (Page header) --> </h1>
<section class="content-header"> </section>
<h1>
Hypervisors <section class="content">
<small>Control panel</small> <!-- Small boxes (Stat box) -->
</h1> <div class="row">
</section> <div class="col-lg-3 col-xs-6">
<!-- small box -->
<section class="content">
<!-- Small boxes (Stat box) --> <div class="small-box bg-aqua">
<div class="row"> <div class="inner">
<div class="col-lg-3 col-xs-6"> <h3><?php echo $users_simple;?></h3>
<!-- small box -->
<p>Hypervisors</p>
<div class="small-box bg-aqua"> </div>
<div class="inner"> <div class="icon">
<h3><?php echo $users_simple;?></h3> <i class="ion ion-person-add"></i>
</div>
<p>Hypervisors</p>
</div> </div>
<div class="icon"> </div>
<i class="ion ion-person-add"></i> <!-- ./col -->
</div> <div class="col-lg-3 col-xs-6">
<!-- small box -->
</div> <div class="small-box bg-yellow">
</div> <div class="inner">
<!-- ./col --> <h3><?php echo $users_geolocated;?></h3>
<div class="col-lg-3 col-xs-6">
<!-- small box --> <p>Geolocated members</p>
<div class="small-box bg-yellow"> </div>
<div class="inner"> <div class="icon">
<h3><?php echo $users_geolocated;?></h3> <i class="ion ion-person-add"></i>
</div>
<p>Geolocated members</p>
</div> </div>
<div class="icon"> </div>
<i class="ion ion-person-add"></i> <!-- ./col -->
</div> <div class="col-lg-3 col-xs-6">
<!-- small box -->
</div> <div class="small-box bg-green">
</div> <div class="inner">
<!-- ./col --> <h3><?php echo $validated_codes;?></h3>
<div class="col-lg-3 col-xs-6">
<!-- small box --> <p>Validated codes</p>
<div class="small-box bg-green"> </div>
<div class="inner"> <div class="icon">
<h3><?php echo $validated_codes;?></h3> <i class="ion ion-stats-bars"></i>
</div>
<p>Validated codes</p>
</div> </div>
<div class="icon"> </div>
<i class="ion ion-stats-bars"></i> <!-- ./col -->
</div> <div class="col-lg-3 col-xs-6">
<!-- small box -->
</div> <div class="small-box bg-red">
</div> <div class="inner">
<!-- ./col --> <h3><?php echo $generated_codes;?></h3>
<div class="col-lg-3 col-xs-6">
<!-- small box --> <p>Generated codes</p>
<div class="small-box bg-red"> </div>
<div class="inner"> <div class="icon">
<h3><?php echo $generated_codes;?></h3> <i class="ion ion-pie-graph"></i>
</div>
<p>Generated codes</p>
</div> </div>
<div class="icon"> </div>
<i class="ion ion-pie-graph"></i> <!-- ./col -->
</div>
<div class="col-xs-12">
</div> <!-- BAR CHART -->
</div> <div class="box box-success">
<!-- ./col --> <div class="box-header with-border">
<h3 class="box-title">Subscriptions</h3>
<div class="col-xs-12">
<!-- BAR CHART --> <div class="box-tools pull-right">
<div class="box box-success"> <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
<div class="box-header with-border"> </button>
<h3 class="box-title">Subscriptions</h3> <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
<div class="box-tools pull-right"> </div>
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i> <div class="box-body">
</button> <div class="chart">
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button> <canvas id="barChart" style="height:230px"></canvas>
</div> </div>
</div> </div>
<div class="box-body"> <!-- /.box-body -->
<div class="chart"> </div>
<canvas id="barChart" style="height:230px"></canvas> <!-- /.box -->
</div> </div>
</div> <!-- /.col -->
<!-- /.box-body --> <div class="col-xs-6">
</div> <!-- DONUT CHART -->
<!-- /.box --> <div class="box box-danger">
</div> <div class="box-header with-border">
<!-- /.col --> <h3 class="box-title">Simple Users by network</h3>
<div class="col-xs-6"> <div class="box-tools pull-right">
<!-- DONUT CHART --> <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
<div class="box box-danger"> </button>
<div class="box-header with-border"> <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
<h3 class="box-title">Simple Users by network</h3> </div>
<div class="box-tools pull-right"> </div>
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i> <div class="box-body">
</button> <canvas id="pieChart" style="height:250px"></canvas>
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button> </div>
</div> <!-- /.box-body -->
</div> </div>
<div class="box-body"> <!-- /.box -->
<canvas id="pieChart" style="height:250px"></canvas> </div>
</div> <div class="col-xs-6">
<!-- /.box-body --> <!-- DONUT CHART -->
</div> <div class="box box-danger">
<!-- /.box --> <div class="box-header with-border">
</div> <h3 class="box-title">Geolocated Users by network</h3>
<div class="col-xs-6">
<!-- DONUT CHART --> <div class="box-tools pull-right">
<div class="box box-danger"> <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
<div class="box-header with-border"> </button>
<h3 class="box-title">Geolocated Users by network</h3> <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
<div class="box-tools pull-right"> </div>
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i> <div class="box-body">
</button> <canvas id="pieChart2" style="height:250px"></canvas>
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button> </div>
</div> <!-- /.box-body -->
</div> </div>
<div class="box-body"> <!-- /.box -->
<canvas id="pieChart2" style="height:250px"></canvas> </div>
</div> </div>
<!-- /.box-body --> <!-- /.row -->
</div> </section>
<!-- /.box -->
</div> </div>
</div>
<!-- /.row -->
</section> <!-- jQuery 3 -->
<script src="<?php echo base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script>
</div> <!-- jQuery UI 1.11.4 -->
<script src="<?php echo base_url('bower_components/jquery-ui/jquery-ui.min.js') ?>"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<!-- jQuery 3 --> <script>
<script src="<?php echo base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script> $.widget.bridge('uibutton', $.ui.button);
<!-- jQuery UI 1.11.4 --> </script>
<script src="<?php echo base_url('bower_components/jquery-ui/jquery-ui.min.js') ?>"></script> <!-- Bootstrap 3.3.7 -->
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip --> <script src="<?php echo base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
<script> <!-- Morris.js charts -->
$.widget.bridge('uibutton', $.ui.button); <script src="<?php echo base_url('bower_components/raphael/raphael.min.js') ?>"></script>
</script> <!-- Sparkline -->
<!-- Bootstrap 3.3.7 --> <script src="<?php echo base_url('bower_components/jquery-sparkline/dist/jquery.sparkline.min.js') ?>"></script>
<script src="<?php echo base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script> <!-- jvectormap -->
<!-- Morris.js charts --> <script src="<?php echo base_url('plugins/jvectormap/jquery-jvectormap-1.2.2.min.js') ?>"></script>
<script src="<?php echo base_url('bower_components/raphael/raphael.min.js') ?>"></script> <script src="<?php echo base_url('plugins/jvectormap/jquery-jvectormap-world-mill-en.js') ?>"></script>
<!-- Sparkline --> <!-- jQuery Knob Chart -->
<script src="<?php echo base_url('bower_components/jquery-sparkline/dist/jquery.sparkline.min.js') ?>"></script> <script src="<?php echo base_url('bower_components/jquery-knob/dist/jquery.knob.min.js') ?>"></script>
<!-- jvectormap --> <!-- daterangepicker -->
<script src="<?php echo base_url('plugins/jvectormap/jquery-jvectormap-1.2.2.min.js') ?>"></script> <script src="<?php echo base_url('bower_components/moment/min/moment.min.js') ?>"></script>
<script src="<?php echo base_url('plugins/jvectormap/jquery-jvectormap-world-mill-en.js') ?>"></script> <script src="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.js') ?>"></script>
<!-- jQuery Knob Chart --> <!-- datepicker -->
<script src="<?php echo base_url('bower_components/jquery-knob/dist/jquery.knob.min.js') ?>"></script> <script src="<?php echo base_url('bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js') ?>"></script>
<!-- daterangepicker --> <!-- Bootstrap WYSIHTML5 -->
<script src="<?php echo base_url('bower_components/moment/min/moment.min.js') ?>"></script> <script src="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js') ?>"></script>
<script src="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.js') ?>"></script> <!-- Slimscroll -->
<!-- datepicker --> <script src="<?php echo base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script>
<script src="<?php echo base_url('bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js') ?>"></script> <!-- FastClick -->
<!-- Bootstrap WYSIHTML5 --> <script src="<?php echo base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
<script src="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js') ?>"></script> <!-- AdminLTE App -->
<!-- Slimscroll --> <script src="<?php echo base_url('dist/js/adminlte.min.js') ?>"></script>
<script src="<?php echo base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script> <!-- AdminLTE for demo purposes -->
<!-- FastClick --> <script src="<?php echo base_url('dist/js/demo.js') ?>"></script>
<script src="<?php echo base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
<!-- AdminLTE App --> <!-- ChartJS -->
<script src="<?php echo base_url('dist/js/adminlte.min.js') ?>"></script> <script src="<?php echo base_url('bower_components/chart.js/Chart.js') ?>"></script>
<!-- AdminLTE for demo purposes -->
<script src="<?php echo base_url('dist/js/demo.js') ?>"></script>
<!-- ChartJS -->
<script src="<?php echo base_url('bower_components/chart.js/Chart.js') ?>"></script> <script >
/*
var cities = [];
var cities_simple = [];
<script >
/* //console.log(geocodeposition(52.5487429714954,-1.81602098644987));
var cities = [];
var cities_simple = []; for(var i = 0 ; i < 1 ; i++ ) {
var cit;
//console.log(geocodeposition(52.5487429714954,-1.81602098644987)); var latit = Number(users[i]['latitude']);
var longi = Number(users[i]['longitude']);
for(var i = 0 ; i < 1 ; i++ ) {
var cit; //cit = geocodeposition(latit, longi);
var latit = Number(users[i]['latitude']); cities[i] = {};
var longi = Number(users[i]['longitude']); cities[i] = cit;
}
*/
//cit = geocodeposition(latit, longi); //console.log(cities);
cities[i] = {};
cities[i] = cit; var Pie = '<?php echo json_encode($pieChart) ?>'
} Pie = JSON.parse(Pie)
*/
//console.log(cities); var Pie2 = '<?php echo json_encode($pieChart2) ?>'
Pie2 = JSON.parse(Pie2)
var Pie = '<?php echo json_encode($pieChart) ?>'
Pie = JSON.parse(Pie)
var Pie2 = '<?php echo json_encode($pieChart2) ?>' var areaChartData = {
Pie2 = JSON.parse(Pie2) labels : ['January', 'February', 'March', 'April', 'May', 'June', 'July','August','September','October','November','December'],
datasets: [
{
label : 'Electronics',
var areaChartData = { fillColor : 'rgba(210, 214, 222, 1)',
labels : ['January', 'February', 'March', 'April', 'May', 'June', 'July','August','September','October','November','December'], strokeColor : 'rgba(210, 214, 222, 1)',
datasets: [ pointColor : 'rgba(210, 214, 222, 1)',
{ pointStrokeColor : '#c1c7d1',
label : 'Electronics', pointHighlightFill : '#fff',
fillColor : 'rgba(210, 214, 222, 1)', pointHighlightStroke: 'rgba(220,220,220,1)',
strokeColor : 'rgba(210, 214, 222, 1)', data: <?php echo json_encode($users_geolocated_data) ?>
pointColor : 'rgba(210, 214, 222, 1)', },
pointStrokeColor : '#c1c7d1', {
pointHighlightFill : '#fff', label : 'Digital Goods',
pointHighlightStroke: 'rgba(220,220,220,1)', fillColor : 'rgba(60,141,188,0.9)',
data: <?php echo json_encode($users_geolocated_data) ?> strokeColor : 'rgba(60,141,188,0.8)',
}, pointColor : '#3b8bba',
{ pointStrokeColor : 'rgba(60,141,188,1)',
label : 'Digital Goods', pointHighlightFill : '#fff',
fillColor : 'rgba(60,141,188,0.9)', pointHighlightStroke: 'rgba(60,141,188,1)',
strokeColor : 'rgba(60,141,188,0.8)', data : <?php echo json_encode($users_simple_data) ?>
pointColor : '#3b8bba', }
pointStrokeColor : 'rgba(60,141,188,1)', ]
pointHighlightFill : '#fff', }
pointHighlightStroke: 'rgba(60,141,188,1)',
data : <?php echo json_encode($users_simple_data) ?>
}
] $('#add_hyp').onclick(function () {
} alert('ok');
});
$('#add_hyp').onclick(function () { </script>
alert('ok'); <!-- Page script -->
}); <script src="<?php echo base_url('dist/js/custom.js') ?>"></script>
</script>
<!-- Page script -->
<script src="<?php echo base_url('dist/js/custom.js') ?>"></script>

View File

@ -1,8 +1,6 @@
<link rel="stylesheet" href="<?php echo base_url('bower_components/jvectormap/jquery-jvectormap.css') ?>">
<link rel="stylesheet" <link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> 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('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet" <link rel="stylesheet"
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>"> 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="<?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> 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-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>" 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> </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" <link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> 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('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet" <link rel="stylesheet"
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>"> 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="<?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> 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-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>" 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> </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" <link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> 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('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet" <link rel="stylesheet"
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>"> 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="<?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> 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-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>" 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> </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" <link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> 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('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet" <link rel="stylesheet"
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>"> 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="<?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> 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-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>" 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> </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" <link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> 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('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet" <link rel="stylesheet"
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>"> 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="<?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://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/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"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<style type="text/css"> <link rel="stylesheet" href="<?= base_url('dist/css/custom/levels-table.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>
<?php <?php
use Brick\Money\Context\CustomContext; 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" <button type="button" class="btn btn-default pull-left"
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button> data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="saveTaxes" data-network-id="<?= $network_id ?>" data-id-config="<?= $idConfig ?>" <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> </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" <link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> 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('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet" <link rel="stylesheet"
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>"> 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="<?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> 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-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>" 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> </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" <link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> 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('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet" <link rel="stylesheet"
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>"> 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="<?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> 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-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>" 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> </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" <link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> 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('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet" <link rel="stylesheet"
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>"> 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="<?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> 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-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>" 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> </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" <link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> 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('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet" <link rel="stylesheet"
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>"> 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="<?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> 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-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>" 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> </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" <link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> 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('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/toastr/toastr.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/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
<style type="text/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') ?>"> <link rel="stylesheet" href="<?php echo base_url('bower_components/toastr/toastr.css') ?>">
<!-- Date Picker --> <!-- Date Picker -->
<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-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" <link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> 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('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet" <link rel="stylesheet"
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>"> href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
<?php <?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(); $month = time();
$months[] = convertDate(date("M")); $months[] = convertDate(date("M"));
$label_months [] = date("M") . " " . date("Y"); $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" <link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> 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('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet" <link rel="stylesheet"
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>"> 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\Context\CustomContext;
use Brick\Money\Money; use Brick\Money\Money;
$context = new \Brick\Money\Context\AutoContext(); $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(); $month = time();
$months[] = convertDate(date("M")); $months[] = convertDate(date("M"));
$label_months [] = date("M") . " " . date("Y"); $label_months [] = date("M") . " " . date("Y");
@ -144,6 +98,7 @@ $fmt = new NumberFormatter( 'fr_FR', NumberFormatter::DECIMAL );
<h1> <h1>
<?php echo $this->lang->line('Gestion des wallets'). ' '. $network .' - '.$country; ?> <?php echo $this->lang->line('Gestion des wallets'). ' '. $network .' - '.$country; ?>
<span class="label label-success pull-right"><?= strtoupper(str_replace('_',' ',$type)) ?></span>
</h1> </h1>
<?php <?php
$site_url = base_url(); $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-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('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> <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/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="<?php echo base_url('bower_components/toastr/toastr.css') ?>">
<?php <?php
function convertDate($date){ use Brick\Money\Context\AutoContext;
$month = null; use Brick\Money\Money;
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(); $month = time();
$months[]=convertDate(date("M")); $months[]=convertDate(date("M"));
$label_months [] = date("M")." ".date("Y"); $label_months [] = date("M")." ".date("Y");
@ -520,7 +474,7 @@ echo base_url('bower_components/jvectormap/jquery-jvectormap.css') ?>">
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default pull-left" <button type="button" class="btn btn-default pull-left"
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button> 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> class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
</div> </div>
</div> </div>
@ -686,7 +640,7 @@ echo base_url('bower_components/jvectormap/jquery-jvectormap.css') ?>">
$('#updateWallet').click(function () { $('#updateWallet').click(function () {
var network_id = $(this).data('network-id'); var id_config = $(this).data('config-id');
if ($('#walletForm')[0].checkValidity()) { if ($('#walletForm')[0].checkValidity()) {
var taux_client_r = parseFloat($('#taux_client_r').val()); var taux_client_r = parseFloat($('#taux_client_r').val());
@ -716,7 +670,7 @@ echo base_url('bower_components/jvectormap/jquery-jvectormap.css') ?>">
type: 'POST', type: 'POST',
dataType: 'json', dataType: 'json',
data: { data: {
"network_id": network_id, "id_config": id_config,
"taux_client_r": taux_client_r, "taux_client_r": taux_client_r,
"taux_client_d": taux_client_d, "taux_client_d": taux_client_d,
"taux_ag_r": taux_ag_r, "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" <link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> 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('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet" <link rel="stylesheet"
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>"> 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\Context\CustomContext;
use Brick\Money\Money; use Brick\Money\Money;
$context = new \Brick\Money\Context\AutoContext(); $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(); $month = time();
$months[] = convertDate(date("M")); $months[] = convertDate(date("M"));
$label_months [] = date("M") . " " . date("Y"); $label_months [] = date("M") . " " . date("Y");
@ -142,6 +96,7 @@ $fmt = new NumberFormatter( 'fr_FR', NumberFormatter::DECIMAL );
<h1> <h1>
<?php echo $this->lang->line('Gestion des wallets'). ' '. $network .' - '.$country; ?> <?php echo $this->lang->line('Gestion des wallets'). ' '. $network .' - '.$country; ?>
<span class="label label-success pull-right"><?= strtoupper(str_replace('_',' ',$type)) ?></span>
</h1> </h1>
<?php <?php
$site_url = base_url(); $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-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('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/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="<?php echo base_url('bower_components/toastr/toastr.css') ?>">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Varela+Round|Open+Sans"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Varela+Round|Open+Sans">
@ -96,49 +94,6 @@
use Brick\Money\Money; use Brick\Money\Money;
$context = new \Brick\Money\Context\AutoContext(); $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(); $month = time();
$months[]=convertDate(date("M")); $months[]=convertDate(date("M"));
$label_months [] = date("M")." ".date("Y"); $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-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('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> <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/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
<?php <?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(); $month = time();
$months[]=convertDate(date("M")); $months[]=convertDate(date("M"));
$label_months [] = date("M")." ".date("Y"); $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-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('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> <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/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
@ -9,49 +7,6 @@
use Brick\Money\Context\CustomContext; use Brick\Money\Context\CustomContext;
use Brick\Money\Money; use Brick\Money\Money;
$context = new \Brick\Money\Context\AutoContext(); $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(); $month = time();
$months[]=convertDate(date("M")); $months[]=convertDate(date("M"));
$label_months [] = date("M")." ".date("Y"); $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 --> <!-- Date Picker -->
<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-datepicker/dist/css/bootstrap-datepicker.min.css') ?>">
<!-- Daterange picker --> <!-- Daterange picker -->
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>"> <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 --> <!-- ChartJS -->
<script src="<?php echo base_url('bower_components/Chart.js/Chart.js') ?>"></script> <script src="<?php echo base_url('bower_components/Chart.js/Chart.js') ?>"></script>
<?php <?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(); $month = time();
$months[]=convertDate(date("M")); $months[]=convertDate(date("M"));
$label_months [] = date("M")." ".date("Y"); $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" <link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> 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('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet" <link rel="stylesheet"
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>"> 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="<?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> data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="saveRates" data-network-id="<?= $network_id ?>" <button type="button" id="saveRates" data-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>" 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> </div>
</div> </div>
@ -407,7 +405,7 @@ $context = new \Brick\Money\Context\AutoContext();
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button> data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="saveTaxes" data-network-id="<?= $network_id ?>" <button type="button" id="saveTaxes" data-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>" 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> </div>
</div> </div>
@ -450,7 +448,7 @@ $context = new \Brick\Money\Context\AutoContext();
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button> 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-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>" 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> </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" <link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> 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('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet" <link rel="stylesheet"
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>"> 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="<?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> data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="saveRates" data-network-id="<?= $network_id ?>" <button type="button" id="saveRates" data-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>" 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> </div>
</div> </div>
@ -359,7 +357,7 @@ $context = new \Brick\Money\Context\AutoContext();
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button> data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="saveTaxes" data-network-id="<?= $network_id ?>" <button type="button" id="saveTaxes" data-network-id="<?= $network_id ?>"
data-id-config="<?= $idConfig ?>" 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> </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" <link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> 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('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet" <link rel="stylesheet"
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>"> 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="<?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" <link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>"> 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('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet" <link rel="stylesheet"
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>"> 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="<?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" <button type="button" class="btn btn-default pull-left"
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button> data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
<button type="button" id="saveLimit" data-network-id="<?= $network_id ?>" <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> </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 @@
<!-- Date Picker -->
<!-- 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') ?>"> <link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>">
<!-- Daterange picker --> <!-- Daterange picker -->
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>"> <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 --> <!-- ChartJS -->
<script src="<?php echo base_url('bower_components/Chart.js/Chart.js') ?>"></script> <script src="<?php echo base_url('bower_components/Chart.js/Chart.js') ?>"></script>
<?php <?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(); $month = time();
$months[]=convertDate(date("M")); $months[]=convertDate(date("M"));
$label_months [] = date("M")." ".date("Y"); $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;
}