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
467bc43d
Commit
467bc43d
authored
Mar 28, 2019
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc
parent
192f4333
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
1 deletion
+81
-1
Api.php
application/controllers/Api.php
+22
-0
Api_model.php
application/models/Api_model.php
+43
-0
Validation_model.php
application/models/Validation_model.php
+15
-0
viewEventList.php
application/views/Event/viewEventList.php
+1
-1
No files found.
application/controllers/Api.php
View file @
467bc43d
...
...
@@ -298,6 +298,28 @@ class Api extends CI_Controller {
}
}
public
function
get_cms_data
()
{
$res
=
$this
->
Api_model
->
get_cms_data
();
if
(
$res
[
'status'
]
!=
0
){
$this
->
response
(
$res
[
'data'
]);
}
else
{
$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
;
$res
=
$this
->
Api_model
->
cancel_booking
(
$data
);
if
(
$res
[
'status'
]
!=
0
){
$this
->
response
(
$res
[
'data'
]);
}
else
{
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
public
function
payNow
(
$auth_token
=
''
,
$amount
=
0
,
$booking_id
=
''
,
$event_id
=
''
){
if
(
empty
(
$auth_token
)
||
empty
(
$amount
)
||
empty
(
$booking_id
)){
redirect
(
'https://projects.nuvento.com/failure'
);
...
...
application/models/Api_model.php
View file @
467bc43d
...
...
@@ -902,5 +902,47 @@ class Api_model extends CI_Model {
return
$res
;
}
function
get_cms_data
(){
$language
=
array
();
try
{
$cms
=
$this
->
db
->
get
(
'privacy_policy'
)
->
row_array
();
if
(
$cms
){
$language
[
'ar'
]
=
array
(
'faq'
=>
$cms
[
'faq_ar'
],
'privacy_policy'
=>
$cms
[
'privacy_policy_ar'
],
'terms_and_conditions'
=>
$cms
[
'terms_and_conditions_ar'
]);
$language
[
'en'
]
=
array
(
'faq'
=>
$cms
[
'faq_en'
],
'privacy_policy'
=>
$cms
[
'privacy_policy_en'
],
'terms_and_conditions'
=>
$cms
[
'terms_and_conditions_en'
]);
$res
=
array
(
'status'
=>
1
,
'data'
=>
$language
);
}
}
catch
(
Exception
$e
){
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Ohh No!! Something went South!!'
,
'code'
=>
'ER06'
);
}
return
$res
;
}
public
function
cancel_booking
(
$data
){
try
{
$user_id
=
$this
->
auth_token_get
(
$data
[
'auth_token'
]);
if
(
$user_id
>
0
)
{
$booked_data
=
$this
->
db
->
get_where
(
'booking'
,
array
(
'id'
=>
$data
[
'booking_id'
]))
->
row
();
if
(
$booked_data
){
if
(
$this
->
db
->
update
(
'booking'
,
array
(
'status'
=>
'0'
),
array
(
'id'
=>
$data
[
'booking_id'
]))){
$res
=
array
(
'status'
=>
1
);
}
else
{
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Booking Id doesnot Exist'
,
'code'
=>
'ER13'
);
}
}
}
else
{
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Invalid user'
,
'code'
=>
'ER19'
);
}
}
catch
(
Exception
$e
){
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Ohh No!! Something went South!!'
,
'code'
=>
'ER06'
);
}
return
$res
;
}
}
?>
\ No newline at end of file
application/models/Validation_model.php
View file @
467bc43d
...
...
@@ -67,6 +67,21 @@ class Validation_model extends CI_Model {
'paymentResponse'
=>
array
()
,
'paymentFailureUrl'
=>
array
()
,
'paymentSuccessUrl'
=>
array
()
,
'get_cms_data'
=>
array
()
,
'cancel_booking'
=>
array
(
'booking_id'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER16'
,
'message'
=>
'Booking id is null or empty'
)
)
,
'auth_token'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER17'
,
'message'
=>
'User Id is null or empty'
)
)
)
,
'favourite'
=>
array
(
'event_id'
=>
array
(
'required'
=>
array
(
...
...
application/views/Event/viewEventList.php
View file @
467bc43d
...
...
@@ -45,7 +45,7 @@
<th>
Venue
</th>
<!-- <th>Location</th> -->
<th>
Status
</th>
<th
width=
"3
0
0px"
>
Action
</th>
<th
width=
"3
3
0px"
>
Action
</th>
</tr>
</thead>
<tbody>
...
...
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