$x = $x + 1; $prepressrownum[$x] = $type; $validation_script = $validation_script . ' addToValidate("EditView", "' . $prepresslines[$i]->type . '_count_' . $prepresslines[$i]->side . '_' . $index[$type] . '", "int",true, ""); '; } if ($index['ctp_a'] > 0 || $index['ctp_b'] > 0) { $validation_script .= 'toggleDisplay("ctp");'; } if ($index['flm_a'] > 0 || $index['flm_b'] > 0) { $validation_script .= 'toggleDisplay("film");'; } for ($i = 0; $i < count($prepressrownum); $i++) { $type = $prepressrownum[$i]; $xtpl->assign($prepressrownum[$i], $prepressrows[$type]); } //Assign Ink $inklines = $focus->getInkRows(); if (count($prepresslines) == 0) { $xtpl->assign("inks_names_side_a", ""); $xtpl->assign("inks_names_side_b", ""); $xtpl->assign("inkId_side_a", ""); $xtpl->assign("inkId_side_b", ""); $x = -1; } else { $x = -1; $inktypes = array(); $index_inktypes = array(); } for ($i = 0; $i < count($inklines); $i++) { $type = "side_" . $inklines[$i]->side; if (empty($inktypes[$type]) || is_null($inktypes[$type])) { $inktypes[$type] = "";