Exemplo n.º 1
12
function generarPdf($num)
{
    $pdf = new FPDF('P');
    $pdf->AddPage();
    $pdf->Image('../../../public_html/imagenes/logoclaro.png', 40, 50, 120);
    $pdf->SetTitle("Notificación al denunciante", true);
    $pdf->Image('../../../public_html/imagenes/logoivss.png', 20, 7, 13);
    $pdf->SetFont('Arial', '', 6);
    //$pdf->Text(40,10,utf8_decode('hola'));
    //$nombre = "Prob".date('m-d-Y').".pdf";
    $pdf->Output("Prob{$num}.pdf", 'F');
}
Exemplo n.º 2
0
function CetakLaporan($prevtahun, $tahun, $nexttahun, $urutan, $gel)
{
    include_once "../fpdf.php";
    require_once "../phplot.php";
    $lbr = 190;
    $arrStatusAplikan = array();
    $s = "select * from statusaplikan where KodeID='" . KodeID . "' order by Urutan ASC";
    $r = _query($s);
    while ($w = _fetch_array($r)) {
        $arrStatusAplikan[] = $w['StatusAplikanID'];
    }
    $arrGelombang = array();
    getArrayGelombang($arrGelombang, $tahun);
    // Buat Graph dan dimasukkan ke file dulu
    $piepath = '../tmp/data_fakta_pmb_pie_graph.png';
    $barpath = '../tmp/data_fakta_pmb_bar_graph.png';
    BuatPieGraph($piepath, $prevtahun, $tahun, $urutan, $gel);
    BuatBarGraph($barpath, $prevtahun, $tahun, $arrStatusAplikan, $urutan, $gel);
    // *** Cetak ***
    $pdf = new FPDF('L', 'mm', 'A4');
    $pdf->SetAutoPageBreak(true, 5);
    $pdf->SetTitle("DATA & FAKTA PMB TAHUN AJARAN {$tahun}/{$nexttahun} GELOMBANG " . UbahKeRomawiLimit99($urutan));
    $pdf->AddPage('L');
    BuatHeaderLap($prevtahun, $tahun, $pdf);
    TampilkanIsinya($prevtahun, $tahun, $arrStatusAplikan, $arrGelombang, $pdf);
    TampilkanGraph($piepath, 30, 75, 96, 64, $pdf);
    TampilkanGraph($barpath, 185, 75, 96, 64, $pdf);
    TampilkanSumberInformasi(60, 145, $prevtahun, $tahun, $urutan, $gel, $pdf);
    TampilkanRatioPresenter(185, 145, $arrStatusAplikan, $tahun, $urutan, $gel, $pdf);
    $pdf->Output();
}
function CetakLaporan($prevtahun, $tahun, $gel)
{
    include_once "../fpdf.php";
    $lbr = 190;
    $pdf = new FPDF('P', 'mm', 'A4');
    $pdf->SetTitle("Ratio Presenter PMB - {$prevtahun}/{$tahun}");
    $pdf->AddPage('P');
    $arrStatusAplikan = array();
    $s = "select * from statusaplikan where KodeID='" . KodeID . "' order by Urutan ASC";
    $r = _query($s);
    while ($w = _fetch_array($r)) {
        $arrStatusAplikan[] = $w['StatusAplikanID'];
    }
    // Buat Table 1
    BuatHeaderLap($prevtahun, $tahun, 0, $pdf);
    $arrPresenterID = array();
    GetArrayPresenterSortByRatio($arrPresenterID, $tahun);
    TampilkanIsinya($prevtahun, $tahun, $arrStatusAplikan, $arrPresenterID, 0, $pdf);
    $pdf->Ln(10);
    BuatHeaderLap($prevtahun, $tahun, 1, $pdf);
    $arrPresenterID = array();
    GetArrayPresenterSortByReg($arrPresenterID, $tahun);
    $arrStat = TampilkanIsinya($prevtahun, $tahun, $arrStatusAplikan, $arrPresenterID, 1, $pdf);
    $pdf->Ln(10);
    TampilkanStatistik($arrStat, $tahun, $pdf);
    $pdf->Output();
}
function CetakLaporan($prevtahun, $tahun, $gel)
{
    include_once "../fpdf.php";
    $lbr = 190;
    $pdf = new FPDF('L', 'mm', 'A4');
    $pdf->SetTitle("Ratio Presenter PMB - {$prevtahun}/{$tahun}");
    $pdf->AddPage('L');
    $arrGelombang = array();
    getArrayGelombang($arrGelombang, $tahun);
    $arrPejabatID = array();
    GetArrayPejabat($arrPejabatID, $tahun);
    // Buat Table 1
    BuatHeaderLap($prevtahun, $tahun, $pdf);
    TampilkanIsinya($prevtahun, $tahun, $arrGelombang, $arrPejabatID, $pdf);
    $pdf->Output();
}
Exemplo n.º 5
0
function CetakLaporan($prevtahun, $tahun, $nexttahun, $urutan, $gel)
{
    include_once "../fpdf.php";
    require_once "../phplot.php";
    $lbr = 190;
    // Buat Graph dan dimasukkan ke file dulu
    $piepath = '../tmp/data_fakta_pmb_pie_graph.png';
    BuatPieGraph($piepath, $prevtahun, $tahun, $urutan, $gel);
    // *** Cetak ***
    $pdf = new FPDF('P', 'mm', 'A4');
    $pdf->SetTitle("LAPORAN SUMBER INFORMASI PMB TAHUN AJARAN {$tahun}/{$nexttahun} GELOMBANG " . UbahKeRomawiLimit99($urutan));
    $pdf->AddPage('P');
    BuatHeaderLap($prevtahun, $tahun, $pdf);
    TampilkanGraph($piepath, 20, 30, 144, 96, $pdf);
    TampilkanSumberInformasi(30, 150, $prevtahun, $tahun, $urutan, $gel, $pdf);
    $pdf->Output();
}
Exemplo n.º 6
0
function UsersTrafficPeriodPDF()
{
    //require('chart.php');
    require 'lib/fpdf.php';
    global $SAMSConf;
    global $DATE;
    $DB = new SAMSDB();
    $sdate = $DATE->sdate();
    $edate = $DATE->edate();
    $bdate = $DATE->BeginDate();
    $eddate = $DATE->EndDate();
    $size = "";
    if (isset($_GET["size"])) {
        $size = $_GET["size"];
    }
    require "reportsclass.php";
    $dateselect = new DATESELECT($DATE->sdate(), $DATE->edate());
    $lang = "./lang/lang.{$SAMSConf->LANG}";
    require $lang;
    define('FPDF_FONTPATH', 'lib/font/');
    require 'lib/fpdf.php';
    $pdfFile = new FPDF();
    $pdfFile->Open();
    $pdfFile->AddFont('Nimbus', '', 'Nimbus.php');
    $pdfFile->SetAuthor("SQUID Account Management System");
    $pdfFile->SetCreator("Created by SAMS2");
    $pdfFile->SetTitle("SAMS2 users statistic");
    //      UsersTrafficPeriodPDF();
    $pdfFile->AddPage();
    $pdfFile->SetFont('Nimbus', '', 15);
    //$pdfFile->SetFont('SUSESerif-Roman','',16);
    $pdfFile->SetXY(50, 15);
    echo " {$usersbuttom_2_traffic_UsersTrafficPeriod_1}<BR>{$usersbuttom_2_traffic_UsersTrafficPeriod_2}<br>";
    $pdfFile->Write(0, " {$usersbuttom_2_traffic_UsersTrafficPeriod_1}<BR>{$usersbuttom_2_traffic_UsersTrafficPeriod_2}");
    $pdfFile->Output();
}
Exemplo n.º 7
0
// Start  : 02 Juni 2008
session_start();
include_once "../dwo.lib.php";
include_once "../db.mysql.php";
include_once "../connectdb.php";
include_once "../parameter.php";
include_once "../cekparam.php";
include_once "../fpdf.php";
// *** Parameters ***
$MhswID = $_REQUEST['MhswID'];
if (empty($MhswID)) {
    die(ErrorMsg("Error", "Tentukan Mahasiswa ID-nya dulu.\r\n    <hr size=1 color=silver />\r\n    <input type=button name='Tutup' value='Tutup'\r\n      onClick='window.close()' />"));
}
// *** Main
$pdf = new FPDF('P');
$pdf->SetTitle("Daftar SKS Tidak Lulus Mahasiswa");
$pdf->AddPage('P');
HeaderLogo("Daftar SKS Tidak Lulus Mahasiswa", $pdf, 'P');
$pdf->SetFont('Helvetica', 'B', 14);
Isinya($MhswID, $pdf);
$pdf->Output();
// *** Functions ***
function Isinya($MhswID, $p)
{
    $lbr = 190;
    $t = 5;
    BuatHeadernya($MhswID, $p);
    JudulKolomnya($p);
    $p->SetFont('Helvetica', '', 9);
    $s = "select k.*\r\n    from krs k\r\n      left outer join khs h on h.KHSID = k.KHSID and h.KodeID = '" . KodeID . "'\r\n      left outer join nilai n on k.GradeNilai=n.Nama and h.ProdiID=n.ProdiID and n.KodeID = '" . KodeID . "'\r\n\twhere k.MhswID = '{$MhswID}'\r\n\t\tand n.Lulus = 'N'\r\n    order by k.TahunID, k.MKKode";
    $r = _query($s);
Exemplo n.º 8
0
include_once "../db.mysql.php";
include_once "../connectdb.php";
include_once "../parameter.php";
include_once "../cekparam.php";
include_once "../fpdf.php";
// *** Parameters ***
$TahunID = GetSetVar('_jdwlTahun');
$ProdiID = GetSetVar('_jdwlProdi');
$ProgramID = GetSetVar('_jdwlProg');
$_jdwlHari = GetSetVar('_jdwlHari');
$_jdwlKelas = GetSetVar('_jdwlKelas');
$_jdwlSemester = GetSetVar('_jdwlSemester');
$thn = GetFields('tahun', "TahunID='{$TahunID}' and KodeID='" . KodeID . "' and ProdiID='{$ProdiID}' and ProgramID", $ProgramID, "*");
$lbr = 280;
$pdf = new FPDF('L');
$pdf->SetTitle("Jadwal Kuliah - {$TahunID}");
$pdf->SetAutoPageBreak(true, 5);
$pdf->AddPage('L');
$pdf->SetFont('Helvetica', 'B', 14);
HeaderLogo("Jadwal Kuliah", $pdf, 'L');
// Buat header dulu
BuatHeader($thn, $pdf);
// Tampilkan datanya
AmbilJadwal($thn, $pdf);
// Buat footer
BuatFooter($thn, $pdf);
$pdf->Output();
// *** Functions ***
function BuatFooter($thn, $p)
{
    global $arrID;
Exemplo n.º 9
0
<?php

$name = $_POST['name'];
$characteristics = $_POST['characteristics'];
$image = $_POST['image'];
require 'fpdf17/fpdf.php';
//create a FPDF object
$pdf = new FPDF();
//set document properties
$pdf->SetAuthor('Anon');
$pdf->SetTitle($name);
//set font for the entire document
$pdf->SetFont('Helvetica', 'B', 20);
$pdf->SetTextColor(50, 60, 100);
//set up a page
$pdf->AddPage('P');
//$pdf->SetDisplayMode(real,'default');
//insert an image and make it a link
$pdf->Image('logo.png', 10, 20, 33, 0);
//display the title without a border around it
$pdf->SetXY(50, 20);
$pdf->SetDrawColor(50, 60, 100);
$pdf->Cell(100, 10, $name, 0, 0, 'C', 0);
// Insert a dynamic image from a URL
$pdf->Image($image, 75, 30, 0, 50);
//Set x and y position for the main text, reduce font size and write content
$pdf->SetXY(10, 90);
$pdf->SetFontSize(10);
$pdf->Write(5, $characteristics);
//Output the document
$pdf->Output();
<?php

// Author : SIAKAD TEAM
// Email  : setio.dewo@gmail.com
// Start  : 20 Oktober 2008
session_start();
include_once "../dwo.lib.php";
include_once "../db.mysql.php";
include_once "../connectdb.php";
include_once "../parameter.php";
include_once "../cekparam.php";
include_once "../fpdf.php";
// *** Parameters ***
$MKPaketID = GetSetVar('MKPaketID');
$pdf = new FPDF();
$pdf->SetTitle("Matakuliah Paket");
$pdf->AddPage();
$pdf->SetFillColor(200, 200, 200);
$pdf->SetFont('Helvetica', 'B', 14);
CetakHeadernya($MKPaketID, $pdf);
CetakMatakuliahnya($MKPaketID, $pdf);
$pdf->Output();
// *** Functions ***
function CetakHeadernya($MKPaketID, $p)
{
    $lbr = 190;
    $t = 6;
    if (empty($MKPaketID)) {
        $_pid = "(SEMUA)";
    } else {
        $_pid = GetaField('mkpaket', "MKPaketID='{$MKPaketID}' and KodeID", KodeID, 'Nama');
Exemplo n.º 11
0
 public function get_receipt($transaction_id)
 {
     $this->load->library('fpdf');
     $transaction_details = $this->get_transaction($transaction_id);
     $this->load->model('User_model');
     $this->User_model->initialize($transaction_details['user_id']);
     $user_details = $this->User_model->get('*');
     //lookup profile
     $profile_details = $this->get_profile($transaction_details['profile_id'], 'billingperiod, amount, taxamt');
     //lookup subscription
     $subscription_details = $this->get_subscription_by_transaction($transaction_id);
     $pdf = new FPDF('P', 'mm', 'Letter');
     $pdf->AddPage();
     $pdf->SetAuthor('ESCTT Inc.');
     $pdf->SetTitle('Invoice');
     $pdf->Image('http://v1.riskmp.com/assets/images/logo.png', 10, 10, 35, 19, '', 'http://v1.riskmp.com/');
     $pdf->SetXY(50, 10);
     $pdf->SetFont('Arial', 'B', 40);
     $pdf->Cell(100, 20, 'Receipt');
     $address_x = $pdf->GetX();
     $pdf->set_field_title_font($pdf);
     $pdf->Write(14, 'ESCTT Inc.');
     $pdf->Ln(5);
     $pdf->SetX($address_x);
     $pdf->Write(14, '131 Bloor Street West');
     $pdf->Ln(5);
     $pdf->SetX($address_x);
     $pdf->Write(14, 'Suite 200/318');
     $pdf->Ln(5);
     $pdf->SetX($address_x);
     $pdf->Write(14, 'Toronto, ON M5S 1R8');
     $pdf->Ln(5);
     $pdf->SetX($address_x);
     $pdf->Write(14, 'Business # ' . BUSINESS_NUMBER);
     $pdf->SetXY(10, 40);
     $pdf->set_field_title_font($pdf);
     $pdf->Write(10, 'Client: ');
     $pdf->set_field_value_font($pdf);
     $pdf->Write(10, $user_details['first_name'] . " " . $user_details['last_name']);
     $pdf->set_field_title_font($pdf);
     $pdf->SetX(140);
     $pdf->Write(10, 'Generated on: ');
     $pdf->set_field_value_font($pdf);
     $pdf->Write(10, date("Y-m-d"));
     $pdf->Ln(16);
     $pdf->SetFont('Arial', 'B', 18);
     $pdf->Write(6, 'Transaction Details');
     $pdf->Ln(6);
     $pdf->set_field_title_font($pdf);
     $pdf->Write(14, 'Transaction ID: ');
     $pdf->set_field_value_font($pdf);
     $pdf->Write(14, $transaction_id);
     $pdf->Ln(7);
     $pdf->set_field_title_font($pdf);
     $pdf->Write(14, 'Order Time: ');
     $pdf->set_field_value_font($pdf);
     $pdf->Write(14, $transaction_details['order_time']);
     $pdf->Ln(7);
     $pdf->set_field_title_font($pdf);
     $pdf->Write(14, 'Payment Method: ');
     $pdf->set_field_value_font($pdf);
     $pdf->Write(14, 'Credit Card');
     $pdf->Ln(16);
     $pdf->SetFont('Arial', 'B', 18);
     $pdf->Write(6, 'Purchase Details');
     $pdf->Ln(4);
     //set table header and body fonts
     $thfont = array('family' => 'Arial', 'style' => 'B', 'size' => 11);
     $tbfont = array('family' => 'Arial', 'style' => '', 'size' => 11);
     $pdf->Ln(4);
     $twidth = array(150, 50);
     //column widths
     $theader = array('Item', 'Amount');
     //column titles
     $tdata = array(array('RiskMP Membership @ 1 ' . $profile_details['billingperiod'], '$' . $profile_details['amount']), array('Tax', '$' . $profile_details['taxamt']), array('Grand Total', '$' . number_format(floatval($profile_details['amount']) + floatval($profile_details['taxamt']), 2, '.', '')));
     $pdf->create_table($theader, $tdata, $twidth, 'L', 'L', $thfont, $tbfont);
     //add table to pdf document
     $pdf->set_field_title_font($pdf);
     $pdf->Write(14, 'Subscription Start Date: ');
     $pdf->set_field_value_font($pdf);
     $pdf->Write(14, $subscription_details['date_of_redemption']);
     $pdf->Ln(7);
     $pdf->set_field_title_font($pdf);
     $pdf->Write(14, 'Subscription Expiry Date: ');
     $pdf->set_field_value_font($pdf);
     $pdf->Write(14, $subscription_details['expiry_date']);
     return $pdf;
 }
 $resp = array();
 $resp['imgSize'] = sizeof($data->{'urls'});
 $startTime = microtime(true);
 $img = array();
 foreach ($data->{'urls'} as $pic_url) {
     $img[] = DownImage(urldecode($pic_url), iconv('utf-8', 'gbk', $data->{'title'}));
     @fwrite($logfile, floor(100 * sizeof($img) / sizeof($data->{'urls'}) * 0.95) . "|" . Date("Y-m-d h:i:sa") . "\n");
     /*log-文件下载进度1-95*/
     @fflush($logfile);
     //break;//单页测试
 }
 /*生成PDF*/
 $imgType = array('1' => 'GIF', '2' => 'JPG', '3' => 'PNG');
 require 'fpdf.php';
 $pdf = new FPDF();
 $pdf->SetTitle($rawdata->{'title'}, true);
 for ($i = 0; $i < sizeof($img); $i++) {
     list($width, $height, $type, $attr) = getimagesize($img[$i]);
     $pdf->AddPage($width > $height ? 'L' : 'P', [$width, $height]);
     $pdf->Image($img[$i], 0, 0, $width, $height, $imgType[$type]);
     @fwrite($logfile, floor(100 * ($i + 1) / sizeof($img) * 0.03) + 95 . "|" . Date("Y-m-d h:i:sa") . "\n");
     /*log-文件合并95-98*/
     @fflush($logfile);
 }
 //unlink(($data->{'title'}).'.pdf');
 $pdf->Output(iconv('utf-8', 'gbk', $data->{'title'}) . '.pdf', 'F');
 $resp['file'] = $data->{'title'} . '.pdf';
 //Todo:删掉目录和目录下文件
 for ($i = 0; $i < sizeof($img); $i++) {
     @unlink($img[$i]);
     @fwrite($logfile, floor(100 * ($i + 1) / sizeof($img) * 0.02) + 98 . "|" . Date("Y-m-d h:i:sa") . "\n");
<?php

session_start();
include '../librerias/fpdf/fpdf.php';
include '../../resources/orcl_conex.php';
include 'Models/class.Denuncia.php';
include 'Models/class.DenunciaDAO.php';
include '../mod_ciudadanos/Models/class_fisc_ciudadano.php';
include '../mod_ciudadanos/Models/class_fisc_ciudadanoDAO.php';
$pdf = new FPDF('P');
$pdf->AddPage();
$pdf->Image('../../public_html/imagenes/logoclaro.png', 40, 50, 120);
$pdf->SetTitle("Notificación al denunciante", true);
$pdf->Image('../../public_html/imagenes/logoivss.png', 20, 7, 13);
$pdf->SetFont('Arial', '', 6);
$pdf->Text(40, 10, utf8_decode('REPÚBLICA BOLIVARIANA DE VENEZUELA'));
$pdf->Text(40, 13, utf8_decode('MINISTERIO DEL PODER POPULAR PARA EL TRABAJO Y SEGURIDAD SOCIAL'));
$pdf->Text(40, 16, utf8_decode('INSTITUTO VENEZOLANO DE LOS SEGUROS SOCIALES'));
$pdf->Text(40, 19, utf8_decode('DIRECCIÓN GENERAL DE FISCALIZACIÓN'));
$pdf->SetXY(20, 26);
$pdf->SetFillColor(35, 65, 129);
$pdf->SetFont('Arial', 'B', 8);
$pdf->setTextColor(255, 255, 255);
$pdf->Cell(50, 6, utf8_decode('N° DE QUEJAS Y/O RECLAMOS'), 1, 0, 'C', TRUE);
$pdf->SetXY(20, 32);
$pdf->Cell(50, 6, '', 1, 0, 'C', FALSE);
$pdf->setTextColor(0, 0, 0);
$pdf->SetFont('Arial', 'B', 8);
$pdf->Text(60, 50, utf8_decode('COMPROBANTE DE RECEPCIÓN DE QUEJA Y/O RECLAMO'));
$pdf->SetXY(20, 52);
$pdf->SetFont('Arial', 'B', 8);
}
if ($_SESSION['status'] == "admin") {
    $query = "SELECT * FROM `abiturients` WHERE `ab_id` = '" . $id . "'";
    $sql = mysql_query($query) or die(mysql_error());
    if (mysql_num_rows($sql) == 1) {
        $row = mysql_fetch_assoc($sql);
    }
}
$query = "SELECT * FROM `users` WHERE `executive` = '+' LIMIT 1";
$sql = mysql_query($query) or die(mysql_error());
$row1 = mysql_fetch_assoc($sql);
$executive = $row1["user_surname"] . " " . substr($row1["user_name"], 0, 1) . ". " . substr($row1["user_patronymic"], 0, 1) . ".";
$pdf = new FPDF();
//set document properties
$pdf->SetAuthor('Alexandr Slovinskiy');
$pdf->SetTitle('Exam Card');
//set font for the entire document
$pdf->AddFont('Times', '', 'times.php');
$pdf->SetFont('Times', '');
$pdf->SetTextColor(0, 0, 0);
//set up a page
$pdf->AddPage('P');
$pdf->SetDisplayMode(real, 'default');
//display the title with a border around it
//Set x and y position for the main text, reduce font size and write content
$pdf->Image('img/form_1_04_1.jpg', 5, 5, 205);
if ($row['study_type'] == "Денна") {
    $pdf->Line(58, 53.5, 65, 53.5);
}
if ($row['study_type'] == "Заочна") {
    $pdf->Line(67, 53.5, 76, 53.5);
Exemplo n.º 15
0
 $titlefs = 18;
 /** settings for the assignment rows **/
 $datew = $catw = $scorew = $weightw = $avgw = 1.0;
 $assignw = 2.5;
 /** settings for the heading **/
 $headingh = ($numCats + 1) * $sh + $colheadingh;
 $headingw = 5.0;
 $summarycatw = 1.5;
 /** width of the categories in heading **/
 $summaryavgw = 1.0;
 /** width of the averages in heading **/
 /** @ 72dpi, 11 X 8.5 is (792 X 612) **/
 /** with a margin of 36 pts or 1/2 inch **/
 $pdf = new FPDF('P', 'in', 'Letter');
 $pdf->open();
 $pdf->SetTitle($pageTitle);
 /** Get the list of categories for this class **/
 /** NOW LOOP OVER THE ARRAY OF STUDENTS **/
 /** THE FOLLOWING SHOULD BE REPEATED FOR EACH STUDENT **/
 if (count($reports)) {
     foreach ($reports as $id => $report) {
         $teacherName = $report['classInfo']['first_name'] . " " . $report['classInfo']['last_name'];
         $rcv = 0;
         /** used for row shading **/
         $pdf->AddPage('P');
         $pdf->SetMargins($lm, $tm);
         //$pdf->SetTitle($className."_".$termName."_".$sname."_ProgressReport.pdf");
         /** START BUILDING THE PAGE **/
         /** First the heading **/
         $y_coord = $tm;
         $x_coord = $lm;
Exemplo n.º 16
0
 public function fee_week()
 {
     $date_from = $this->input->get("date_from");
     $date_to = $this->input->get("date_to");
     $event = $this->input->get("event");
     require_once "../assets/fpdf/fpdf.php";
     $pdf = new FPDF();
     $pdf->AliasNbPages();
     $pdf->AddPage('L', 'A4');
     $pdf->SetTitle("Fee Moderasi HM Sampoerna");
     $pdf->SetFont('Arial', 'B', 14);
     $pdf->Cell(0, 10, 'Report Fee Moderasi HM Sampoerna', 0, 0, 'C');
     $pdf->Ln(10);
     $this->_header($pdf);
     $pdf->SetFont('Arial', '', 8);
     $pdf->SetDrawColor(0, 0, 0);
     $pdf->SetTextColor(0, 0, 0);
     $result = $this->user_event_model->get_user_week()->result();
     $total_siang = 0;
     $total_siang_fee = 0;
     $total_malam = 0;
     $total_malam_fee = 0;
     $total_training = 0;
     $total_training_fee = 0;
     $i = 1;
     $j = 0;
     foreach ($result as $r) {
         $pdf->Cell(10, 7, $i++, 1, 0, 'C');
         $pdf->Cell(40, 7, $r->user, 1, 0, 'L');
         $from = date_create(format_ymd($date_from));
         $to = date_create(format_ymd($date_to));
         $j = 0;
         $jum_siang = 0;
         $jum_malam = 0;
         $jum_training = 0;
         while ($from <= $to) {
             $siang = $this->absent_model->check_exist($r->user_kode, $event, date_format($from, 'Y-m-d'), 'S');
             $pdf->Cell(6, 7, number_format($siang), 1, 0, 'C');
             $malam = $this->absent_model->check_exist($r->user_kode, $event, date_format($from, 'Y-m-d'), 'M');
             $pdf->Cell(6, 7, number_format($malam), 1, 0, 'C');
             $training = $this->absent_model->check_exist($r->user_kode, $event, date_format($from, 'Y-m-d'), 'T');
             $pdf->Cell(6, 7, number_format($training), 1, 0, 'C');
             $jum_siang += $siang;
             $jum_malam += $malam;
             $jum_training += $training;
             date_add($from, date_interval_create_from_date_string('1 days'));
             $j++;
         }
         $fee_siang = $this->price_model->get_price($event, 'S', $r->user_level);
         $fee_malam = $this->price_model->get_price($event, 'M', $r->user_level);
         $fee_training = $this->price_model->get_price($event, 'T', $r->user_level);
         $pdf->Cell(7, 7, number_format($jum_siang), 1, 0, 'C');
         $pdf->Cell(18, 7, number_format($jum_siang * $fee_siang), 1, 0, 'C');
         $pdf->Cell(7, 7, number_format($jum_malam), 1, 0, 'C');
         $pdf->Cell(18, 7, number_format($jum_malam * $fee_malam), 1, 0, 'C');
         $pdf->Cell(7, 7, number_format($jum_training), 1, 0, 'C');
         $pdf->Cell(18, 7, number_format($jum_training * $fee_training), 1, 0, 'C');
         $total = $jum_siang + $jum_malam + $jum_training;
         $pdf->Cell(7, 7, number_format($total), 1, 0, 'C');
         $pdf->Cell(0, 7, number_format($jum_siang * $fee_siang + $jum_malam * $fee_malam + $jum_training * $fee_training), 1, 0, 'C');
         $pdf->Ln(7);
         $total_siang += $jum_siang;
         $total_siang_fee += $jum_siang * $fee_siang;
         $total_malam += $jum_malam;
         $total_malam_fee += $jum_malam * $fee_malam;
         $total_training += $jum_training;
         $total_training_fee += $jum_training * $fee_training;
     }
     $pdf->SetFillColor(240, 240, 240);
     $pdf->SetFont('Arial', 'B', 8);
     $pdf->Cell(50 + 18 * $j, 7, 'Total : ', 1, 0, 'R', true);
     $pdf->Cell(7, 7, number_format($total_siang), 1, 0, 'C', true);
     $pdf->Cell(18, 7, number_format($total_siang_fee), 1, 0, 'C', true);
     $pdf->Cell(7, 7, number_format($total_malam), 1, 0, 'C', true);
     $pdf->Cell(18, 7, number_format($total_malam_fee), 1, 0, 'C', true);
     $pdf->Cell(7, 7, number_format($total_training), 1, 0, 'C', true);
     $pdf->Cell(18, 7, number_format($total_training_fee), 1, 0, 'C', true);
     $pdf->Cell(7, 7, number_format($total_siang + $total_malam + $total_training), 1, 0, 'C', true);
     $pdf->Cell(0, 7, number_format($total_siang_fee + $total_malam_fee + $total_training_fee), 1, 0, 'C', true);
     $this->_footer($pdf);
     $pdf->Output("Fee Moderasi HM Sampoerna", "I");
 }
Exemplo n.º 17
0
	{

		$gepiSchoolName=getSettingValue('gepiSchoolName');

	}

	// création du document
	$pdf->SetCreator($gepiSchoolName);
	// auteur du document
	$pdf->SetAuthor($gepiSchoolName);
	// mots clé
	$pdf->SetKeywords('');
	// sujet du document
	$pdf->SetSubject('Bilan journalier des absences');
	// titre du document
	$pdf->SetTitle('Bilan journalier des absences');
	// méthode d'affichage du document à son ouverture
	$pdf->SetDisplayMode('fullwidth', 'single');
	// compression du document
	$pdf->SetCompression(TRUE);
	// change automatiquement de page à 5mm du bas
	$pdf->SetAutoPageBreak(TRUE, 5);


/* **************************** */
/* début de la boucle des pages */

// comptage du nombre de page traité
$nb_page_traite = 0;

// initialiser la variable compteur de ligne passé pour le tableau
Exemplo n.º 18
0
// Author : Irvandy Goutama
// Email  : irvandygoutama@gmail.com
// Start  : 2 Juni 2009
session_start();
include_once "../dwo.lib.php";
include_once "../db.mysql.php";
include_once "../connectdb.php";
include_once "../parameter.php";
include_once "../cekparam.php";
include_once "../fpdf.php";
// *** Parameters ***
$TahunID = GetSetVar('TahunID');
$ProdiID = GetSetVar('ProdiID');
// *** Init PDF
$pdf = new FPDF();
$pdf->SetTitle("Daftar Mahasiswa Yang Tidak Bisa Ujian");
$pdf->SetAutoPageBreak(true, 5);
$lbr = 190;
$pdf->AddPage();
HeaderLogo("Daftar Mahasiswa Yang Tidak Memenuhi", $pdf, 'P', 'Syarat Mengikuti Ujian Akhir Semester(UAS)');
BuatIsinya($TahunID, $ProdiID, $pdf);
$pdf->Ln(8);
BuatIsinya2($TahunID, $ProdiID, $pdf);
$pdf->Output();
// *** FUnctions ***
function BuatIsinya($TahunID, $ProdiID, $p)
{
    $maxentryperpage = 45;
    BuatHeader($TahunID, 'Belum Administrasi', ceil($ttl / $maxentryperpage) + 1, $p);
    $whr_prodi = empty($ProdiID) ? '' : "and h.ProdiID = '{$ProdiID}' ";
    $whr_tahun = empty($TahunID) ? '' : "and h.TahunID = '{$TahunID}' ";
Exemplo n.º 19
0
<?php

session_start();
if ($_SESSION['access'] == 1) {
    require '../includes/fpdf.php';
    $pdf = new FPDF();
    $pdf->SetAuthor('ISP');
    $pdf->SetTitle('Memoloi Projet');
    $pdf->SetFont('Helvetica', 'B', 20);
    $pdf->SetTextColor(50, 60, 100);
    foreach ($_SESSION['images'] as $j) {
        $pdf->AddPage();
        $pdf->Image("{$j}", 0, 0, 210, 297, 'JPG');
        $pdf->Ln(2.0);
    }
    $pdf->Output();
    unset($_SESSION['images']);
} else {
    header('Location: index.php?login=error');
}
?>

Exemplo n.º 20
0
include_once "../cekparam.php";
include_once "../fpdf.php";
// *** Parameters ***
$gel = $_REQUEST['gel'];
$gels = GetFields('pmbperiod', "KodeID='" . KodeID . "' and PMBPeriodID", $gel, "*");
$tahun = GetaField('pmbperiod', "PMBPeriodID='{$gel}' and KodeID", KodeID, 'Tahun');
$prevtahun = $tahun - 1;
$nexttahun = $tahun + 1;
$lbr = 190;
// *** Cetak ***
$s = "select DISTINCT(b.PMBID) \r\n\t  from statusaplikanmhsw sam left outer join aplikan a on sam.AplikanID=a.AplikanID\r\n\t\t\t\t left outer join pmb b on a.PMBID=b.PMBID \r\n\t\t\t\t left outer join pmbperiod pp on b.PMBPeriodID=pp.PMBPeriodID\r\n\t  where b.KodeID = '" . KodeID . "'\r\n\t\t\tand a.StatusAplikanID='REG'\r\n\t\t\tand pp.Tahun='{$tahun}'";
$r = _query($s);
$n = _num_rows($r);
if ($n > 0) {
    $pdf = new FPDF('L', 'mm', 'A4');
    $pdf->SetTitle("Data Registrasi");
    $limitperpage = 54;
    $currentpage = 0;
    while ($currentpage * $limitperpage < $n) {
        $pdf->AddPage('L');
        BuatHeaderLap($gel, $gels, $tahun, $nexttahun, $pdf);
        TampilkanIsinya($currentpage, $limitperpage, $gel, $gels, $tahun, $nexttahun, $pdf);
        $currentpage++;
    }
    $pdf->Output();
} else {
    echo "<div align=center><font size=8><b>Tidak ada data yang dapat dicetak</b></font></div>";
}
// *** Functions ***
function TampilkanHeader($p)
{
<?php

// advancedII/pdf/teste.php
require_once 'meupdf.php';
$pdf = new FPDF('P', 'cm', 'A4');
$pdf->SetAuthor('GerenciaNet');
$pdf->SetTitle('Meu Primeiro Documento PDF');
$pdf->SetMargins(2, 2, 1);
$pdf->AliasNbPage('{nb}');
$pdf->AddPage();
// tentar adicionar um footer, adicionar a página, e tentar adicionar um header na nova página
$produtos = array(array('nome' => 'Lixa de unha reutilizável', 'marca' => 'Treco', 'preco' => 10.5), array('nome' => 'Escova de Dentes Multiuso', 'marca' => 'OralBJ', 'preco' => 12), array('nome' => 'Refrigerante de Cachaça', 'marca' => 'Companhia das Índias Antigas', 'preco' => 4.5));
$pdf->SetFont('Arial', 'B', 12);
$pdf->Cell(8, 1, 'Nome do Produto', 1, 0, 'C');
$pdf->Cell(5, 1, 'Marca', 1, 0, 'C');
$pdf->Cell(5, 1, 'Preço', 1, 0, 'C');
$pdf->Ln(1);
$pdf->SetFont('Arial', '', 11);
foreach ($produtos as $produto) {
    $pdf->Cell(8, 1, $produto['nome'], 1, 0, 'C');
    $pdf->Cell(5, 1, $produto['marca'], 1, 0, 'C');
    $pdf->Cell(5, 1, $produto['preco'], 1, 0, 'C');
    $pdf->Ln(1);
}
$pdf->Output('first.pdf', 'I');
Exemplo n.º 22
0
// Start  : 04 Juni 2009
session_start();
include_once "../dwo.lib.php";
include_once "../db.mysql.php";
include_once "../connectdb.php";
include_once "../parameter.php";
include_once "../cekparam.php";
include_once "../fpdf.php";
// *** Parameters ***
$prodi = $_REQUEST['prodi'];
$program = $_REQUEST['program'];
$srcmhswkey = $_REQUEST['srcmhswkey'];
$srcmhswval = $_REQUEST['srcmhswval'];
// *** Main
$pdf = new FPDF('P');
$pdf->SetTitle("Data Detail Mahasiswa");
$pdf->SetAutoPageBreak(true, 5);
$pdf->SetFillColor(200, 200, 200);
$pdf->AddPage('P');
HeaderLogo("Data Detail Mahasiswa", $pdf, 'P');
Isinya($prodi, $program, $srcmhswkey, $srcmhswval, $pdf);
$pdf->Output();
// *** Functions ***
function Isinya($prodi, $program, $srcmhswkey, $srcmhswval, $p)
{
    $lbr = 190;
    $t = 6;
    // BuatHeader
    $p->SetFont('Helvetica', 'B', 10);
    $p->Cell(10, $t, 'No.', 1, 0, 'R');
    $p->Cell(23, $t, 'NIM', 1, 0, 'L');
Exemplo n.º 23
0
if (isset($_COOKIE['lname'])) {
    $lname = $_COOKIE['lname'];
} else {
    echo "<script type='text/javascript'>alert('lname NAME NOT PRESENT IN DATABASE');</script>";
}
if (isset($_COOKIE['phone'])) {
    $phone = $_COOKIE['phone'];
} else {
    echo "<script type='text/javascript'>alert('phone NAME NOT PRESENT IN DATABASE');</script>";
}
if (isset($_COOKIE['address'])) {
    $address = $_COOKIE['address'];
} else {
    echo "<script type='text/javascript'>alert('address NAME NOT PRESENT IN DATABASE');</script>";
}
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetAuthor('Lana Kovacevic');
$pdf->SetTitle('FPDF tutorial');
$pdf->SetFont('Arial', "B", 20);
$pdf->Cell(0, 10, "Thanks {$name} for shopping with us", 0, 1, "C");
$pdf->Cell(0, 10, "Fullname : {$name} {$lname} ", 0, 1, "l");
$pdf->Cell(0, 10, "EmailID  : {$email} ", 0, 1, "l");
$pdf->Cell(0, 10, "Mobile No  : {$phone} ", 0, 1, "l");
$pdf->Cell(0, 10, "Address  : {$address} ", 0, 1, "l");
//		$pdf->Cell(100,10,"sada",1,0,"R");
$pdf->output();
/*			require("fpdf/fpdf.php");

?>
*/
Exemplo n.º 24
0
// Start  : 22 Agustus 2008
session_start();
include_once "../dwo.lib.php";
include_once "../db.mysql.php";
include_once "../connectdb.php";
include_once "../parameter.php";
include_once "../cekparam.php";
include_once "../fpdf.php";
// *** Parameters ***
$_jdwlProdi = GetSetVar('_jdwlProdi');
$_jdwlProg = GetSetVar('_jdwlProg');
$_jdwlTahun = GetSetVar('_jdwlTahun');
$id = GetSetVar('id');
// Init
$pdf = new FPDF('P', 'mm', 'A4');
$pdf->SetTitle("Daftar Nomer Kursi UAS - {$TahunID}");
$pdf->SetAutoPageBreak(true, 4);
// *** Main ***
if ($id == 0) {
    // Maka cetak semua
    $whr_prog = empty($_jdwlProg) ? "" : "and ProgramID = '{$_jdwlProg}'";
    $s = "select JadwalID\r\n    from jadwal\r\n    where KodeID = '" . KodeID . "'\r\n\t  and TahunID = '{$_jdwlTahun}'\r\n      and ProdiID = '{$_jdwlProdi}'\r\n\t  {$whr_prog}\r\n    order by HariID, JamMulai";
    $r = _query($s);
    while ($w = _fetch_array($r)) {
        CetakKursi($w['JadwalID'], $pdf);
    }
} else {
    CetakKursi($id, $pdf);
}
$pdf->Output();
// *** Functions ***
Exemplo n.º 25
0
if ($_POST["month"] != '') {
    $_SESSION['month'] = $_POST["month"];
}
if ($_POST["year"] != '') {
    $_SESSION['year'] = $_POST["year"];
}
if ($_POST["search_study_type"] == 'Денна') {
    $study_type = "stc";
}
if ($_POST["search_study_type"] == 'Заочна') {
    $study_type = "zao";
}
$pdf = new FPDF();
//set document properties
$pdf->SetAuthor('Alexandr Slovinskiy');
$pdf->SetTitle('Order Annex');
//set font for the entire document
$pdf->AddFont('Times', '', 'times.php');
$pdf->SetFont('Times', '');
$pdf->SetTextColor(0, 0, 0);
//set up a page
$pdf->AddPage('L');
$pdf->SetDisplayMode(real, 'default');
//display the title with a border around it
//Set x and y position for the main text, reduce font size and write content
$pdf->Image('img/form_1-12-2.jpg', 10, 15, 280);
$pdf->SetFontSize(9);
$pdf->SetXY(261, 29.5);
$pdf->Write(5, $_POST["order_number"]);
$pdf->SetXY(197.5, 37);
$pdf->Write(5, $_POST["day"]);
Exemplo n.º 26
0
// Author : Emanuel Setio Dewo
// Email  : setio.dewo@gmail.com
// Start  : 23 September 2008
session_start();
include_once "../dwo.lib.php";
include_once "../db.mysql.php";
include_once "../connectdb.php";
include_once "../parameter.php";
include_once "../cekparam.php";
include_once "../header_pdf.php";
// *** Parameters ***
$TahunID = GetSetVar('TahunID');
// *** Init PDF
$pdf = new FPDF('L', 'mm', 'A5');
$pdf->SetTitle("Daftar Wisudawan - {$TahunID}");
$pdf->AddPage('P');
$lbr = 70;
//BuatHeadernya($pdf);
BuatIsinya($pdf);
$pdf->Output();
// *** Functions ***
function BuatHeadernya($p)
{
    global $lbr;
    $gel = GetFields('wisuda', "KodeID='" . KodeID . "' and TahunID", $_SESSION['TahunID'], "*, date_format(TglWisuda, '%d-%m-%Y') as _TglWisuda");
    $t = 6;
    $p->SetFont('Helvetica', 'B', 14);
    $p->Cell($lbr, $t, "Daftar Wisudawan " . $gel['Nama'], 0, 1, 'C');
    $p->SetFont('Helvetica', '', 12);
    $p->Cell($lbr, $t, "Tanggal Wisuda: " . $gel['_TglWisuda'], 0, 1, 'C');
Exemplo n.º 27
0
// Author : Irvandy Goutama
// Email  : irvandygoutama@gmail.com
// Start  : 2 Juni 2009
session_start();
include_once "../dwo.lib.php";
include_once "../db.mysql.php";
include_once "../connectdb.php";
include_once "../parameter.php";
include_once "../cekparam.php";
include_once "../fpdf.php";
// *** Parameters ***
$TahunID = GetSetVar('TahunID');
$ProdiID = GetSetVar('ProdiID');
// *** Init PDF
$pdf = new FPDF();
$pdf->SetTitle("Daftar Mahasiswa Bedasarkan Agama");
$pdf->SetAutoPageBreak(true, 5);
$lbr = 190;
BuatIsinya($TahunID, $ProdiID, $pdf);
$pdf->Output();
// *** FUnctions ***
function BuatIsinya($TahunID, $ProdiID, $p)
{
    $maxentryperpage = 45;
    $whr_prodi = empty($ProdiID) ? '' : "and h.ProdiID = '{$ProdiID}' ";
    $whr_tahun = empty($TahunID) ? '' : "and h.TahunID = '{$TahunID}' ";
    $s = "select h.*,\r\n      m.Nama as NamaMhsw, m.Agama,\r\n      d.Nama as NamaPA, d.Gelar\r\n    from khs h\r\n      left outer join mhsw m on m.MhswID = h.MhswID and m.KodeID = '" . KodeID . "'\r\n      left outer join dosen d on d.Login = m.PenasehatAkademik and d.KodeID = '" . KodeID . "'\r\n    where h.KodeID = '" . KodeID . "'\r\n      and h.TahunID = '{$TahunID}'\r\n      and h.SKS > 0\r\n      {$whr_prodi}\r\n\t  {$whr_tahun}\r\n    order by m.Agama, h.MhswID";
    $r = _query($s);
    $n = 0;
    $t = 5;
    $_agama = 'laksdjfalksdfh';
Exemplo n.º 28
0
$stmt->execute();
//$sql="INSERT INTO `tempinc` SELECT * FROM `NC` WHERE PAR='$par'";
//$stmt=$cnx->prepare($sql);
//$stmt->execute();
//$stmt=$cnx->prepare($sql);
//$stmt->execute();
//$sql="SELECT * FROM INC FOR PAR='$par'";
//$stmt=$cnx->prepare($sql);
//$stmt->execute();
//$res = $stmt->fetch(PDO::FETCH_OBJ);
require 'fpdf.php';
//create a FPDF object
$pdf = new FPDF();
//set document properties
$pdf->SetAuthor('CORCIOVA ENACHI');
$pdf->SetTitle('FISA PARTIDEI');
//set font for the entire document
$pdf->SetFont('Helvetica', 'B', 10);
//$pdf->SetTextColor(50,60,100);
//set up a page
$pdf->AddPage('P');
//$pdf->SetDisplayMode(real,'default');
//display the title with a border around it
//$pdf->SetXY(50,20);
//$pdf->SetDrawColor(50,60,100);
$pdf->Write(7, 'CASA DE AJUTOR RECIPROC A PENSIONARILOR DIN FOCSANI SI JUDETUL VRANCEA');
//$pdf->Ln(2);
$pdf->SetFont('Helvetica', 'B', 12);
$pdf->SetXY(10, 15);
//$pdf->Ln(3);
$s = " ";
Exemplo n.º 29
0
// Author : Irvandy Goutama
// Email  : irvandygoutama@gmail.com
// Start  : 2 Juni 2009
session_start();
include_once "../dwo.lib.php";
include_once "../db.mysql.php";
include_once "../connectdb.php";
include_once "../parameter.php";
include_once "../cekparam.php";
include_once "../fpdf.php";
// *** Parameters ***
$TahunID = GetSetVar('TahunID');
$ProdiID = GetSetVar('ProdiID');
// *** Init PDF
$pdf = new FPDF();
$pdf->SetTitle("Daftar Mahasiswa Berdasarkan Angkatan");
$pdf->SetAutoPageBreak(true, 5);
$lbr = 190;
BuatIsinya($TahunID, $ProdiID, $pdf);
$pdf->Output();
// *** FUnctions ***
function BuatIsinya($TahunID, $ProdiID, $p)
{
    $maxentryperpage = 45;
    $whr_prodi = empty($ProdiID) ? '' : "and h.ProdiID = '{$ProdiID}' ";
    $whr_tahun = empty($TahunID) ? '' : "and h.TahunID = '{$TahunID}' ";
    $s = "select h.*,\r\n      m.Nama as NamaMhsw, m.TahunID as Angkatan,  \r\n      d.Nama as NamaPA, d.Gelar\r\n    from khs h\r\n      left outer join mhsw m on m.MhswID = h.MhswID and m.KodeID = '" . KodeID . "'\r\n      left outer join dosen d on d.Login = m.PenasehatAkademik and d.KodeID = '" . KodeID . "'\r\n    where h.KodeID = '" . KodeID . "'\r\n      and h.TahunID = '{$TahunID}'\r\n      and h.SKS > 0\r\n      {$whr_prodi}\r\n\t  {$whr_tahun}\r\n    order by m.TahunID, h.MhswID";
    $r = _query($s);
    $n = 0;
    $t = 5;
    $_thn = 'laksdjfalksdfh';
Exemplo n.º 30
0
// Start  : 04 Juni 2009
session_start();
include_once "../dwo.lib.php";
include_once "../db.mysql.php";
include_once "../connectdb.php";
include_once "../parameter.php";
include_once "../cekparam.php";
include_once "../fpdf.php";
// *** Parameters ***
$kurid = $_REQUEST['kurid'];
if (empty($kurid)) {
    die(ErrorMsg("Kurikulum Belum Diset", "Tidak dapat mencetak karena kurikulum belum ditentukan atau tidak ditemukan."));
}
// *** Main
$pdf = new FPDF('P');
$pdf->SetTitle("Daftar Matakuliah Setara");
$pdf->SetAutoPageBreak(true, 5);
$pdf->SetFillColor(200, 200, 200);
$pdf->AddPage('P');
HeaderLogo("Daftar Matakuliah Setara", $pdf, 'P');
CetakMKSetara($kurid, $pdf);
$pdf->Output();
// *** Functions ***
function CetakMKSetara($kurid, $p)
{
    $lbr = 190;
    $t = 6;
    $p->SetFont('Helvetica', 'B', 11);
    $p->Cell(10, $t, 'No.', 1, 0, 'R');
    $p->Cell(30, $t, 'MKKode', 1, 0, 'L');
    $p->Cell(100, $t, 'Nama Mata Kuliah', 1, 0, 'L');