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
93e2cd3c
Commit
93e2cd3c
authored
Aug 10, 2018
by
Jansa Jose
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jansa'
parents
9697aaae
c12fd6a4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
11 deletions
+18
-11
Webservice_model.php
admin/application/models/Webservice_model.php
+1
-1
Doctor.php
application/controllers/Doctor.php
+1
-0
Doctor_model.php
application/models/Doctor_model.php
+8
-5
Search_doctor_model.php
application/models/Search_doctor_model.php
+8
-5
1_download.jpg
assets/uploads/profilepic/doctors/1_download.jpg
+0
-0
1_download.jpeg
assets/uploads/profilepic/patient/1_download.jpeg
+0
-0
No files found.
admin/application/models/Webservice_model.php
View file @
93e2cd3c
...
...
@@ -2933,7 +2933,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
array_splice
(
$query
,
0
,
1
);
}
else
{
$get_row
=
$this
->
db
->
get_where
(
'tbl_clinic'
,
array
(
'id'
=>
'0'
))
->
row
();
if
(
$get_row
==
''
){
if
(
!
empty
(
$get_row
)
){
$this
->
db
->
insert
(
'tbl_clinic'
,
array
(
'name'
=>
'Default'
,
'username'
=>
'default'
,
'password'
=>
md5
(
'default'
)));
$last
=
$this
->
db
->
insert_id
();
if
(
$last
!=
'0'
){
...
...
application/controllers/Doctor.php
View file @
93e2cd3c
...
...
@@ -1225,6 +1225,7 @@ public function editProfile()
$template
[
'page_title'
]
=
"Edit Profile"
;
$template
[
'data'
]
=
"Doctor page"
;
$doctor_data
=
$this
->
Doctor_model
->
get_single_doctor
(
$userdata
[
'id'
]);
//print_r($doctor_data);exit();
$speciality_list
=
$this
->
Home_model
->
get_speciality
();
$template
[
'speciality_list'
]
=
$speciality_list
;
$template
[
'doctor_data'
]
=
$doctor_data
;
...
...
application/models/Doctor_model.php
View file @
93e2cd3c
...
...
@@ -842,11 +842,14 @@ public function get_wallet_for_doctor($doc_id)
total_earn as total_earn'
);
$this
->
db
->
from
(
'tbl_wallet_details'
);
$this
->
db
->
where
(
'doctor_id'
,
$doc_id
);
$query
=
$this
->
db
->
get
();
$query
[
'reedem_earn'
]
=
decrypt_data
(
$query
[
'reedem_earn'
]);
$query
[
'future_earn'
]
=
decrypt_data
(
$query
[
'future_earn'
]);
$query
[
'total_earn'
]
=
decrypt_data
(
$query
[
'total_earn'
]);
return
$query
->
row_array
();
$query
=
$this
->
db
->
get
()
->
row_array
();
if
(
$query
){
$query
[
'reedem_earn'
]
=
decrypt_data
(
$query
[
'reedem_earn'
]);
$query
[
'future_earn'
]
=
decrypt_data
(
$query
[
'future_earn'
]);
$query
[
'total_earn'
]
=
decrypt_data
(
$query
[
'total_earn'
]);
}
return
$query
;
}
public
function
update_wallet
(
$id
,
$data
)
...
...
application/models/Search_doctor_model.php
View file @
93e2cd3c
...
...
@@ -209,7 +209,9 @@ public function filter_search($post_data)
if
(
!
empty
(
$post_data
[
'doctor-search-location'
])
&&
empty
(
$post_data
[
'filter_dr_srch_distance_end'
])
&&
empty
(
$post_data
[
'filter_dr_srch_distance_start'
]))
{
$where
=
"ROUND(( 6371 * acos( cos( radians(
$lat
) ) * cos( radians( `location_lattitude` ) ) * cos( radians( `location_longitude` ) - radians(
$lng
) ) + sin( radians(
$lat
) ) * sin( radians( `location_lattitude` ) ) ) ))"
;
//$where = "ROUND(( 6371 * acos( cos( radians($lat) ) * cos( radians( `location_lattitude` ) ) * cos( radians( `location_longitude` ) - radians($lng) ) + sin( radians($lat) ) * sin( radians( `location_lattitude` ) ) ) ))";
$where
=
"IF (tbl_clinic_doctors.clinic_id != 0, ROUND(( 6371 * acos( cos( radians(
{
$lat
}
) ) * cos( radians( `location_lattitude` ) ) * cos( radians( `location_longitude` ) - radians(
{
$lng
}
) ) + sin( radians(
{
$lat
}
) ) * sin( radians( `location_lattitude` ) ) ) )), ROUND(( 6371 * acos( cos( radians(
{
$lat
}
) ) * cos( radians( `tbl_doctors`.`default_latitude` ) ) * cos( radians( `tbl_doctors`.`default_longitude` ) - radians(
{
$lng
}
) ) + sin( radians(
{
$lat
}
) ) * sin( radians( `tbl_doctors`.`default_latitude` ) ) ) )) )"
;
$this
->
db
->
where
(
$where
.
"<= 15"
);
}
...
...
@@ -221,7 +223,8 @@ public function filter_search($post_data)
$post_data
[
'filter_dr_srch_distance_start'
]
=
preg_replace
(
"/[^0-9,.]/"
,
""
,
$post_data
[
'filter_dr_srch_distance_start'
]
);
$where
=
"ROUND(( 6371 * acos( cos( radians(
$lat
) ) * cos( radians( `location_lattitude` ) ) * cos( radians( `location_longitude` ) - radians(
$lng
) ) + sin( radians(
$lat
) ) * sin( radians( `location_lattitude` ) ) ) ))"
;
//$where = "ROUND(( 6371 * acos( cos( radians($lat) ) * cos( radians( `location_lattitude` ) ) * cos( radians( `location_longitude` ) - radians($lng) ) + sin( radians($lat) ) * sin( radians( `location_lattitude` ) ) ) ))";
$where
=
"IF (tbl_clinic_doctors.clinic_id != 0, ROUND(( 6371 * acos( cos( radians(
{
$lat
}
) ) * cos( radians( `location_lattitude` ) ) * cos( radians( `location_longitude` ) - radians(
{
$lng
}
) ) + sin( radians(
{
$lat
}
) ) * sin( radians( `location_lattitude` ) ) ) )), ROUND(( 6371 * acos( cos( radians(
{
$lat
}
) ) * cos( radians( `tbl_doctors`.`default_latitude` ) ) * cos( radians( `tbl_doctors`.`default_longitude` ) - radians(
{
$lng
}
) ) + sin( radians(
{
$lat
}
) ) * sin( radians( `tbl_doctors`.`default_latitude` ) ) ) )) )"
;
$this
->
db
->
where
(
$where
.
">=
{
$post_data
[
'filter_dr_srch_distance_start'
]
}
"
);
$this
->
db
->
where
(
$where
.
"<=
{
$post_data
[
'filter_dr_srch_distance_end'
]
}
"
);
...
...
@@ -230,11 +233,11 @@ public function filter_search($post_data)
if
(
isset
(
$post_data
[
'filter_dr_gender'
])
&&
!
empty
(
$post_data
[
'filter_dr_gender'
]))
{
if
(
$post_data
[
'filter_dr_gender'
]
==
'
male'
||
$post_data
[
'filter_dr_gender'
]
==
'MALE
'
){
if
(
$post_data
[
'filter_dr_gender'
]
==
'
MALE'
||
$post_data
[
'filter_dr_gender'
]
==
'male
'
){
$post_data
[
'filter_dr_gender'
]
=
'0'
;
}
elseif
(
$post_data
[
'filter_dr_gender'
]
==
'
female'
||
$post_data
[
'filter_dr_gender'
]
==
'FEMALE
'
){
}
elseif
(
$post_data
[
'filter_dr_gender'
]
==
'
FEMALE'
||
$post_data
[
'filter_dr_gender'
]
==
'female
'
){
$post_data
[
'filter_dr_gender'
]
=
'1'
;
}
elseif
(
$post_data
[
'filter_dr_gender'
]
==
'
others'
||
$post_data
[
'filter_dr_gender'
]
==
'OTHERS
'
){
}
elseif
(
$post_data
[
'filter_dr_gender'
]
==
'
OTHERS'
||
$post_data
[
'filter_dr_gender'
]
==
'others
'
){
$post_data
[
'filter_dr_gender'
]
=
'2'
;
}
$this
->
db
->
where
(
'tbl_doctors.gender'
,
$post_data
[
'filter_dr_gender'
]);
...
...
assets/uploads/profilepic/doctors/1_download.jpg
0 → 100644
View file @
93e2cd3c
13.3 KB
assets/uploads/profilepic/patient/1_download.jpeg
0 → 100644
View file @
93e2cd3c
10.8 KB
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