Sales_PD_Controller revert : ps
This commit is contained in:
parent
8b4415e1ba
commit
b30b91f305
@ -218,24 +218,24 @@ class Sales_PD_Controller extends REST_Controller {
|
||||
// print_r($view_data['section3']);die();
|
||||
$view_data['section9'] = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $sales_pd_id,'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||
if(count($view_data['section9'])>0){
|
||||
//for ($i = 0; $i < count($view_data['section9']); $i++){
|
||||
// $img_fields[0]['img_name'] = $view_data['section9'][$i]['img_name'];
|
||||
// $img_fields[0]['img'] = $view_data['section9'][$i]['img'];
|
||||
// salespd_cetapp::pushwithcetsalespdapi($common_fields,$img_fields,2);
|
||||
//}
|
||||
// "section9":{"selfie_with_person_met":"SAVED","approach_to_pd_location":["SAVED",""],"name_board_seen":["SAVED",""],"stock_image":["SAVED","SAVED","SAVED","SAVED",""],"workplace_interior_image":["SAVED","SAVED",""]}}
|
||||
$arr1 =array();$arr2 =array();
|
||||
for ($i = 0; $i < count($view_data['section9']); $i++){
|
||||
$img_name = $view_data['section9'][$i]['img_name'];
|
||||
if(!in_array($img_name, $arr1)){
|
||||
array_push($arr1,$img_name);
|
||||
}
|
||||
$k = array_search($img_name, $arr1); //$k = 1;
|
||||
$arr2[$k][] = $view_data['section9'][$i]['img'];
|
||||
for ($j = 0; $j < count($arr1); $j++) {
|
||||
$section_fields['section9'][$arr1[$j]] = $arr2[$j];
|
||||
}
|
||||
$img_fields[0]['img_name'] = $view_data['section9'][$i]['img_name'];
|
||||
$img_fields[0]['img'] = $view_data['section9'][$i]['img'];
|
||||
salespd_cetapp::pushwithcetsalespdapi($common_fields,$img_fields,2);
|
||||
}
|
||||
// "section9":{"selfie_with_person_met":"SAVED","approach_to_pd_location":["SAVED",""],"name_board_seen":["SAVED",""],"stock_image":["SAVED","SAVED","SAVED","SAVED",""],"workplace_interior_image":["SAVED","SAVED",""]}}
|
||||
// $arr1 =array();$arr2 =array();
|
||||
//for ($i = 0; $i < count($view_data['section9']); $i++){
|
||||
// $img_name = $view_data['section9'][$i]['img_name'];
|
||||
// if(!in_array($img_name, $arr1)){
|
||||
// array_push($arr1,$img_name);
|
||||
// }
|
||||
// $k = array_search($img_name, $arr1); //$k = 1;
|
||||
// $arr2[$k][] = $view_data['section9'][$i]['img'];
|
||||
// for ($j = 0; $j < count($arr1); $j++) {
|
||||
// $section_fields['section9'][$arr1[$j]] = $arr2[$j];
|
||||
// }
|
||||
//}
|
||||
}
|
||||
salespd_cetapp::pushwithcetsalespdapi($common_fields,$section_fields,1);
|
||||
$view_data['satellite_image'] = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $sales_pd_id,'img_name' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user