diff --git a/application/config/config.php b/application/config/config.php index d2683fb9..8541342d 100755 --- a/application/config/config.php +++ b/application/config/config.php @@ -23,7 +23,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | a PHP script and you can easily do that on your own. | */ -$config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/backofficeiLinkTest'; +$config['base_url'] = 'https://'.$_SERVER['SERVER_NAME'].'/backofficeiLinkTest'; /* |-------------------------------------------------------------------------- diff --git a/application/config/database.php b/application/config/database.php index 32380b0f..68ce7312 100755 --- a/application/config/database.php +++ b/application/config/database.php @@ -76,10 +76,11 @@ $query_builder = TRUE; $db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', - 'username' => 'djery-tom', - 'password' => 'root', - 'database' => 'iLink_test2', - 'wallet_service_url' => 'http://localhost:8081', + 'username' => 'root', + 'password' => 'vps@2017GA', + 'database' => 'iLink_preprod', + 'wallet_service_url' => 'https://localhost:8081', + 'wallet_service_externe_url' => 'https://localhost:8085', 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, diff --git a/application/controllers/Admin_dash.php b/application/controllers/Admin_dash.php index c15de7b5..f3d1c259 100755 --- a/application/controllers/Admin_dash.php +++ b/application/controllers/Admin_dash.php @@ -143,8 +143,11 @@ class Admin_dash extends CI_Controller if (isset($route) && $route = 'page') { if ($this->input->get('view')) { switch ($this->input->get('view')){ - case 'walletService' : - $data['link'] = 'https://test.ilink-app.com:8081/api/documentation'; + case 'walletServiceInterne' : + $data['link'] = $this->db->wallet_service_url.'/api/documentation'; + break; + case 'walletServiceExterne' : + $data['link'] = $this->db->wallet_service_externe_url.'/api/documentation'; break; case 'backoffice': $data['link'] = base_url('docs/html/index.html'); diff --git a/application/controllers/Gestion.php b/application/controllers/Gestion.php index 52642f12..27f7f496 100755 --- a/application/controllers/Gestion.php +++ b/application/controllers/Gestion.php @@ -2322,6 +2322,34 @@ class Gestion extends CI_Controller } } + public function add_operator_type() + { + if ($this->isLogged()) { + if (isset($_POST)) { + + $query = $this->db->get_where('type_operators', array('code' => $this->input->post('code')), 1); + $exist = $query->num_rows() > 0; + if($exist){ + echo json_encode(422); + }else{ + $data = array( + 'code' => $this->input->post('code'), + 'description_fr' => $this->input->post('description_fr'), + 'description_en' => $this->input->post('description_fr') + ); + + $query = $this->db->insert('type_operators', $data); + if ($query) { + echo json_encode(200); + } else { + echo json_encode(500); + } + } + + } + } + } + public function delete_operator() { if ($this->isLogged()) { diff --git a/application/language/french/message_lang.php b/application/language/french/message_lang.php index 2e7e484e..826c28ac 100755 --- a/application/language/french/message_lang.php +++ b/application/language/french/message_lang.php @@ -591,4 +591,13 @@ $lang['docs_title'] = "Toute la documentation de iLink App accessible à un seul $lang['docs_api_overview'] = "L'ensemble des services REST qui communiquent avec l'application mobile et la base de données"; $lang['docs_web_overview'] = "La partie BackOffice developpée avec le framework CodeIgniter est dediée à l'administration de la plateforme"; $lang['docs_mobile_overview'] = "L'application mobile developpée avec le framework React Native, dediée aux clients"; +/******/ +$lang['add_operator_type'] = "Ajouter un nouveau type d'operateur"; +$lang['new_operator_type'] = "Nouveau type d'operateur"; +$lang['new_operator_added'] = "Nouveau type d'operateur ajouté"; +$lang['description_en'] = "Description anglaise"; +$lang['description_fr'] = "Description francaise"; +$lang['operator_type_code_exists'] = "Ce code de type d'opérateur existe déjà"; +$lang['unexpected_error'] = "Une erreur innatendue s'est produite"; +$lang['operators_enabled_disabled'] = "Opérateur(s) activée(s)/désactivée(s)" ?> diff --git a/application/views/documentation/docs-page.php b/application/views/documentation/docs-page.php index 446797be..48016b01 100755 --- a/application/views/documentation/docs-page.php +++ b/application/views/documentation/docs-page.php @@ -71,7 +71,8 @@