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
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
75 additions
and
23 deletions
+75
-23
Booking.php
application/controllers/Booking.php
+5
-3
Webservice.php
application/controllers/Webservice.php
+7
-0
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
+36
-17
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 {
$template
[
'page_head'
]
=
"Booking Management"
;
$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
);
}
...
...
@@ -32,8 +32,10 @@ class Booking extends CI_Controller {
if
(
!
isset
(
$_POST
)
||
empty
(
$_POST
)
||!
isset
(
$_POST
[
'booking_id'
])
||
empty
(
$_POST
[
'booking_id'
])){
echo
json_encode
(
$resArr
);
exit
;
}
$booking_id
=
(
!
is_numeric
(
$_POST
[
'booking_id'
]))
?
decode_param
(
$_POST
[
'booking_id'
])
:
$_POST
[
'booking_id'
];
$view_all
=
(
isset
(
$_POST
[
'view_all'
])
&&
$_POST
[
'view_all'
]
!=
''
)
?
$_POST
[
'view_all'
]
:
'0,1,2,3'
;
$booking_id
=
(
!
is_numeric
(
$_POST
[
'booking_id'
]))
?
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'
)
:
''
;
$bookData
[
'bookData'
]
=
$this
->
Booking_model
->
getBookingData
(
$booking_id
,
$provider_id
,
$view_all
);
...
...
application/controllers/Webservice.php
View file @
c56582bf
...
...
@@ -419,6 +419,13 @@ 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
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
?>
application/models/Booking_model.php
View file @
c56582bf
...
...
@@ -5,7 +5,7 @@ class Booking_model extends CI_Model {
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
(
$booking_id
))
?
" AND BOK.id='
$booking_id
' "
:
""
;
$cond
.=
(
!
empty
(
$provider_id
))
?
" AND EVT.provider_id='
$provider_id
' "
:
""
;
...
...
@@ -31,7 +31,7 @@ class Booking_model extends CI_Model {
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 provider AS PRV ON (PRV.provider_id=EVT.provider_id)
WHERE
$cond
AND EVT.status!='2'
"
;
WHERE
$cond
"
;
$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 {
'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'
),)),
...
...
application/models/Webservice_model.php
View file @
c56582bf
...
...
@@ -1337,5 +1337,25 @@ class Webservice_model extends CI_Model {
}
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 @@
case
1
:
echo
'Booked'
;
break
;
case
2
:
echo
'Completed'
;
break
;
case
3
:
echo
'Pending'
;
break
;
case
4
:
echo
'Deleted'
;
break
;
case
5
:
echo
'Payment Failed'
;
break
;
}
?>
...
...
application/views/Booking/viewBookingDetails.php
View file @
c56582bf
...
...
@@ -118,6 +118,7 @@
case
'2'
:
echo
'Completed'
;
break
;
case
'3'
:
echo
'Pending'
;
break
;
case
'4'
:
echo
'Deleted'
;
break
;
case
'5'
:
echo
'Payment Failed'
;
break
;
}
?>
</div>
...
...
application/views/Settings/viewSettings.php
View file @
c56582bf
...
...
@@ -9,8 +9,8 @@
<li>
<?=
$menu
?>
</li>
<li
class=
"active"
>
<?=
$sub_menu
?>
</li>
</ol>
</section>
<section
class=
"content"
>
</section>
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<?php
if
(
$this
->
session
->
flashdata
(
'message'
))
{
...
...
@@ -25,7 +25,7 @@
<div
class=
"box box-warning"
>
<div
class=
"box-header with-border"
>
<div
class=
"col-md-6"
>
<h3
class=
"box-title"
>
Edit Basic
Site Details
</h3>
<h3
class=
"box-title"
>
Site Details
</h3>
</div>
<div
class=
"col-md-6"
align=
"right"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
()
?>
"
>
Back
</a>
...
...
@@ -33,7 +33,6 @@
</div>
<form
method=
"post"
class=
"validate"
role=
"form"
action=
"
<?=
base_url
()
.
'Settings/change_settings'
?>
"
enctype=
"multipart/form-data"
data-parsley-validate=
""
>
<div
class=
"box-body"
>
<!-- <div class="form-group col-xs-12"> -->
<div
class=
"form-group col-xs-7"
>
<div
class=
"form-group col-xs-6"
>
<label>
Site Title
</label>
...
...
@@ -51,14 +50,6 @@
<label>
Currency
</label>
<input
type=
"text"
name=
"currency"
class=
"form-control required"
placeholder=
"Enter SMTP Password"
value=
"
<?=
$data
[
'currency'
]
?>
"
>
</div>
<!-- <div class="form-group col-xs-6">
<label>SMTP Username</label>
<input type="text" name="smtp_username" class="form-control required" placeholder="Enter SMTP Username" value="
<?=
$data
[
'smtp_username'
]
?>
">
</div>
<div class="form-group col-xs-6">
<label>SMTP Password</label>
<input type="text" name="smtp_password" class="form-control required" placeholder="Enter SMTP Password" value="
<?=
$data
[
'smtp_password'
]
?>
">
</div> -->
<div
class=
"form-group col-xs-6"
>
<label>
Google API Key
</label>
<input
type=
"text"
name=
"google_api_key"
class=
"form-control required"
placeholder=
"Enter Google API"
value=
"
<?=
$data
[
'google_api_key'
]
?>
"
>
...
...
@@ -79,10 +70,6 @@
<label>
Admin Email-ID
</label>
<input
type=
"email"
name=
"admin_mail_id"
class=
"form-control required"
placeholder=
"Admin Email-ID"
value=
"
<?=
$data
[
'admin_mail_id'
]
?>
"
>
</div>
<div
class=
"form-group col-xs-6"
>
<label>
App-ID
</label>
<input
type=
"text"
name=
"app_id"
class=
"form-control required"
placeholder=
"App-ID"
value=
"
<?=
$data
[
'app_id'
]
?>
"
>
</div>
</div>
<div
class=
"form-group col-xs-5"
>
<div
class=
"form-group"
>
...
...
@@ -108,12 +95,43 @@
</div>
</div>
</div>
<!-- </div> -->
</div>
<div
class=
"box-header with-border"
>
<div
class=
"col-md-6"
>
<h3
class=
"box-title"
>
APP Details
</h3>
</div>
</div>
<div
class=
"box-body"
>
<div
class=
"form-group col-xs-7"
>
<div
class=
"form-group col-xs-12"
>
<label>
FireBase App-ID
</label>
<input
type=
"text"
name=
"app_id"
class=
"form-control required"
placeholder=
"App-ID"
value=
"
<?=
$data
[
'app_id'
]
?>
"
>
</div>
<div
class=
"form-group col-xs-6"
>
<label>
IOS Version
</label>
<input
type=
"text"
name=
"ios_version"
class=
"form-control required"
placeholder=
"Enter IOS Version"
value=
"
<?=
$data
[
'ios_version'
]
?>
"
>
</div>
<div
class=
"form-group col-xs-6"
>
<label>
IOS Playstore URL
</label>
<input
type=
"text"
name=
"ios_playstore_url"
class=
"form-control required"
placeholder=
"Enter IOS Playstore URL"
value=
"
<?=
$data
[
'ios_playstore_url'
]
?>
"
>
</div>
<div
class=
"form-group col-xs-6"
>
<label>
Android Version
</label>
<input
type=
"text"
name=
"android_version"
class=
"form-control required"
placeholder=
"Enter Android Version"
value=
"
<?=
$data
[
'android_version'
]
?>
"
>
</div>
<div
class=
"form-group col-xs-6"
>
<label>
Android Playstore URL
</label>
<input
type=
"text"
name=
"android_playstore_url"
class=
"form-control required"
placeholder=
"Enter Android Playstore URL"
value=
"
<?=
$data
[
'android_playstore_url'
]
?>
"
>
</div>
</div>
</div>
<div
class=
"box-footer"
style=
"padding-left:46%"
>
<button
type=
"submit"
class=
"btn btn-info"
>
Update
</button>
</div>
</form>
</div>
</div>
</div>
</section>
</div>
\ No newline at end of file
assets/js/custom-script.js
View file @
c56582bf
...
...
@@ -608,7 +608,7 @@ function viewBooking(booking_id){
jQuery
.
ajax
({
url
:
base_url
+
"Booking/getBookingData"
,
type
:
'POST'
,
data
:
{
'booking_id'
:
booking_id
},
data
:
{
'booking_id'
:
booking_id
,
'view_all'
:
'0,1,2,3,4,5'
},
success
:
function
(
resp
){
if
(
resp
==
''
||
resp
==
undefined
||
resp
==
'undefined'
||
resp
==
null
||
resp
==
'null'
){
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