コード例 #1
0
$format_bg_g = "220";
$format_bg_b = "220";
$format_ln_r = "220";
$format_ln_g = "220";
$format_ln_b = "220";
$current_date = TimeFormat(time());
$proj_id = CleanUp($_GET[proj_id]);
// Begin creating the page
//Page Title
$sql_proj = "SELECT * FROM intranet_projects WHERE proj_id = {$proj_id} LIMIT 1";
$result_proj = mysql_query($sql_proj, $conn) or die(mysql_error());
$array_proj = mysql_fetch_array($result_proj);
$proj_num = $array_proj['proj_num'];
$proj_name = $array_proj['proj_name'];
$sheet_title = "Project Checklist";
$pdf->SetXY(10, 45);
$pdf->SetFont($format_font, '', 24);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetDrawColor(0, 0, 0);
$pdf->Cell(0, 10, $sheet_title);
$pdf->SetXY(10, 55);
$pdf->SetFont($format_font, '', 14);
$sheet_subtitle = $proj_num . " " . $proj_name;
$sheet_date = "Current at " . $current_date;
$pdf->Cell(0, 7.5, $sheet_subtitle, 0, 1, L, 0);
$pdf->Cell(0, 7.5, $sheet_date, 0, 1, L, 0);
$pdf->SetXY(10, 70);
$pdf->SetLineWidth(0.5);
$sql_checklist = "SELECT * FROM intranet_project_checklist_items LEFT JOIN intranet_project_checklist ON checklist_item = item_id AND checklist_project = {$proj_id} WHERE checklist_required != 1 ORDER BY item_group, item_order, checklist_date DESC, item_name";
$result_checklist = mysql_query($sql_checklist, $conn) or die(mysql_error());
$y = $pdf->GetY() + 10;
コード例 #2
0
     $contact_address_print = $contact_address_print . "\n" . $contact_address;
 }
 if ($contact_city) {
     $contact_address_print = $contact_address_print . "\n" . $contact_city;
 }
 if ($contact_county) {
     $contact_address_print = $contact_address_print . "\n" . $contact_county;
 }
 if ($contact_postcode) {
     $contact_address_print = $contact_address_print . "\n" . $contact_postcode;
 }
 if ($country_printable_name) {
     $contact_address_print = $contact_address_print . "\n" . $country_printable_name;
 }
 //Invoice Title
 $pdf->SetXY(10, 45);
 $pdf->SetFont($format_font, '', 26);
 $pdf->SetTextColor(0, 0, 0);
 $pdf->Cell(0, 10, $invoice_ref_print);
 //Invoice Title
 $pdf->SetXY(10, 55);
 $pdf->SetFont($format_font, '', 20);
 $pdf->SetTextColor(0, 0, 0);
 $pdf->Cell(0, 10, $invoice_project_print);
 //Invoice Date
 $pdf->SetXY(10, 62);
 $pdf->SetFont($format_font, '', 20);
 $pdf->SetTextColor(0, 0, 0);
 $pdf->Cell(0, 10, $invoice_date_print);
 //Heading Titles Heading
 $pdf->SetFont($format_font, '', 9);
コード例 #3
0
if ($user_usertype_current <= 3) {
    header("Location: index2.php");
}
//  Use FDPI to get the template
define('FPDF_FONTPATH', 'fpdf/font/');
require 'fpdf/fpdi.php';
$pdf = new fpdi();
$pagecount = $pdf->setSourceFile("pdf/template.pdf");
$tplidx = $pdf->ImportPage(1);
$pdf->addPage();
$pdf->useTemplate($tplidx, 0, 0, 210, 297);
$pdf->AddFont($format_font, '', $format_font_2);
// Begin creating the page
//Page Title
$sheet_title = "Verified Expenses, " . date("j F Y, g:i a", $ts_expense_verified);
$pdf->SetXY(10, 45);
$pdf->SetFont($format_font, '', 26);
$pdf->SetTextColor(200, 200, 200);
$pdf->Cell(0, 10, $sheet_title);
$pdf->SetXY(10, 55);
$pdf->SetFont($format_font, '', 12);
// Columnn Headings
$pdf->SetTextColor(220, 220, 220);
$pdf->SetFont($format_font, '', 8);
$pdf->Cell(10, 4, "ID", 0, 0, L, 0);
$pdf->Cell(20, 4, "Date", 0, 0, L, 0);
$pdf->Cell(15, 4, "Project", 0, 0, L, 0);
$pdf->Cell(55, 4, "Description", 0, 0, L, 0);
$pdf->Cell(20, 4, "Date Verified", 0, 0, L, 0);
$pdf->Cell(25, 4, "Invoice (ID)", 0, 0, L, 0);
$pdf->Cell(15, 4, "Net.", 0, 0, R, 0);
コード例 #4
0
$format_bg_g = "220";
$format_bg_b = "220";
$format_ln_r = "220";
$format_ln_g = "220";
$format_ln_b = "220";
$current_date = TimeFormat(time());
$proj_id = CleanUp($_GET[proj_id]);
// Begin creating the page
//Page Title
$sql_proj = "SELECT * FROM intranet_projects WHERE proj_id = {$proj_id} LIMIT 1";
$result_proj = mysql_query($sql_proj, $conn) or die(mysql_error());
$array_proj = mysql_fetch_array($result_proj);
$proj_num = $array_proj['proj_num'];
$proj_name = $array_proj['proj_name'];
$sheet_title = "Drawing Schedule";
$pdf->SetXY(10, 45);
$pdf->SetFont($format_font, '', 24);
$pdf->SetTextColor(150, 150, 150);
$pdf->SetDrawColor(150, 150, 150);
$pdf->Cell(0, 10, $sheet_title);
$pdf->SetXY(10, 55);
$pdf->SetFont($format_font, '', 14);
$sheet_subtitle = $proj_num . " " . $proj_name . ", printed " . $current_date;
$pdf->Cell(0, 10, $sheet_subtitle, 0, 1, L, 0);
$pdf->SetXY(10, 60);
$pdf->SetLineWidth(0.5);
// And now the list of drawings issued
unset($current_drawing);
//$sql_drawings = "SELECT * FROM intranet_drawings_issued, intranet_drawings LEFT JOIN intranet_drawings_revision ON revision_drawing = drawing_id WHERE issue_set = $set_id AND issue_drawing = drawing_id ORDER BY drawing_number";
$sql_drawings = "SELECT * FROM intranet_drawings, intranet_drawings_scale, intranet_drawings_paper WHERE drawing_project = {$proj_id} AND drawing_scale = scale_id AND drawing_paper = paper_id order by drawing_number";
$result_drawings = mysql_query($sql_drawings, $conn) or die(mysql_error());
コード例 #5
0
$user_name_first = $array_project['user_name_first'];
$user_name_second = $array_project['user_name_second'];
if ($blog_type == "phone") {
    $blog_type_view = "Telephone Call";
} elseif ($blog_type == "filenote") {
    $blog_type_view = "File Note";
} elseif ($blog_type == "meeting") {
    $blog_type_view = "Meeting Note";
} elseif ($blog_type == "email") {
    $blog_type_view = "Email Message";
} else {
    $blog_type_view = NULL;
    $type = 0;
}
$blog_type_view = $blog_type_view . " - " . $user_name_first . " " . $user_name_second;
$pdf->SetXY(10, 45);
$pdf->SetFont($format_font, '', 14);
$pdf->SetTextColor(200, 200, 200);
$sheet_subtitle = $proj_num . " " . $proj_name . ", " . TimeFormat($blog_date);
$pdf->Cell(0, 7.5, $sheet_subtitle, 0, 1, L, 0);
$pdf->Cell(0, 7.5, $blog_type_view, 0, 1, L, 0);
$pdf->SetFont($format_font, '', 24);
$pdf->SetTextColor(150, 150, 150);
$pdf->MultiCell(0, 8, $blog_title, 0, L);
$pdf->SetXY(40, 85);
$pdf->SetFont($format_font, '', 11);
$pdf->SetTextColor(0, 0, 0);
$pdf->MultiCell(0, 5, $blog_text, 0, L);
// and send to output
$file_name = $proj_num . "_" . Date("Y", $blog_date) . "-" . Date("m", $blog_date) . "-" . Date("d", $blog_date) . "_" . $blog_type . ".pdf";
$pdf->Output($file_name, I);
コード例 #6
0
if ($_GET[s1] > 0) {
    $s1 = intval($_GET[s1]);
    $section = "Section " . $_GET[s1] . " only - " . $qms_firstpage;
    $s1 = " WHERE qms_toc1 = {$s1} ";
} else {
    unset($s1);
}
if ($_GET[s2] > 0) {
    $s2 = intval($_GET[s2]);
    $section = "Section " . $_GET[s1] . "." . $_GET[s2] . " only - " . $qms_firstpage;
    $s2 = " AND qms_toc2 = {$s2} ";
} else {
    unset($s2);
}
$pdf->AddFont($format_font, '', $format_font_2);
$pdf->SetXY(10, 175);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFillColor(220, 220, 220);
$pdf->SetFont('Helvetica', '', 18);
$pdf->MultiCell(0, 10, $settings_companyname, 0, L);
$pdf->SetFont('Helvetica', 'B', 32);
$pdf->MultiCell(0, 20, 'Quality Management System', 0, L);
$pdf->SetFont($format_font, '', 14);
$printed_date = "Current at " . date("g.ia, jS F Y", time());
$pdf->MultiCell(0, 25, '', 0, L);
$pdf->MultiCell(0, 8, $printed_date, 0, L);
$pdf->SetLineWidth(0.1);
$pdf->SetFont($format_font, '', 11);
$width = $pdf->GetStringWidth($printed_date) + 20;
if ($s1 != NULL or $s2 != NULL) {
    $pdf->MultiCell(0, 8, $section, T, L);
コード例 #7
0
     $address_go = $address_go . "\n" . $company_county;
 } elseif ($contact_county != NULL) {
     $address_go = $address_go . "\n" . $contact_county;
 }
 if ($company_postcode != NULL) {
     $address_go = $address_go . ", " . $company_postcode;
 } elseif ($contact_postcode != NULL) {
     $address_go = $address_go . "\n" . $contact_postcode;
 }
 if ($company_name != NULL) {
     $company_name_inc = $company_name . "\n";
 } else {
     unset($company_name_inc);
 }
 // Set current x and y
 $pdf->SetXY($x, $y);
 // Print Border if requested
 if ($_POST[borders] == "1") {
     $pdf->SetDrawColor(200, 200, 200);
     $pdf->Cell($label_c, $label_d, '', 1);
     $pdf->SetDrawColor(0, 0, 0);
 }
 // Print Address
 $cell_width = $label_c - $cell_margin_left - $cell_margin_left;
 $cell_x = $x + $cell_margin_left;
 $cell_y = $y + $cell_margin_top;
 if ($_POST[marketing] == 0 and $contact_include == 3) {
     $pdf->SetTextColor(0, 0, 200);
 } elseif ($_POST[marketing] == 0 and $contact_include == 2 and $contact_email != NULL) {
     $address_go = $contact_namefirst . " " . $contact_namesecond . "\n" . $company_name_inc . $contact_email;
 } elseif ($_POST[marketing] == 2 and $contact_include == 2) {
コード例 #8
0
 //  Use FDPI to get the template
 define('FPDF_FONTPATH', 'fpdf/font/');
 require 'fpdf/fpdi.php';
 $pdf = new fpdi();
 $pagecount = $pdf->setSourceFile("pdf/template.pdf");
 $tplidx = $pdf->ImportPage(1);
 $pdf->addPage();
 $pdf->useTemplate($tplidx, 0, 0, 210, 297);
 $pdf->AddFont($format_font, '', $format_font_2);
 // Begin creating the page
 $project_counter = 1;
 $page_count = 1;
 $month_count = 1;
 $x = 10;
 $y = 50;
 $pdf->SetXY($x, $y);
 // Reset all the counters
 $invoice_value_novat_month_all = 0;
 $invoice_value_vat_month_all = 0;
 $invoice_value_novat_total_all = 0;
 $invoice_value_vat_total_all = 0;
 $thismonth = 0;
 $thisyear = 0;
 $invoice_year_novat = 0;
 $invoice_year_vat = 0;
 $total_12month_novat = array("0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0");
 $total_12month_vat = array("0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0");
 //Page Title
 $sheet_title = "Invoice Summary, " . date("j F Y", time());
 $pdf->SetXY(10, 45);
 $pdf->SetFont($format_font, '', 26);
コード例 #9
0
$set_reason = $array_set['set_reason'];
$set_method = $array_set['set_method'];
$set_format = $array_set['set_format'];
$set_comment = $array_set['set_comment'];
$set_checked = $array_set['set_checked'];
if ($set_checked > 0) {
    $sql_set_checked = "SELECT user_initials FROM intranet_user_details WHERE user_id = {$set_checked} LIMIT 1";
    $result_set_checked = mysql_query($sql_set_checked, $conn) or die(mysql_error());
    $array_set_checked = mysql_fetch_array($result_set_checked);
    $user_checked_initials = $array_set_checked['user_initials'];
} else {
    $user_checked_initials = "None";
}
$user_name = $array_set['user_initials'];
$sheet_title = "Drawing Issue Sheet";
$pdf->SetXY(10, 45);
$pdf->SetFont($format_font, '', 24);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetDrawColor(0, 0, 0);
$pdf->Cell(0, 10, $sheet_title);
$pdf->SetXY(10, 55);
$pdf->SetFont($format_font, '', 14);
$sheet_subtitle = $proj_num . " " . $proj_name . ", " . $set_date;
$pdf->Cell(0, 10, $sheet_subtitle, 0, 1, L, 0);
$pdf->SetXY(10, 70);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetFont("Helvetica", 'B', 8);
$pdf->Cell(40, 5, "Purpose of Issue", 0, 0, L, 0);
$pdf->Cell(30, 5, "Method of Issue", 0, 0, L, 0);
$pdf->Cell(30, 5, "Format", 0, 0, L, 0);
$pdf->Cell(30, 5, "Issued By", 0, 0, L, 0);
コード例 #10
0
             $user_prop_multiplier = $user_prop / $user_prop_target;
         } else {
             $user_prop_multiplier = 1;
         }
         $this_user = $user_timesheet_hours * $user_prop_multiplier * $user_user_rate * (1 - $user_prop);
         $weekly_cost = $weekly_cost + $this_user;
         //$array_total_cost[] = $this_user; //remove
         //$print = $user_id . ": " . round ($this_user); $pdf->Cell(15,4,$print,1,0); // remove
     }
     //$weekly_cost = array_sum($array_total_cost); //remove
     return $weekly_cost;
 }
 //$test = StaffCost($current_time,"");
 $x = 0;
 $y = $pdf->GetY() + 5;
 $pdf->SetXY($x, $y);
 //$pdf->MultiCell(0,5,$test);
 $pdf->SetFont('Helvetica', 'B', 6);
 $pdf->Cell(0, 5, '', 0, 1, L);
 $pdf->Cell(40, 5, "Target Staff Costs", 0, 0, L);
 $pdf->SetFont('Helvetica', '', 6);
 $beginweek = BeginWeek($current_time);
 while ($x <= 220) {
     $x = $x + $colwidth;
     $total = "£" . number_format(StaffCost($beginweek, "target"));
     $pdf->Cell($colwidth, 3, $total, 0, 0, R);
     $beginweek = $beginweek + 604800;
 }
 if ($pdf->GetY() > 170) {
     $pdf->addPage(L);
     DrawGrid();