} } //Prepress Save -------------------------------------------------/ $componentPrepress1 = new ComponentPrepress(); $component->check_modified_fields($keys, $componentPrepress1, $component->id); $componentPrepress1->mark_deletedByComponentId($return_id); $type_array = array(0 => "ctp", 1 => "flm"); $side_array = array(0 => "a", 1 => "b"); for ($p = 0; $p < count($type_array); $p++) { for ($q = 0; $q < count($side_array); $q++) { for ($i = 0; $i < $count; $i++) { if (substr_count($keys[$i], $type_array[$p] . "_prepressId_" . $side_array[$q] . "_") > 0) { $index = substr($keys[$i], -1, 1); $id = $_POST[$type_array[$p] . "_prepressId_" . $side_array[$q] . "_" . $index]; $rate_count = $_POST[$type_array[$p] . "_count_" . $side_array[$q] . "_" . $index]; $componentPrepress = new ComponentPrepress(); $componentPrepress->rate_id = $id; $componentPrepress->count = $rate_count; $componentPrepress->side = $side_array[$q]; $componentPrepress->type = $type_array[$p]; $componentPrepress->component_id = $component->id; $componentPrepress->save(); } } } } //// Status Update if (isset($_REQUEST['calculant_id']) && !empty($_REQUEST['calculant_id']) && !is_null($_REQUEST['calculant_id'])) { $component->status_update('', $component->id, '', $_REQUEST['calculant_id']); } elseif (isset($_REQUEST['stat_action']) && !empty($_REQUEST['stat_action']) && !is_null($_REQUEST['stat_action'])) { $component->status_update('', $component->id, $_REQUEST['stat_action'], '');
function getPrepressRows() { $return_array = array(); if ($this->id != "") { $componentPrepress = new ComponentPrepress(); $return_array = $componentPrepress->get_full_list("id", "component_id='" . $this->id . "'"); } return $return_array; }