Commit 7b2c3063 by Jansa Jose

Merge branch 'master' into 'dev_production'

J : changes controller and model names See merge request !219
parents b77407ee 4a395b56
...@@ -16,13 +16,13 @@ if (isset($_SERVER['HTTP_ORIGIN'])) { ...@@ -16,13 +16,13 @@ if (isset($_SERVER['HTTP_ORIGIN'])) {
exit(0); exit(0);
} }
//test changes //test changes
class WebserviceFlight extends CI_Controller { class FlightServices extends CI_Controller {
var $auth_token; var $auth_token;
public function __construct() { public function __construct() {
parent::__construct(); parent::__construct();
date_default_timezone_set("Asia/Riyadh"); date_default_timezone_set("Asia/Riyadh");
$this->load->model('Webservice_flight_model'); $this->load->model('Flight_model');
$this->load->model('Validation_flight_model'); $this->load->model('Validation_flight_model');
$method = $this->router->fetch_method(); $method = $this->router->fetch_method();
$data = (array) json_decode(file_get_contents('php://input')); $data = (array) json_decode(file_get_contents('php://input'));
...@@ -64,7 +64,7 @@ class WebserviceFlight extends CI_Controller { ...@@ -64,7 +64,7 @@ class WebserviceFlight extends CI_Controller {
public function flight_authenticate(){ public function flight_authenticate(){
$data = (array)json_decode(file_get_contents('php://input')); $data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$res = $this->Webservice_flight_model->flight_authenticate($data); $res = $this->Flight_model->flight_authenticate($data);
if($res['status'] == 1){ if($res['status'] == 1){
$this->response($res['data']); $this->response($res['data']);
}else{ }else{
...@@ -75,7 +75,7 @@ class WebserviceFlight extends CI_Controller { ...@@ -75,7 +75,7 @@ class WebserviceFlight extends CI_Controller {
public function flight_availability_search(){ public function flight_availability_search(){
$data = (array)json_decode(file_get_contents('php://input')); $data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$res = $this->Webservice_flight_model->flight_availability_search($data); $res = $this->Flight_model->flight_availability_search($data);
if($res['status'] == 1){ if($res['status'] == 1){
$this->response($res['data']); $this->response($res['data']);
}else{ }else{
...@@ -86,7 +86,7 @@ class WebserviceFlight extends CI_Controller { ...@@ -86,7 +86,7 @@ class WebserviceFlight extends CI_Controller {
public function flight_fare_rules(){ public function flight_fare_rules(){
$data = (array)json_decode(file_get_contents('php://input')); $data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$res = $this->Webservice_flight_model->flight_fare_rules($data); $res = $this->Flight_model->flight_fare_rules($data);
if($res['status'] == 1){ if($res['status'] == 1){
$this->response($res['data']); $this->response($res['data']);
}else{ }else{
...@@ -97,7 +97,7 @@ class WebserviceFlight extends CI_Controller { ...@@ -97,7 +97,7 @@ class WebserviceFlight extends CI_Controller {
public function flight_revalidate(){ public function flight_revalidate(){
$data = (array)json_decode(file_get_contents('php://input')); $data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$res = $this->Webservice_flight_model->flight_revalidate($data); $res = $this->Flight_model->flight_revalidate($data);
if($res['status'] == 1){ if($res['status'] == 1){
$this->response($res['data']); $this->response($res['data']);
}else{ }else{
...@@ -108,7 +108,7 @@ class WebserviceFlight extends CI_Controller { ...@@ -108,7 +108,7 @@ class WebserviceFlight extends CI_Controller {
public function flight_book(){ public function flight_book(){
$data = (array)json_decode(file_get_contents('php://input')); $data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$res = $thia->Webservice_flight_model->flight_book($data); $res = $thia->Flight_model->flight_book($data);
if($res['status'] == 1){ if($res['status'] == 1){
$this->response($res['data']); $this->response($res['data']);
}else{ }else{
...@@ -119,7 +119,7 @@ class WebserviceFlight extends CI_Controller { ...@@ -119,7 +119,7 @@ class WebserviceFlight extends CI_Controller {
public function flight_ticket_order(){ public function flight_ticket_order(){
$data = (array)json_decode(file_get_contents('php://input')); $data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$res = $this->Webservice_flight_model->flight_ticket_order($data); $res = $this->Flight_model->flight_ticket_order($data);
if($res['status'] == 1){ if($res['status'] == 1){
$this->response($res['data']); $this->response($res['data']);
}else{ }else{
...@@ -130,7 +130,7 @@ class WebserviceFlight extends CI_Controller { ...@@ -130,7 +130,7 @@ class WebserviceFlight extends CI_Controller {
public function flight_trip_details(){ public function flight_trip_details(){
$data = (array)json_decode(file_get_contents('php://input')); $data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$res = $this->Webservice_flight_model->flight_trip_details($data); $res = $this->Flight_model->flight_trip_details($data);
if($res['status'] == 1){ if($res['status'] == 1){
$this->response($res['data']); $this->response($res['data']);
}else{ }else{
...@@ -141,7 +141,7 @@ class WebserviceFlight extends CI_Controller { ...@@ -141,7 +141,7 @@ class WebserviceFlight extends CI_Controller {
public function cancel_flights(){ public function cancel_flights(){
$data = (array)json_decode(file_get_contents('php://input')); $data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$res = $this->Webservice_flight_model->cancel_flights($data); $res = $this->Flight_model->cancel_flights($data);
if($res['status'] == 1){ if($res['status'] == 1){
$this->response($res['data']); $this->response($res['data']);
}else{ }else{
...@@ -152,7 +152,7 @@ class WebserviceFlight extends CI_Controller { ...@@ -152,7 +152,7 @@ class WebserviceFlight extends CI_Controller {
public function airportSearch(){ public function airportSearch(){
$data = $_GET; $data = $_GET;
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$res = $this->Webservice_flight_model->airportSearch($data); $res = $this->Flight_model->airportSearch($data);
if($res['status'] == 1){ if($res['status'] == 1){
$this->response($res['data']); $this->response($res['data']);
}else{ }else{
......
...@@ -16,13 +16,13 @@ if (isset($_SERVER['HTTP_ORIGIN'])) { ...@@ -16,13 +16,13 @@ if (isset($_SERVER['HTTP_ORIGIN'])) {
exit(0); exit(0);
} }
//test changes //test changes
class WebserviceHotel extends CI_Controller { class HotelServices extends CI_Controller {
var $auth_token; var $auth_token;
public function __construct() { public function __construct() {
parent::__construct(); parent::__construct();
date_default_timezone_set("Asia/Riyadh"); date_default_timezone_set("Asia/Riyadh");
$this->load->model('Webservice_hotel_model'); $this->load->model('Hotel_model');
$this->load->model('Validation_hotel_model'); $this->load->model('Validation_hotel_model');
$method = $this->router->fetch_method(); $method = $this->router->fetch_method();
$data = (array) json_decode(file_get_contents('php://input')); $data = (array) json_decode(file_get_contents('php://input'));
...@@ -64,7 +64,7 @@ class WebserviceHotel extends CI_Controller { ...@@ -64,7 +64,7 @@ class WebserviceHotel extends CI_Controller {
public function get_hotel_city_list(){ public function get_hotel_city_list(){
$data = $_GET; $data = $_GET;
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$res = $this->Webservice_hotel_model->get_hotel_city_list($data); $res = $this->Hotel_model->get_hotel_city_list($data);
if($res['status'] == 1){ if($res['status'] == 1){
$this->response($res['data']); $this->response($res['data']);
}else{ }else{
...@@ -75,7 +75,7 @@ class WebserviceHotel extends CI_Controller { ...@@ -75,7 +75,7 @@ class WebserviceHotel extends CI_Controller {
public function hotel_search(){ public function hotel_search(){
$data = (array)json_decode(file_get_contents('php://input')); $data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$res = $this->Webservice_hotel_model->hotel_search($data); $res = $this->Hotel_model->hotel_search($data);
if($res['status'] == 1){ if($res['status'] == 1){
$this->response($res['data']); $this->response($res['data']);
}else{ }else{
...@@ -86,7 +86,7 @@ class WebserviceHotel extends CI_Controller { ...@@ -86,7 +86,7 @@ class WebserviceHotel extends CI_Controller {
public function get_specific_hotel_content(){ public function get_specific_hotel_content(){
$data = (array)json_decode(file_get_contents('php://input')); $data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$res = $this->Webservice_hotel_model->get_specific_hotel_content($data); $res = $this->Hotel_model->get_specific_hotel_content($data);
if($res['status'] == 1){ if($res['status'] == 1){
$this->response($res['data']); $this->response($res['data']);
}else{ }else{
...@@ -97,7 +97,7 @@ class WebserviceHotel extends CI_Controller { ...@@ -97,7 +97,7 @@ class WebserviceHotel extends CI_Controller {
public function get_room_rates(){ public function get_room_rates(){
$data = (array)json_decode(file_get_contents('php://input')); $data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$res = $this->Webservice_hotel_model->get_room_rates($data); $res = $this->Hotel_model->get_room_rates($data);
if($res['status'] == 1){ if($res['status'] == 1){
$this->response($res['data']); $this->response($res['data']);
}else{ }else{
...@@ -108,7 +108,7 @@ class WebserviceHotel extends CI_Controller { ...@@ -108,7 +108,7 @@ class WebserviceHotel extends CI_Controller {
public function get_rate_rules(){ public function get_rate_rules(){
$data = (array) json_decode(file_get_contents('php://input')); $data = (array) json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$res = $this->Webservice_hotel_model->get_rate_rules($data); $res = $this->Hotel_model->get_rate_rules($data);
if($res['status'] == 1){ if($res['status'] == 1){
$this->response($res['data']); $this->response($res['data']);
}else{ }else{
...@@ -119,7 +119,7 @@ class WebserviceHotel extends CI_Controller { ...@@ -119,7 +119,7 @@ class WebserviceHotel extends CI_Controller {
public function hotel_book(){ public function hotel_book(){
$data = (array)json_decode(file_get_contents('php://input')); $data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$res = $this->Webservice_hotel_model->hotel_book($data); $res = $this->Hotel_model->hotel_book($data);
if($res['status'] == 1){ if($res['status'] == 1){
$this->response($res['data']); $this->response($res['data']);
}else{ }else{
...@@ -130,7 +130,7 @@ class WebserviceHotel extends CI_Controller { ...@@ -130,7 +130,7 @@ class WebserviceHotel extends CI_Controller {
public function trawex_cancel_booking(){ public function trawex_cancel_booking(){
$data = (array)json_decode(file_get_contents('php://input')); $data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$res = $this->Webservice_hotel_model->trawex_cancel_booking($data); $res = $this->Hotel_model->trawex_cancel_booking($data);
if($res['status'] == 1){ if($res['status'] == 1){
$this->response($res['data']); $this->response($res['data']);
}else{ }else{
......
<?php <?php
class Webservice_flight_model extends CI_Model { class Flight_model extends CI_Model {
public function _consruct(){ public function _consruct(){
parent::_construct(); parent::_construct();
......
<?php <?php
class Webservice_hotel_model extends CI_Model { class Hotel_model extends CI_Model {
public function _consruct(){ public function _consruct(){
parent::_construct(); parent::_construct();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment