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
35ffd4a8
Commit
35ffd4a8
authored
Jul 27, 2018
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dctr bukng
parent
d2d52b9e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
4 deletions
+31
-4
Webservice.php
admin/application/controllers/Webservice.php
+11
-2
Webservice_model.php
admin/application/models/Webservice_model.php
+15
-1
Home.php
application/controllers/Home.php
+1
-1
Home_model.php
application/models/Home_model.php
+4
-0
No files found.
admin/application/controllers/Webservice.php
View file @
35ffd4a8
...
...
@@ -41,9 +41,18 @@ class Webservice extends CI_Controller {
{
if
(
isset
(
$data
[
'cpf'
])){
$ress
=
$this
->
cpf_valid
(
$data
[
'cpf'
]);
if
((
isset
(
$ress
))
&&
(
$ress
==
1
)){
$res
=
$this
->
registration_processing_user
(
$data
,
$type
);
//$is_cpf = $this->Webservice_model->is_cpf_exist($data['cpf']);
//if($is_cpf['status'] == 'success'){
$res
=
$this
->
registration_processing_user
(
$data
,
$type
);
//}else{
//$res = array(
// "status"=> "error",
//// "error"=> "CPF Exist",
"message"
=>
"CPF Already Exist"
//);
// }
}
else
{
$res
=
array
(
"status"
=>
"error"
,
...
...
admin/application/models/Webservice_model.php
View file @
35ffd4a8
...
...
@@ -78,6 +78,10 @@ class Webservice_model extends CI_Model {
}
else
{
if
(
$this
->
db
->
insert
(
'tbl_doctors'
,
$data
)){
$insertid
=
$this
->
db
->
insert_id
();
$this
->
db
->
insert
(
'tbl_clinic_doctors'
,
array
(
'doctor_id'
=>
$insertid
,
'clinic_id'
=>
0
));
$this
->
db
->
insert
(
'tbl_consultation'
,
array
(
'doctor_id'
=>
$insertid
,
'clinic_id'
=>
0
,
'date'
=>
'""'
,
'date_secondary'
=>
'""'
,
'active_schedule'
=>
0
));
$this
->
db
->
select
(
'tbl_specialization.id as specialization_id,tbl_specialization.specialization_name,tbl_doctors.*'
);
$this
->
db
->
join
(
'tbl_specialization'
,
'tbl_specialization.id = tbl_doctors. specialization'
);
$query
=
$this
->
db
->
get_where
(
"tbl_doctors"
,
array
(
"tbl_doctors.id"
=>
$insertid
));
...
...
@@ -1105,7 +1109,7 @@ class Webservice_model extends CI_Model {
$times
=
explode
(
'-'
,
$data
[
'time'
]);
$start_time
=
strtotime
(
$date_def
.
$times
[
0
]);
$end_time
=
strtotime
(
$date_def
.
$times
[
1
]);
$msg
=
"Your booking for doctor "
.
$doctr_data
->
name
.
" at time "
.
$data
[
'time'
]
.
" is in Waiting list"
;
$msg
=
"Your booking for doctor "
.
$doctr_data
[
'name'
]
.
" at time "
.
$data
[
'time'
]
.
" is in Waiting list"
;
if
(
$this
->
db
->
insert
(
'tbl_booking'
,
array
(
'doctor_id'
=>
$data
[
'doctor_id'
],
'clinic_id'
=>
$data
[
'clinic_id'
],
'patient_id'
=>
$patientid
[
'userid'
],
'ipok_fee'
=>
$ipokefees
,
'date'
=>
$data
[
'date'
],
'time'
=>
$data
[
'time'
],
'booking_status'
=>
'0'
,
'payment_status'
=>
$payment_status
,
'free_visit_status'
=>
$free_visit_status
,
'visit_type'
=>
$visit
,
'amount'
=>
$data
[
'amount'
],
'promo_name'
=>
$promo_name
,
'promo_amount'
=>
$new_amnt
,
'payment_type'
=>
$data
[
'payment_mode'
],
'total_sum'
=>
$diff
,
'time_start'
=>
$start_time
,
'time_end'
=>
$end_time
,
'requested_date'
=>
time
()))){
$insert_id
=
$this
->
db
->
insert_id
();
if
(
!
$is_payment_required
){
...
...
@@ -1162,6 +1166,16 @@ class Webservice_model extends CI_Model {
//............................ get clinic specialisation
function
is_cpf_exist
(
$cpf
){
$res
=
$this
->
db
->
get_where
(
'tbl_cpf_number'
,
array
(
'cpf'
=>
$cpf
))
->
row
();
if
(
$res
){
$query
=
array
(
'status'
=>
'error'
);
}
else
{
$query
=
array
(
'status'
=>
'success'
);
}
return
$query
;
}
function
get_clinic_specialisation
(){
$this
->
db
->
select
(
"DISTINCT(tbl_specialization.specialization_name),tbl_clinic_specialization.clinic_id,tbl_specialization.id"
);
$this
->
db
->
join
(
'tbl_specialization'
,
'tbl_specialization.id = tbl_clinic_specialization.specialization_id'
);
...
...
application/controllers/Home.php
View file @
35ffd4a8
...
...
@@ -967,7 +967,7 @@ class Home extends CI_Controller {
$data
[
'dob'
]
=
strtotime
(
$newdob
);
$this
->
Doctor_model
->
assignDoctors_default
(
$this
->
session
->
userdata
(
'UserData'
)[
'id'
],
''
);
//
$this->Doctor_model->assignDoctors_default($this->session->userdata('UserData')['id'],'');
$result
=
$this
->
Home_model
->
register_doctor
(
$data
);
...
...
application/models/Home_model.php
View file @
35ffd4a8
...
...
@@ -546,6 +546,10 @@
$insertid
=
$this
->
db
->
insert_id
();
$this
->
db
->
insert
(
'tbl_clinic_doctors'
,
array
(
'doctor_id'
=>
$insertid
,
'clinic_id'
=>
0
));
$this
->
db
->
insert
(
'tbl_consultation'
,
array
(
'doctor_id'
=>
$insertid
,
'clinic_id'
=>
0
,
'date'
=>
'""'
,
'date_secondary'
=>
'""'
,
'active_schedule'
=>
0
));
$query
=
$this
->
db
->
get_where
(
"tbl_doctors"
,
array
(
"id"
=>
$insertid
));
$return_array
=
array
(
'status'
=>
'success'
,
'data'
=>
$query
->
row_array
());
...
...
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