diff --git a/application/controllers/Admin.php b/application/controllers/Admin.php index d7715fbf..5cb5434d 100755 --- a/application/controllers/Admin.php +++ b/application/controllers/Admin.php @@ -217,7 +217,7 @@ class Admin extends CI_Controller $this->session->set_userdata('name_current_pays',$pays_name->first_row()->name); $this->session->set_userdata('name_current_ville',$town_name->first_row()->name); - redirect('index.php/Admin_dash/index'); + redirect('Admin_dash/index'); } } } @@ -378,7 +378,7 @@ class Admin extends CI_Controller // get current page records $data["tab"] = $this->user_model->get_current_page_records($limit_per_page, $start_index,$pays,$hyper,$ville); //$data['positions'] = $this->user_model->get_current_page_records_positions($limit_per_page, $start_index,$pays,$hyper,$ville); - $config['base_url'] = base_url() . 'index.php/Admin/pagination_User_g'; + $config['base_url'] = base_url() . 'Admin/pagination_User_g'; $config['total_rows'] = $total_records; $config['per_page'] = $limit_per_page; $config["uri_segment"] = 3; diff --git a/application/controllers/Doctor_password.php b/application/controllers/Doctor_password.php new file mode 100755 index 00000000..c55ee143 --- /dev/null +++ b/application/controllers/Doctor_password.php @@ -0,0 +1,69 @@ +load->model('nano_health_model'); + } + + public function index() + { + if (!$this->input->get('token')) { + echo "Lien incorrect"; + } + else { + $db_token = $this->db->get_where('nh_validating_doctors',['token' => $this->input->get('token')]); + if($db_token->num_rows() > 0 ){ + $this->session->set_userdata('token', $this->input->get('token')); + $this->load->view('admin_update_password',['isValidatingDoctor' => true]); + }else{ + echo "Ce lien a déjà expiré"; + } + } + + } + + public function create_password() + { + if (!$this->session->userdata('token')) { + echo "Ce lien a déjà expiré"; + } else { + if(isset($_POST)) + { + $password = $this->input->post('password'); + $hash = hashSSHA($password); + $encrypted_password = $hash["encrypted"]; // encrypted password + $salt = $hash["salt"]; // salt + + $this->db->where('token' , $this->session->userdata('token')); + $res = $this->db->update('nh_validating_doctors',['password' => $encrypted_password, 'salt' => $salt]); + + if($res==true){ + $new_token = null; + do { + $new_token = bin2hex(openssl_random_pseudo_bytes(16)); + $tokenExist = $this->db->get_where('nh_validating_doctors',['token' => $new_token]); + } while ($tokenExist->num_rows() > 0); + + + $this->db->where('token' , $this->session->userdata('token')); + $res_token = $this->db->update('nh_validating_doctors',['token'=>$new_token]); + + if($res_token==true){ + $data['alert'] = 'password'; + $data['message'] = 'Votre mot de passe a été configuré avec succès'; + $this->load->view('login', $data); + }else{ + echo "Une erreur s'est produite"; + } + }else{ + echo "Une erreur s'est produite"; + } + } + } + } +} diff --git a/application/controllers/Gestion.php b/application/controllers/Gestion.php index 2acc72c3..8b408b54 100755 --- a/application/controllers/Gestion.php +++ b/application/controllers/Gestion.php @@ -46,15 +46,7 @@ class Gestion extends CI_Controller } public function activer() - { - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { + {if($this->isLogged()) { if (isset($_POST)) { $villes = $this->input->post('villes'); @@ -77,15 +69,7 @@ class Gestion extends CI_Controller public function update() { - - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { +if($this->isLogged()) { if (isset($_POST)) { $id_country = $this->input->post('id_country'); @@ -105,15 +89,7 @@ class Gestion extends CI_Controller public function activer_desactiver() { - - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { +if($this->isLogged()) { if (isset($_POST)) { $aVilles = $this->input->post('aVilles'); @@ -150,15 +126,7 @@ class Gestion extends CI_Controller } public function desactiver() - { - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { + {if($this->isLogged()) { if (isset($_POST)) { $villes = $this->input->post('villes'); @@ -180,15 +148,7 @@ class Gestion extends CI_Controller } public function suppress() - { - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { + {if($this->isLogged()) { if (isset($_POST)) { $villes = $this->input->post('ville'); @@ -283,15 +243,7 @@ class Gestion extends CI_Controller public function creat_network() { - - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { +if($this->isLogged()) { if (isset($_POST)) { $network = $this->input->post('new_network'); @@ -311,15 +263,7 @@ class Gestion extends CI_Controller public function assignation() { - - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { +if($this->isLogged()) { if (isset($_POST)) { $network = $this->input->post('network'); @@ -354,15 +298,7 @@ class Gestion extends CI_Controller public function update_network() { - - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { +if($this->isLogged()) { if (isset($_POST)) { $old_network = $this->input->post('old_name'); @@ -381,15 +317,7 @@ class Gestion extends CI_Controller public function change_status_network() { - - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { +if($this->isLogged()) { if (isset($_POST)) { $activations = $this->input->post('activations'); @@ -457,16 +385,7 @@ class Gestion extends CI_Controller public function create_admin() { - - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { - + if($this->isLogged()) { if (isset($_POST)) { $category = 1; $firstname = $this->input->post('prenom'); @@ -491,7 +410,7 @@ class Gestion extends CI_Controller if ($query) { - $link = base_url("index.php/Admin_password/?token=" . $token); + $link = base_url("Admin_password/?token=" . $token); $this->load->library('email'); $this->email->from('noreply@ilink-app.com', 'iLink World'); @@ -518,15 +437,7 @@ class Gestion extends CI_Controller public function modif_admin() { - - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { +if($this->isLogged()) { if (isset($_POST)) { $id = $this->input->post('id'); @@ -551,15 +462,7 @@ class Gestion extends CI_Controller public function delete_admin() { - - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { + if($this->isLogged()) { if (isset($_POST)) { $id = $this->input->post('id'); @@ -577,15 +480,7 @@ class Gestion extends CI_Controller public function codes() { - - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - $this->load->view('login', $data); - } else { - + if($this->isLogged()) { $ville = $this->session->userdata('current_ville'); $hyper = $this->session->userdata('current_hyper'); $pays = $this->session->userdata('current_pays'); @@ -634,9 +529,6 @@ class Gestion extends CI_Controller $data['active'] = "codes-hyper"; $data['pays'] = $this->user_model->getAllCountries(); $data['game_pays'] = $this->user_model->getGameCountry(); - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['email'] = $this->session->userdata('email'); $this->load->view('header_gestion', $data); $this->load->view('codeg'); @@ -659,9 +551,6 @@ class Gestion extends CI_Controller $data['list'] = $this->user_model->getGeneratedHyperCodes(); $data['active'] = "codes"; $data['pays'] = $this->user_model->getAllCountries(); - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['email'] = $this->session->userdata('email'); $this->load->view('header_gestion', $data); @@ -733,15 +622,7 @@ class Gestion extends CI_Controller public function infos_geolocalisation() { - - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { +if($this->isLogged()) { if (isset($_POST)) { $pays = $this->input->post('pays'); @@ -932,15 +813,7 @@ class Gestion extends CI_Controller public function redirect_info_agent() { - - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { +if($this->isLogged()) { if (isset($_GET)) { $lastname = $this->input->get('agent'); @@ -1046,15 +919,7 @@ class Gestion extends CI_Controller } public function activerGame() - { - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { + {if($this->isLogged()) { if (isset($_POST)) { $pays = $this->input->post('pays'); @@ -1086,15 +951,7 @@ class Gestion extends CI_Controller } public function desactiverGame() - { - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { + {if($this->isLogged()) { if (isset($_POST)) { $pays = $this->input->post('pays'); @@ -1173,15 +1030,7 @@ class Gestion extends CI_Controller } public function modifierPalier() - { - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { + {if($this->isLogged()) { if (isset($_POST)) { $n1 = $this->input->post('n1'); @@ -1285,15 +1134,7 @@ class Gestion extends CI_Controller public function get_user() { - - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { +if($this->isLogged()) { if (isset($_POST)) { $nom = $this->input->post('nom'); @@ -1385,15 +1226,7 @@ class Gestion extends CI_Controller public function update_info_user() { - - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { +if($this->isLogged()) { if (isset($_POST)) { $id = $_POST['user_id']; $phone = $_POST['contact']; @@ -1414,15 +1247,7 @@ class Gestion extends CI_Controller public function update_info_geolocated() { - - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { +if($this->isLogged()) { if (isset($_POST)) { $id_agent = $_POST['user_id']; $id_netAg = $_POST['id_netAg']; @@ -1472,15 +1297,7 @@ class Gestion extends CI_Controller public function changePubState() { - - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { +if($this->isLogged()) { if (isset($_POST)) { $id_pub = $_POST['pub_id']; $etat = $_POST['etat']; @@ -1501,15 +1318,7 @@ class Gestion extends CI_Controller } public function addPubRow() - { - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - - $this->load->view('login', $data); - } else { + {if($this->isLogged()) { if (isset($_POST)) { $id_country = $_POST['country_id']; $res = $this->user_model->createPubRow($id_country); diff --git a/application/controllers/Hyperviseur_dash.php b/application/controllers/Hyperviseur_dash.php index 4c83a024..fd0521c8 100755 --- a/application/controllers/Hyperviseur_dash.php +++ b/application/controllers/Hyperviseur_dash.php @@ -33,9 +33,6 @@ class Hyperviseur_dash extends CI_Controller $data['allGeo'] = $this->user_model->getAllUserGeoForHyp($this->session->userdata('member_code')); $data['allDem'] = $this->user_model->getDemandes($this->session->userdata('member_code')); $data['token'] = $this->session->userdata('token'); - $data['email'] = $this->session->userdata('email'); - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); $data['member_code'] = $this->session->userdata('member_code'); $data['phone'] = $this->session->userdata('phone'); $data['adresse'] = $this->session->userdata('adresse'); @@ -73,9 +70,6 @@ class Hyperviseur_dash extends CI_Controller $data['latitude'] = $this->session->userdata('latitude'); $data['longitude'] = $this->session->userdata('longitude'); $data['token'] = $this->session->userdata('token'); - $data['email'] = $this->session->userdata('email'); - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); $data['code_parrain'] = $this->session->userdata('code_parrain'); $data['phone'] = $this->session->userdata('phone'); $data['adresse'] = $this->session->userdata('adresse'); @@ -106,10 +100,10 @@ class Hyperviseur_dash extends CI_Controller $network = $this->session->userdata('network'); $category = 'super'; $position = $this->user_model->getAllpositions($network, $category, $this->session->userdata('member_code')); - if ($position != null) { +// if ($position != null) { //var_dump($position); //echo json_encode($position); - } +// } $data['total_points'] = $this->user_model->getCoutSuperForHyper($this->session->userdata('member_code')); $data['positions'] = $position; $data['active'] = "super"; @@ -118,9 +112,6 @@ class Hyperviseur_dash extends CI_Controller $data['latitude'] = $this->session->userdata('latitude'); $data['longitude'] = $this->session->userdata('longitude'); $data['token'] = $this->session->userdata('token'); - $data['email'] = $this->session->userdata('email'); - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); $data['code_parrain'] = $this->session->userdata('code_parrain'); $data['phone'] = $this->session->userdata('phone'); $data['adresse'] = $this->session->userdata('adresse'); @@ -167,9 +158,6 @@ class Hyperviseur_dash extends CI_Controller $data['demand_type'] = 'credit'; $data['alert'] = ""; $data['token'] = $this->session->userdata('token'); - $data['email'] = $this->session->userdata('email'); - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); $data['code_parrain'] = $this->session->userdata('code_parrain'); $data['phone'] = $this->session->userdata('phone'); $data['adresse'] = $this->session->userdata('adresse'); @@ -209,9 +197,6 @@ class Hyperviseur_dash extends CI_Controller $data['demand_type'] = 'credit'; $data['alert'] = ""; $data['token'] = $this->session->userdata('token'); - $data['email'] = $this->session->userdata('email'); - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); $data['code_parrain'] = $this->session->userdata('code_parrain'); $data['phone'] = $this->session->userdata('phone'); $data['adresse'] = $this->session->userdata('adresse'); @@ -366,9 +351,6 @@ class Hyperviseur_dash extends CI_Controller $data['active'] = "demandesAd"; $data['alert'] = ""; $data['token'] = $this->session->userdata('token'); - $data['email'] = $this->session->userdata('email'); - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); $data['code_parrain'] = $this->session->userdata('code_parrain'); $data['phone'] = $this->session->userdata('phone'); $data['adresse'] = $this->session->userdata('adresse'); @@ -470,6 +452,7 @@ class Hyperviseur_dash extends CI_Controller $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'); + $data['provider_classes'] = $this->nano_health_model->getProviderClasses($data['config_id']); } //Create wallet if it not exist @@ -491,9 +474,6 @@ class Hyperviseur_dash extends CI_Controller $data['alert'] = ""; $data['active'] = "wallet_wallet"; $data['token'] = $this->session->userdata('token'); - $data['email'] = $this->session->userdata('email'); - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); $data['code_parrain'] = $this->session->userdata('code_parrain'); $data['phone'] = $this->session->userdata('phone'); $data['adresse'] = $this->session->userdata('adresse'); @@ -565,9 +545,7 @@ class Hyperviseur_dash extends CI_Controller $data['active'] = "wallet_wallet"; $data['alert'] = ""; - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['email'] = $this->session->userdata('email'); + $data['network'] = $this->session->userdata('network'); $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); $data['networks'] = $this->user_model->getActiveNetwork(); @@ -757,9 +735,6 @@ class Hyperviseur_dash extends CI_Controller if ($this->isLogged()) { $data['active'] = "wallet_password"; $data['alert'] = ""; - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['email'] = $this->session->userdata('email'); $data['network'] = $this->session->userdata('network'); $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); $data['networks'] = $this->user_model->getActiveNetwork(); @@ -962,9 +937,6 @@ class Hyperviseur_dash extends CI_Controller if ($this->isLogged()) { $data['active'] = "wallet_calculator"; $data['alert'] = ""; - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['email'] = $this->session->userdata('email'); $data['network'] = $this->session->userdata('network'); $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); $data['networks'] = $this->user_model->getActiveNetwork(); @@ -1307,9 +1279,7 @@ class Hyperviseur_dash extends CI_Controller // $data['configWallet'] = $this->wallet_model->getConfigWallet($network_id); $data['active'] = "wallet_wallet"; $data['alert'] = ""; - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['email'] = $this->session->userdata('email'); + $data['network'] = $this->session->userdata('network'); $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); @@ -1448,9 +1418,7 @@ class Hyperviseur_dash extends CI_Controller $data['active'] = "wallet_wallet"; $data['alert'] = ""; - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['email'] = $this->session->userdata('email'); + $data['network'] = $this->session->userdata('network'); $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); // @@ -1508,11 +1476,8 @@ class Hyperviseur_dash extends CI_Controller $data['game_pays'] = $this->user_model->getGameCountry(); $data['network'] = $this->session->userdata('network'); $data['country'] = $this->session->userdata('current_pays'); - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); $data['currency_code'] = $this->session->userdata('currency_code'); $data['token'] = $this->session->userdata('token'); - $data['email'] = $this->session->userdata('email'); $data['configWallet'] = $data['hasWallet']->first_row(); $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); $this->load->view('header_hyp', $data); @@ -1527,9 +1492,6 @@ class Hyperviseur_dash extends CI_Controller // $data['configWallet'] = $this->wallet_model->getConfigWallet($network_id); $data['active'] = "nano_credit"; $data['alert'] = ""; - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['email'] = $this->session->userdata('email'); $data['network'] = $this->session->userdata('network'); $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); $data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id')); @@ -1578,9 +1540,7 @@ class Hyperviseur_dash extends CI_Controller } $data['active'] = "nano_credit"; $data['alert'] = ""; - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['email'] = $this->session->userdata('email'); + $data['network'] = $this->session->userdata('network'); $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); $data['networks'] = $this->user_model->getActiveNetwork(); @@ -1683,9 +1643,7 @@ class Hyperviseur_dash extends CI_Controller { $data['active'] = "nano_credit"; $data['alert'] = ""; - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['email'] = $this->session->userdata('email'); + $data['network'] = $this->session->userdata('network'); $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); $data['networks'] = $this->user_model->getActiveNetwork(); @@ -1724,9 +1682,6 @@ class Hyperviseur_dash extends CI_Controller $data['active'] = "recherche"; $data['alert'] = ""; - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['email'] = $this->session->userdata('email'); $data['network'] = $this->session->userdata('network'); $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); $data['networks'] = $this->user_model->getActiveNetwork(); @@ -1794,9 +1749,6 @@ class Hyperviseur_dash extends CI_Controller $data['active'] = "recherche"; $data['alert'] = ""; - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['email'] = $this->session->userdata('email'); $data['network'] = $this->session->userdata('network'); $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); $data['networks'] = $this->user_model->getActiveNetwork(); @@ -1852,9 +1804,6 @@ class Hyperviseur_dash extends CI_Controller $data['active'] = "operators"; $data['alert'] = ""; - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['email'] = $this->session->userdata('email'); $data['network'] = $this->session->userdata('network'); $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); $data['networks'] = $this->user_model->getActiveNetwork(); @@ -1967,7 +1916,6 @@ class Hyperviseur_dash extends CI_Controller public function documentation() { - if ($this->isLogged()) { $view = $this->input->get('view'); if ($view) { @@ -1986,6 +1934,29 @@ class Hyperviseur_dash extends CI_Controller } } } + + public function validating_doctors(){ + if ($this->isLogged()) { + $data['active'] = "wallet_validating_doctors"; + $data['alert'] = ""; + $data['network'] = $this->session->userdata('network'); + $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); + $data['networks'] = $this->user_model->getActiveNetwork(); + $data['currency_code'] = $this->session->userdata('currency_code'); + $data['category'] = $this->session->userdata('category'); + $data['network_id'] = $this->session->userdata('network_id'); + + $data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id')); + $nh_config = $this->nano_health_model->getConfig($data['network_id']); + $data['nh_config'] = $nh_config ? $nh_config->first_row() : null ; + $data['config_id'] = $data['nh_config'] ? $data['nh_config']->id : null ; + $data['doctors'] = $this->db->get('nh_validating_doctors'); + + $this->load->view('header_hyp', $data); + $this->load->view('nano_health/hyper/validating_doctors'); + $this->load->view('footer'); + } + } } class Operation diff --git a/application/controllers/Listes_members.php b/application/controllers/Listes_members.php index 47c32417..0153085b 100755 --- a/application/controllers/Listes_members.php +++ b/application/controllers/Listes_members.php @@ -81,7 +81,7 @@ class Listes_members extends CI_Controller $data['message'] = "The member $phoneNm couldn't been added!"; - redirect('index.php/Listes_members'); + redirect('Listes_members'); } } else { @@ -91,7 +91,7 @@ class Listes_members extends CI_Controller $data['message'] = "Database error!"; - redirect('index.php/Listes_members'); + redirect('Listes_members'); } } @@ -165,7 +165,7 @@ class Listes_members extends CI_Controller $data['message'] = "The member $phoneNm has been updated!"; - redirect('index.php/Listes_members'); + redirect('Listes_members'); //redirect('Listes_admin'); } else { @@ -175,7 +175,7 @@ class Listes_members extends CI_Controller $data['message'] = "The member $phoneNm couldn't been updated!"; - redirect('index.php/Listes_members'); + redirect('Listes_members'); } } else { $data['alert'] = "ok"; @@ -183,7 +183,7 @@ class Listes_members extends CI_Controller $data['message'] = "The record couldn't been updated! No data sent."; - redirect('index.php/Listes_members'); + redirect('Listes_members'); } } diff --git a/application/controllers/Login.php b/application/controllers/Login.php index 00e0909e..1005c06e 100755 --- a/application/controllers/Login.php +++ b/application/controllers/Login.php @@ -99,12 +99,12 @@ class Login extends CI_Controller $admin = "admin"; if ($data['category'] == $admin) { - redirect('index.php/Admin_dash'); + redirect('Admin_dash'); //$this->load->view('user_profile.php'); } else if ($data['category'] == $hyper) { - redirect('index.php/Hyperviseur_dash'); + redirect('Hyperviseur_dash'); } else if ($data['category'] == $super) { - redirect('index.php/Superviseur_dash'); + redirect('Superviseur_dash'); } $this->load->view('user_profile.php'); diff --git a/application/controllers/Member_code_admin.php b/application/controllers/Member_code_admin.php index 61b8805d..cbc24dfb 100755 --- a/application/controllers/Member_code_admin.php +++ b/application/controllers/Member_code_admin.php @@ -139,13 +139,13 @@ class Member_code_admin extends CI_Controller $data['alert'] = "ok"; $data['success'] = "ok"; $data['message'] = "Le code membre $id a bien été supprimé !"; - redirect('index.php/Member_code_admin/index'); + redirect('Member_code_admin/index'); } else { $data['active'] = "members_code"; $data['alert'] = "ok"; $data['message'] = "Une erreur s'est produite !"; - redirect('index.php/Member_code_admin/index'); + redirect('Member_code_admin/index'); } } diff --git a/application/controllers/NanoHealthController.php b/application/controllers/NanoHealthController.php index f1d0e41f..1b8c3f67 100644 --- a/application/controllers/NanoHealthController.php +++ b/application/controllers/NanoHealthController.php @@ -58,6 +58,106 @@ class NanoHealthController extends CI_Controller } } + public function deleteAct(){ + if($this->isLogged()) { + if (isset($_POST)) { + $this->db->delete('nh_acts', ['id' => $_POST['id']]); + echo json_encode(['code' => 200 ]); + } + } + } + + public function createValidatingDoctor() + { + if($this->isLogged()) { + if (isset($_POST)) { + $emailExist = $this->db->get_where('nh_validating_doctors', ['email' => $_POST['email']]); + if ($emailExist->num_rows() == 0) { + do { + $token = bin2hex(openssl_random_pseudo_bytes(16)); + $tokenExist = $this->db->get_where('nh_validating_doctors',['token' => $token]); + } while ($tokenExist->num_rows() > 0); + + $_POST['token'] = $token; + $query = $this->db->insert('nh_validating_doctors', $_POST); + + if ($query) { + + $link = base_url("Doctor_password/?token=" . $token); + $this->load->library('email'); + + $this->email->from('noreply@ilink-app.com', 'iLink World'); + $this->email->to($_POST['email']); + + $this->email->subject($this->lang->line("mail_title_validating_doctor")); + $this->email->message($_POST['firstname'] . ' ' . $_POST['lastname'] . ' ' . $this->lang->line("mail_body_validating_doctor") . ' ' . $link); + + $this->email->send(); + + echo json_encode(['code' => 200]); + } else { + echo json_encode(['code' => 500, 'message' => $this->lang->line("Une erreur s'est produite")]); + } + } else { + echo json_encode(['code'=> 419 , 'message' => $this->lang->line("L'email entré est déjà utilisé")]); + } + } + } + } + + public function updateValidatingDoctor() + { + if($this->isLogged()) { + if (isset($_POST)) { + $emailExist = $this->db->get_where('nh_validating_doctors', ['id !=' => $_POST['id'], 'email' => $_POST['email']]); + if ($emailExist->num_rows() == 0) { + $this->db->where('id',$_POST['id']); + $this->db->update('nh_validating_doctors',$_POST); + echo json_encode(['code' => 200]); + }else{ + echo json_encode(['code'=> 419 , 'message' => $this->lang->line("L'email entré est déjà utilisé")]); + } + } + } + } + + public function deleteValidatingDoctor(){ + if($this->isLogged()) { + if (isset($_POST)) { + $this->db->delete('nh_validating_doctors', ['id' => $_POST['id']]); + echo json_encode(['code' => 200]); + } + } + } + + public function storeProviderClass(){ + 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_provider_classes',$_POST); + }else{ + $this->db->insert('nh_provider_classes',$_POST); + } + + echo json_encode(['code' => 200 ]); + } + } + } + + public function deleteProviderClass(){ + if($this->isLogged()) { + if (isset($_POST)) { + $this->db->delete('nh_provider_classes', ['id' => $_POST['id']]); + echo json_encode(['code' => 200 ]); + } + } + } + private function isLogged() { if (!$this->session->userdata('email')) { diff --git a/application/controllers/Search.php b/application/controllers/Search.php index d00092b5..2fb0c711 100755 --- a/application/controllers/Search.php +++ b/application/controllers/Search.php @@ -8,15 +8,15 @@ class Welcome extends CI_Controller * Index Page for this controller. * * Maps to the following URL - * http://example.com/index.php/welcome + * http://example.com/welcome * - or - - * http://example.com/index.php/welcome/index + * http://example.com/welcome/index * - or - * Since this controller is set as the default controller in * config/routes.php, it's displayed at http://example.com/ * * So any other public methods not prefixed with an underscore will - * map to /index.php/welcome/ + * map to /welcome/ * @see https://codeigniter.com/user_guide/general/urls.html */ public function index() diff --git a/application/controllers/Superviseur_dash.php b/application/controllers/Superviseur_dash.php index d297ec45..d876cf6b 100755 --- a/application/controllers/Superviseur_dash.php +++ b/application/controllers/Superviseur_dash.php @@ -38,9 +38,7 @@ class Superviseur_dash extends CI_Controller $data['active'] = "dash"; $data['token'] = $this->session->userdata('token'); - $data['email'] = $this->session->userdata('email'); - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); + $data['member_code'] = $this->session->userdata('member_code'); $data['phone'] = $this->session->userdata('phone'); $data['adresse'] = $this->session->userdata('adresse'); @@ -93,9 +91,7 @@ class Superviseur_dash extends CI_Controller $data['latitude'] = $this->session->userdata('latitude'); $data['longitude'] = $this->session->userdata('longitude'); $data['token'] = $this->session->userdata('token'); - $data['email'] = $this->session->userdata('email'); - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); + $data['code_parrain'] = $this->session->userdata('code_parrain'); $data['phone'] = $this->session->userdata('phone'); $data['adresse'] = $this->session->userdata('adresse'); @@ -137,9 +133,7 @@ class Superviseur_dash extends CI_Controller $data['demand_type'] = 'credit'; $data['alert'] = ""; $data['token'] = $this->session->userdata('token'); - $data['email'] = $this->session->userdata('email'); - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); + $data['code_parrain'] = $this->session->userdata('code_parrain'); $data['phone'] = $this->session->userdata('phone'); $data['adresse'] = $this->session->userdata('adresse'); @@ -191,9 +185,7 @@ class Superviseur_dash extends CI_Controller $data['alert'] = ""; $data['demand_type'] = 'adhesion'; $data['token'] = $this->session->userdata('token'); - $data['email'] = $this->session->userdata('email'); - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); + $data['code_parrain'] = $this->session->userdata('code_parrain'); $data['phone'] = $this->session->userdata('phone'); $data['adresse'] = $this->session->userdata('adresse'); @@ -283,9 +275,6 @@ class Superviseur_dash extends CI_Controller $data['alert'] = ""; $data['active'] = "wallet"; $data['token'] = $this->session->userdata('token'); - $data['email'] = $this->session->userdata('email'); - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); $data['code_parrain'] = $this->session->userdata('code_parrain'); $data['phone'] = $this->session->userdata('phone'); $data['adresse'] = $this->session->userdata('adresse'); @@ -326,9 +315,6 @@ class Superviseur_dash extends CI_Controller $data['active'] = "wallet"; $data['alert'] = ""; - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['email'] = $this->session->userdata('email'); $data['network'] = $this->session->userdata('network'); $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); $data['networks'] = $this->user_model->getActiveNetwork(); @@ -370,9 +356,6 @@ class Superviseur_dash extends CI_Controller $data['active'] = "nano_credit"; $data['alert'] = ""; - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['email'] = $this->session->userdata('email'); $data['network'] = $this->session->userdata('network'); $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); $data['networks'] = $this->user_model->getActiveNetwork(); @@ -404,14 +387,10 @@ class Superviseur_dash extends CI_Controller public function recherche() { - if ($this->isLogged()) { $data['active'] = "recherche"; $data['alert'] = ""; - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['email'] = $this->session->userdata('email'); $data['network'] = $this->session->userdata('network'); $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); $data['networks'] = $this->user_model->getActiveNetwork(); @@ -479,9 +458,6 @@ class Superviseur_dash extends CI_Controller $data['active'] = "recherche"; $data['alert'] = ""; - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['email'] = $this->session->userdata('email'); $data['network'] = $this->session->userdata('network'); $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); $data['networks'] = $this->user_model->getActiveNetwork(); diff --git a/application/controllers/Users.php b/application/controllers/Users.php index 26d9feef..96d2f483 100755 --- a/application/controllers/Users.php +++ b/application/controllers/Users.php @@ -5,7 +5,7 @@ public function __construct(){ parent::__construct(); - $this->load->model('user_model'); + $this->load->model('nano_health_model'); } public function index() @@ -74,65 +74,86 @@ 'user_role' => $this->input->post('user_role') ); - $data = $this->user_model->login_user($user_login['user_email'], $user_login['user_password'], $user_login['user_role']); + // Pour les medecins valideurs de iLink Santé + if($user_login['user_role'] == 2 && filter_var($user_login['user_email'], FILTER_VALIDATE_EMAIL)){ + $sql = "SELECT nhd.* , n.name as network , n.id as network_id, cc.name as country, cc.currency_code + FROM nh_validating_doctors nhd INNER JOIN nh_networks_configs nhc ON nhc.id = nhd.nh_network_config_id + INNER JOIN networks n ON n.id = nhc.network_id INNER JOIN countries_currencies cc ON cc.id = n.country_id WHERE nhd.email = ?"; + $doctor = $this->db->query($sql,[$user_login['user_email']]); + if($doctor->num_rows()>0) { + $doctor = $doctor->first_row(); + $encrypted_password = $doctor->password; + $hash = checkhashSSHA($doctor->salt,$user_login['user_password']); + if ($encrypted_password == $hash) { + $this->session->set_userdata('email', $doctor->email); + $this->session->set_userdata('firstname', $doctor->firstname); + $this->session->set_userdata('lastname', $doctor->lastname); + $this->session->set_userdata('phone', $doctor->email); + $this->session->set_userdata('currency_code', $doctor->currency_code); + $this->session->set_userdata('network', $doctor->network); + $this->session->set_userdata('network_id', $doctor->network_id); + $this->session->set_userdata('current_pays', $doctor->country); + redirect('ValidatingDoctor'); + } + } + }else{ + $data = $this->user_model->login_user($user_login['user_email'], $user_login['user_password'], $user_login['user_role']); - if ($data) { + if ($data) { - $hyper = "hyper"; - $super = "super"; + $hyper = "hyper"; + $super = "super"; - $this->session->set_userdata('token', $data->token); - $this->session->set_userdata('email', $data->email); - $this->session->set_userdata('firstname', $data->firstname); - $this->session->set_userdata('lastname', $data->lastname); - $this->session->set_userdata('adresse', $data->adresse); - $this->session->set_userdata('agent_id', $data->agent_id); - $this->session->set_userdata('currency_code', $data->currency_code); + $this->session->set_userdata('token', $data->token); + $this->session->set_userdata('email', $data->email); + $this->session->set_userdata('firstname', $data->firstname); + $this->session->set_userdata('lastname', $data->lastname); + $this->session->set_userdata('adresse', $data->adresse); + $this->session->set_userdata('agent_id', $data->agent_id); + $this->session->set_userdata('currency_code', $data->currency_code); - if($user_login['user_role']==1){ - $this->session->set_userdata('country', $data->country); + if($user_login['user_role']==1){ + $this->session->set_userdata('country', $data->country); - $pays = $this->user_model->getAllCountries(); - $this->session->set_userdata('current_pays', $pays->first_row()->name); + $pays = $this->user_model->getAllCountries(); + $this->session->set_userdata('current_pays', $pays->first_row()->name); - $hyper = $this->user_model->getAllHyper($this->session->userdata('current_pays')); - $this->session->set_userdata('current_hyper', $hyper->first_row()->code_membre); + $hyper = $this->user_model->getAllHyper($this->session->userdata('current_pays')); + $this->session->set_userdata('current_hyper', $hyper->first_row()->code_membre); - $ville = $this->user_model->getVilleNetworkByHyper($this->session->userdata('current_hyper')); - $this->session->set_userdata('current_ville', $ville->first_row()->ville); + $ville = $this->user_model->getVilleNetworkByHyper($this->session->userdata('current_hyper')); + $this->session->set_userdata('current_ville', $ville->first_row()->ville); - $this->session->set_userdata('category', $data->category); + $this->session->set_userdata('category', $data->category); - redirect('index.php/Admin_dash/filter'); + redirect('Admin_dash/filter'); - }else{ - $this->session->set_userdata('member_code', $data->code_membre); - $this->session->set_userdata('longitude', $data->longitude); - $this->session->set_userdata('latitude', $data->latitude); - $this->session->set_userdata('phone', $data->phone); - $this->session->set_userdata('category', $data->category); - $this->session->set_userdata('network', $data->network); - $this->session->set_userdata('network_id', $data->network_id); - $this->session->set_userdata('current_pays', $data->country); + }else{ + $this->session->set_userdata('member_code', $data->code_membre); + $this->session->set_userdata('longitude', $data->longitude); + $this->session->set_userdata('latitude', $data->latitude); + $this->session->set_userdata('phone', $data->phone); + $this->session->set_userdata('category', $data->category); + $this->session->set_userdata('network', $data->network); + $this->session->set_userdata('network_id', $data->network_id); + $this->session->set_userdata('current_pays', $data->country); - if($data->category == $hyper) { - redirect('index.php/Hyperviseur_dash'); - } else if ($data->category == $super) { - $this->session->set_userdata('code_parrain', $data->code_parrain); - redirect('index.php/Superviseur_dash'); - } - } + if($data->category == $hyper) { + redirect('Hyperviseur_dash'); + } else if ($data->category == $super) { + $this->session->set_userdata('code_parrain', $data->code_parrain); + redirect('Superviseur_dash'); + } + } - } else { - $this->session->set_flashdata('error_msg', 'Error occured,Try again.'); + } + } - $data['alert'] = "ok"; - $data['message'] = "L'identifiant " . $user_login['user_email'] . " ou le mot de passe sont incorrectes ou vérifiez votre grade!"; - - $this->load->view('login', $data); - - } + $this->session->set_flashdata('error_msg', 'Error occured,Try again.'); + $data['alert'] = "ok"; + $data['message'] = "L'identifiant " . $user_login['user_email'] . " ou le mot de passe sont incorrectes ou vérifiez votre grade!"; + $this->load->view('login', $data); } @@ -219,7 +240,7 @@ $this->session->sess_destroy(); $data['alert'] = 'You have been disconnected'; $this->session->set_flashdata('error','You have been disconnected' ); - redirect('index.php/Users', $data); + redirect('Users', $data); // $this->load->view('login', $data); } @@ -242,7 +263,7 @@ $token_query = $this->db->query("SELECT token FROM admin WHERE email='".$email."'"); $token = $token_query->first_row()->token; - $link = base_url("index.php/Admin_password/?token=".$token); + $link = base_url("Admin_password/?token=".$token); $this->load->library('email'); $this->email->from('noreply@ilink-app.com', 'iLink World'); diff --git a/application/controllers/ValidatingDoctor.php b/application/controllers/ValidatingDoctor.php new file mode 100755 index 00000000..d7e5d0d4 --- /dev/null +++ b/application/controllers/ValidatingDoctor.php @@ -0,0 +1,34 @@ +load->model('nano_credit_model'); + } + + public function index(){ +// if ($this->isLogged()){ + $data['active'] = "dashboard"; + $this->load->view('nano_health/validating_doctor/header', $data); + $this->load->view('nano_health/validating_doctor/dashboard', $data); + $this->load->view('footer'); +// } + + } + + private function isLogged(){ + if (!$this->session->userdata('email')) { + $this->session->set_flashdata('error', 'log in first'); + + $data['alert'] = "ok"; + $data['message'] = "Login first!"; + + redirect('index.php', $data); + return false; + } + return true; + } +} diff --git a/application/helpers/functions_helper.php b/application/helpers/functions_helper.php index d8f7d198..0be669fd 100644 --- a/application/helpers/functions_helper.php +++ b/application/helpers/functions_helper.php @@ -134,3 +134,17 @@ if (!function_exists('convertDate')) { } } +if (!function_exists('hashSSHA')) { + function hashSSHA($password) { + $salt = sha1(rand()); + $salt = substr($salt, 0, 10); + $encrypted = base64_encode(sha1($password . $salt, true) . $salt); + return array("salt" => $salt, "encrypted" => $encrypted); + } +} + +if (!function_exists('checkhashSSHA')) { + function checkhashSSHA($salt, $password) { + return base64_encode(sha1($password . $salt, true) . $salt); + } +} diff --git a/application/language/english/message_lang.php b/application/language/english/message_lang.php index c7d481cd..75e866ab 100755 --- a/application/language/english/message_lang.php +++ b/application/language/english/message_lang.php @@ -671,5 +671,26 @@ $lang['PACKAGE'] = "Package"; $lang['UNIT_PRICE'] = "Unit price"; $lang['FREE'] = "Free"; $lang['PRIOR'] = "Prerequisite"; - +$lang['first_rule_years_price_grid'] = "The minimum age must be less than or equal to the age limit of the child beneficiary"; +$lang['second_rule_years_price_grid'] = "The maximum age must be less than or equal to the age limit of the child beneficiary"; +$lang['validating_doctors'] = "Validating doctors"; +$lang['validating_doctor'] = "Validating doctor"; +$lang['manage_validating_doctors'] = "Managing validating doctors"; +$lang['add_validating_doctor'] = "Add a validating doctor"; +$lang['validating_doctor_created'] = "Validating doctor created"; +$lang['mail_title_validating_doctor'] = "Create your validating doctor account"; +$lang['mail_body_validating_doctor'] = "Your validating doctor account has been created. Please follow this link to set up your password"; +$lang['validating_doctor_updated'] = "Validating doctor modified"; +$lang['validating_doctor_deleted'] = "Deleted validating doctor"; +$lang['delete_of_act'] = "Deleted act"; +$lang['act_deleted'] = "Deleted act"; +$lang['care_requests'] = "Care requests"; +$lang['accepted_care_requests'] = "Accepted care requests"; +$lang['cancelled_care_requests'] = "Cancelled care requests"; +$lang['not_treated_care_requests'] = "Care requests not processed"; +$lang['provider_classes'] = "Provider classes"; +$lang['add_provider_class'] = "Add a provider class"; +$lang['edit_provider_class'] = "Edit a class"; +$lang['delete_provider_class'] = "Delete a provider class"; +$lang['provider_class_deleted'] = "Deleted provider class"; ?> diff --git a/application/language/french/message_lang.php b/application/language/french/message_lang.php index 6fd59893..0959c10c 100755 --- a/application/language/french/message_lang.php +++ b/application/language/french/message_lang.php @@ -683,4 +683,26 @@ $lang['PACKAGE'] = "Forfait"; $lang['UNIT_PRICE'] = "Prix unitaire"; $lang['FREE'] = "Libre"; $lang['PRIOR'] = "Préalable"; +$lang['first_rule_years_price_grid'] = "L'age minimal doit être inférieur ou égal à l'age limite de l’ayant droit enfant"; +$lang['second_rule_years_price_grid'] = "L'age maximal doit être inférieur ou égal à l'age limite de l’ayant droit enfant"; +$lang['validating_doctors'] = "Médécins valideurs"; +$lang['validating_doctor'] = "Médécin valideur"; +$lang['manage_validating_doctors'] = "Gestion des médécins valideurs"; +$lang['add_validating_doctor'] = "Ajouter un médécin valideur"; +$lang['validating_doctor_created'] = "Médécin valideur crée"; +$lang['mail_title_validating_doctor'] = "Création de votre compte médecin valideur"; +$lang['mail_body_validating_doctor'] = "votre compte médecin valideur a bien été créé.\n\nVeuillez suivre ce lien pour configurer votre mot de passe."; +$lang['validating_doctor_updated'] = "Médécin valideur modifié"; +$lang['validating_doctor_deleted'] = "Médécin valideur supprimé"; +$lang['delete_of_act'] = "Suppression de l'acte"; +$lang['act_deleted'] = "Acte supprimé"; +$lang['care_requests'] = "Demandes de soins"; +$lang['accepted_care_requests'] = "Demandes de soins acceptées"; +$lang['cancelled_care_requests'] = "Demandes de soins annulées"; +$lang['not_treated_care_requests'] = "Demandes de soins non traitées"; +$lang['provider_classes'] = "Classes de prestataires"; +$lang['add_provider_class'] = "Ajouter une classe de prestataire"; +$lang['edit_provider_class'] = "Modifier une classe"; +$lang['delete_provider_class'] = "Suppression d'une classe de prestataire"; +$lang['provider_class_deleted'] = "Classe de prestataire supprimée"; ?> diff --git a/application/models/Nano_health_model.php b/application/models/Nano_health_model.php index f9073738..5d883c09 100644 --- a/application/models/Nano_health_model.php +++ b/application/models/Nano_health_model.php @@ -37,16 +37,9 @@ class Nano_health_model extends CI_Model return $this->db->get_where('nh_acts',['nh_network_config_id'=> $configId]); } - // Nano sante - public function getAllIlinkWorldNetworks() + // Classes de prestataires + public function getProviderClasses($configId) { - $query = $this->db->query("SELECT networks.name AS network,networks.status AS status,networks.id,cc.name AS country,networks.country_id , configWallet.id_network , configWallet.type,cc.currency_code, - configWallet.has_nano_health FROM `networks` - INNER JOIN countries_currencies cc ON networks.country_id=cc.id LEFT JOIN configWallet ON configWallet.id_network = networks.id WHERE status = 1 AND configWallet.type = 'ilink'"); - if ($query->num_rows() > 0) { - return $query; - } else { - return false; - } + return $this->db->get_where('nh_provider_classes',['nh_network_config_id'=> $configId]); } } diff --git a/application/models/User_model.php b/application/models/User_model.php index e527a80c..0a990be1 100755 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -42,7 +42,7 @@ class User_model extends CI_Model { $salt = $query->row()->salt; $encrypted_password = $query->row()->encrypted_password; - $hash = $this->checkhashSSHA($salt, $pass); + $hash = checkhashSSHA($salt, $pass); if ($encrypted_password == $hash) { return $query->row(); @@ -115,13 +115,6 @@ class User_model extends CI_Model } } - public function checkhashSSHA($salt, $password) { - - $hash = base64_encode(sha1($password . $salt, true) . $salt); - - return $hash; - } - public function countUser($category,$network,$codeParrain){ if($codeParrain=='all'){ @@ -1214,35 +1207,17 @@ class User_model extends CI_Model public function isEmailExist($email) { $query = $this->db->query("SELECT id FROM admin WHERE email='".$email."'"); - if ($query->num_rows() > 0) { - // user existed - return true; - } else { - // user not existed - return false; - } + return $query->num_rows() > 0; } public function isPhoneExist($phone) { $query = $this->db->query("SELECT id FROM admin WHERE phone='".$phone."'"); - if ($query->num_rows() > 0) { - // user existed - return true; - } else { - // user not existed - return false; - } + return $query->num_rows() > 0; } public function getToken($token){ $query = $this->db->query("SELECT id FROM admin WHERE token='".$token."'"); - if ($query->num_rows() > 0) { - // token not used - return true; - } else { - // token expired - return false; - } + return $query->num_rows() > 0; } public function createPasswordAdmin($encrypted_password,$salt,$token){ diff --git a/application/views/admin_dash.php b/application/views/admin_dash.php index 2a2f06cd..145055f9 100755 --- a/application/views/admin_dash.php +++ b/application/views/admin_dash.php @@ -278,13 +278,13 @@ - - - - - - - + + + + + + + iLink | Password + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/admin_update_password.php b/application/views/admin_update_password.php index 4ce74039..e79855a2 100755 --- a/application/views/admin_update_password.php +++ b/application/views/admin_update_password.php @@ -1,89 +1,89 @@ - - - - - - - iLink | Password - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + iLink | Password + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/admin_vue.php b/application/views/admin_vue.php index 68f98768..9a583d35 100755 --- a/application/views/admin_vue.php +++ b/application/views/admin_vue.php @@ -26,7 +26,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');


