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
4dbcccdc
Commit
4dbcccdc
authored
Sep 24, 2019
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc
parent
1eef46a0
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
103 deletions
+31
-103
Webservice.php
application/controllers/Webservice.php
+2
-19
Validation_app_model.php
application/models/Validation_app_model.php
+29
-84
Webservice_model.php
application/models/Webservice_model.php
+0
-0
No files found.
application/controllers/Webservice.php
View file @
4dbcccdc
...
...
@@ -63,7 +63,6 @@ class Webservice extends CI_Controller {
}
}
public
function
check_email_availability
()
{
$data
=
(
array
)
json_decode
(
file_get_contents
(
'php://input'
));
$res
=
$this
->
Webservice_model
->
availability
(
$data
);
...
...
@@ -87,7 +86,6 @@ class Webservice extends CI_Controller {
}
public
function
get_events_list
()
{
$data
=
$_GET
;
$data
[
'auth_token'
]
=
$this
->
auth_token
;
$res
=
$this
->
Webservice_model
->
discover
(
$data
);
...
...
@@ -98,7 +96,6 @@ class Webservice extends CI_Controller {
}
else
{
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
public
function
events_details
(
$event_id
=
null
)
{
...
...
@@ -136,7 +133,6 @@ class Webservice extends CI_Controller {
print
json_encode
(
$result
);
}
public
function
successResponse
(
$data
)
{
$result
=
array
(
'status'
=>
'success'
,
...
...
@@ -153,7 +149,6 @@ class Webservice extends CI_Controller {
print
json_encode
(
$result
);
}
public
function
get_category_list
(
$query
=
null
)
{
$data
[
'query'
]
=
!
empty
(
$_GET
[
'query'
])
?
$_GET
[
'query'
]
:
''
;
$data
[
'auth_token'
]
=
$this
->
auth_token
;
...
...
@@ -178,7 +173,6 @@ class Webservice extends CI_Controller {
}
}
public
function
get_cities_list
()
{
$data
[
'auth_token'
]
=
$this
->
auth_token
;
$res
=
$this
->
Webservice_model
->
get_cities_list
(
$data
);
...
...
@@ -188,10 +182,8 @@ class Webservice extends CI_Controller {
else
{
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
public
function
update_city
(){
$data
=
(
array
)
json_decode
(
file_get_contents
(
'php://input'
));
$data
[
'auth_token'
]
=
$this
->
auth_token
;
...
...
@@ -218,7 +210,6 @@ class Webservice extends CI_Controller {
else
{
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
public
function
payment
(){
...
...
@@ -294,6 +285,7 @@ class Webservice extends CI_Controller {
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
public
function
cancel_booking
()
{
$data
=
(
array
)
json_decode
(
file_get_contents
(
'php://input'
));
$data
[
'auth_token'
]
=
$this
->
auth_token
;
...
...
@@ -367,7 +359,6 @@ class Webservice extends CI_Controller {
}
public
function
get_last_booking
()
{
$data
[
'auth_token'
]
=
$this
->
auth_token
;
$res
=
$this
->
Webservice_model
->
get_last_booking
(
$data
);
if
(
$res
[
'status'
]
!=
0
){
...
...
@@ -413,7 +404,6 @@ class Webservice extends CI_Controller {
public
function
get_app_version
(){
$res
=
$this
->
Webservice_model
->
get_app_version
();
if
(
$res
[
'status'
]
!=
0
)
$this
->
response
(
$res
[
'data'
]);
else
...
...
@@ -424,7 +414,6 @@ class Webservice extends CI_Controller {
$data
=
(
array
)
json_decode
(
file_get_contents
(
'php://input'
));
$data
[
'auth_token'
]
=
$this
->
auth_token
;
$res
=
$this
->
Webservice_model
->
logout
(
$data
);
if
(
$res
[
'status'
]
!=
0
)
$this
->
successResponse
(
$res
);
else
...
...
@@ -438,7 +427,6 @@ class Webservice extends CI_Controller {
}
$data
=
$_GET
;
$data
[
'auth_token'
]
=
$this
->
auth_token
;
$res
=
$this
->
Webservice_model
->
event_search
(
$data
);
if
(
$res
[
'status'
]
!=
0
){
$this
->
response
(
$res
[
'data'
]);
...
...
@@ -455,7 +443,6 @@ class Webservice extends CI_Controller {
empty
(
$settings
[
'currency_api'
])){
return
;
}
$sourceCur
=
(
!
empty
(
$settings
[
'currency'
]))
?
$settings
[
'currency'
]
:
'SAR'
;
$coma
=
''
;
$convertCur
=
''
;
...
...
@@ -463,20 +450,16 @@ class Webservice extends CI_Controller {
$convertCur
.=
$coma
.
$curr
[
'currency'
];
$coma
=
','
;
}
$params
=
'currencies='
.
$convertCur
;
$params
.=
'&source='
.
$sourceCur
;
$params
.=
'&access_key='
.
$settings
[
'currency_api'
];
$apiUrl
=
"http://apilayer.net/api/live?"
.
$params
;
$ch
=
curl_init
(
$apiUrl
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
true
);
$json
=
curl_exec
(
$ch
);
curl_close
(
$ch
);
$exchangeRates
=
json_decode
(
$json
,
true
);
if
(
empty
(
$exchangeRates
)
||
!
isset
(
$exchangeRates
[
'quotes'
])
||
empty
(
$conversion
=
$exchangeRates
[
'quotes'
])){
if
(
empty
(
$exchangeRates
)
||
!
isset
(
$exchangeRates
[
'quotes'
])
||
empty
(
$conversion
=
$exchangeRates
[
'quotes'
])){
return
;
}
foreach
(
$conversion
AS
$curr
=>
$rate
)
{
...
...
application/models/Validation_app_model.php
View file @
4dbcccdc
This diff is collapsed.
Click to expand it.
application/models/Webservice_model.php
View file @
4dbcccdc
This diff is collapsed.
Click to expand it.
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