Example #1
0
	background-color: #E6E6E6;
	color: black;
}

tr.d1 td {
	background-color: #FFFFFF;
	color: black;
}
</style>


<body>
<?php 
include 'functions.php';
include 'ccompare.php';
$com = new ccompare();
$functions = new functions();
session_start();
$categoriasSeleccionandas = $_SESSION['categoriasSeleccionandas'];
$tipo = (int) $_GET['tipo'];
//OBTENER EL TIPO DE ACCION A TOMAR  1- AGREGAR A LA COMPARACION, 2 - IMPRIMIR COMPARACION
if ($tipo == 1) {
    // AGREGAR A LA COMPARACION
    $categoria = (int) $_GET['categoria'];
    $estado = $_GET['estado'];
    //OBTENEMOS EL ESTADO
    if (!$functions->validarExistenciaItem($_SESSION['categoriasSeleccionandas'], $categoria) && count($categoriasSeleccionandas) < 4 && $estado == "agregar") {
        $categoriasSeleccionandas[] = $categoria;
        $_SESSION['categoriasSeleccionandas'] = $categoriasSeleccionandas;
    } else {
        if ($estado == "eliminar") {
Example #2
0
<?php

require '/fpdf/fpdf.php';
include 'functions.php';
include 'ccompare.php';
$com = new ccompare();
$functions = new functions();
$categoria = (int) $_GET['categoria'];
//OBTENER EL TIPO DE ACCION A TOMAR  1- AGREGAR A LA COMPARACION, 2 - IMPRIMIR COMPARACION
$categoriasSeleccionandas = array();
$categoriasSeleccionandas[] = $categoria;
class PDF extends FPDF
{
    // header
    function Header()
    {
        // Page header
        global $title;
        // Logo
        //$this->Image("../tpl/img/Partners/Asistencia.png",10,6,30);
        $this->SetFont('Arial', 'B', 15);
        $w = $this->GetStringWidth($title) + 6;
        $this->SetX((210 - $w) / 2);
        $this->SetDrawColor(250, 250, 250);
        $this->SetFillColor(250, 250, 250);
        $this->SetTextColor(0, 0, 0);
        $this->SetLineWidth(1);
        $this->Cell($w, 9, $title, 1, 1, 'C', true);
        $this->Ln(10);
        // Save ordinate
        $this->y0 = $this->GetY();