Exemplo n.º 1
0
    // memisahkan format tanggal menggunakan substring
    $result = $tgl . "/" . $bulan . "/" . $tahun;
    return $result;
}
//get query dan variabel
$mulai = $_GET['mulai'];
$akhir = $_GET['akhir'];
$gudang = $_GET['gudang'];
$decode_cr = $_GET['cr_txt'];
$getquery = str_replace("+", " ", $_GET[query]);
$getquerykorporate = str_replace("+", " ", $_GET[query_korporate]);
//instansiasi fpdf
$pdf = new PDF_MC_Table('L', 'cm', 'A4');
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetMargins(0.7, 0.7, 0.7, 0.7);
#tampilkan judul laporan
$pdf->SetFont('Arial', 'B', '16');
$pdf->Cell(0, 0, "CIPAGANTI RENTAL CAR & TRAVEL", '0', 1, 'C');
$pdf->Cell(0, 2, "HASIL SEWA KENDARAAN", '0', 1, 'C');
$pdf->SetFont('Arial', 'B', '12');
$pdf->Cell(3, 3, "CABANG : " . $gudang, 0, 0, 'L');
$pdf->Cell(25.2, 3, "PERIODE : " . DateToIndo($mulai) . " - " . DateToIndo($akhir), 0, 0, 'R');
//membuat kop tabel
$y = $pdf->GetY();
$pdf->SetY($y + 2.5);
$pdf->SetFont('Arial', 'B', 11);
$pdf->SetWidths(array(2.3, 2.5, 2.5, 2.5, 3.7, 2.2, 2.2, 2.6, 2.6, 2.6, 2.6));
$pdf->SetHeight(0.1);
$pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
$pdf->Row(array("CSO", "Berangkat", "No. Order", "No. Kendaraan", "Merk Kendaraan", "Periode Awal", "Periode Akhir", "Customer", "T.Sewa", "T.Bayar", "Piutang"));
Exemplo n.º 2
0
<?php

define('FPDF_FONTPATH', 'fpdf/font/');
require 'mc_table.php';
$pdf = new PDF_MC_Table('P', 'cm', "Legal");
$pdf->Open();
$pdf->AddPage();
$pdf->AliasNbPages();
$pdf->SetMargins(1, 1, 1);
$pdf->SetFont('times', 'B', 12);
$pdf->Cell(0, 0.9, 'Laporan Barang', 0, 0, 'C');
$pdf->Ln();
$tgl = date('Y-m-d');
$pdf->SetFont('times', 'B', 8);
$pdf->SetFont('times', 'B', 10);
$pdf->SetWidths(array(1, 8, 1.8, 2.1));
$pdf->SetHeight(0.1);
$pdf->Row(array("NO", "NAMA", "SATUAN", "STOK"));
$pdf->SetFont('times', '', 10);
$pdf->Row(array("1", "Buku Tulis Matematika Kualitas ABCD Kiki 80 gram 1 Lusin ", "Lusin", "100"));
$pdf->Output();
?>

Exemplo n.º 3
0
<?php

require '../../bootstrap.php';
// VARIABLES DEL FORMULARIO
$unidad = $_POST['unidad'];
require '../../pdf/mc_table.php';
$pdf = new PDF_MC_Table();
$pdf->Open();
$pdf->SetMargins(11, 10, 11);
$pdf->SetDisplayMode('fullpage');
// Cargamos las fuentes corporativas
$pdf->AddFont('NewsGotT', '', 'NewsGotT.php');
$pdf->AddFont('NewsGotT', 'B', 'NewsGotTb.php');
// En el caso de haber seleccionado una unidad, se muestra el listado de alumnos de dicha unidad,
// en otro caso mostramos el listado de faltas de todas las unidades.
$query = "SELECT DISTINCT unidad FROM FALUMNOS where unidad not like '' ";
if ($unidad) {
    $query .= " and unidad='{$unidad}'";
}
$query .= " order by unidad";
// echo $query;
$unidades = mysqli_query($db_con, $query);
while ($unidad = mysqli_fetch_array($unidades)) {
    $unidad = $unidad[0];
    $pdf->AddPage('L', 'A4');
    // CABECERA DEL DOCUMENTO
    // Obtenemos la fecha inicial y final de la semana en curso
    list($anio, $mes, $dia, $semana, $sdia) = explode(':', date('Y:m:d:W:w'));
    $inicio = strtotime("{$anio}-{$mes}-{$dia} 12:00am");
    $inicio += (1 - $sdia) * 86400;
    $fin = $inicio + 6 * 86400;
if ($conn) {
    $open = mysql_select_db($dbnm);
    if (!$open) {
        die("Database tidak dapat dibuka karena " . mysql_error());
    }
} else {
    die("Server MySQL tidak terhubung karena " . mysql_error());
}
//akhir koneksi
//get query dan variabel
$area = $_GET['area'];
//instansiasi fpdf
$pdf = new PDF_MC_Table('L', 'cm', 'Legal');
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetMargins(0.25, 1, 0.7);
#tampilkan judul laporan
$pdf->SetFont('Arial', 'B', '16');
$pdf->Cell(0, 0, "CIPAGANTI RENTAL CAR & TRAVEL", 0, 1, 'C');
$pdf->Cell(34.5, 2, "STOK KENDARAAN CABANG", 0, 1, 'C');
$pdf->SetFont('Arial', 'B', '12');
$pdf->SetXY(0.8, 3);
$sql = "SELECT area FROM gl_area WHERE id = '{$area}' ";
$cekdata = mysql_query($sql) or die(mysql_error());
$row_data = mysql_fetch_array($cekdata);
$pdf->Cell(8, 3, "Area : " . $row_data['area'], 0, 0, 'L');
//membuat kop tabel
list($namaarea) = mysql_fetch_row(mysql_query("select area from gl_area where id='{$area}'"));
$pdf->SetFont('Arial', 'B', 11);
$pdf->SetXY(0.25, 5);
$pdf->Cell(1, 2.3, "No", 1, 0, 'C');
Exemplo n.º 5
0
<?php

ini_set("memory_limit", "1024M");
require '../../bootstrap.php';
// VARIABLES DEL FORMULARIO
$curso = $_POST['curso'];
require '../../pdf/mc_table.php';
$pdf = new PDF_MC_Table();
$pdf->Open();
$pdf->SetMargins(13, 10, 13);
$pdf->SetDisplayMode('fullpage');
// Cargamos las fuentes corporativas
$pdf->AddFont('NewsGotT', '', 'NewsGotT.php');
$pdf->AddFont('NewsGotT', 'B', 'NewsGotTb.php');
// En el caso de haber seleccionado una unidad, se muestra el listado de alumnos de dicha unidad,
// en otro caso mostramos el listado de faltas de todas las unidades.
$query = "SELECT DISTINCT unidad FROM FALUMNOS";
if ($curso) {
    $query .= " WHERE unidad='{$curso}'";
}
$unidades = mysqli_query($db_con, $query);
while ($unidad = mysqli_fetch_array($unidades)) {
    $grupo = $unidad[0];
    $pdf->AddPage('P', 'A4');
    // CABECERA DEL DOCUMENTO
    $pdf->SetFont('NewsGotT', 'B', 12);
    $pdf->Cell(170, 5, "ALUMNOS DEL GRUPO {$grupo}", 0, 1, 'C');
    $pdf->Ln(5);
    // Consultamos los alumnos del grupo seleccionado
    $result = mysqli_query($db_con, "SELECT claveal, apellidos, nombre FROM FALUMNOS WHERE unidad='{$grupo}'");
    $i = 1;
Exemplo n.º 6
0
session_start();
function sav2_convert($val)
{
    return iconv('UTF-8', 'windows-1251', $val);
}
$month_rus = array("января", "февраля", "марта", "апреля", "мая", "июня", "июля", "августа", "сентября", "октября", "ноября", "декабря");
define('FPDF_FONTPATH', './font/');
require './mc_table/mc_table.php';
if (isset($_POST['jsonstring'])) {
    $_SESSION['applydata'] = json_decode($_POST['jsonstring']);
}
if (isset($_GET['getpdf'])) {
    $applyData = $_SESSION['applydata'];
    $pdf = new PDF_MC_Table('P');
    $pdf->SetMargins(25, 10, 10);
    $pdf->AddFont('TimesNewRomanPSMT', '', 'times.php');
    $pdf->AddPage();
    $pdf->SetFont('TimesNewRomanPSMT', '', 12);
    $pdf->SetX(110);
    $pdf->MultiCell(88, 5, sav2_convert("Государственное бюджетное учреждение \n Республики Коми \"Центр по предоставлению \n государственных услуг в сфере \n социальной защиты населения "), 0, 'R');
    $pdf->SetX(110);
    $pdf->SetTextColor(0, 0, 255);
    $pdf->MultiCell(88, 6, sav2_convert($applyData->{'org-town'} . "\""), 'B', 'R');
    $pdf->SetTextColor(0, 0, 0);
    $pdf->Ln();
    $pdf->MultiCell($width, 5, sav2_convert("ЗАЯВЛЕНИЕ \n о признании семьи или одиноко проживающего гражданина \n малоимущими и назначении государственной социальной помощи"), 0, 'C');
    $pdf->Ln();
    $pdf->Cell(6, 5, sav2_convert('от'), 0);
    $pdf->SetTextColor(0, 0, 255);
    $pdf->MultiCell($width, 5, sav2_convert($applyData->{'customer-fio'}), 'B', 'C');
<?php

require '../mc_table.php';
//require_once("../fpdf/fpdf.php");
require_once 'jpgraph-3.5.0b1/src/jpgraph.php';
require_once 'jpgraph-3.5.0b1/src/jpgraph_pie.php';
require_once "jpgraph-3.5.0b1/src/jpgraph_pie3d.php";
require_once '../db.php';
require_once '../conteo.php';
date_default_timezone_set('America/Caracas');
$pdf = new PDF_MC_Table('P', 'mm', 'Letter');
$pdf->AddPage();
$pdf->SetMargins(20, 20);
$db = new PgDB();
//QUERY PARA LOS ESTUDIANTES DEL PERIODO ACTIVO
/*$query = "SELECT nombre, apellido, cedula, m01_registrada ::timestamp::date, m02_aceptada ::timestamp::date, m03_numero_asignado ::timestamp::date, m05_entrego_copia ::timestamp::date,
            m06_entrego_borrador ::timestamp::date, m07_retiro_borrador ::timestamp::date,  m08_entrega_final ::timestamp::date, m09_carga_nota ::timestamp::date, aprobada
            FROM usuario INNER JOIN pasantia ON usuario.id = pasantia.usuario_id AND usuario.tipo = 'estudiante' INNER JOIN periodo ON periodo.id = pasantia.periodo_id AND periodo.activo = TRUE";


$reco = pg_query($query);
$row = pg_fetch_array($reco);
*/
//QUERY PARA EL PERIDO ACTIVO
$queryPer = "SELECT tipo, anio FROM periodo WHERE activo = TRUE";
$recoPer = pg_query($queryPer);
$rowPer = pg_fetch_array($recoPer);
$pdf->SetFont('Arial', 'B', 12);
$pdf->MultiCell(0, 5, utf8_decode("\nRepública Bolivariana de Venezuela\nUniversidad del Zulia\nFacultad Experimental de Ciencias\nDivisión de Programas Especiales\nSistema de Pasantías\n"), 0, "C", 0);
$pdf->MultiCell(165, 5, utf8_decode("\n\nReporte General"), 0, "C", 0);
$pdf->MultiCell(165, 5, utf8_decode("\n{$rowPer['tipo']} - {$rowPer['anio']}"), 0, "C", 0);
Exemplo n.º 8
0
	NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
	SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

	No technical support is available for any of this source code. In general,
	you must modify and test this code before incorporating it into your programs.

	Warning: Some code contains mistakes or deliberately incorrect coding for the
	purpose of serving as an example for the book. Please read the book carefully
	to determine which code is suitable for reuse in your own applications.

	Copyright 2013 Marc J. Rochkind. All rights reserved. May be copied and used
	under the BSD-type license at http://basepath.com/aup/copyright.htm.
*/
require_once 'lib/fpdf17/fpdf.php';
require_once 'lib/fpdf-plus/mc_table.php';
$in = fopen('data/cwa_panels.csv', 'r');
$pdf = new PDF_MC_Table('L', 'pt', array(300, 500));
$pdf->SetFont('Helvetica', '', 7);
$pdf->SetLineWidth(0.1);
$pdf->SetMargins(30, 20);
$pdf->SetAutoPageBreak(true, 20);
$pdf->SetHorizontalPadding(2);
$pdf->SetVerticalPadding(3);
$pdf->SetStyles(array('', 'B', 'B', '', '', 'I'));
$pdf->AddPage();
$pdf->SetWidths(array(70, 50, 50, 70, 40, 140));
$pdf->SetAligns(array('R', 'C', 'C', 'C', 'C', 'L'));
while ($row = fgetcsv($in)) {
    $pdf->RowX($row);
}
$pdf->Output();
        $r["m08_entrega_final"] = "---";
    }
    if ($r["m09_carga_nota"] != null) {
        if ($r["aprobada"] == "t") {
            $r["m09_carga_nota"] = "Aprobada";
        } else {
            $r["m09_carga_nota"] = "Reprobada";
        }
    } else {
        $r["m09_carga_nota"] = "---";
    }
    return $r;
}
$pdf = new PDF_MC_Table('L', 'mm', 'Letter');
$pdf->AddPage();
$pdf->SetMargins(10, 10);
$db = new PgDB();
//QUERY PARA LOS ESTUDIANTES DEL PERIODO ACTIVO
$query = "SELECT periodo.tipo, periodo.anio, nombre, apellido, cedula, aprobada, m01_registrada ::timestamp::date, m02_aceptada ::timestamp::date, m03_numero_asignado ::timestamp::date,\nm04_sellada::timestamp::date, m05_entrego_copia ::timestamp::date, m06_entrego_borrador ::timestamp::date, m07_retiro_borrador ::timestamp::date,\nm08_entrega_final ::timestamp::date, m09_carga_nota ::timestamp::date, aprobada\nFROM usuario INNER JOIN pasantia ON usuario.id = pasantia.usuario_id AND usuario.tipo = 'estudiante' INNER JOIN periodo ON periodo.id = pasantia.periodo_id AND periodo.activo = TRUE ORDER BY cedula ";
//QUERY PARA EL PERIDO ACTIVO
$queryPer = "SELECT tipo, anio FROM periodo WHERE activo = TRUE";
$recoPer = pg_query($queryPer);
$rowPer = pg_fetch_array($recoPer);
$pdf->SetFont('Arial', 'B', 12);
$pdf->MultiCell(0, 5, utf8_decode("\nRepública Bolivariana de Venezuela\nUniversidad del Zulia\nFacultad Experimental de Ciencias\nDivisión de Programas Especiales\nSistema de Pasantías\n"), 0, "C", 0);
$pdf->MultiCell(258, 5, utf8_decode("\nReporte de Pasantes Registrados"), 0, "C", 0);
$pdf->MultiCell(258, 5, utf8_decode("\n{$rowPer['tipo']} - {$rowPer['anio']}"), 0, "C", 0);
$pdf->Ln();
$pdf->Image("logotipo.jpg", 20, 12, -280);
$pdf->SetFont('Arial', 'B', '10');
$pdf->SetWidths(array(25, 20, 22, 22, 25, 25, 25, 25, 25, 25, 25));