include "../config/config.php"; include "../pdf/fpdf/fpdf.php"; //include "../barcode/barcode.php"; //include "../barcode/bars.php"; $pdf = new FPDF(); $pdf->Open(); $pdf->addPage(); $pdf->setAutoPageBreak(true); $pdf->setFont('Arial', '', 12); $pdf->text(10, 25, 'Tes User DB'); $pdf->Line(10, 31, 198, 31); $yi = 50; $ya = 44; $pdf->setFont('Arial', '', 9); $pdf->setFillColor(222, 222, 222); $pdf->setXY(10, $ya); $pdf->CELL(6, 6, 'ID', 1, 0, 'C', 1); $pdf->CELL(40, 6, 'Username', 1, 0, 'C', 1); $pdf->CELL(50, 6, 'Password', 1, 0, 'C', 1); $ya = $yi + $row; $sql = "SELECT id, password, username FROM user"; $result = $conn->query($sql); $i = 1; $no = 1; $max = 31; //$row = 6; if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $pdf->setXY(10, $ya); $pdf->setFont('arial', '', 9);
$pdf->Cell(40, 30, 'Report date: ' . $date . ' REPORT BY: ' . $USER); $pdf->SetDrawColor(0, 0, 0); //black //table header $pdf->SetFillColor(102, 51, 0); $pdf->SetTextColor(252, 252, 252); $pdf->setFont("Arial", "B", "11"); $pdf->setXY(10, 40); $pdf->Cell(22, 10, "TRANS ID:", 1, 0, "L", 1); // my field headers $pdf->Cell(25, 10, "MEMBER #:", 1, 0, "L", 1); $pdf->Cell(55, 10, "FULL NAMES", 1, 0, "L", 1); $pdf->Cell(20, 10, "REF NO:", 1, 0, "L", 1); $pdf->Cell(30, 10, "TRANS DATE", 1, 0, "L", 1); $pdf->Cell(30, 10, "FUND NAME", 1, 0, "L", 1); $pdf->Cell(30, 10, "REASON", 1, 0, "L", 1); $pdf->Cell(25, 10, "AMOUNT", 1, 0, "L", 1); $y = 50; $x = 10; $pdf->setXY($x, $y); $pdf->setFont("Arial", "", "8"); $pdf->setFillColor(255, 204, 229); //***************************************************************************************************************************************************************************************************************************************************** if ($datefrom == NULL || $dateto == NULL) { $datey = date('d/m/Y'); $query_result = "SELECT TRANS_AMOUNT.TRANS_ID,TRANS_AMOUNT.TRANS_TYPE, TO_CHAR(TRANS_AMOUNT.TRANS_DATE, 'DD.MM.YYYY:HH24:MI:SS'), TRANS_AMOUNT.MEMBER_NO, TRANS_AMOUNT.DOC_NO, TRANS_AMOUNT.FULL_NAME, TRANS_AMOUNT.PORTFOLIO, TRANS_AMOUNT.CANCELREASON, TRANS_AMOUNT.AMOUNT FROM TRANS INNER JOIN TRANS_AMOUNT ON TRANS_AMOUNT.TRANS_ID = TRANS.RECONCILED WHERE TRUNC(trans_amount.trans_date)=TO_DATE('{$datey}','DD/MM/YYYY:HH24:MI:SS') and trans_amount.bnkcode='" . $_SESSION['Branchcode'] . "' AND TRANS_AMOUNT.RECONCILED = 0 AND TRANS.CONFIRMED = 1 AND TRANS.REVERSED = 1 "; } else { $query_result = "SELECT TRANS_AMOUNT.TRANS_ID,TRANS_AMOUNT.TRANS_TYPE, TO_CHAR(TRANS_AMOUNT.TRANS_DATE, 'DD.MM.YYYY:HH24:MI:SS'), TRANS_AMOUNT.MEMBER_NO, TRANS_AMOUNT.FULL_NAME, TRANS_AMOUNT.DOC_NO, TRANS_AMOUNT.PORTFOLIO,TRANS_AMOUNT.CANCELREASON, TRANS_AMOUNT.AMOUNT FROM TRANS INNER JOIN TRANS_AMOUNT ON TRANS_AMOUNT.TRANS_ID = TRANS.RECONCILED where TRUNC(trans_amount.trans_date) BETWEEN TO_DATE('" . cleanInput($datefrom) . "','DD/MM/YYYY:HH24:MI:SS') AND TO_DATE('" . cleanInput($dateto) . "','DD/MM/YYYY:HH24:MI:SS') and trans_amount.bnkcode='" . $_SESSION['Branchcode'] . "' AND TRANS_AMOUNT.RECONCILED = 0 AND TRANS.CONFIRMED =1 AND TRANS.REVERSED = 1 ORDER BY trans_amount.TRANS_DATE ASC"; } //***************************************************************************************************************************************************************************************************************************************************** $result = oci_parse($conn, $query_result) or die(oci_error());
include "link.php"; $pdf = new FPDF('P', 'mm', 'A4'); $pdf->addPage(); $pdf->setFont('Times', 'B', 30, 'C'); $pdf->text(10, 15, 'Dynamic Link Library'); $pdf->setFont('Helvetica', 'I', 20, 'C'); $pdf->text(10, 22.5, 'Perpustakaan Online SMK Negeri 10 Jakarta'); $pdf->setFont('Helvetica', '', 20, 'C'); $pdf->text(10, 32, 'Laporan Buku'); $pdf->text(10, 22.5, 'Perpustakaan Online SMK Negeri 10 Jakarta'); $pdf->setFont('Helvetica', '', 15, 'C'); $pdf->text(10, 39, 'Bulan ' . $_GET[bulan]); $yi = 50; $ya = 44; $pdf->setFont('Arial', '', 9); $pdf->setFillColor(183, 199, 93); $pdf->setXY(10, $ya); $pdf->CELL(10, 6, 'No', 1, 0, 'C', 1); $pdf->CELL(20, 6, 'ID', 1, 0, 'C', 1); $pdf->CELL(80, 6, 'Judul', 1, 0, 'C', 1); $pdf->CELL(60, 6, 'Rak', 1, 0, 'C', 1); $pdf->CELL(20, 6, 'Jumlah', 1, 0, 'C', 1); $ya = $yi + $row; $sql = mysql_query("select*from buku"); $i = 1; $no = 1; $max = 31; $row = 6; while ($data = mysql_fetch_array($sql)) { $rak = mysql_query("select*from rak where id='{$data['rak']}'"); $kar = mysql_fetch_array($rak);
$texto_opcional3 = "El Prestatario tendrá derecho a la defensa jurídica en materia civil en caso de que las autoridades competentes apliquen la ley de extinción de dominio en su contra a consecuencia de que el inquilino lleve a cabo actos ilícitos de los considerados en la mencionada ley, no obstante haber declarado en el contrato de arrendamiento que se dedica a actividades lícitas."; $texto_Principal3 = "Si El Prestatario sospecha que el inquilino abandonó el inmueble, no deberá entrar al mismo, ya que estaría cometiendo un delito, debe notificar a El Prestador para recibir orientación y definir la mejor acción a seguir.\n \nLos gastos originados por el lanzamiento o toma de posesión del inmueble después de que se obtengan las ordenes judiciales correspondientes, serán cubiertos por El Prestador hasta la cantidad indicada en este contrato, en caso de que por las características del inmueble sea necesario cubrir un gasto mayor, El Prestatario acepta cubrir esa diferencia."; //if ($GJudiciales==True){ // $texto_Principal3="Para iniciar una demanda de rescisión o terminación del contrato de arrendamiento, El Prestatario deberá otorgar poderes especiales de pleitos y cobranzas a los abogados que le indique El Prestador, quien cubrirá el costo de este poder hasta la cantidad indicada en este contrato."; // }Else{ // $texto_Principal3= "Para iniciar una demanda de rescisión o terminación del contrato de arrendamiento, El Prestatario deberá otorgar poderes especiales de pleitos y cobranzas a los abogados que le indique El Prestador, quien cubrirá el costo de este poder hasta la cantidad indicada en este contrato. //Los gastos originados por el lanzamiento o toma de posesión del inmueble después de que se obtengan las órdenes judiciales correspondientes, serán cubiertos por El Prestador hasta la cantidad indicada en este contrato, en caso de que por las características del inmueble sea necesario cubrir un gasto mayor, El Prestatario acepta cubrir esa diferencia."; // } if ($ExtDominio == False) { $texto_opcional3 = " "; } //////////////////////////////////////////////////////////////////////Cración del PDF $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetAutoPageBreak(False); $pdf->setFillColor(194, 194, 196); $pdf->SetDrawColor(255, 255, 255); $pdf->SetFont('Times', '', 10); $pdf->Image('../images/certi.jpg', 15, 27, 99, 15); ///////// Inicia columna derecha $pdf->SetFont('Arial', 'B', 12); $pdf->SetXY(140, 20); $pdf->Cell(20, 5, "Contrato de Prestación", 0, 0, 'L'); $pdf->SetXY(155, 25); $pdf->Cell(20, 5, "de Servicios", 0, 0, 'C'); $pdf->SetFont('Arial', 'B', 11); $pdf->SetXY(138, 33); $pdf->Cell(26, 5, "Fecha", 1, 0, 'C', true); $pdf->SetXY(165, 33); $pdf->Cell(27, 5, "Numero", 1, 0, 'C', true); $pdf->SetFont('Arial', '', 10);
public function makepdf() { global $user; // Get required files. require_once 'others/fpdf/fpdf.php'; // Set some document variables $author = "eduCloud"; $x = 35; $text = <<<EOT Hello EOT; // Create fpdf object $pdf = new FPDF('P', 'pt', 'Letter'); // Set base font to start $pdf->SetFont('Arial', 'B', 16); // Add a new page to the document $pdf->addPage(); $pdf->setLeftMargin($x); //page border $pdf->Line(35, 30, 35, 750); $pdf->Line(35, 30, 575, 30); $pdf->Line(575, 30, 575, 750); $pdf->Line(575, 750, 35, 750); //end of page border // Set the x,y coordinates of the cursor $pdf->SetXY($x + 20, 40); // Write 'Simple PDF' with a line height of 1 at the current position $pdf->Write(25, 'Employee Details'); $pdf->Image($_SERVER['DOCUMENT_ROOT'] . '/cloud/images/school_logo.jpg', 500, 35, 50, 50, 'JPG'); // Reset the font // Reset font, color, and coordinates $pdf->SetFont('Arial', '', 12); $pdf->SetTextColor(0, 0, 0); $pdf->SetLeftMargin($x + 50); $pdf->setXY($x + 50, 90); global $objPDO; require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/teacher_class.php'; $record = new Teacher($objPDO); if ($user->checkAdmin()) { $eid = $_GET['uid']; } else { $student = new Student($objPDO, $user->getuserId()); $eid = $student->getID(); } $record->loadByUserId($eid); // Write out a long text blurb. //$array=$record->getAsArray(); //$x=0; /* TEMPLATE 1 DESIGN*/ $pdf->SetFont('Arial', '', 8); $pdf->setFillColor(255, 255, 255); $pdf->cell(200, 20, 'Employee Id (reference) : ' . $record->getTeacherId(), 0, 1, 'L', true); $pdf->SetFont('Arial', '', 12); $pdf->setFillColor(50, 50, 50); $pdf->setTextColor(255, 255, 255); $pdf->cell(450, 20, 'Employee Details', 0, 1, 'C', true); $pdf->setTextColor(0, 0, 0); $pdf->setFillColor(221, 221, 221); $pdf->cell(200, 20, 'Employee Name', 0, 0, 'C', true); $pdf->cell(250, 20, $record->getName(), 0, 1, 'C', true); $pdf->setFillColor(255, 255, 255); $pdf->cell(200, 20, 'Qualification', 0, 0, 'C', true); $pdf->cell(250, 20, $record->getQualification(), 0, 1, 'C', true); require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/subject_class.php'; $subject_id = new Subject($objPDO); $subject_id->setID($record->getSubjectId()); $pdf->setFillColor(221, 221, 221); $pdf->cell(200, 20, 'Subject', 0, 0, 'C', true); $pdf->cell(250, 20, $subject_id->getName(), 0, 1, 'C', true); $pdf->setFillColor(255, 255, 255); $pdf->cell(200, 20, 'Date Of Birth', 0, 0, 'C', true); $pdf->cell(250, 20, $record->getDateOfBirth(), 0, 1, 'C', true); $pdf->setFillColor(221, 221, 221); $pdf->cell(200, 20, 'Gender', 0, 0, 'C', true); $pdf->cell(250, 20, ucfirst($record->getGender()), 0, 1, 'C', true); $pdf->setFillColor(255, 255, 255); $pdf->cell(200, 20, 'Blood Group', 0, 0, 'C', true); $pdf->cell(250, 20, $record->getBloodGroup(), 0, 1, 'C', true); $pdf->setFillColor(255, 255, 255); $pdf->cell(200, 20, '', 0, 0, 'C', true); $pdf->cell(250, 20, '', 0, 1, 'C', true); $pdf->setFillColor(50, 50, 50); $pdf->setTextColor(255, 255, 255); $pdf->cell(450, 20, 'Contact Details', 0, 1, 'C', true); $pdf->setTextColor(0, 0, 0); $pdf->setFillColor(221, 221, 221); $pdf->cell(200, 20, 'Correspondence Address', 0, 0, 'C', true); $pdf->cell(250, 20, $record->getCorrespondenceAddressLine1(), 0, 1, 'C', true); $pdf->cell(200, 20, '', 0, 0, 'C', true); $pdf->cell(250, 20, $record->getCorrespondenceAddressLine2(), 0, 1, 'C', true); $pdf->setFillColor(255, 255, 255); $pdf->cell(200, 20, 'City', 0, 0, 'C', true); $pdf->cell(250, 20, $record->getCorrespondenceCity(), 0, 1, 'C', true); $pdf->setFillColor(221, 221, 221); $pdf->cell(200, 20, 'State', 0, 0, 'C', true); $pdf->cell(250, 20, $record->getCorrespondenceState(), 0, 1, 'C', true); $pdf->setFillColor(255, 255, 255); $pdf->cell(200, 20, 'Pincode', 0, 0, 'C', true); $pdf->cell(250, 20, $record->getCorrespondencePincode(), 0, 1, 'C', true); $pdf->setFillColor(221, 221, 221); $pdf->cell(200, 20, 'Phone', 0, 0, 'C', true); $pdf->cell(250, 20, $record->getPhone(), 0, 1, 'C', true); $pdf->setFillColor(255, 255, 255); $pdf->cell(200, 20, 'Mobile', 0, 0, 'C', true); $pdf->cell(250, 20, $record->getMobile(), 0, 1, 'C', true); $pdf->setFillColor(221, 221, 221); $pdf->cell(200, 20, 'Email', 0, 0, 'C', true); $pdf->cell(250, 20, $record->getEmail(), 0, 1, 'C', true); $pdf->setFillColor(255, 255, 255); $pdf->cell(450, 20, '', 0, 1, 'C', true); $pdf->setFillColor(50, 50, 50); $pdf->setTextColor(255, 255, 255); $pdf->cell(450, 20, 'Login Details', 0, 1, 'C', true); $pdf->setTextColor(0, 0, 0); $pdf->setFillColor(221, 221, 221); $pdf->cell(200, 20, 'Employee Id *', 0, 0, 'C', true); $pdf->cell(250, 20, $record->getTeacherId(), 0, 1, 'C', true); $pdf->setFillColor(255, 255, 255); $pdf->cell(200, 20, 'Temporary Password **', 0, 0, 'C', true); $pdf->cell(250, 20, $record->getTempPass(), 0, 1, 'C', true); /* TEMPLATE 1 DESIGN END*/ $pdf->SetFont('Arial', '', 10); $pdf->SetXY($x + 100, 620); $pdf->write(15, 'Employee\'s Signature'); $pdf->SetXY($x + 350, 620); $pdf->write(15, 'Admin\'s Signature'); $pdf->SetFont('Arial', '', 8); $pdf->SetXY($x + 20, 710); $pdf->write(15, '* Employee Id may be Temporary , ** Please Change the Password for Security Reasons'); $pdf->SetXY($x + 20, 720); $pdf->write(15, 'This is a Computer Generated Form. If any Discrepancy Contact Admin : eduCloud Reference Number ' . $user->getuserId()); // Close the document and save to the filesystem with the name simple.pdf $pdf->Output('generated_files/enroll' . $record->getUserId() . '.pdf', 'F'); header('Location:http://localhost/cloud/generated_files/enroll' . $record->getUserId() . '.pdf'); }
} @($dataParam = $_POST["dataParam"]); @($idUsuar = $_SESSION["valid_user"]); // Instanciando a classe geradora de PDFs $pdf = new FPDF('P', 'cm', 'A4'); // colocando autor do documento $pdf->SetAuthor('Financ - O seu sistema finaceiro'); // Colocando o titulo do documento $pdf->SetTitle('Movimentação - Financ'); //SetMargins(float left, float top [, float right]) $pdf->SetMargins(2, 2, 2); // Adiciona página $pdf->AddPage(); // Formatando fonte da linha $pdf->SetFont('Arial', 'B', 14); $pdf->setFillColor(200, 200, 200); $pdf->Cell(0, 0.5, "Gerado em: " . datePhpToString(null), 0, 1, 'C', 1); $pdf->Cell(0, 0.5, "Período: " . $dataParam, 0, 1, 'C', 1); $pdf->ln(); //criando uma conexão com o banco $conn = mysql_connect($server, $db_user, $db_pass) or die("Não foi possivel conectar ao banco"); //Definindo a qual base de dados as operações se daram mysql_select_db($database) or die("Base de dados não foi encontrada"); // calculo do saldo anterior $str_query_saldo_anterior = " SELECT ifnull(sum( " . " CASE m.fg_deb_cred" . " WHEN 'D' " . " THEN m.vl_movimento * -1 " . " WHEN 'C' " . " THEN m.vl_movimento " . " END ),0) AS saldo " . " FROM movimentos m" . " WHERE m.id_usuar = '{$idUsuar}'" . " AND date_format(m.dt_movimento,'%m/%Y') < '{$dataParam}'"; // execução do comando e obtenção dos dados $arrRegsSaldoAnterior = mysql_query($str_query_saldo_anterior); $arrSaldoAnterior = mysql_fetch_assoc($arrRegsSaldoAnterior); $saldoAnterior = number_format($arrSaldoAnterior["saldo"], 2, ',', '.'); mysql_free_result($arrRegsSaldoAnterior); $str_query_saldo = " SELECT ifnull(sum( " . " CASE m.fg_deb_cred" . " WHEN 'D' " . " THEN m.vl_movimento * -1 " . " WHEN 'C' " . " THEN m.vl_movimento " . " END ),0) AS saldo " . " FROM movimentos m" . " WHERE m.id_usuar = '{$idUsuar}'" . " AND date_format(m.dt_movimento,'%m/%Y') <= '{$dataParam}'";