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'])) {
exit(0);
}
//test changes
class WebserviceFlight extends CI_Controller {
class FlightServices extends CI_Controller {
var $auth_token;
public function __construct() {
parent::__construct();
date_default_timezone_set("Asia/Riyadh");
$this->load->model('Webservice_flight_model');
$this->load->model('Flight_model');
$this->load->model('Validation_flight_model');
$method = $this->router->fetch_method();
$data = (array) json_decode(file_get_contents('php://input'));
......@@ -64,7 +64,7 @@ class WebserviceFlight extends CI_Controller {
public function flight_authenticate(){
$data = (array)json_decode(file_get_contents('php://input'));
$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){
$this->response($res['data']);
}else{
......@@ -75,7 +75,7 @@ class WebserviceFlight extends CI_Controller {
public function flight_availability_search(){
$data = (array)json_decode(file_get_contents('php://input'));
$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){
$this->response($res['data']);
}else{
......@@ -86,7 +86,7 @@ class WebserviceFlight extends CI_Controller {
public function flight_fare_rules(){
$data = (array)json_decode(file_get_contents('php://input'));
$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){
$this->response($res['data']);
}else{
......@@ -97,7 +97,7 @@ class WebserviceFlight extends CI_Controller {
public function flight_revalidate(){
$data = (array)json_decode(file_get_contents('php://input'));
$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){
$this->response($res['data']);
}else{
......@@ -108,7 +108,7 @@ class WebserviceFlight extends CI_Controller {
public function flight_book(){
$data = (array)json_decode(file_get_contents('php://input'));
$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){
$this->response($res['data']);
}else{
......@@ -119,7 +119,7 @@ class WebserviceFlight extends CI_Controller {
public function flight_ticket_order(){
$data = (array)json_decode(file_get_contents('php://input'));
$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){
$this->response($res['data']);
}else{
......@@ -130,7 +130,7 @@ class WebserviceFlight extends CI_Controller {
public function flight_trip_details(){
$data = (array)json_decode(file_get_contents('php://input'));
$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){
$this->response($res['data']);
}else{
......@@ -141,7 +141,7 @@ class WebserviceFlight extends CI_Controller {
public function cancel_flights(){
$data = (array)json_decode(file_get_contents('php://input'));
$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){
$this->response($res['data']);
}else{
......@@ -152,7 +152,7 @@ class WebserviceFlight extends CI_Controller {
public function airportSearch(){
$data = $_GET;
$data['auth_token'] = $this->auth_token;
$res = $this->Webservice_flight_model->airportSearch($data);
$res = $this->Flight_model->airportSearch($data);
if($res['status'] == 1){
$this->response($res['data']);
}else{
......
......@@ -16,13 +16,13 @@ if (isset($_SERVER['HTTP_ORIGIN'])) {
exit(0);
}
//test changes
class WebserviceHotel extends CI_Controller {
class HotelServices extends CI_Controller {
var $auth_token;
public function __construct() {
parent::__construct();
date_default_timezone_set("Asia/Riyadh");
$this->load->model('Webservice_hotel_model');
$this->load->model('Hotel_model');
$this->load->model('Validation_hotel_model');
$method = $this->router->fetch_method();
$data = (array) json_decode(file_get_contents('php://input'));
......@@ -64,7 +64,7 @@ class WebserviceHotel extends CI_Controller {
public function get_hotel_city_list(){
$data = $_GET;
$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){
$this->response($res['data']);
}else{
......@@ -75,7 +75,7 @@ class WebserviceHotel extends CI_Controller {
public function hotel_search(){
$data = (array)json_decode(file_get_contents('php://input'));
$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){
$this->response($res['data']);
}else{
......@@ -86,7 +86,7 @@ class WebserviceHotel extends CI_Controller {
public function get_specific_hotel_content(){
$data = (array)json_decode(file_get_contents('php://input'));
$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){
$this->response($res['data']);
}else{
......@@ -97,7 +97,7 @@ class WebserviceHotel extends CI_Controller {
public function get_room_rates(){
$data = (array)json_decode(file_get_contents('php://input'));
$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){
$this->response($res['data']);
}else{
......@@ -108,7 +108,7 @@ class WebserviceHotel extends CI_Controller {
public function get_rate_rules(){
$data = (array) json_decode(file_get_contents('php://input'));
$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){
$this->response($res['data']);
}else{
......@@ -119,7 +119,7 @@ class WebserviceHotel extends CI_Controller {
public function hotel_book(){
$data = (array)json_decode(file_get_contents('php://input'));
$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){
$this->response($res['data']);
}else{
......@@ -130,7 +130,7 @@ class WebserviceHotel extends CI_Controller {
public function trawex_cancel_booking(){
$data = (array)json_decode(file_get_contents('php://input'));
$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){
$this->response($res['data']);
}else{
......
<?php
class Webservice_flight_model extends CI_Model {
class Flight_model extends CI_Model {
public function _consruct(){
parent::_construct();
......
<?php
class Webservice_hotel_model extends CI_Model {
class Hotel_model extends CI_Model {
public function _consruct(){
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