Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
IPok_Web
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
IPok
IPok_Web
Commits
f16f04e8
Commit
f16f04e8
authored
Jul 27, 2018
by
Jansa Jose
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jansa'
parents
56b642b3
71f1ebd9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
17 deletions
+30
-17
Webservice.php
admin/application/controllers/Webservice.php
+8
-1
Webservice_model.php
admin/application/models/Webservice_model.php
+22
-16
No files found.
admin/application/controllers/Webservice.php
View file @
f16f04e8
...
@@ -6853,7 +6853,8 @@ print_r(date('H:i',$ms));exit();*/
...
@@ -6853,7 +6853,8 @@ print_r(date('H:i',$ms));exit();*/
if
(
isset
(
$data
[
'month'
])
&&
strlen
(
$data
[
'month'
])
&&
isset
(
$data
[
'year'
])
&&
strlen
(
$data
[
'year'
])
&&
isset
(
$data
[
'first_name'
])
&&
strlen
(
$data
[
'first_name'
])
&&
isset
(
$data
[
'last_name'
])
&&
strlen
(
$data
[
'last_name'
])
&&
isset
(
$data
[
'card_number'
])
&&
strlen
(
$data
[
'card_number'
])
&&
isset
(
$data
[
'cvv'
])
&&
strlen
(
$data
[
'cvv'
])
&&
isset
(
$data
[
'booking_id'
])
&&
strlen
(
$data
[
'booking_id'
]))
{
if
(
isset
(
$data
[
'month'
])
&&
strlen
(
$data
[
'month'
])
&&
isset
(
$data
[
'year'
])
&&
strlen
(
$data
[
'year'
])
&&
isset
(
$data
[
'first_name'
])
&&
strlen
(
$data
[
'first_name'
])
&&
isset
(
$data
[
'last_name'
])
&&
strlen
(
$data
[
'last_name'
])
&&
isset
(
$data
[
'card_number'
])
&&
strlen
(
$data
[
'card_number'
])
&&
isset
(
$data
[
'cvv'
])
&&
strlen
(
$data
[
'cvv'
])
&&
isset
(
$data
[
'booking_id'
])
&&
strlen
(
$data
[
'booking_id'
]))
{
$authtoken
=
$this
->
Webservice_model
->
get_userid_frm_authtoken
(
$headers
[
'Auth'
]);
$authtoken
=
$this
->
Webservice_model
->
get_userid_frm_authtoken
(
$headers
[
'Auth'
]);
$data
[
'user_id'
]
=
$authtoken
->
userid
;
$data
[
'user_id'
]
=
$authtoken
->
userid
;
$get_booked_payed_data
=
$this
->
Webservice_model
->
get_booked_payed_data
(
$data
[
'booking_id'
]);
$payed_data
=
$this
->
Webservice_model
->
get_booked_payed_data
(
$data
[
'booking_id'
]);
if
(
$payed_data
[
'status'
]
==
'success'
&&
(
$payed_data
[
'is_result'
]
==
'0'
||
$payed_data
[
'is_result'
]
==
'1'
)){
$check_markbooking
=
$this
->
Webservice_model
->
checkBooking
(
$data
[
'booking_id'
]);
$check_markbooking
=
$this
->
Webservice_model
->
checkBooking
(
$data
[
'booking_id'
]);
$booking_details
=
$this
->
Webservice_model
->
get_booking_details
(
$data
[
'booking_id'
]);
$booking_details
=
$this
->
Webservice_model
->
get_booking_details
(
$data
[
'booking_id'
]);
$patient_data
=
$this
->
Webservice_model
->
get_single_patient
(
$booking_details
[
'patient_id'
]);
$patient_data
=
$this
->
Webservice_model
->
get_single_patient
(
$booking_details
[
'patient_id'
]);
...
@@ -7019,6 +7020,12 @@ print_r(date('H:i',$ms));exit();*/
...
@@ -7019,6 +7020,12 @@ print_r(date('H:i',$ms));exit();*/
$res
=
array
(
'status'
=>
'error'
,
'payment_status'
=>
'0'
,
'message'
=>
$charge
->
errors
);
$res
=
array
(
'status'
=>
'error'
,
'payment_status'
=>
'0'
,
'message'
=>
$charge
->
errors
);
}
}
}
}
}
else
{
$res
=
array
(
"status"
=>
"error"
,
"error"
=>
"error"
,
"message"
=>
$payed_data
[
'message'
]);
}
}
else
{
}
else
{
$res
=
array
(
$res
=
array
(
"status"
=>
"error"
,
"status"
=>
"error"
,
...
...
admin/application/models/Webservice_model.php
View file @
f16f04e8
...
@@ -3865,22 +3865,28 @@ class Webservice_model extends CI_Model {
...
@@ -3865,22 +3865,28 @@ class Webservice_model extends CI_Model {
$this
->
db
->
update
(
'tbl_booking'
,
$update
);
$this
->
db
->
update
(
'tbl_booking'
,
$update
);
}
}
// public function get_booked_payed_data($id){
public
function
get_booked_payed_data
(
$id
){
// $booked_data = $this->db->get_where('tbl_booking',array('id'=>$id))->row_array();
$booked_data
=
$this
->
db
->
get_where
(
'tbl_booking'
,
array
(
'id'
=>
$id
))
->
row_array
();
// if($booked_data){
if
(
$booked_data
){
// $check = $this->db->get_where('tbl_booking',array('doctor_id'=>$booked_data['doctor_id'],'clinic_id'=>$booked_data['clinic_id'],'date'=>$booked_data['date'],'time'=>$booked_data['time'],'payment_status'=>'1'));
$check
=
$this
->
db
->
get_where
(
'tbl_booking'
,
array
(
'doctor_id'
=>
$booked_data
[
'doctor_id'
],
'clinic_id'
=>
$booked_data
[
'clinic_id'
],
'date'
=>
$booked_data
[
'date'
],
'time'
=>
$booked_data
[
'time'
],
'payment_status'
=>
'1'
));
// if($check->num_rows() <= '0'){
if
(
$check
->
num_rows
()
<=
'0'
){
// $is_result = 0;
$is_result
=
0
;
// }else if($check->num_rows() == '1'){
$res
=
array
(
'status'
=>
'success'
,
'is_result'
=>
$is_result
);
// $is_result = 1;
}
else
if
(
$check
->
num_rows
()
==
'1'
){
// }else if($check->num_rows() >= '1'){
$is_result
=
1
;
// $is_result = 2;
$this
->
db
->
update
(
'tbl_booking'
,
array
(
'booking_status'
=>
'0'
),
array
(
'id'
=>
$id
));
// }
$res
=
array
(
'status'
=>
'success'
,
'is_result'
=>
$is_result
);
}
else
if
(
$check
->
num_rows
()
>=
'1'
){
// return $is_result;
$is_result
=
2
;
$this
->
db
->
update
(
'tbl_booking'
,
array
(
'booking_status'
=>
'4'
),
array
(
'id'
=>
$id
));
// }
$res
=
array
(
'status'
=>
'error'
,
'is_result'
=>
$is_result
,
'message'
=>
'
// }
Selected Doctor Not Available'
);
}
}
else
{
$res
=
array
(
'status'
=>
'error'
,
'message'
=>
'No Booking Found'
);
}
return
$res
;
}
/*function push_sent($fcm_data,$type) {
/*function push_sent($fcm_data,$type) {
...
...
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