CUS LINK 4
This commit is contained in:
parent
73061ded23
commit
308da22a61
@ -9637,8 +9637,11 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
|||||||
{
|
{
|
||||||
foreach ($this->photo_names as $key => $value)
|
foreach ($this->photo_names as $key => $value)
|
||||||
{
|
{
|
||||||
$final_data[] = $this->photoMapping($key,$value);
|
$temp = $this->photoMapping($key,$value);
|
||||||
unset($this->photo_names[$key]);
|
$final_data[] = is_array($temp) ? $temp : array('img_key' =>$key,'img_name' => $value[0],'img_url' => '','fk_form_id' => $value[1]);;
|
||||||
|
|
||||||
|
|
||||||
|
//unset($this->photo_names[$key]);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9650,7 +9653,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//print_r($final_data);
|
//print_r($final_data);die();
|
||||||
//$final_data[] = array('imag_data' => $common_images,'is_multiple' => 1);
|
//$final_data[] = array('imag_data' => $common_images,'is_multiple' => 1);
|
||||||
|
|
||||||
$data['dataStatus'] = true;
|
$data['dataStatus'] = true;
|
||||||
@ -9662,43 +9665,53 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
|||||||
function photoMapping($current_img_key,$current_img)
|
function photoMapping($current_img_key,$current_img)
|
||||||
{
|
{
|
||||||
|
|
||||||
//print_r($èxist_img_array);echo $img_key;die();
|
//print_r(count($this->existing_imges));///echo $img_key;die();
|
||||||
//echo $this->photo_names['selfie_with_person_met'][1];die();
|
//;die();
|
||||||
foreach ($this->existing_imges as $key => $value)
|
foreach ($this->existing_imges as $key => $value)
|
||||||
{
|
{
|
||||||
//print_r($value);die();
|
//print_r($value);
|
||||||
if($value['img_type'] == 1 && $current_img_key == 'selfie_with_person_met')
|
// echo $current_img_key.'***'.$value['pd_document_title'];
|
||||||
|
// echo '<br>';
|
||||||
|
// echo '<br>';
|
||||||
|
if($current_img_key == 'selfie_with_person_met' && $value['img_type'] == 1 )
|
||||||
{
|
{
|
||||||
unset($this->existing_imges[$key]);
|
unset($this->existing_imges[$key]);
|
||||||
|
//echo "SELFIE";
|
||||||
return array('img_key' => 'selfie_with_person_met','img_name' => $this->photo_names['selfie_with_person_met'][0],'fk_form_id' => $this->photo_names['selfie_with_person_met'][1],'img_url' => $value['doc_url'],'is_multiple' => 0);
|
return array('img_key' => 'selfie_with_person_met','img_name' => $this->photo_names['selfie_with_person_met'][0],'fk_form_id' => $this->photo_names['selfie_with_person_met'][1],'img_url' => $value['doc_url'],'is_multiple' => 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if($value['img_type'] == 2 && $current_img_key == 'person_met_id')
|
else if($current_img_key == 'person_met_id' && $value['img_type'] == 2)
|
||||||
{
|
{
|
||||||
unset($this->existing_imges[$key]);
|
unset($this->existing_imges[$key]);
|
||||||
|
//echo 'HOLD';
|
||||||
return array('img_key' => 'person_met_id','img_name' => $this->photo_names['person_met_id'][0],'img_url' => $value['doc_url'],'fk_form_id' => $this->photo_names['person_met_id'][1],'is_multiple' => 0);
|
return array('img_key' => 'person_met_id','img_name' => $this->photo_names['person_met_id'][0],'img_url' => $value['doc_url'],'fk_form_id' => $this->photo_names['person_met_id'][1],'is_multiple' => 0);
|
||||||
// unset($this->photo_names['selfie_with_person_met']);
|
// unset($this->photo_names['selfie_with_person_met']);
|
||||||
// return $arr;
|
// return $arr;
|
||||||
}
|
}
|
||||||
else if(strpos($value['pd_document_title'], 'Approach') !== false && $current_img_key == 'approach_to_pd_location')
|
else if($current_img_key == 'approach_to_pd_location' && strpos($value['pd_document_title'], 'Approach') !== false)
|
||||||
{
|
{
|
||||||
unset($this->existing_imges[$key]);
|
unset($this->existing_imges[$key]);
|
||||||
|
//echo "APPROACH";
|
||||||
return array('img_key' => 'approach_to_pd_location','img_name' => $this->photo_names['approach_to_pd_location'][0],'img_url' => $value['doc_url'],'fk_form_id' => $this->photo_names['approach_to_pd_location'][1],'is_multiple' => 0);
|
return array('img_key' => 'approach_to_pd_location','img_name' => $this->photo_names['approach_to_pd_location'][0],'img_url' => $value['doc_url'],'fk_form_id' => $this->photo_names['approach_to_pd_location'][1],'is_multiple' => 0);
|
||||||
// unset($this->photo_names['selfie_with_person_met']);
|
// unset($this->photo_names['selfie_with_person_met']);
|
||||||
// return $arr;
|
// return $arr;
|
||||||
}
|
}
|
||||||
else if($current_img_key == $value['pd_document_title'])
|
|
||||||
|
else if(strpos($current_img_key, $value['pd_document_title']) !== false)
|
||||||
{
|
{
|
||||||
|
//echo $current_img_key.'***'.$value['pd_document_title'];
|
||||||
unset($this->existing_imges[$key]);
|
unset($this->existing_imges[$key]);
|
||||||
|
//echo "OTHER";
|
||||||
return array('img_key' => $value['pd_document_title'],'img_name' => $this->photo_names[ $value['pd_document_title'] ][0],'img_url' => $value['doc_url'],'fk_form_id' => $this->photo_names[ $value['pd_document_title'] ][1],'is_multiple' => 0);
|
return array('img_key' => $value['pd_document_title'],'img_name' => $this->photo_names[ $value['pd_document_title'] ][0],'img_url' => $value['doc_url'],'fk_form_id' => $this->photo_names[ $value['pd_document_title'] ][1],'is_multiple' => 0);
|
||||||
// unset($this->photo_names['selfie_with_person_met']);
|
// unset($this->photo_names['selfie_with_person_met']);
|
||||||
// return $arr;
|
// return $arr;
|
||||||
}
|
}
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
//unset($this->existing_imges[$key]);
|
// //unset($this->existing_imges[$key]);
|
||||||
return array('img_key' =>$current_img_key,'img_name' => $current_img_key,'img_url' => '','fk_form_id' => $current_img[1]);
|
// echo "ELSE";
|
||||||
}
|
// return array('img_key' =>$current_img_key,'img_name' => $current_img_key,'img_url' => '','fk_form_id' => $current_img[1]);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user