Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TimeOutAdmin
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TimeOut
TimeOutAdmin
Commits
54f6a0a0
Commit
54f6a0a0
authored
Nov 04, 2019
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
organizer api
parent
aeb3d751
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
4 deletions
+67
-4
Webservice.php
application/controllers/Webservice.php
+11
-0
Organizer_model.php
application/models/Organizer_model.php
+6
-3
Validation_app_model.php
application/models/Validation_app_model.php
+2
-1
Webservice_model.php
application/models/Webservice_model.php
+48
-0
No files found.
application/controllers/Webservice.php
View file @
54f6a0a0
...
...
@@ -570,5 +570,16 @@ class Webservice extends CI_Controller {
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
public
function
get_hotel_city_list
(){
$data
=
$_GET
;
$data
[
'auth_token'
]
=
$this
->
auth_token
;
$res
=
$this
->
Webservice_model
->
get_hotel_city_list
(
$data
);
if
(
$res
[
'status'
]
==
1
){
$this
->
response
(
$res
[
'data'
]);
}
else
{
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
}
?>
application/models/Organizer_model.php
View file @
54f6a0a0
...
...
@@ -918,8 +918,11 @@ class Organizer_model extends CI_Model {
if
(
!
isset
(
$seatlyt
->
{
'price_details_'
.
$lang
})){
continue
;
}
$sql
=
"SELECT country_id AS lang_id,language_code AS lang,language FROM country WHERE status='1' AND language_code='
$lang
'"
;
$langSql
=
$this
->
db
->
query
(
$sql
)
->
row_array
();
$desc
=
(
!
empty
(
$seatlyt
->
{
'price_details_'
.
$lang
}))
?
$seatlyt
->
{
'price_details_'
.
$lang
}
:
''
;
$priceArr
[]
=
array
(
'lang'
=>
$lang
,
'desc'
=>
$desc
);
$priceArr
[]
=
array
(
'lang'
=>
$lang
,
'desc'
=>
$desc
,
'language'
=>
$langSql
[
'language'
],
'language_id'
=>
$langSql
[
'lang_id'
]
);
unset
(
$seatlyt
->
{
'price_details_'
.
$lang
});
}
$seatlyt
->
about_price_division
=
$priceArr
;
...
...
@@ -940,8 +943,8 @@ class Organizer_model extends CI_Model {
$evtDesc
[]
=
array
(
'lang'
=>
$value
[
'language_code'
],
'language'
=>
$langSql
[
'language'
],
'language_id'
=>
$langSql
[
'lang_id'
],
'desc'
=>
$value
[
'event_description'
]);
}
}
$evData
[
'event_name'
]
=
$evtName
;
$evData
[
'event_desc'
]
=
$evtDesc
;
$evData
[
'event_name'
]
=
(
!
empty
(
$evtName
))
?
$evtName
:
[]
;
$evData
[
'event_desc'
]
=
(
!
empty
(
$evtDesc
))
?
$evtDesc
:
[]
;
}
$res
=
array
(
'status'
=>
1
,
'message'
=>
'success'
,
'data'
=>
$evData
);
}
catch
(
Exception
$e
){
...
...
application/models/Validation_app_model.php
View file @
54f6a0a0
...
...
@@ -168,7 +168,8 @@ class Validation_app_model extends CI_Model {
'message'
=>
'Total Cost is null or empty'
)
)
)
),
'get_hotel_city_list'
=>
array
(),
);
public
function
validation_check
(
$method_name
,
$parms
)
{
...
...
application/models/Webservice_model.php
View file @
54f6a0a0
...
...
@@ -2039,5 +2039,53 @@ class Webservice_model extends CI_Model {
$this
->
image_lib
->
initialize
(
$config
);
$this
->
image_lib
->
resize
();
}
public
function
get_hotel_city_list
(
$data
){
try
{
$user_id
=
$this
->
auth_token_get
(
$data
[
'auth_token'
]);
if
(
$user_id
>
0
)
{
$cond
=
''
;
if
(
isset
(
$data
[
'query'
])
&&
empty
(
$data
[
'query'
])){
$cond
=
"AND THC.hotel_city_name LIKE '%"
.
$data
[
'query'
]
.
"%'"
;
}
$sql
=
"SELECT HC.hotel_city_id FROM hotel_cities AS HC
INNER JOIN translator_hotel_city AS THC ON(THC.hotel_city_id=HC.hotel_city_id)
WHERE HC.status=1
$cond
"
;
$count
=
$this
->
db
->
query
(
$sql
)
->
num_rows
();
if
(
$count
>=
1
){
$perPage
=
10
;
$page
=
(
isset
(
$data
[
'page'
]))
?
$data
[
'page'
]
:
1
;
$limit
=
(
$page
-
1
)
*
$perPage
;
$meta
=
array
(
'total_pages'
=>
ceil
(
$count
/
$perPage
),
'total'
=>
$count
,
'current_page'
=>
$page
,
'per_page'
=>
$perPage
);
$sql
=
"SELECT THC.hotel_city_id AS id,HC.hotel_city_icon AS image
FROM translator_hotel_city AS THC
INNER JOIN hotel_cities AS HC ON (HC.hotel_city_id=THC.hotel_city_id)
WHERE THC.status=1
$cond
LIMIT
$limit
,
$perPage
"
;
$hotelData
=
$this
->
db
->
query
(
$sql
)
->
result_array
();
$countryData
=
$this
->
getCountryData
(
$user_id
);
$lang
=
$countryData
[
'language_code'
];
foreach
(
$hotelData
as
$key
=>
$value
)
{
if
(
!
empty
(
$lanTrans
=
langTranslator
(
$value
[
'id'
],
'HCTY'
,
$lang
))){
$hotelData
[
$key
][
'name'
]
=
$lanTrans
[
'hotel_city_name'
];
}
}
if
(
count
(
$hotelData
)
<
0
){
$res
=
array
(
'status'
=>
0
,
'message'
=>
'No Data Found'
,
'code'
=>
'ER10'
);
}
$res
=
array
(
'status'
=>
1
,
'data'
=>
array
(
'city_list'
=>
$hotelData
,
'meta'
=>
$meta
));
}
else
{
$res
=
array
(
'status'
=>
0
,
'message'
=>
'No Data Found'
,
'code'
=>
'ER10'
);
}
}
else
{
$res
=
array
(
'status'
=>
0
,
'message'
=>
'User Authentication Failed'
,
'code'
=>
'ER15'
);
}
}
catch
(
Exception
$e
){
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Ohh No!! Something Went South!!'
,
'code'
=>
'ER08'
);
}
return
$res
;
}
}
?>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment