Welcome Guest, Not a member yet? Register   Sign In
Unable to locate the specified class: Session.php
#1

Hello , im making a second report an this error appers "Unable to locate the specified class: Session.php" thx for the help

Library 

PHP Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 
   // Incluimos el archivo fpdf

//require_once APPPATH.'third_party/fpdf/fpdf-1.7.php';
require_once APPPATH.'third_party/fpdf/fpdf-1.7.php';

 
   //Extendemos la clase Pdf de la clase fpdf para que herede todas sus variables y funciones
 
   class Reporte_contactos extends FPDF {
 
       public function __construct() {
 
           parent::__construct();

 
       }
 
       // El encabezado del PDF
 
       public function Header(){


 
         //  $this->Image('imagenes/logo.png',10,8,22);
 
           $this->Cell(30,25,'',0,0,'C',$this->Image('upload/logo_1.jpg',10,8,50));
 
           $this->Ln('10');
 
           $this->SetFont('Arial','B',14);
 
           $this->Cell(0,25,'LISTA DE CLIENTES',0,0,'C');
 
           $this->Ln('25');
 
           $this->SetFont('Arial','B',10);
 
           $this->Cell(0,10,'DATOS DEL CLIENTE:',0,0,'L');
 
           $this->Ln(9);
 
      }
 
      // El pie del pdf
 
      public function Footer(){
 
          $this->SetY(-20);
 
          $this->SetFont('Arial','I',8);
 
          $this->Cell(0,10,'Paseo Av. Bulnes 147 Piso 8, Santiago Centro, Santiago Fono: (56-2) 9564100  www.dbsys.cl ',0,0,'C');
 
          $this->Ln(4);
 
          $this->Cell(0,10,'Pagina '.$this->PageNo().'/{nb}',0,0,'C');
 
          $this->Ln(4);
 
          $this->SetFont('Arial','I',7);
 
          $this->Cell(0,10,'Generado el '.date("d-m-Y"),0,0,'C');
 
     }
 
   }
?>
Controller 


PHP Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class 
Reporte_contactos extends CI_Controller {

 
   public function index()
 
   {
 
     
        
// Se carga el modelo Lista de Clientes
 
       $this->load->model('contacto');
 
       // Se carga la libreria fpdf
 
       $this->load->library('reporte_contactos');

 
       // Se obtienen los Clientes de la base de datos
 
       $contactos $this->contacto->get_contactos_cliente();

 
       // Creacion del PDF

 
       /*
         * Se crea un objeto de la clase Pdf, recuerda que la clase Pdf
         * heredó todos las variables y métodos de fpdf
         */
 
       $this->pdf = new Reporte_contactos('L','mm','Legal');

 
       // Agregamos una página
 
       $this->pdf->AddPage('L');
 
       // Define el alias para el número de página que se imprimirá en el pie
 
       $this->pdf->AliasNbPages();

 
       /* Se define el titulo, márgenes izquierdo, derecho y
         * el color de relleno predeterminado
         */
 
       $this->pdf->SetTitle("CONTACTOS "  );



 
       // Se define el formato de fuente: Arial, negritas, tamaño 9
 
       $this->pdf->SetFont('Helvetica''B'10);
 
       /*
         * TITULOS DE COLUMNAS
         *
         * $this->pdf->Cell(Ancho, Alto,texto,borde,posición,alineación,relleno);
         */
 
       $this->pdf->SetFillColor(0,102,204);
 
       $this->pdf->SetTextColor(240255240); //Letra color Blanco
 
       $this->pdf->Cell(100,7,'CLIENTE','LTB',0,'L','1');
 
       $this->pdf->Cell(100,7,'DIRECCION','TB',0,'L','1');
 
       $this->pdf->Cell(28,7,'TELEFONO','TB',0,'L','1');
 
       $this->pdf->Cell(50,7,'URL','TBR',0,'L','1');
 
       $this->pdf->Ln(7);

 
       foreach ($contactos as $contacto) {


 
           // Se imprimen los datos de cada cLIENTE

     
         $fantasia=$contacto->nombre;
 
           $direccion=$contacto->direccion;
 
           $this->pdf->SetTextColor(000); //Letra color blanco


 
           $this->pdf->Cell(100,5,utf8_decode($fantasia),'B',0,'L',0);
 
           $this->pdf->Cell(100,5,utf8_decode($direccion),'B',0,'L',0);
 
           $this->pdf->Cell(28,5,$contacto->fono,'B',0,'L',0);
 
           $this->pdf->Cell(50,5,$contacto->url,'B',0,'L',0);

 
           //Se agrega un salto de linea
 
           $this->pdf->Ln(7);
 
       }
 
       /*
         * Se manda el pdf al navegador
         *
         * $this->pdf->Output(nombredelarchivo, destino);
         *
         * I = Muestra el pdf en el navegador
         * D = Envia el pdf para descarga
         *
         */
 
        ob_end_clean();
 
       $this->pdf->Output("Lista de contactos.pdf"'I');
 
   }

Model
PHP Code:
<?php
class Lista_contacto extends CI_Model {

 
   function __construct()
 
   {
 
       parent::__construct();
 
   }

 
   /* Devuelve la lista de alumnos que se encuentran en la tabla tblalumno */
 
   function obtenerListaContactos()
 
   {
 
       $this->load->database();
 
       $this->db->order_by("nombre_fantasia""asc");
 
       $contactos $this->db->get('contactos');

 
       return $contactos->result();
 
   }
}
?>
Reply
#2

There's a note marked as "Important" in the 3.0.0 upgrade instructions that you didn't follow.
Reply
#3

(01-13-2016, 07:04 AM)Narf Wrote: There's a note marked as "Important" in the 3.0.0 upgrade instructions that you didn't follow.

Solved , i Rename de controller to Reporte2 and the class Reporte2 extends and done
Reply




Theme © iAndrew 2016 - Forum software by © MyBB