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
c56582bf
Commit
c56582bf
authored
May 14, 2019
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc
parent
793d77b5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
41 additions
and
8 deletions
+41
-8
Booking.php
application/controllers/Booking.php
+5
-3
Webservice.php
application/controllers/Webservice.php
+9
-2
Booking_model.php
application/models/Booking_model.php
+2
-2
Validation_app_model.php
application/models/Validation_app_model.php
+1
-0
Webservice_model.php
application/models/Webservice_model.php
+21
-0
viewBooking.php
application/views/Booking/viewBooking.php
+1
-0
viewBookingDetails.php
application/views/Booking/viewBookingDetails.php
+1
-0
viewSettings.php
application/views/Settings/viewSettings.php
+0
-0
custom-script.js
assets/js/custom-script.js
+1
-1
No files found.
application/controllers/Booking.php
View file @
c56582bf
...
@@ -22,7 +22,7 @@ class Booking extends CI_Controller {
...
@@ -22,7 +22,7 @@ class Booking extends CI_Controller {
$template
[
'page_head'
]
=
"Booking Management"
;
$template
[
'page_head'
]
=
"Booking Management"
;
$provider_id
=
(
$this
->
session
->
userdata
(
'user_type'
)
==
2
)
?
$this
->
session
->
userdata
(
'id'
)
:
''
;
$provider_id
=
(
$this
->
session
->
userdata
(
'user_type'
)
==
2
)
?
$this
->
session
->
userdata
(
'id'
)
:
''
;
$template
[
'booking_data'
]
=
$this
->
Booking_model
->
getBookingData
(
''
,
$provider_id
,
'0,1,2,3'
);
$template
[
'booking_data'
]
=
$this
->
Booking_model
->
getBookingData
(
''
,
$provider_id
,
'0,1,2,3
,5
'
);
$this
->
load
->
view
(
'template'
,
$template
);
$this
->
load
->
view
(
'template'
,
$template
);
}
}
...
@@ -32,8 +32,10 @@ class Booking extends CI_Controller {
...
@@ -32,8 +32,10 @@ class Booking extends CI_Controller {
if
(
!
isset
(
$_POST
)
||
empty
(
$_POST
)
||!
isset
(
$_POST
[
'booking_id'
])
||
empty
(
$_POST
[
'booking_id'
])){
if
(
!
isset
(
$_POST
)
||
empty
(
$_POST
)
||!
isset
(
$_POST
[
'booking_id'
])
||
empty
(
$_POST
[
'booking_id'
])){
echo
json_encode
(
$resArr
);
exit
;
echo
json_encode
(
$resArr
);
exit
;
}
}
$booking_id
=
(
!
is_numeric
(
$_POST
[
'booking_id'
]))
?
decode_param
(
$_POST
[
'booking_id'
])
:
$_POST
[
'booking_id'
];
$booking_id
=
(
!
is_numeric
(
$_POST
[
'booking_id'
]))
?
$view_all
=
(
isset
(
$_POST
[
'view_all'
])
&&
$_POST
[
'view_all'
]
!=
''
)
?
$_POST
[
'view_all'
]
:
'0,1,2,3'
;
decode_param
(
$_POST
[
'booking_id'
])
:
$_POST
[
'booking_id'
];
$view_all
=
(
isset
(
$_POST
[
'view_all'
])
&&
$_POST
[
'view_all'
]
!=
''
)
?
$_POST
[
'view_all'
]
:
'0,1,2,3,5'
;
$provider_id
=
(
$this
->
session
->
userdata
(
'user_type'
)
==
2
)
?
$this
->
session
->
userdata
(
'id'
)
:
''
;
$provider_id
=
(
$this
->
session
->
userdata
(
'user_type'
)
==
2
)
?
$this
->
session
->
userdata
(
'id'
)
:
''
;
$bookData
[
'bookData'
]
=
$this
->
Booking_model
->
getBookingData
(
$booking_id
,
$provider_id
,
$view_all
);
$bookData
[
'bookData'
]
=
$this
->
Booking_model
->
getBookingData
(
$booking_id
,
$provider_id
,
$view_all
);
...
...
application/controllers/Webservice.php
View file @
c56582bf
...
@@ -417,8 +417,15 @@ class Webservice extends CI_Controller {
...
@@ -417,8 +417,15 @@ class Webservice extends CI_Controller {
else
{
else
{
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
}
public
function
get_app_version
(){
$res
=
$this
->
Webservice_model
->
get_app_version
();
if
(
$res
[
'status'
]
!=
0
)
$this
->
response
(
$res
[
'data'
]);
else
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
}
}
?>
?>
application/models/Booking_model.php
View file @
c56582bf
...
@@ -5,7 +5,7 @@ class Booking_model extends CI_Model {
...
@@ -5,7 +5,7 @@ class Booking_model extends CI_Model {
parent
::
_construct
();
parent
::
_construct
();
}
}
public
function
getBookingData
(
$booking_id
=
''
,
$provider_id
=
''
,
$view
=
'0,1,2,3'
){
public
function
getBookingData
(
$booking_id
=
''
,
$provider_id
=
''
,
$view
=
'0,1,2,3
,5
'
){
$cond
=
(
!
empty
(
$view
))
?
" BOK.status IN (
$view
) "
:
" BOK.status != '4' "
;
$cond
=
(
!
empty
(
$view
))
?
" BOK.status IN (
$view
) "
:
" BOK.status != '4' "
;
$cond
.=
(
!
empty
(
$booking_id
))
?
" AND BOK.id='
$booking_id
' "
:
""
;
$cond
.=
(
!
empty
(
$booking_id
))
?
" AND BOK.id='
$booking_id
' "
:
""
;
$cond
.=
(
!
empty
(
$provider_id
))
?
" AND EVT.provider_id='
$provider_id
' "
:
""
;
$cond
.=
(
!
empty
(
$provider_id
))
?
" AND EVT.provider_id='
$provider_id
' "
:
""
;
...
@@ -31,7 +31,7 @@ class Booking_model extends CI_Model {
...
@@ -31,7 +31,7 @@ class Booking_model extends CI_Model {
INNER JOIN event_date_time AS EDT ON (EDT.id=BOK.event_date_id)
INNER JOIN event_date_time AS EDT ON (EDT.id=BOK.event_date_id)
LEFT JOIN transaction AS TRANS ON (TRANS.booking_id=BOK.bookId)
LEFT JOIN transaction AS TRANS ON (TRANS.booking_id=BOK.bookId)
LEFT JOIN provider AS PRV ON (PRV.provider_id=EVT.provider_id)
LEFT JOIN provider AS PRV ON (PRV.provider_id=EVT.provider_id)
WHERE
$cond
AND EVT.status!='2'
"
;
WHERE
$cond
"
;
$bookingData
=
$this
->
db
->
query
(
$sql
);
$bookingData
=
$this
->
db
->
query
(
$sql
);
...
...
application/models/Validation_app_model.php
View file @
c56582bf
...
@@ -73,6 +73,7 @@ class Validation_app_model extends CI_Model {
...
@@ -73,6 +73,7 @@ class Validation_app_model extends CI_Model {
'update_notification_email_status'
=>
array
(
'auth_token'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER17'
,
'message'
=>
'User Id is null or empty'
),
'update_notification_email_status'
=>
array
(
'auth_token'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER17'
,
'message'
=>
'User Id is null or empty'
),
)
)
),
),
'get_app_version'
=>
array
(),
'profile_details'
=>
array
(
'auth_token'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER17'
,
'message'
=>
'User Id is null or empty'
),)),
'profile_details'
=>
array
(
'auth_token'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER17'
,
'message'
=>
'User Id is null or empty'
),)),
...
...
application/models/Webservice_model.php
View file @
c56582bf
...
@@ -1337,5 +1337,25 @@ class Webservice_model extends CI_Model {
...
@@ -1337,5 +1337,25 @@ class Webservice_model extends CI_Model {
}
}
return
$res
;
return
$res
;
}
}
function
get_app_version
()
{
$res
=
array
();
try
{
$settings
=
$this
->
db
->
get
(
'setting'
)
->
row_array
();
if
(
!
empty
(
$settings
)){
$data
=
array
(
'android_version_code'
=>
$settings
[
'android_version'
],
'ios_version_code'
=>
$settings
[
'ios_version'
],
'android_playstore_link'
=>
$settings
[
'android_playstore_url'
],
'ios_playstore_link'
=>
$settings
[
'ios_playstore_url'
]);
$res
=
array
(
'status'
=>
1
,
'data'
=>
$data
);
}
else
{
$res
=
array
(
'status'
=>
0
,
'message'
=>
'No Data Found'
,
'code'
=>
'ER15'
);
}
}
catch
(
Exception
$e
)
{
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Ohh No!! Something went South!!'
,
'code'
=>
'ER06'
);
}
return
$res
;
}
}
}
?>
?>
\ No newline at end of file
application/views/Booking/viewBooking.php
View file @
c56582bf
...
@@ -66,6 +66,7 @@
...
@@ -66,6 +66,7 @@
case
1
:
echo
'Booked'
;
break
;
case
1
:
echo
'Booked'
;
break
;
case
2
:
echo
'Completed'
;
break
;
case
2
:
echo
'Completed'
;
break
;
case
3
:
echo
'Pending'
;
break
;
case
3
:
echo
'Pending'
;
break
;
case
4
:
echo
'Deleted'
;
break
;
case
5
:
echo
'Payment Failed'
;
break
;
case
5
:
echo
'Payment Failed'
;
break
;
}
}
?>
?>
...
...
application/views/Booking/viewBookingDetails.php
View file @
c56582bf
...
@@ -118,6 +118,7 @@
...
@@ -118,6 +118,7 @@
case
'2'
:
echo
'Completed'
;
break
;
case
'2'
:
echo
'Completed'
;
break
;
case
'3'
:
echo
'Pending'
;
break
;
case
'3'
:
echo
'Pending'
;
break
;
case
'4'
:
echo
'Deleted'
;
break
;
case
'4'
:
echo
'Deleted'
;
break
;
case
'5'
:
echo
'Payment Failed'
;
break
;
}
}
?>
?>
</div>
</div>
...
...
application/views/Settings/viewSettings.php
View file @
c56582bf
This diff is collapsed.
Click to expand it.
assets/js/custom-script.js
View file @
c56582bf
...
@@ -608,7 +608,7 @@ function viewBooking(booking_id){
...
@@ -608,7 +608,7 @@ function viewBooking(booking_id){
jQuery
.
ajax
({
jQuery
.
ajax
({
url
:
base_url
+
"Booking/getBookingData"
,
url
:
base_url
+
"Booking/getBookingData"
,
type
:
'POST'
,
type
:
'POST'
,
data
:
{
'booking_id'
:
booking_id
},
data
:
{
'booking_id'
:
booking_id
,
'view_all'
:
'0,1,2,3,4,5'
},
success
:
function
(
resp
){
success
:
function
(
resp
){
if
(
resp
==
''
||
resp
==
undefined
||
resp
==
'undefined'
||
resp
==
null
||
resp
==
'null'
){
if
(
resp
==
''
||
resp
==
undefined
||
resp
==
'undefined'
||
resp
==
null
||
resp
==
'null'
){
remModalLoader
();
remModalLoader
();
...
...
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