-
+

Creer un admin

@@ -62,4 +62,4 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - \ No newline at end of file + diff --git a/application/views/calculator.php b/application/views/calculator.php index f5bbb13e..9ec95b90 100755 --- a/application/views/calculator.php +++ b/application/views/calculator.php @@ -285,7 +285,7 @@ $converter = new CurrencyConverter($provider);
- +
diff --git a/application/views/codeg.php b/application/views/codeg.php index d103a8aa..3a9d1654 100755 --- a/application/views/codeg.php +++ b/application/views/codeg.php @@ -34,7 +34,7 @@

lang->line('Générateur de codes'); ?>

- +
@@ -167,7 +167,7 @@ $('#pays').change(function(){ var pays = $(this).val(); $.ajax({ - url:'', + url:'', type: 'post', data: {pays: pays}, dataType: 'json', @@ -187,7 +187,7 @@ var code = data[0].member_code; $.ajax({ - url:'', + url:'', type: 'post', data: {code: code,pays:pays}, dataType: 'json', @@ -235,7 +235,7 @@ $('#hyper').change(function(){ var code = $(this).val(); $.ajax({ - url:'', + url:'', type: 'post', data: {code: code}, dataType: 'json', diff --git a/application/views/codeg_save.php b/application/views/codeg_save.php index d9284d60..c8689d69 100755 --- a/application/views/codeg_save.php +++ b/application/views/codeg_save.php @@ -77,7 +77,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
  • -
  • Logout
  • +
  • Logout
  • @@ -180,10 +180,10 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $simple="simple"; $super="super"; if($t==$d && $c==$simple){ - redirect('https://ilink-app.com/backoffice/index.php/Member_code'); + redirect('https://ilink-app.com/backoffice/Member_code'); } else{ - redirect('https://ilink-app.com/backoffice/index.php/Member_code_admin'); + redirect('https://ilink-app.com/backoffice/Member_code_admin'); } } } diff --git a/application/views/config_wallet_ilink_hyp/agent_remove_carte_cash.php b/application/views/config_wallet_ilink_hyp/agent_remove_carte_cash.php index fda30931..bdcd366a 100755 --- a/application/views/config_wallet_ilink_hyp/agent_remove_carte_cash.php +++ b/application/views/config_wallet_ilink_hyp/agent_remove_carte_cash.php @@ -27,7 +27,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL); lang->line('config_agent').' - '.$this->lang->line('config_ilink_agent_remove_carte_cash'); ?> ', + url: '', type: 'POST', dataType: 'json', data: { diff --git a/application/views/config_wallet_ilink_hyp/agent_remove_cash.php b/application/views/config_wallet_ilink_hyp/agent_remove_cash.php index 9ad58896..61c6ecd0 100755 --- a/application/views/config_wallet_ilink_hyp/agent_remove_cash.php +++ b/application/views/config_wallet_ilink_hyp/agent_remove_cash.php @@ -27,7 +27,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL); lang->line('config_agent').' - '.$this->lang->line('config_ilink_agent_remove_cash'); ?> ', + url: '', type: 'POST', dataType: 'json', data: { diff --git a/application/views/config_wallet_ilink_hyp/agent_send_cash_canal.php b/application/views/config_wallet_ilink_hyp/agent_send_cash_canal.php index abb73d10..38bdcd09 100755 --- a/application/views/config_wallet_ilink_hyp/agent_send_cash_canal.php +++ b/application/views/config_wallet_ilink_hyp/agent_send_cash_canal.php @@ -126,7 +126,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL); lang->line('config_agent').' - '.$this->lang->line('config_ilink_agent_send_cash_canal'); ?> ', + url: '', type: 'POST', dataType: 'json', data: { diff --git a/application/views/config_wallet_ilink_hyp/agent_send_cash_carte.php b/application/views/config_wallet_ilink_hyp/agent_send_cash_carte.php index ccf0d517..4f380cbe 100755 --- a/application/views/config_wallet_ilink_hyp/agent_send_cash_carte.php +++ b/application/views/config_wallet_ilink_hyp/agent_send_cash_carte.php @@ -27,7 +27,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL); lang->line('config_agent').' - '.$this->lang->line('config_ilink_agent_send_cash_carte'); ?> ', + url: '', type: 'POST', dataType: 'json', data: { diff --git a/application/views/config_wallet_ilink_hyp/etat_soldes.php b/application/views/config_wallet_ilink_hyp/etat_soldes.php index ac25e613..44246ad6 100755 --- a/application/views/config_wallet_ilink_hyp/etat_soldes.php +++ b/application/views/config_wallet_ilink_hyp/etat_soldes.php @@ -26,7 +26,7 @@

    lang->line('no_wallet_password') ?>

    - lang->line('click_here') ?> + lang->line('click_here') ?>
    @@ -394,7 +394,7 @@ let button = $(this) button.prop("disabled",true); $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: { @@ -442,7 +442,7 @@ button.prop("disabled",true); $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: { diff --git a/application/views/config_wallet_ilink_hyp/historique_commission_payements.php b/application/views/config_wallet_ilink_hyp/historique_commission_payements.php index 61fe18fb..9c6d004c 100755 --- a/application/views/config_wallet_ilink_hyp/historique_commission_payements.php +++ b/application/views/config_wallet_ilink_hyp/historique_commission_payements.php @@ -48,7 +48,7 @@ lang->line('edit_tax'); ?> ', + url: '', type: 'POST', dataType: 'json', data: { diff --git a/application/views/config_wallet_ilink_hyp/user_carte_wallet.php b/application/views/config_wallet_ilink_hyp/user_carte_wallet.php index c90e84e1..5451a019 100755 --- a/application/views/config_wallet_ilink_hyp/user_carte_wallet.php +++ b/application/views/config_wallet_ilink_hyp/user_carte_wallet.php @@ -27,7 +27,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL); lang->line('config_user').' - '.$this->lang->line('config_ilink_user_carte_wallet'); ?> ', + url: '', type: 'POST', dataType: 'json', data: { diff --git a/application/views/config_wallet_ilink_hyp/user_wallet_carte.php b/application/views/config_wallet_ilink_hyp/user_wallet_carte.php index 83a048da..1d4d52e7 100755 --- a/application/views/config_wallet_ilink_hyp/user_wallet_carte.php +++ b/application/views/config_wallet_ilink_hyp/user_wallet_carte.php @@ -26,7 +26,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL); lang->line('config_user').' - '.$this->lang->line('config_ilink_user_wallet_carte'); ?> ', + url: '', type: 'POST', dataType: 'json', data: { diff --git a/application/views/config_wallet_ilink_hyp/user_wallet_cash.php b/application/views/config_wallet_ilink_hyp/user_wallet_cash.php index ace3b53f..afd685dc 100755 --- a/application/views/config_wallet_ilink_hyp/user_wallet_cash.php +++ b/application/views/config_wallet_ilink_hyp/user_wallet_cash.php @@ -126,7 +126,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL); lang->line('config_user').' - '.$this->lang->line('config_ilink_user_wallet_cash'); ?> ', + url: '', type: 'POST', dataType: 'json', data: { diff --git a/application/views/config_wallet_ilink_hyp/user_wallet_wallet.php b/application/views/config_wallet_ilink_hyp/user_wallet_wallet.php index 2a91350f..8c97868c 100755 --- a/application/views/config_wallet_ilink_hyp/user_wallet_wallet.php +++ b/application/views/config_wallet_ilink_hyp/user_wallet_wallet.php @@ -125,7 +125,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL); lang->line('config_user').' - '.$this->lang->line('config_ilink_user_wallet_wallet'); ?> ', + url: '', type: 'POST', dataType: 'json', data: { diff --git a/application/views/demande.php b/application/views/demande.php index c0fe1ce2..f7b86da2 100755 --- a/application/views/demande.php +++ b/application/views/demande.php @@ -153,7 +153,7 @@ result() as $row) { $num++; @@ -299,7 +299,7 @@ result() as $row) { $num++; @@ -443,7 +443,7 @@ result() as $row) { $num++; @@ -577,7 +577,7 @@ result() as $row) { $num++; @@ -709,7 +709,7 @@ result() as $row) { $num++; @@ -838,7 +838,7 @@ result() as $row) { $num++; @@ -973,7 +973,7 @@ result() as $row) { $num++; @@ -1118,7 +1118,7 @@ result() as $row) { $num++; @@ -1248,7 +1248,7 @@ result() as $row) { $num++; @@ -1448,15 +1448,15 @@ const user_geo = GetURLParameter("u"); if(category == 'super'){ if(type == 'credit'){ - window.location.replace(""+"?d="+debut+"&f="+fin+"&u="+user_geo); + window.location.replace(""+"?d="+debut+"&f="+fin+"&u="+user_geo); }else if (type == 'adhesion'){ - window.location.replace(""+"?d="+debut+"&f="+fin); + window.location.replace(""+"?d="+debut+"&f="+fin); } }else if (category == 'hyper'){ if(type == 'credit'){ - window.location.replace(""+"?d="+debut+"&f="+fin+"&u="+user_geo); + window.location.replace(""+"?d="+debut+"&f="+fin+"&u="+user_geo); }else if (type == 'adhesion'){ - window.location.replace(""+"?d="+debut+"&f="+fin); + window.location.replace(""+"?d="+debut+"&f="+fin); } } @@ -1466,15 +1466,15 @@ $('#daterange').val(''); if(category == 'super'){ if(type == 'credit'){ - window.location.replace(""+"?d="+debut+"&f="+fin+"&u="+user_geo); + window.location.replace(""+"?d="+debut+"&f="+fin+"&u="+user_geo); }else if (type == 'adhesion'){ - window.location.replace(""+"?d="+debut+"&f="+fin); + window.location.replace(""+"?d="+debut+"&f="+fin); } }else if (category == 'hyper'){ if(type == 'credit'){ - window.location.replace(""+"?d="+debut+"&f="+fin+"&u="+user_geo); + window.location.replace(""+"?d="+debut+"&f="+fin+"&u="+user_geo); }else if (type == 'adhesion'){ - window.location.replace(""+"?d="+debut+"&f="+fin); + window.location.replace(""+"?d="+debut+"&f="+fin); } } @@ -1489,7 +1489,7 @@ $('#pays').change(function(){ var pays = $(this).val(); $.ajax({ - url:'', + url:'', type: 'post', data: {pays: pays}, dataType: 'json', @@ -1515,7 +1515,7 @@ var code = data[0].code_membre; $.ajax({ - url:'', + url:'', type: 'post', data: {code: code,pays:pays}, dataType: 'json', @@ -1565,7 +1565,7 @@ $('#hyper').change(function(){ var code = $(this).val(); $.ajax({ - url:'', + url:'', type: 'post', data: {code: code}, dataType: 'json', diff --git a/application/views/demande_adhesion.php b/application/views/demande_adhesion.php index 3a814d33..ba3fa206 100755 --- a/application/views/demande_adhesion.php +++ b/application/views/demande_adhesion.php @@ -406,18 +406,18 @@ const fin = end.format('YYYY-MM-DD'); if(category == 'super'){ - window.location.replace(""+"?d="+debut+"&f="+fin); + window.location.replace(""+"?d="+debut+"&f="+fin); }else if (category == 'hyper'){ - window.location.replace(""+"?d="+debut+"&f="+fin); + window.location.replace(""+"?d="+debut+"&f="+fin); } }); $('input[name="daterange"]').on('cancel.daterangepicker', function(ev, picker) { //do something, like clearing an input $('#daterange').val(''); if(category == 'super'){ - window.location.replace(""); + window.location.replace(""); }else if (category == 'hyper'){ - window.location.replace(""); + window.location.replace(""); } }); }); @@ -430,7 +430,7 @@ $('#pays').change(function(){ var pays = $(this).val(); $.ajax({ - url:'', + url:'', type: 'post', data: {pays: pays}, dataType: 'json', @@ -456,7 +456,7 @@ var code = data[0].code_membre; $.ajax({ - url:'', + url:'', type: 'post', data: {code: code,pays:pays}, dataType: 'json', @@ -506,7 +506,7 @@ $('#hyper').change(function(){ var code = $(this).val(); $.ajax({ - url:'', + url:'', type: 'post', data: {code: code}, dataType: 'json', diff --git a/application/views/demande_credit.php b/application/views/demande_credit.php index a7b2c571..a522de37 100755 --- a/application/views/demande_credit.php +++ b/application/views/demande_credit.php @@ -1092,9 +1092,9 @@ const user_geo = GetURLParameter("u"); const type = GetURLParameter("type"); if (category == 'super') { - window.location.replace("" + type + "&d=" + debut + "&f=" + fin); + window.location.replace("" + type + "&d=" + debut + "&f=" + fin); } else if (category == 'hyper') { - window.location.replace("" + "?d=" + debut + "&f=" + fin); + window.location.replace("" + "?d=" + debut + "&f=" + fin); } }); $('input[name="daterange"]').on('cancel.daterangepicker', function (ev, picker) { diff --git a/application/views/demande_credit_annulation.php b/application/views/demande_credit_annulation.php index e78bea51..bffe8bde 100755 --- a/application/views/demande_credit_annulation.php +++ b/application/views/demande_credit_annulation.php @@ -286,7 +286,7 @@ const debut = start.format('YYYY-MM-DD'); const fin = end.format('YYYY-MM-DD'); - window.location.replace("" + "?d=" + debut + "&f=" + fin); + window.location.replace("" + "?d=" + debut + "&f=" + fin); }); $('input[name="daterange"]').on('cancel.daterangepicker', function (ev, picker) { @@ -304,7 +304,7 @@ let button = $(this) button.prop("disabled",true); $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: {"id_demand": id_demand}, diff --git a/application/views/firstfilter.php b/application/views/firstfilter.php index 62ada098..2256340f 100755 --- a/application/views/firstfilter.php +++ b/application/views/firstfilter.php @@ -40,7 +40,7 @@ @@ -104,7 +104,7 @@
    @@ -127,13 +127,13 @@ + + + diff --git a/application/views/game.php b/application/views/game.php index 5dd38a76..740a2614 100755 --- a/application/views/game.php +++ b/application/views/game.php @@ -278,7 +278,7 @@ var n3 = $('#palier3').val(); var n4 = $('#palier4').val(); $.ajax({ - url:'', + url:'', type: 'post', data: {n1: n1,n2:n2,n3:n3,n4:n4}, dataType: 'json', @@ -296,14 +296,14 @@ $('.change-country').click(function(){ var id_pays = $(this).val(); - $.post("", + $.post("", { pays: id_pays }, function(data, status){ console.log(typeof data); if(data==1){ - window.location.replace(""); + window.location.replace(""); }else{ alert("Une erreur s'est produite"); } @@ -338,7 +338,7 @@ if(selected.length > 0 && selectedForDisable.length === 0){ $.ajax({ - url:'', + url:'', type: 'post', data: {pays: chkArray}, dataType: 'json', @@ -354,7 +354,7 @@ }); } else if (selectedForDisable.length > 0 && selected.length === 0){ $.ajax({ - url:'', + url:'', type: 'post', data: {pays: unchkArray}, dataType: 'json', @@ -370,7 +370,7 @@ }); } else if (selectedForDisable.length > 0 && selected.length > 0){ $.ajax({ - url:'', + url:'', type: 'post', data: {dpays: unchkArray,apays: chkArray}, dataType: 'json', diff --git a/application/views/generer_super.php b/application/views/generer_super.php index 345bf212..832e99a0 100755 --- a/application/views/generer_super.php +++ b/application/views/generer_super.php @@ -1,93 +1,93 @@ - - - - - - - iLink | Create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + iLink | Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/gestion_admin.php b/application/views/gestion_admin.php index 0e5db62c..9c94b8cd 100755 --- a/application/views/gestion_admin.php +++ b/application/views/gestion_admin.php @@ -341,7 +341,7 @@ var m_category = $('#update-form #category').val(); $.ajax({ - url:'', + url:'', type: 'post', data: {id: id_admin,nom:m_nom,prenom:m_prenom,email:m_email,contact:m_contact,adresse:m_adresse,country:m_id_country,category:m_category}, dataType: 'json', @@ -368,7 +368,7 @@ var adresse = $("#create-admin-form #adresse").val(); $.ajax({ - url:'', + url:'', type: 'post', data: {country: country,nom:nom,prenom:prenom,email:email,contact:contact,adresse:adresse}, dataType: 'json', @@ -422,7 +422,7 @@ /* check if there is selected checkboxes, by default the length is 1 as it contains one single comma */ if(selected.length > 0){ $.ajax({ - url:'', + url:'', type: 'post', data: {villes: chkArray}, dataType: 'json', @@ -457,7 +457,7 @@ /* check if there is selected checkboxes, by default the length is 1 as it contains one single comma */ if(selected.length > 0){ $.ajax({ - url:'', + url:'', type: 'post', data: {villes: chkArray}, dataType: 'json', @@ -491,7 +491,7 @@ $("#delete").click(function(){ $.ajax({ - url:'', + url:'', type: 'post', data: {id: id_admin}, dataType: 'json', diff --git a/application/views/gestion_campagne.php b/application/views/gestion_campagne.php index 034d82bf..bbafc088 100755 --- a/application/views/gestion_campagne.php +++ b/application/views/gestion_campagne.php @@ -50,7 +50,7 @@
    -
    +
    @@ -110,7 +110,7 @@ echo "
    -

    ".$agents[$i][0]."

    +

    ".$agents[$i][0]."

    ".$agents[$i][2]." points physiques

    ".$geo_correct[$i][1]." contacts correctes

    ".$agents[$i][1]." points géolocalisés

    @@ -227,7 +227,7 @@ $('#pays').change(function(){ var pays = $(this).val(); $.ajax({ - url:'', + url:'', type: 'post', data: {pays: pays}, dataType: 'json', @@ -246,7 +246,7 @@ var id_ville = list[0].id; $.ajax({ - url:'', + url:'', type: 'post', data: {id_ville: id_ville}, dataType: 'json', @@ -291,7 +291,7 @@ $('#ville').change(function(){ var ville = $(this).val(); $.ajax({ - url:'', + url:'', type: 'post', data: {id_ville: ville}, dataType: 'json', diff --git a/application/views/gestion_geolocalisation.php b/application/views/gestion_geolocalisation.php index a682f846..93461154 100755 --- a/application/views/gestion_geolocalisation.php +++ b/application/views/gestion_geolocalisation.php @@ -1,265 +1,265 @@ - - -
    - -
    - -

    - lang->line('Géolocalisation'); ?> -

    - -
    - -

    Erreur!

    - -
    - - -
    - -

    Success!

    - -
    - - -
    - -
    -
    -
    -

    lang->line('Agent'); ?>

    -
    -
    - -
    -
    -
    - num_rows(); - if ($numrows > 0) { ?> - - lang->line('Aucun pays'); - } - ?> -
    -
    -
    -
    - num_rows(); - if ($numrows > 0) { ?> - - lang->line('Aucune ville'); - } - ?> -
    -
    -
    -
    - num_rows(); - if ($numrows > 0) { ?> - - lang->line('Aucun agent'); - } - }else{ - echo $this->lang->line('Aucun agent'); - } - ?> -
    -
    -
    - '/> -
    -
    - -
    -
    -
    -
    -

    -
    -
    -
    - -
    -
    -

    ".$number_geolocalisation[$i]."

    -

    ".$network_geolocalisation[$i]."

    -
    -
    - -
    -
    -
    "; - $recap = $recap + $number_geolocalisation[$i]; - } - echo "
    -
    -
    -

    ".$recap."

    -

    Total

    -
    -
    - -
    -
    -
    "; - ?> -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - + + +
    + +
    + +

    + lang->line('Géolocalisation'); ?> +

    + +
    + +

    Erreur!

    + +
    + + +
    + +

    Success!

    + +
    + + +
    + +
    +
    +
    +

    lang->line('Agent'); ?>

    +
    +
    +
    +
    +
    +
    + num_rows(); + if ($numrows > 0) { ?> + + lang->line('Aucun pays'); + } + ?> +
    +
    +
    +
    + num_rows(); + if ($numrows > 0) { ?> + + lang->line('Aucune ville'); + } + ?> +
    +
    +
    +
    + num_rows(); + if ($numrows > 0) { ?> + + lang->line('Aucun agent'); + } + }else{ + echo $this->lang->line('Aucun agent'); + } + ?> +
    +
    +
    + '/> +
    +
    +
    +
    +
    +
    +
    +

    +
    +
    +
    + +
    +
    +

    ".$number_geolocalisation[$i]."

    +

    ".$network_geolocalisation[$i]."

    +
    +
    + +
    +
    +
    "; + $recap = $recap + $number_geolocalisation[$i]; + } + echo "
    +
    +
    +

    ".$recap."

    +

    Total

    +
    +
    + +
    +
    +
    "; + ?> +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/gestion_map.php b/application/views/gestion_map.php index 36293ac5..a03d1237 100755 --- a/application/views/gestion_map.php +++ b/application/views/gestion_map.php @@ -1,226 +1,226 @@ - - - - -
    - -
    - - -
    - -

    Error!

    - -
    - - -
    - -

    Success!

    - -
    - - -
    -
    -
    -

    iLink World dans le monde

    -
    - -
    -
    -
    -
    - -
    -
    -
    - -
    -
    -
    -
    90,70,90,70,75,80,70
    -
    8390
    - Visits -
    - -
    -
    90,50,90,70,61,83,63
    -
    30%
    - Referrals -
    - -
    -
    90,50,90,70,61,83,63
    -
    70%
    - Organic -
    - -
    -
    - -
    - -
    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +
    + +
    + + +
    + +

    Error!

    + +
    + + +
    + +

    Success!

    + +
    + + +
    +
    +
    +

    iLink World dans le monde

    +
    + +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    90,70,90,70,75,80,70
    +
    8390
    + Visits +
    + +
    +
    90,50,90,70,61,83,63
    +
    30%
    + Referrals +
    + +
    +
    90,50,90,70,61,83,63
    +
    70%
    + Organic +
    + +
    +
    + +
    + +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/gestion_monnaie.php b/application/views/gestion_monnaie.php index cee62289..0aac3af0 100755 --- a/application/views/gestion_monnaie.php +++ b/application/views/gestion_monnaie.php @@ -242,7 +242,7 @@ $converter = new CurrencyConverter($provider); $('#save').click(function () { $.ajax({ - url: '', + url: '', type: 'GET', dataType: 'json', success: function (data) { diff --git a/application/views/gestion_networks.php b/application/views/gestion_networks.php index dfb2e391..d1f79d3e 100755 --- a/application/views/gestion_networks.php +++ b/application/views/gestion_networks.php @@ -266,7 +266,7 @@ }); $.ajax({ - url:'', + url:'', type: 'post', data: {activations: activation,desactivations:desactivation}, dataType: 'json', @@ -327,7 +327,7 @@ var selectedValues = $('#assign-form #pays').val(); $.ajax({ - url:'', + url:'', type: 'post', data: {id_country: selectedValues,network:reseau}, dataType: 'json', @@ -352,7 +352,7 @@ $("#add-network").submit(function(event){ var new_network = $("#add-network #network").val(); $.ajax({ - url:'', + url:'', type: 'post', data: {new_network: new_network}, dataType: 'json', @@ -374,7 +374,7 @@ var up_network = $("#update-form #modal-reseau").val(); $.ajax({ - url:'', + url:'', type: 'post', data: {new_network: up_network,old_name:name_network}, dataType: 'json', @@ -428,7 +428,7 @@ /* check if there is selected checkboxes, by default the length is 1 as it contains one single comma */ if(selected.length > 0){ $.ajax({ - url:'', + url:'', type: 'post', data: {villes: chkArray}, dataType: 'json', @@ -463,7 +463,7 @@ /* check if there is selected checkboxes, by default the length is 1 as it contains one single comma */ if(selected.length > 0){ $.ajax({ - url:'', + url:'', type: 'post', data: {villes: chkArray}, dataType: 'json', diff --git a/application/views/gestion_operateurs_admin.php b/application/views/gestion_operateurs_admin.php index b5a05e9c..747a4637 100755 --- a/application/views/gestion_operateurs_admin.php +++ b/application/views/gestion_operateurs_admin.php @@ -342,7 +342,7 @@ // console.log('desact' , desactivation) $.ajax({ - url:'', + url:'', type: 'post', data: {activations: activation,desactivations:desactivation}, dataType: 'json', @@ -412,7 +412,7 @@ id_country = $(this).data('id-country'); $.ajax({ - url:'', + url:'', type: 'post', data: {id_operator: id_operator , id_country : id_country}, dataType: 'json', @@ -445,7 +445,7 @@ var selectedValues = $('#assign-form #pays').val(); $.ajax({ - url:'', + url:'', type: 'post', data: {id_country: selectedValues,id_operator:id_operator}, dataType: 'json', @@ -480,7 +480,7 @@ var name = $("#add-operator #name").val(); var type = $("#add-operator #type").val(); $.ajax({ - url:'', + url:'', type: 'post', data: {name: name , type :type}, dataType: 'json', @@ -512,7 +512,7 @@ const address = $("#update-form #address").val(); const code = $("#update-form #code").val(); $.ajax({ - url:'', + url:'', type: 'post', data: {id_operator: id_operator ,name:name , address :address , id_country : id_country , code : code}, dataType: 'json', @@ -545,7 +545,7 @@ // var description_en = $("#add-operator-type-form #description_en").val(); var description_fr = $("#add-operator-type-form #description_fr").val(); $.ajax({ - url:'', + url:'', type: 'post', data: {code: code , description_fr :description_fr}, dataType: 'json', diff --git a/application/views/gestion_operateurs_hyp.php b/application/views/gestion_operateurs_hyp.php index caac45f2..bd8525fc 100755 --- a/application/views/gestion_operateurs_hyp.php +++ b/application/views/gestion_operateurs_hyp.php @@ -184,7 +184,7 @@ const id_network = $(this).data('id-network'); console.log(id_operator_country) $.ajax({ - url : '', + url : '', type : 'POST', dataType : 'json', data: {"id_operator_country": id_operator_country , "id_network" : id_network}, @@ -212,7 +212,7 @@ $('#deleteWallet').click(function(){ $.ajax({ - url : '', + url : '', type : 'POST', dataType : 'json', data: {"id_operator_country": id_operator_country , "id_network" : id_network}, diff --git a/application/views/gestion_publicite.php b/application/views/gestion_publicite.php index 52d2ad94..a8232dc5 100755 --- a/application/views/gestion_publicite.php +++ b/application/views/gestion_publicite.php @@ -125,7 +125,7 @@ if(etat === ''){ $.ajax({ - url : '', + url : '', type : 'POST', dataType : 'json', data: {"country_id": country_id}, @@ -143,7 +143,7 @@ }); }else{ $.ajax({ - url : '', + url : '', type : 'POST', dataType : 'json', data: {"pub_id": pub_id,"etat": etat}, diff --git a/application/views/gestion_recherche.php b/application/views/gestion_recherche.php index 0ed39730..ad720a38 100755 --- a/application/views/gestion_recherche.php +++ b/application/views/gestion_recherche.php @@ -108,9 +108,9 @@
    @@ -823,7 +823,7 @@ $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: {"user_id": user_id, "nom": nom, "adresse": adresse, "contact": contact, "email": email}, @@ -853,7 +853,7 @@ var transac = $('#transac-g' + num).val(); $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: { diff --git a/application/views/gestion_reglementations.php b/application/views/gestion_reglementations.php index 68d2845c..f7e76228 100755 --- a/application/views/gestion_reglementations.php +++ b/application/views/gestion_reglementations.php @@ -241,7 +241,7 @@ $context = new \Brick\Money\Context\AutoContext(); const max_week_international = parseFloat($('#max_week_international'+num).val()); const max_month_international = parseFloat($('#max_month_international'+num).val()); $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: {"country_id": country_id, diff --git a/application/views/gestion_settings.php b/application/views/gestion_settings.php index 389a5d9a..1cad79f4 100755 --- a/application/views/gestion_settings.php +++ b/application/views/gestion_settings.php @@ -168,7 +168,7 @@ // var active_pub = $("#sms_notifications").is(':checked') ? 1 : 0; $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: {pas: pas}, diff --git a/application/views/gestion_villes.php b/application/views/gestion_villes.php index b20220fe..12180989 100755 --- a/application/views/gestion_villes.php +++ b/application/views/gestion_villes.php @@ -113,7 +113,7 @@

    lang->line('Ajouter une ville'); ?>

    - +
    ', + url:'', type: 'post', data: {id_country: new_id_country,id_town:id_town,town:new_town}, dataType: 'json', @@ -286,7 +286,7 @@ if(selected.length > 0 && selectedForDisable.length === 0){ $.ajax({ - url:'', + url:'', type: 'post', data: {villes: chkArray}, dataType: 'json', @@ -302,7 +302,7 @@ }); } else if (selectedForDisable.length > 0 && selected.length === 0){ $.ajax({ - url:'', + url:'', type: 'post', data: {villes: unchkArray}, dataType: 'json', @@ -318,7 +318,7 @@ }); } else if (selectedForDisable.length > 0 && selected.length > 0){ $.ajax({ - url:'', + url:'', type: 'post', data: {dVilles: unchkArray,aVilles: chkArray}, dataType: 'json', @@ -347,7 +347,7 @@ if(selectedForDisable.length > 0){ $.ajax({ - url:'', + url:'', type: 'post', data: {villes: unchkArray}, dataType: 'json', diff --git a/application/views/gestion_wallet.php b/application/views/gestion_wallet.php index cfe81d6c..d798b541 100755 --- a/application/views/gestion_wallet.php +++ b/application/views/gestion_wallet.php @@ -354,18 +354,7 @@ if ($transactions != false) { diff --git a/application/views/gestion_wallet_autre.php b/application/views/gestion_wallet_autre.php index 0f7499b6..607f8ff5 100755 --- a/application/views/gestion_wallet_autre.php +++ b/application/views/gestion_wallet_autre.php @@ -253,18 +253,7 @@ $fmt = new NumberFormatter( 'fr_FR', NumberFormatter::DECIMAL ); diff --git a/application/views/gestion_wallet_hyp.php b/application/views/gestion_wallet_hyp.php index 86c9e035..370e6311 100755 --- a/application/views/gestion_wallet_hyp.php +++ b/application/views/gestion_wallet_hyp.php @@ -516,7 +516,7 @@

    lang->line('no_wallet_password') ?>

    - lang->line('click_here') ?> + lang->line('click_here') ?>
    @@ -666,7 +666,7 @@ toastr.error("lang->line('fourth_rule')?>", "lang->line('management_rule')?>"); }else{ $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: { @@ -717,7 +717,7 @@ const country = $(this).data('country'); const email = $(this).data('email'); $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: { @@ -761,7 +761,7 @@ const password = $('#password').val(); $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: { diff --git a/application/views/gestion_wallet_ilink.php b/application/views/gestion_wallet_ilink.php index f9e21909..499caaaa 100755 --- a/application/views/gestion_wallet_ilink.php +++ b/application/views/gestion_wallet_ilink.php @@ -833,18 +833,7 @@ $fmt = new NumberFormatter( 'fr_FR', NumberFormatter::DECIMAL ); diff --git a/application/views/gestion_wallet_ilink_config_paying_network.php b/application/views/gestion_wallet_ilink_config_paying_network.php index e15d460e..71f7f373 100755 --- a/application/views/gestion_wallet_ilink_config_paying_network.php +++ b/application/views/gestion_wallet_ilink_config_paying_network.php @@ -361,7 +361,7 @@ const rate = parseFloat($('#rate' + num).val()); const url = $('#url' + num).val(); $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: {"network_id": network_id, "rate": rate, "url": url, "config_id": config_id}, @@ -397,7 +397,7 @@ const url = $('#urlTransmitting' + num).val(); const is_enabled = $(this).data('is-transmitting-network'); $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: {"network_id": network_id, "config_id": config_id , "rate": rate, "url": url , 'is_enabled' : is_enabled}, @@ -428,7 +428,7 @@ $(document).on("click", ".disableTransmitting", function () { $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: {"network_id": network_id, "config_id": config_id}, diff --git a/application/views/gestion_wallet_ilink_hyp.php b/application/views/gestion_wallet_ilink_hyp.php index 541499ba..bc3dd465 100755 --- a/application/views/gestion_wallet_ilink_hyp.php +++ b/application/views/gestion_wallet_ilink_hyp.php @@ -500,7 +500,7 @@ $context = new \Brick\Money\Context\AutoContext();

    lang->line('no_wallet_password') ?>

    - lang->line('click_here') ?> + lang->line('click_here') ?>
    @@ -624,7 +624,7 @@ $context = new \Brick\Money\Context\AutoContext(); const country = $(this).data('country'); const email = $(this).data('email'); $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: { @@ -668,7 +668,7 @@ $context = new \Brick\Money\Context\AutoContext(); const password = $('#password').val(); $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: { diff --git a/application/views/gestion_wallet_ilink_paying_network_account.php b/application/views/gestion_wallet_ilink_paying_network_account.php index da64c354..7bdfef57 100755 --- a/application/views/gestion_wallet_ilink_paying_network_account.php +++ b/application/views/gestion_wallet_ilink_paying_network_account.php @@ -259,7 +259,7 @@

    lang->line('no_wallet_password') ?>

    - lang->line('click_here') ?>
    @@ -353,7 +353,7 @@ const password = $('#password').val(); $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: { @@ -403,7 +403,7 @@ const country = $(this).data('country'); const email = $(this).data('email'); $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: { diff --git a/application/views/gestion_wallets.php b/application/views/gestion_wallets.php index 629fcd56..76899d3b 100755 --- a/application/views/gestion_wallets.php +++ b/application/views/gestion_wallets.php @@ -205,7 +205,7 @@ // const network_id = $(this).data('network-id'); const type = $(this).val(); $.ajax({ - url : '', + url : '', type : 'POST', dataType : 'json', data: {"network_id": network_id , country_id : country_id , "type" : type}, @@ -232,7 +232,7 @@ } }).done(function () { $.ajax({ - url : '', + url : '', type : 'POST', dataType : 'json', data : {"network_id": network_id , "type" : type}, @@ -247,7 +247,7 @@ $('#disableWallet').click(function(){ $.ajax({ - url : '', + url : '', type : 'POST', dataType : 'json', data: {"network_id": network_id }, diff --git a/application/views/header.php b/application/views/header.php index 593b722f..cfcdbab8 100755 --- a/application/views/header.php +++ b/application/views/header.php @@ -96,7 +96,7 @@ lang->line('Reseau'); ?>
    @@ -113,27 +113,27 @@ @@ -165,9 +165,9 @@
  • "> - + - lang->line('Demandes adhésion'); ?> + lang->line('Demandes adhésion'); ?>
  • @@ -175,7 +175,7 @@ style="height: auto;"> - lang->line('wallet_management'); ?> + lang->line('wallet_management'); ?> @@ -185,29 +185,29 @@
  • "> - + Walletlang->line('Game'); ?>
  • + first_row()->type == 'ilink_sante') { ?> +
  • "> + + + lang->line('validating_doctors'); ?> + +
  • +
  • "> - + - lang->line('menu_wallet_password'); ?> + lang->line('menu_wallet_password'); ?>
  • -first_row()->type == 'ilink') { ?> - - - -lang->line('calculator'); ?> - - - @@ -216,28 +216,28 @@
  • "> - + Nano credit
  • "> - - lang->line('operators'); ?> + + lang->line('operators'); ?>
  • "> - - lang->line('Rechercher'); ?> + + lang->line('Rechercher'); ?>
  • first_row()->type == 'ilink')){?>
  • "> - + Documentation
  • @@ -251,12 +251,12 @@ - -
    -
    - Loading -

    Chargement

    -
    -
    + load->view('include/loader') ?> @@ -241,17 +204,6 @@ diff --git a/application/views/nano_health/config_nano_health.php b/application/views/nano_health/config_nano_health.php index 76765119..eecd8ba0 100755 --- a/application/views/nano_health/config_nano_health.php +++ b/application/views/nano_health/config_nano_health.php @@ -22,7 +22,7 @@ $context = new \Brick\Money\Context\AutoContext(); lang->line('nano_health_management') . ' ' . $network . ' - ' . $country; ?> ', + url: '', type: 'POST', dataType: 'json', data: {"id_network": id_network}, @@ -220,7 +220,7 @@ $('#deleteWallet').click(function () { $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: {"id_network": network_id}, diff --git a/application/views/nano_health/hyper/gestion_wallet.php b/application/views/nano_health/hyper/gestion_wallet.php index e6749321..5c614895 100755 --- a/application/views/nano_health/hyper/gestion_wallet.php +++ b/application/views/nano_health/hyper/gestion_wallet.php @@ -100,7 +100,7 @@ $depots = $this->db->query("SELECT * FROM infos_transaction lang->line('Gestion des wallets'). ' '. $network .' - '.$country; ?> db->query("SELECT * FROM infos_transaction
    -
    +

    lang->line('list_of_acts') ?>

    @@ -385,7 +385,8 @@ $depots = $this->db->query("SELECT * FROM infos_transaction ".$this->lang->line('Nom')." + echo "# + ".$this->lang->line('Nom')." ".$this->lang->line('billing_type')." ".$this->lang->line('authorization_type')." Action"; @@ -397,6 +398,7 @@ $depots = $this->db->query("SELECT * FROM infos_transaction if(isset($acts)){ foreach($acts->result() as $i => $row) { ?> + name ?> lang->line($row->billing_type); ?> lang->line($row->authorization_type); ?> @@ -405,7 +407,53 @@ $depots = $this->db->query("SELECT * FROM infos_transaction data-authorization_type="authorization_type?>" > - + + + + + +
    +
    +
    +
    +
    +
    +

    lang->line('provider_classes') ?>

    +
    + +
    +
    +
    + + + + # + + "; + ?> + + + + result() as $i => $row) { ?> + + + + @@ -672,6 +720,35 @@ $depots = $this->db->query("SELECT * FROM infos_transaction + + + load->view('include/delete_modal',['title' => $this->lang->line('delete_of_act')]) ?> + load->view('include/delete_modal',['title' => $this->lang->line('delete_provider_class'), 'id' => 'class']) ?> + load->view('include/loader') ?> @@ -704,6 +781,7 @@ $depots = $this->db->query("SELECT * FROM infos_transaction @@ -715,6 +793,7 @@ $depots = $this->db->query("SELECT * FROM infos_transaction let config_id = ""; var selectedActId = null; + var selectedClassId = null; $('#updateWallet').click(function () { var network_id = $(this).data('network-id'); @@ -737,7 +816,7 @@ $depots = $this->db->query("SELECT * FROM infos_transaction toastr.error("lang->line('exoneration_rule')?>", "lang->line('management_rule')?>"); }else{ $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: { @@ -802,7 +881,7 @@ $depots = $this->db->query("SELECT * FROM infos_transaction }); $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: { @@ -855,7 +934,7 @@ $depots = $this->db->query("SELECT * FROM infos_transaction }); $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: { @@ -889,10 +968,8 @@ $depots = $this->db->query("SELECT * FROM infos_transaction }); $("#actForm").submit(function( event ) { - console.log(selectedActId) - $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: { @@ -941,6 +1018,119 @@ $depots = $this->db->query("SELECT * FROM infos_transaction $("#actForm select[name='authorization_type']").prop('selectedIndex',0); $('#modal-act').modal('show'); }); + + $('.deleteAct').click(function () { + selectedActId = $(this).data('id'); + $('#delete-modal').modal('show'); + }); + + $("#delete-btn").click(function () { + $.ajax({ + url: '', + type: 'post', + data: {id: selectedActId}, + dataType: 'json', + success: function (data) { + if(data.code === 200){ + Swal.fire({ + icon: 'success', + title: "lang->line('act_deleted')?>", + text:"lang->line('informations_updated')?>", + timer: 3000 + }).then(()=>{ + location.reload(); + }); + }else{ + toastr.error(data.message , "lang->line('request_error')?>"); + } + }, + error: function (resultat, statut, error) { + console.log(resultat + " " + error); + toastr.error("lang->line('error_message')?>" , "lang->line('request_error')?>"); + } + }); + event.preventDefault(); + }); + + // Classes de prestataires + + $('#add-class').click(function (){ + selectedClassId = null; + $("#modal-class h3").html("lang->line('add_provider_class')?>"); + $("#class-form input[name='name']").val(null); + $('#modal-class').modal('show'); + }); + + $('.edit-class').click(function (){ + selectedClassId = $(this).data('id'); + $("#modal-act h3").html("lang->line('edit_provider_class')?>"); + $("#class-form input[name='name']").val($(this).data('name')); + $('#modal-class').modal('show'); + }); + + $('.delete-class').click(function () { + selectedClassId = $(this).data('id'); + $('#class-delete-modal').modal('show'); + }); + + $("#class-form").submit(function( event ) { + $.ajax({ + url: '', + type: 'POST', + dataType: 'json', + data: { + "config_id": config_id, + "id" : selectedClassId, + "name": $("input[name='name']",this).val(), + }, + success: function (data) { + if (data.code == 200) { + Swal.fire({ + icon: 'success', + title: "lang->line('wallet_update')?>", + text: "lang->line('informations_updated')?>", + timer: 3000 + }).then(() => { + location.reload(); + }); + } else { + toastr.error("lang->line('error_message')?>", "lang->line('request_error')?>"); + } + }, + error: function (resultat, statut, error) { + console.log(resultat + " " + error); + toastr.error("lang->line('error_message')?>", "lang->line('request_error')?>"); + } + }); + event.preventDefault(); + }); + $("#class-delete-btn").click(function () { + $.ajax({ + url: '', + type: 'post', + data: {id: selectedClassId}, + dataType: 'json', + success: function (data) { + if(data.code === 200){ + Swal.fire({ + icon: 'success', + title: "lang->line('provider_class_deleted')?>", + text:"lang->line('informations_updated')?>", + timer: 3000 + }).then(()=>{ + location.reload(); + }); + }else{ + toastr.error(data.message , "lang->line('request_error')?>"); + } + }, + error: function (resultat, statut, error) { + console.log(resultat + " " + error); + toastr.error("lang->line('error_message')?>" , "lang->line('request_error')?>"); + } + }); + event.preventDefault(); + }); + + + + + + + + + + + + + + + diff --git a/application/views/nano_health/validating_doctor/dashboard.php b/application/views/nano_health/validating_doctor/dashboard.php new file mode 100755 index 00000000..6f070c62 --- /dev/null +++ b/application/views/nano_health/validating_doctor/dashboard.php @@ -0,0 +1,312 @@ + + + + + + + + db->query("SELECT demande_id FROM info_demandeCredits +// WHERE MONTH(dateAjout) = '".$months[$i-1]."' AND YEAR(dateAjout) = ".$years[$i-1]." +// AND codeParrain='".$this->session->userdata('member_code')."'" +// ); +// $demandes_data[] = $demandes_query_mounth->num_rows(); +// } +// +// $demandes_query = $listdem; +// +// if($demandes_query!=false){ +// $demandes=$demandes_query->num_rows(); +// // Count networks for simple users +// $array_simple = array(); +// $num = 0; +// if ($demandes > 0) { +// foreach($demandes_query->result() as $row) { +// $num++; +// $array_simple[] = $row->codeMembre; +// } +// +// $vals_simple = array_count_values($array_simple); +// //echo 'No. of NON Duplicate Items: '.count($vals_simple).'

    '; +// //print_r($vals_simple); +// $pieChart2 = array(); +// foreach(array_keys($vals_simple) as $paramName2) { +// $color2 = dechex(rand(0x000000, 0xFFFFFF)); +// $trash2 = array("value" => $vals_simple[$paramName2], +// "color" => "#".$color2, +// "highlight" => "#".$color2, +// "label" => $paramName2); +// +// $pieChart2[]= $trash2; +// +// } +// } +// }else{ + $pieChart2 = array(); +// } + + /** + ** Geolocated User Treatment + **/ +// $users_geolocated_query = $list_geolocated_users; +// // Geolocated Users by month replace 2016 by NOW() +// $users_geolocated_data[] = ''; +// $users_geolocated_data =array(); +// for ($i = 1; $i <= 12; $i++) { +// $users_geolocated_query_january = $this->db->query("SELECT agent_id FROM super_infos +// WHERE MONTH(date_created) = '".$months[$i-1]."' AND YEAR(date_created) = ".$years[$i-1]." +// AND category='geolocated' AND code_parrain='".$this->session->userdata('member_code')."'"); +// $users_geolocated_data[] = $users_geolocated_query_january->num_rows(); +// } +// +// if($users_geolocated_query!=false){ +// +// $users_geolocated=$users_geolocated_query->num_rows(); +// //$users_geolocated_query = json_encode($users_geolocated_query->result()); +// // Counts network for geolocated users +// $array_geolocated = array(); +// $num = 0; +// if ($users_geolocated > 0) { +// foreach($users_geolocated_query->result() as $row) { +// $num++; +// $array_geolocated[] = date("M", strtotime($row->date_created)); +// } +// $vals_geolocated = array_count_values($array_geolocated); +// //echo 'No. of NON Duplicate Items: '.count($vals_geolocated).'

    '; +// //print_r($vals_geolocated); +// $pieChart = array(); +// foreach(array_keys($vals_geolocated) as $paramName) { +// $color = dechex(rand(0x000000, 0xFFFFFF)); +// $trash = array("value" => $vals_geolocated[$paramName], +// "color" => "#".$color, +// "highlight" => "#".$color, +// "label" => $paramName); +// +// $pieChart[]= $trash; +// } +// } +// }else{ +// $pieChart = array(); +// } + ?> + +
    + + +
    +

    + lang->line('validating_doctor'); ?> + lang->line('Tableau de bord'); ?> +

    +
    + +
    + +
    +
    + +
    +
    +

    + +

    lang->line('accepted_care_requests'); ?>

    +
    +
    + +
    + lang->line("Plus d'informations"); ?> +
    +
    +
    + +
    +
    +

    + +

    lang->line('not_treated_care_requests'); ?>

    +
    +
    + +
    + lang->line("Plus d'informations"); ?> +
    +
    +
    + +
    +
    +

    + +

    lang->line("cancelled_care_requests"); ?>

    +
    +
    + +
    + lang->line("Plus d'informations"); ?> +
    +
    + +
    + +
    +
    +

    lang->line('care_requests'); ?>

    +
    +
    +
    + +
    +
    + +
    + +
    + +
    + +
    +
    +

    lang->line('care_requests'); ?>

    +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/nano_health/validating_doctor/header.php b/application/views/nano_health/validating_doctor/header.php new file mode 100755 index 00000000..f02b69bd --- /dev/null +++ b/application/views/nano_health/validating_doctor/header.php @@ -0,0 +1,131 @@ + + + + + + + iLink | Hyperviseur + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + diff --git a/application/views/search.php b/application/views/search.php index 5edf31e6..757cf8ed 100755 --- a/application/views/search.php +++ b/application/views/search.php @@ -89,7 +89,7 @@ function randomString($length=10 )
  • -
  • Logout
  • +
  • Logout
  • @@ -105,9 +105,9 @@ function randomString($length=10 ) Dashboard
    diff --git a/application/views/wallet_password.php b/application/views/wallet_password.php index b3b28c88..7ad7babd 100755 --- a/application/views/wallet_password.php +++ b/application/views/wallet_password.php @@ -168,7 +168,7 @@ // const size = parseInt($('#size').val()); $.ajax({ - url: '', + url: '', type: 'POST', dataType: 'json', data: { diff --git a/composer.json b/composer.json index a647241a..70122b5f 100755 --- a/composer.json +++ b/composer.json @@ -17,8 +17,9 @@ "brick/money": "^0.4.5", "ext-intl": "*", "ext-json": "*", - "ext-curl": "*" - }, + "ext-curl": "*", + "ext-openssl": "*" + }, "suggest": { "paragonie/random_compat": "Provides better randomness in PHP 5.x" }, diff --git a/dist/js/custom.js b/dist/js/custom.js index ec4f7e73..37faed48 100755 --- a/dist/js/custom.js +++ b/dist/js/custom.js @@ -111,22 +111,22 @@ var pieOptions2 = { //Create pie or douhnut chart // You can switch between pie and douhnut using the method below. pieChart2.Doughnut(Pie2, pieOptions2); -console.log(geocodeposition(52.5487429714954,-1.81602098644987)); +// console.log(geocodeposition(52.5487429714954,-1.81602098644987)); }); - function geocodeposition(lat, lng){ - var city; - var url = "https://nominatim.openstreetmap.org/reverse?format=json&lat="+lat+"&lon="+lng+"&zoom=18&addressdetails=1"; - - $.getJSON(url, function( data ) { - //console.log(data.address.city); - city = data.address.city; - }); - - return city; - - } + // function geocodeposition(lat, lng){ + // var city; + // var url = "https://nominatim.openstreetmap.org/reverse?format=json&lat="+lat+"&lon="+lng+"&zoom=18&addressdetails=1"; + // + // $.getJSON(url, function( data ) { + // //console.log(data.address.city); + // city = data.address.city; + // }); + // + // return city; + // + // }
    ".$this->lang->line('Nom')."Action
    name ?> + +