flyhi image location : ps
This commit is contained in:
parent
0cb76c57b7
commit
d5c70ab5b8
@ -572,9 +572,8 @@ class Flyhi_Controller extends REST_Controller {
|
||||
if($records['section_id'] == 9 && count($section_data))
|
||||
{
|
||||
$all_sales_pd_images = $this->Flyhi_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $records['sales_pd_id'],'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||
//print_r($all_sales_pd_images);die();
|
||||
// print_r($all_sales_pd_images);die();
|
||||
$photo_questions = (json_decode(($section_data[0]['section_data']),true));
|
||||
// print_r($photo_questions);
|
||||
foreach ($photo_questions['questions'] as $key => $value)
|
||||
{
|
||||
if(isset($value['answer_value']) && $value['answer_value'] && !$value['is_repeatable'])
|
||||
@ -583,6 +582,7 @@ class Flyhi_Controller extends REST_Controller {
|
||||
if(count($selfie))
|
||||
{
|
||||
$photo_questions['questions'][$key]['answer_value'] = $selfie[0]['img'];
|
||||
$photo_questions['questions'][$key]['image_location'] = $selfie[0]['location'];
|
||||
//$photo_questions['questions'][$key]['answer_value'] = "CHNAGED";
|
||||
}
|
||||
}
|
||||
@ -600,6 +600,7 @@ class Flyhi_Controller extends REST_Controller {
|
||||
if($individual_value['questions'][0]['question_key'] == $img_value['img_name'])
|
||||
{
|
||||
$photo_questions['questions'][$key]['questions_group'][$v_key]['questions'][0]['answer_value'] = $img_value['img'];
|
||||
$photo_questions['questions'][$key]['questions_group'][$v_key]['questions'][0]['image_location'] = $img_value['location'];
|
||||
//$photo_questions['questions'][$key]['questions_group'][$v_key]['questions'][0]['answer_value'] = "CHANGED";
|
||||
unset($all_sales_pd_images[$img_key]);
|
||||
break;
|
||||
@ -609,7 +610,7 @@ class Flyhi_Controller extends REST_Controller {
|
||||
}
|
||||
}
|
||||
}
|
||||
//die();
|
||||
|
||||
$photo_questions = json_encode($photo_questions);
|
||||
$section_data[0]['section_data'] = $photo_questions;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user