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
6e743e2b
Commit
6e743e2b
authored
Aug 03, 2018
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regist
parent
c7bce2a6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
Webservice.php
admin/application/controllers/Webservice.php
+18
-5
No files found.
admin/application/controllers/Webservice.php
View file @
6e743e2b
...
...
@@ -79,26 +79,39 @@ class Webservice extends CI_Controller {
$data
[
'dob'
]
=
$data
[
'dob'
];
$new
=
array
();
if
(
(
isset
(
$data
[
'bystander_name'
])
&&
strlen
(
trim
(
$data
[
'bystander_name'
],
" "
))
>
0
)
||
(
isset
(
$data
[
'bystander_relation'
])
&&
strlen
(
trim
(
$data
[
'bystander_relation'
],
" "
))
>
0
)
||
(
isset
(
$data
[
'bystander_cpf'
])
&&
strlen
(
trim
(
$data
[
'bystander_cpf'
],
" "
))
>
0
)
||
(
isset
(
$data
[
'bystander_dob'
])
&&
strlen
(
trim
(
$data
[
'bystander_dob'
],
" "
))
>
0
))
{
if
(
isset
(
$data
[
'bystander_name'
])){
if
(
isset
(
$data
[
'bystander_name'
])
||
isset
(
$data
[
'bystander_relation'
])
||
isset
(
$data
[
'bystander_cpf'
])
||
isset
(
$data
[
'bystander_dob'
])
)
{
if
(
isset
(
$data
[
'bystander_name'
])
&&
strlen
(
trim
(
$data
[
'bystander_name'
],
" "
))
>
0
){
$new
[
'dependent_name'
]
=
$data
[
'bystander_name'
];
unset
(
$data
[
'bystander_name'
]);
}
else
{
unset
(
$data
[
'bystander_name'
]);
}
if
(
isset
(
$data
[
'bystander_relation'
])){
if
(
isset
(
$data
[
'bystander_relation'
])
&&
strlen
(
trim
(
$data
[
'bystander_relation'
],
" "
))
>
0
){
$new
[
'relation'
]
=
$data
[
'bystander_relation'
];
unset
(
$data
[
'bystander_relation'
]);
}
else
{
unset
(
$data
[
'bystander_relation'
]);
}
if
(
isset
(
$data
[
'bystander_cpf'
])){
if
(
isset
(
$data
[
'bystander_cpf'
])
&&
strlen
(
trim
(
$data
[
'bystander_cpf'
],
" "
))
>
0
){
$new
[
'cpf'
]
=
$data
[
'bystander_cpf'
];
unset
(
$data
[
'bystander_cpf'
]);
}
else
{
unset
(
$data
[
'bystander_cpf'
]);
}
if
(
isset
(
$data
[
'bystander_dob'
])){
if
(
isset
(
$data
[
'bystander_dob'
])
&&
strlen
(
trim
(
$data
[
'bystander_dob'
],
" "
))
>
0
){
$new
[
'dob'
]
=
strtotime
(
$data
[
'bystander_dob'
]);
unset
(
$data
[
'bystander_dob'
]);
}
else
{
unset
(
$data
[
'bystander_dob'
]);
}
$result
=
$this
->
Webservice_model
->
registration
(
$data
,
$type
);
if
(
!
empty
(
$new
)){
$this
->
Webservice_model
->
insert_bystander_registration
(
$new
,
$result
);
}
}
else
{
$result
=
$this
->
Webservice_model
->
registration
(
$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