コード例 #1
0
    $checklist_item = intval(trim($checklist_item, "#"));
    if ($proj_id > 0 and $checklist_item > 0) {
        $sql_checklist_date = "SELECT checklist_date FROM intranet_project_checklist WHERE checklist_project = {$proj_id} AND checklist_item = {$checklist_item} ORDER BY checklist_date DESC LIMIT 1";
        $result_checklist_date = mysql_query($sql_checklist_date, $conn) or die(mysql_error());
        $array_checklist_date = mysql_fetch_array($result_checklist_date);
        if ($array_checklist_date['checklist_date'] != "0000-00-00") {
            $output = strtotime($array_checklist_date['checklist_date']);
            $output = date("j F Y", $output);
        }
        return $output;
    }
}
$pagecount = $pdf->setSourceFile("pdf/template.pdf");
$tplidx = $pdf->ImportPage(1);
$pdf->addPage();
$pdf->SetMargins(10, 15, 10);
$pdf->useTemplate($tplidx, 0, 0, 210, 297);
if ($settings_pdffont != NULL) {
    $format_font = $settings_pdffont;
    $format_font_2 = $settings_pdffont . ".php";
} else {
    $format_font = "franklingothicbook";
    $format_font_2 = "franklingothicbook.php";
}
if ($_GET[s1] > 0) {
    $s1 = intval($_GET[s1]);
    $s2 = intval($_GET[s2]);
    $sql_firstpage = "SELECT qms_text FROM intranet_qms WHERE qms_toc1 = {$s1} AND qms_toc2 = {$s2}";
    $result_firstpage = mysql_query($sql_firstpage, $conn) or die(mysql_error());
    $array_firstpage = mysql_fetch_array($result_firstpage);
    $qms_firstpage = strip_tags($array_firstpage['qms_text']);
コード例 #2
0
} else {
    $import_template = NULL;
}
if ($import_template == "1") {
    $pdf->setSourceFile("library/background.pdf");
    $tplidx = $pdf->ImportPage(1);
}
// Now add the first page
$pdf->addPage();
if ($import_template == "1") {
    $pdf->useTemplate($tplidx, 0, 0, 210, 297);
}
$pdf->AddFont('century', '', 'Century.php');
$pdf->AddFont('franklingothicbook', '', 'franklingothicbook.php');
$pdf->AddFont('gillsans', '', 'gillsans.php');
$pdf->SetMargins(0, 0);
$pdf->SetAutoPageBreak("no");
// Create the sheet header
$pdf->SetFont("arial", '', $label_j);
$label_print_date = $label_title . ", created " . date("jS M y", time());
$label_url = "http://labelstudio.redcitrus.com";
$pdf->SetFontSize(8);
$pdf->SetTextColor(190, 190, 190);
$pdf->Cell(0, 5, $label_print_date, 0, 1, L, 0, $label_url);
$pdf->SetFont($font, '', $label_j);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFontSize($label_j);
if ($_GET[labeltype] != NULL) {
    $labeltype = $_GET[labeltype];
} else {
    $labeltype = 1;