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
5f16406c
Commit
5f16406c
authored
6 years ago
by
Jansa Jose
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jansa'
parents
c6622b71
404625dd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
Webservice_model.php
admin/application/models/Webservice_model.php
+14
-14
No files found.
admin/application/models/Webservice_model.php
View file @
5f16406c
...
@@ -2909,8 +2909,8 @@ class Webservice_model extends CI_Model {
...
@@ -2909,8 +2909,8 @@ class Webservice_model extends CI_Model {
$this
->
db
->
join
(
'tbl_clinic'
,
'tbl_clinic_doctors.clinic_id = tbl_clinic.id'
);
$this
->
db
->
join
(
'tbl_clinic'
,
'tbl_clinic_doctors.clinic_id = tbl_clinic.id'
);
$this
->
db
->
where
(
'tbl_clinic_doctors.doctor_id'
,
$id
);
$this
->
db
->
where
(
'tbl_clinic_doctors.doctor_id'
,
$id
);
$this
->
db
->
order_by
(
'tbl_clinic.id'
,
'ASC'
);
$this
->
db
->
order_by
(
'tbl_clinic.id'
,
'ASC'
);
$query
=
$this
->
db
->
get
(
'tbl_clinic_doctors'
)
->
result
();
$query
=
$this
->
db
->
get
(
'tbl_clinic_doctors'
)
->
result
_array
();
print_r
(
$query
);
exit
();
//
print_r($query);exit();
if
(
in_array
(
0
,
array_column
(
$query
,
'id'
))
||
in_array
(
'Default'
,
array_column
(
$query
,
'name'
)))
{
//
if
(
in_array
(
0
,
array_column
(
$query
,
'id'
))
||
in_array
(
'Default'
,
array_column
(
$query
,
'name'
)))
{
//
array_splice
(
$query
,
0
,
1
);
array_splice
(
$query
,
0
,
1
);
}
else
{
}
else
{
...
@@ -2929,27 +2929,27 @@ class Webservice_model extends CI_Model {
...
@@ -2929,27 +2929,27 @@ class Webservice_model extends CI_Model {
$this
->
db
->
join
(
'tbl_doctors'
,
'tbl_clinic_doctors.doctor_id = tbl_doctors.id'
);
$this
->
db
->
join
(
'tbl_doctors'
,
'tbl_clinic_doctors.doctor_id = tbl_doctors.id'
);
$this
->
db
->
where
(
'tbl_clinic_doctors.clinic_id'
,
'0'
);
$this
->
db
->
where
(
'tbl_clinic_doctors.clinic_id'
,
'0'
);
$this
->
db
->
where
(
'tbl_clinic_doctors.doctor_id'
,
$id
);
$this
->
db
->
where
(
'tbl_clinic_doctors.doctor_id'
,
$id
);
$query_default
=
$this
->
db
->
get
()
->
result
();
$query_default
=
$this
->
db
->
get
()
->
result
_array
();
foreach
(
$query_default
as
$key
=>
$value
)
{
foreach
(
$query_default
as
$key
=>
$value
)
{
$query_default
[
$key
]
->
street_address
=
decrypt_data
(
$value
->
street_address
);
$query_default
[
$key
]
[
'street_address'
]
=
decrypt_data
(
$value
[
'street_address'
]
);
$query_default
[
$key
]
->
locality
=
decrypt_data
(
$value
->
locality
);
$query_default
[
$key
]
[
'locality'
]
=
decrypt_data
(
$value
[
'locality'
]
);
$query_default
[
$key
]
->
number
=
decrypt_data
(
$value
->
number
);
$query_default
[
$key
]
[
'number'
]
=
decrypt_data
(
$value
[
'number'
]
);
$query_default
[
$key
]
->
complement
=
decrypt_data
(
$value
->
complement
);
$query_default
[
$key
]
[
'complement'
]
=
decrypt_data
(
$value
[
'complement'
]
);
}
}
$new_query
=
array_merge
(
$query_default
,
$query
);
$new_query
=
array_merge
(
$query_default
,
$query
);
//echo"<pre>";print_r($new_query);exit();
//echo"<pre>";print_r($new_query);exit();
if
(
count
(
$new_query
)
>
0
){
if
(
count
(
$new_query
)
>
0
){
foreach
(
$new_query
as
$key
=>
$value
)
{
foreach
(
$new_query
as
$key
=>
$value
)
{
$location
=
$value
->
street_address
.
','
.
$value
->
locality
.
','
.
$value
->
number
.
','
.
$value
->
complement
;
$location
=
$value
[
'street_address'
]
.
','
.
$value
[
'locality'
]
.
','
.
$value
[
'number'
]
.
','
.
$value
[
'complement'
]
;
$new
[
$key
][
'id'
]
=
$value
->
id
;
$new
[
$key
][
'id'
]
=
$value
[
'id'
]
;
$new
[
$key
][
'name'
]
=
$value
->
name
;
$new
[
$key
][
'name'
]
=
$value
[
'name'
]
;
$new
[
$key
][
'email'
]
=
$value
->
email
;
$new
[
$key
][
'email'
]
=
$value
[
'email'
]
;
$new
[
$key
][
'photo'
]
=
$value
->
profile_photo
;
$new
[
$key
][
'photo'
]
=
$value
[
'profile_photo'
]
;
$new
[
$key
][
'location'
]
=
$location
;
$new
[
$key
][
'location'
]
=
$location
;
$new
[
$key
][
'latitude'
]
=
$value
->
location_lattitude
;
$new
[
$key
][
'latitude'
]
=
$value
[
'location_lattitude'
]
;
$new
[
$key
][
'longitude'
]
=
$value
->
location_longitude
;
$new
[
$key
][
'longitude'
]
=
$value
[
'location_longitude'
]
;
}
}
$return_array
=
array
(
'status'
=>
'success'
,
'data'
=>
array
(
'clinics'
=>
$new
));
$return_array
=
array
(
'status'
=>
'success'
,
'data'
=>
array
(
'clinics'
=>
$new
));
}
else
{
}
else
{
...
...
This diff is collapsed.
Click to expand it.
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