// $xtpl->assign('auto_price_checked', 'disabled'); //} $validation_script = '<script type="text/javascript"> '; //Assign Layout list $layoutlines = $focus->getLayoutRows(); if (count($layoutlines) == 0) { $xtpl->assign("LAYOUTROWS", $focus->getLayoutRow(new Layoutline(), 0, true)); $xtpl->parse("main.row1"); } for ($i = 0; $i < count($layoutlines); $i++) { $fieldcount = count($layoutlines[$i]); $xtpl->assign("LAYOUTROWS", $focus->getLayoutRow($layoutlines[$i], $i, true)); $xtpl->parse("main.row1"); } //Assign Operations list $operationlines = $focus->getOperationsRows(); if (count($operationlines) == 0) { $xtpl->assign("CUTTING_OPERATIONS", ""); $xtpl->assign("OTHER_OPERATIONS", ""); } for ($i = 0; $i < count($operationlines); $i++) { $operation_type = $focus->getOperationtype($operationlines[$i]->operation_id); if ($operation_type == "Книговезане") { $validation_script .= ' addToValidate("EditView", "CutngOperations_count_' . $i . '", "int",true, ""); '; $xtpl->assign("CUTTING_OPERATIONS", $focus->getOperationsRow($operationlines[$i], $i, true)); $xtpl->parse("main.cuttingoperation_row1"); } else { $validation_script .= ' addToValidate("EditView", "OtherOperations_count_' . $i . '", "int",true, ""); '; $xtpl->assign("OTHER_OPERATIONS", $focus->getOperationsRow($operationlines[$i], $i, true)); $xtpl->parse("main.otheroperation_row1"); }
for ($j = 0; $j < count($prepress_rows); $j++) { $compsHtml .= $estComps->getPrepressRowPdf($prepress_rows[$j], $j); } $compsHtml .= "</table>"; //Press $compsHtml .= $pdf->createHeading($comp_mod_strings["LBL_LINEITEMS"]); $compsHtml .= "\t<tr bgcolor=" . $pdfColors["label"] . ">\n\t\t\t\t\t\t<td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_NUMBER_LOTS"] . "</font></td>\n\t\t\t\t\t\t<td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_NUMBER_UNITS"] . "</font></td>\n\t\t \t\t\t<td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_RUN_STYLE"] . "</font></td>\n\t\t\t\t\t</tr><tr><td height=1px bgcolor=#fff colspan=3></td></tr>"; $layoutrows = $estComps->getLayoutRows(); for ($j = 0; $j < count($layoutrows); $j++) { $compsHtml .= $estComps->getLayoutRowPdf($layoutrows[$j], $j); } $compsHtml .= "</table>"; //Post-Press $compsHtml .= $pdf->createHeading($comp_mod_strings["LBL_POSTPRESS"]); $compsHtml .= "\t<tr bgcolor=" . $pdfColors["label"] . ">\n\t\t\t\t\t\t<td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_OPERATION_NAME"] . "</font></td>\n\t\t\t\t\t\t<td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_TYPE"] . "</font></td>\n\t\t\t\t\t <td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_PREPRESS_COUNT"] . "</font></td>\n\t\t\t\t\t</tr><tr><td height=1px bgcolor=#fff colspan=3></td></tr>"; $postpress_rows = $estComps->getOperationsRows(); for ($j = 0; $j < count($postpress_rows); $j++) { $compsHtml .= $estComps->getOperationsRowPdf($postpress_rows[$j], $j); } $compsHtml .= "</table>"; } //end of main For loop $xtpl = new XTemplate("CreatePDF.html"); $xtpl->assign("HEADER", $pdf->headerPDF()); $xtpl->assign("BODY", $bodyHtml); $xtpl->assign("COMPONENTS", $compsHtml); $xtpl->assign("FOOTER", $pdf->footerPDF()); $pdf->DisplayPreferences('HideWindowUI'); $pdf->AddPage(); $xtpl->parse("main"); $html = $xtpl->pdf_out('main');