本文整理汇总了PHP中HTML2FPDF::CompRows方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML2FPDF::CompRows方法的具体用法?PHP HTML2FPDF::CompRows怎么用?PHP HTML2FPDF::CompRows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML2FPDF
的用法示例。
在下文中一共展示了HTML2FPDF::CompRows方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$query = "SELECT name, type, number, paper FROM `clientorders_components` WHERE parent_id='" . $focus->id . "' AND deleted=0";
$result = $focus->db->query($query, true, "Error filling layout fields: ");
while (($row = $focus->db->fetchByAssoc($result)) != null) {
foreach ($fields as $field) {
$data[$field] = $row[$field];
}
$list[] = $data;
}
//////////////
$xtpl = new XTemplate("modules/{$currentModule}/CreatePDF.html");
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$pdf = new HTML2FPDF();
$xtpl->assign("HEADER", $pdf->headerPDF());
$xtpl->assign("FOOTER", $pdf->footerPDF());
$xtpl->assign("ROWS", $pdf->CompRows($list));
$xtpl->parse("main.row1");
//Assign layout attributes
$xtpl->assign("LABEL_COLOR", $pdfColors["label"]);
$xtpl->assign("FIELD_COLOR", $pdfColors["field"]);
$xtpl->assign("colspan", count($fields));
$xtpl->assign("fSize", $pdfFontSize["default"]);
$xtpl->assign("headingFontSize", $pdfFontSize["heading"]);
$xtpl->assign("headingColor", $pdfColors["heading"]);
$xtpl->assign("titleColor", $pdfColors["headerFld"]);
$xtpl->assign("firstCol", "20%");
$xtpl->assign("secCol", "30%");
//Line divider attributes
$xtpl->assign("dividerHeight", "1px");
$xtpl->assign("dividerColor", $pdfColors["dividerColor"]);
$xtpl->assign("dividerSpan", 4);
示例2: EstimateComponents
$bodyHtml .= $pdf->createHeading($mod_strings["LBL_GENERAL"]);
$bodyHtml .= $pdf->createTr(false, $mod_strings["LBL_QUANTITY"], $focus->quantity, $mod_strings["LBL_PERIODIC"], $periodic);
$bodyHtml .= $pdf->createTr(false, $mod_strings["LBL_FILES"], $focus->files, $mod_strings["LBL_SAMPLES"], $samples);
$bodyHtml .= $pdf->createTr(false, $mod_strings["LBL_SPECIAL_REQUIREMENTS"], $focus->special_requirements, null, null, true);
$bodyHtml .= $pdf->createTr(true, $mod_strings["LBL_DESCRIPTION"], $description, null, null, true);
$bodyHtml .= $pdf->createHeading($mod_strings["LBL_OPERATIONS"]);
$bodyHtml .= $pdf->createTr(true, $mod_strings["LBL_OPERATIONS_DESCRIPTION"], $focus->operation_description, null, null, true);
$bodyHtml .= $pdf->createHeading($mod_strings["LBL_OTHERS"]);
$bodyHtml .= $pdf->createTr(true, $mod_strings["LBL_TRANSPORT"], $focus->transport, $mod_strings["LBL_PACK"], $focus->pack);
$bodyHtml .= $pdf->createHeading($mod_strings["LBL_COMPONENTS_LIST"]);
$bodyHtml .= $pdf->genCells($mod_strings["LBL_NAME"], true, true, false);
$bodyHtml .= $pdf->genCells($mod_strings["LBL_TYPE"]);
$bodyHtml .= $pdf->genCells($mod_strings["LBL_PAPER_DESCRIPTION"]);
$bodyHtml .= $pdf->genCells($mod_strings["LBL_COLORS_A"]);
$bodyHtml .= $pdf->genCells($mod_strings["LBL_COLORS_B"], false, false, true);
$bodyHtml .= $pdf->CompRows($list);
$bodyHtml .= "</table>";
$bodyHtml .= "<newpage>";
//Get the components' ids
$list = null;
$query = "SELECT id FROM `estimates_components` WHERE parent_id='" . $focus->id . "' AND deleted=0 AND parent_bean = 'ClientRequest'";
//$query = "SELECT id FROM `estimates_components` WHERE deleted=0 AND parent_bean = 'ClientRequest'";
$result = $focus->db->query($query, true, "Error filling layout fields: ");
while ($row = $focus->db->fetchByAssoc($result)) {
$list[] = $row['id'];
}
//Initializing of EstimateComponents object needs to be done for every record
for ($i = 0; $i < count($list); $i++) {
$RqComps = new EstimateComponents();
$RqComps->retrieve($list[$i]);
//get the $mod_strings from EstimateComponents module