Пример #1
0
 /**
  * logout
  *
  * @param void
  * @return void
  */
 public static function logout()
 {
     Load::lib('auth');
     Load::lib('session');
     Session::set(SESSION_KEY, false);
     Auth::destroy_identity();
 }
Пример #2
0
 public function formatos()
 {
     $this->render(null, null);
     Load::lib("formato");
     echo "UTF8: " . Formato::utf8("México") . "<br />";
     echo "Normal: " . "México" . "<br />";
     echo "ISO8859-1: " . Formato::iso88591("México") . "<br />";
     echo "<br />";
     echo "Numero: " . Formato::numero(738374) . "<br />";
     echo "Dinero: " . Formato::dinero(738374) . "<br />";
     echo "Ceros: " . Formato::ceros(73, 5) . "<br />";
     echo "<br />";
     echo "Numero con Letra: " . Formato::numeroLetra(738374) . "<br />";
     echo "<br />";
     echo "Mayusculas: " . Formato::mayusculas("Lorem Ipsum is simply dummy text of the printing and typesetting industry") . "<br />";
     echo "Minusculas: " . Formato::minusculas("Lorem Ipsum is simply dummy text of the printing and typesetting industry") . "<br />";
     echo "Capital: " . Formato::capital("Lorem Ipsum is simply dummy text of the printing and typesetting industry") . "<br />";
     echo "Texto: " . Formato::texto("clientes_distinguidos") . "<br />";
     echo "Camello: " . Formato::camello("clientes_distinguidos") . "<br />";
     echo "InversaCamello: " . Formato::inversaCamello("facturasEmitidasMes") . "<br />";
     echo "<br />";
     echo "Fecha: " . Formato::fecha(date("Y-m-d")) . "<br />";
     echo "Fecha DB: " . Formato::fechaDB(date("d/m/Y")) . "<br />";
     echo "Hora: " . Formato::hora(452) . "<br />";
 }
Пример #3
0
 /**
  * Genera Img Captcha
  *
  */
 public function captcha()
 {
     Load::lib('captcha/captcha');
     View::select(NULL, NULL);
     $captcha = new Captcha();
     $captcha->run();
 }
Пример #4
0
 public function logout()
 {
     Load::lib('SdAuth');
     SdAuth::logout();
     $this->render(null, 'login2');
     $this->redirect('');
 }
Пример #5
0
 public function logout()
 {
     Load::lib('SdAuth');
     SdAuth::logout();
     View::template('login2');
     Router::redirect('');
 }
Пример #6
0
 /**
  * Realiza una busqueda
  *
  */
 public function busqueda()
 {
     Load::lib('validate');
     if (Input::hasGet('b') && Validate::isNull(Input::get('b'))) {
         $this->b = Input::get('b');
         $articulo = new Articulo();
         //Debug::getInstance()->dump($this->articulo->search($this->b), 'Resultado');
         $this->result = $articulo->search($this->b);
     }
 }
Пример #7
0
 public function registrar()
 {
     $this->render(null, null);
     Load::lib("formato");
     $menu = false;
     $menu = Menu::registrar(Formato::capital(Formato::minusculas($this->post("titulo"))));
     if ($menu) {
         $menu->abierto = $this->post("abierto");
         $menu->activo = $this->post("activo");
     }
 }
Пример #8
0
	public function service($api)
	{
		$token = md5(microtime());
		meta('epay_auth_domain_only',$token,60);
		$server = base64_decode('aHR0cDovL3BheW1lbnQudHR0dWFuZ291Lm5ldA==').$api.'?charset='.ini('settings.charset').'&';
		$url = $server."url=".ini('settings.site_url')."/index.php?mod=bankdirect&token={$token}";
		try{
			$res = dfopen($url, 10485760, '', '', true, 5, 'CENWOR.TTTG.AUTH.BDT.AGENT.'.SYS_VERSION.'.'.SYS_BUILD);
			if ($res)
			{
				if ($api == '/merchant/api-kernel-file')
				{
					if (preg_match('/\r?\n\w+\r?\n/', $res))
					{
						$res = preg_replace('/\r?\n\w+\r?\n/', '', $res);
					}
					return array('file.b64' => $res, 'file.md5' => md5($res));
				}
				$load = new Load();
				$load->lib('servicesJSON');
				$json = new servicesJSON(16);
				$res = $json->decode($res);
			}
			else
			{
				return __('网络错误');
			}
		} catch (Exception $e) {
		    return __('未知错误');
		}
		if ($res['status'] == 'ok') {
			return $res['data'];
		}else{
			$data = array(
				'client.url.found.no'	=>__('URL地址格式不正确'),
				'client.idx.found.no'	=>__('未在数据库中找到对应的URL地址记录'),
				'client.url.illegal'	=>__('URL地址和数据库中的记录不匹配'),
				'server.http.error'		=>__('服务器HTTP请求失败'),
				'client.http.error'		=>__('用户站点请求失败'),
				'client.token.error'	=>__('Token校验失败'),
				'client.license.overdue'=>__('授权已经过期 '),
				'client.license.disabled'=>__('授权已经禁用'),
				'api.file.missing' => __('接口文件未找到')
				);
			return $data[$res['errcode']];
		}
	}
 function ingresar()
 {
     Config::set('config.application.breadcrumb', FALSE);
     View::template('login-box');
     Load::lib('auth');
     if ($this->has_post("usuario", "contrasena")) {
         $usuario = $this->post("usuario");
         $contrasena = $this->post("contrasena");
         $auth = new Auth("model", "class: Usuario", "nombreusuario: {$usuario}", "contrasena: {$contrasena}");
         if ($auth->authenticate()) {
             Router::redirect("administrador/inicioadmin");
             //Flash::success("Correcto");
         } else {
             Flash::error("Falló");
         }
     }
 }
Пример #10
0
 public static function sendContact($de_correo, $de_nombre, $asunto, $cuerpo)
 {
     //Carga las librería PHPMailer
     Load::lib('phpmailer');
     //instancia de PHPMailer
     $mail = new PHPMailer(true);
     $mail->IsSMTP();
     $mail->SMTPAuth = true;
     // enable SMTP authentication
     $mail->SMTPSecure = 'ssl';
     // sets the prefix to the servier
     $mail->Host = Config::get('config.correo.host');
     $mail->Port = Config::get('config.correo.port');
     $mail->Username = Config::get('config.correo.username');
     $mail->Password = Config::get('config.correo.password');
     $mail->AddReplyTo($de_correo, $de_nombre);
     $mail->From = $de_correo;
     $mail->FromName = $de_nombre;
     $mail->Subject = $asunto;
     $mail->Body = $cuerpo;
     $mail->WordWrap = 50;
     // set word wrap
     $mail->MsgHTML($cuerpo);
     $mail->AddAddress(Config::get('config.sitio.email'), Config::get('config.sitio.nombre'));
     $mail->IsHTML(true);
     // send as HTML
     $mail->SetLanguage('es');
     //Enviamos el correo
     $exito = $mail->Send();
     $intentos = 2;
     //esto se realizara siempre y cuando la variable $exito contenga como valor false
     while (!$exito && $intentos < 1) {
         sleep(5);
         $exito = $mail->Send();
         $intentos = $intentos + 1;
     }
     $mail->SmtpClose();
     return $exito;
 }
Пример #11
0
 /**
  * Callback que se ejecuta antes de guardar un registro
  */
 public function before_save()
 {
     //Verifico que la fecha de publicación no sea mayor a la de hoy
     if ($this->fecha_publicacion > date("Y-m-d")) {
         $this->fecha_publicacion = date("Y-m-d H:i:s");
     }
     //Verifico que no exista otro titulo registrado
     if ($this->getSlugRegistrado()) {
         Flash::error('El título de la publicación ya se encuentra almacenado.');
         return 'cancel';
     }
     //Compongo el slug del post
     Load::lib('utils');
     $this->slug = isset($this->slug) ? $this->slug : Utils::slug($this->titulo);
     //Realizo el resumen del post
     if (preg_match('/<!-- pagebreak(.*?)?-->/', $this->contenido, $matches)) {
         $matches = explode($matches[0], $this->contenido, 2);
         $this->resumen = Utils::balanceTags($matches[0]) . '<a href="' . PUBLIC_PATH . $this->getUrlPost('blog') . '" title="Sigue Leyendo">Sigue leyendo...</a>';
     } else {
         $this->resumen = $this->contenido;
     }
 }
Пример #12
0
<?php

/**
 * Dailyscript - Web | App | Media
 *
 * Descripcion: Controlador que se encarga del logueo de los usuarios del sistema
 *
 * @category    
 * @package     Controllers 
 * @author      Iván D. Meléndez (ivan.melendez@dailycript.com.co)
 * @copyright   Copyright (c) 2013 Dailyscript Team (http://www.dailyscript.com.co) 
 */
Load::lib('dw_security');
class LoginController extends BackendController
{
    /**
     * Limite de parámetros por acción
     */
    public $limit_params = FALSE;
    /**
     * Nombre de la página
     */
    public $page_title = 'Ingresar al Sistema';
    /**
     * Método que se ejecuta antes de cualquier acción
     */
    protected function before_filter()
    {
        View::template('backend/login');
    }
    /**
<?php

/**
 * KumbiaPHP web & app Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://wiki.kumbiaphp.com/Licencia
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@kumbiaphp.com so we can send you a copy immediately.
 *
 * Helpers HTML
 *
 * @category   Manteniemiento
 * @package    Controllers
 * @copyright  Copyright (c) 2005-2009 Kumbia Team (http://www.kumbiaphp.com)
 * @license    http://wiki.kumbiaphp.com/Licencia     New BSD License
 */
use PEAR2\Net\RouterOS;
Load::lib('PEAR2/Autoload');
Load::models('mikrotik/mikrotik');
class ManteniemientoController extends AppController
{
    public function index()
    {
    }
}
Пример #14
0
<?php

/**
 * Dailyscript - Web | App | Media
 *
 * Clase que se utiliza para autenticar los usuarios
 *
 * @category    Sistema
 * @package     Libs
 * @author      Iván D. Meléndez
 * @copyright   Copyright (c) 2013 Dailyscript Team (http://www.dailyscript.com.co) 
 */
Load::lib('auth2');
//Cambiar la key por una propia
//Se puede utilizar las de wordpress: https://api.wordpress.org/secret-key/1.1/salt/
define('SESSION_KEY', 'sv}-c*2h_SoM]jM-Putiat`|h[Sih9GjLh=Qz.TU$<<7_RwPmLNcxz(pq4c2ueJ{');
class DwAuth
{
    /**
     * Mensaje de Error
     *
     * @var String
     */
    protected static $_error = null;
    /**
     * Método para iniciar Sesion
     *
     * @param $username mixed Array con el nombre del campo en la bd del usuario y el valor
     * @param $password mixed Array con el nombre del campo en la bd de la contraseña y el valor
     * @return true/false
     */
Пример #15
0
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://wiki.kumbiaphp.com/Licencia
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@kumbiaphp.com so we can send you a copy immediately.
 *
 * @category   Kumbia
 * @package    Console
 * @copyright  Copyright (c) 2005-2012 Kumbia Team (http://www.kumbiaphp.com)
 * @license    http://wiki.kumbiaphp.com/Licencia     New BSD License
 */
// carga libreria para manejo de cache
Load::lib('cache');
/**
 * Consola para manejar la cache
 *
 * @category   Kumbia
 * @package    Console
 */
class CacheConsole
{
    /**
     * Comando de consola para limpiar la cache
     *
     * @param array $params parametros nombrados de la consola
     * @param string $group nombre de grupo
     * @throw KumbiaException
     */
 /**
  * Callback que se ejecuta antes de guardar un registro
  */
 public function before_save()
 {
     //Compongo el slug del post
     Load::lib('utils');
     $this->slug = Utils::slug($this->titulo);
     if (preg_match('/<!-- pagebreak(.*?)?-->/', $this->contenido, $matches)) {
         $matches = explode($matches[0], $this->contenido, 2);
         $this->resumen = Utils::balanceTags($matches[0]) . '<a href="' . PUBLIC_PATH . date("Y") . '/' . date("m") . '/' . date("d") . '/' . $this->slug . '/" title="Sigue Leyendo">Sigue leyendo...</a>';
     } else {
         $this->resumen = $this->contenido;
     }
 }
Пример #17
0
	function Disallow()
	{
		$this->CheckAdminPrivs('robot');
		$name = trim($this->Get['name']);
		$disallow = 'disallow1' == $this->Code ? 1 : 0;

		$sql = "update `".TABLE_PREFIX."system_robot` set `disallow`='{$disallow}' where `name`='{$name}'";
		$this->DatabaseHandler->Query($sql);

		$sql = "select `name`,`disallow` from `".TABLE_PREFIX."system_robot` where `disallow`=1";
		$query = $this->DatabaseHandler->Query($sql);
		$robot_config = ConfigHandler::get('robot');
		$robot_config['list'] = array();
		while ($row = $query->GetRow())
		{
			$robot_config['list'][$row['name']]['disallow'] = $row['disallow'];
		}
		$configHandler = new ConfigHandler();
		$configHandler->set('robot',$robot_config);


		$disallow_string = "User-agent: {$name}
Disallow: /

";

		$load = new Load();
		$load->lib('io');
		$IoHandler = new IoHandler();
		$robots_path = ROOT_PATH . 'robots.txt';

		$robots_string_new = $robots_string = $IoHandler->ReadFile($robots_path);
		$disallow_string_strpos = strpos($robots_string,$disallow_string);
		if ($disallow && false===$disallow_string_strpos) {
			$robots_string_new = $disallow_string . $robots_string_new;
		} elseif (!$disallow && false!==$disallow_string_strpos) {
			$robots_string_new = str_replace($disallow_string,"",$robots_string_new);
		}

		if ($robots_string_new!=$robots_string) {
			$return = $IoHandler->WriteFile($robots_path,$robots_string_new);

			if (!$return) {
				$this->Messager("写入 <b>{$robots_path}</b> 文件失败,请检查是否有可读写的权限",null);
			}
		}

		$this->Messager("修改成功");
	}
Пример #18
0
<?php

/**
 * @see Controller nuevo controller
 */
require_once CORE_PATH . 'kumbia/controller.php';
/**
 * Controlador principal que heredan los controladores
 *
 * Todas las controladores heredan de esta clase en un nivel superior
 * por lo tanto los metodos aqui definidos estan disponibles para
 * cualquier controlador.
 *
 * @category Kumbia
 * @package Controller
 */
Load::lib('dw_config');
DwConfig::load();
class AppController extends Controller
{
    protected final function initialize()
    {
    }
    protected final function finalize()
    {
    }
}
Пример #19
0
 /**
  * Método para crear variables tipo define del config.ini
  */
 public static function load()
 {
     $config = self::read('config');
     // Nombre del aplicativo
     if (!defined('APP_NAME')) {
         define('APP_NAME', $config['application']['name']);
     }
     //Carga y define automáticamente las variables definidas en el config.ini
     if (isset($config['custom'])) {
         foreach ($config['custom'] as $variable => $valor) {
             $variable = Filter::get($variable, 'upper');
             if (in_array($valor, array('On', 'Off'))) {
                 $valor = $valor == 'On' ? TRUE : FALSE;
             }
             if ($variable == 'APP_AJAX') {
                 $valor = Session::get('app_ajax') && $valor ? TRUE : FALSE;
             } else {
                 if ($variable == 'DATAGRID') {
                     $valor = Session::get('datagrid') > 0 ? Session::get('datagrid') : $valor;
                 }
             }
             define($variable, $valor);
         }
     }
     //Se verifica que tipo de dispositivo es
     Load::lib('Mobile_Detect');
     $detect = new Mobile_Detect();
     define('MOBILE', $detect->isMobile());
     define('TABLET', $detect->isTablet());
     define('DESKTOP', !MOBILE && !TABLET ? TRUE : FALSE);
     //Establezco el nombre de la empesa o cliente de la aplicación
     $empresa = Load::model('config/empresa')->getInformacionEmpresa();
     //Almaceno en sesión la información de la empresa
     Session::set('empresa', $empresa, 'config');
     if (!defined('APP_CLIENT')) {
         define('APP_CLIENT', empty($empresa->razon_social) ? 'E.M.S. Arroz del Alba S.A.' : $empresa->razon_social);
     }
     if (!defined('APP_CLIENT_LOGO')) {
         define('APP_CLIENT_LOGO', empty($empresa->logo) ? NULL : $empresa->logo);
     }
 }
Пример #20
0
 *	titlePosition = 'outside'		The position of title. Can be set to 'outside', 'inside' or 'over'
 *	titleFormat = null				Callback to customize title area. You can set any html - custom image counter or even custom navigation
 *	transitionIn = 'fade'			The transition type. Can be set to 'elastic', 'fade' or 'none'
 *	transitionOut = 'fade'			The transition type. Can be set to 'elastic', 'fade' or 'none'
 *	speedIn = 300					Speed of the fade and elastic transitions, in milliseconds
 *	speedOut = 300					Speed of the fade and elastic transitions, in milliseconds
 *	showCloseButton = true			Toggle close button
 *	showNavArrows = true			Toggle navigation arrows
 *	enableEscapeButton = true		Toggle if pressing Esc button closes FancyBox
 *	onStart = null					Will be called right before attempting to load the content
 *	onCancel = null					Will be called after loading is canceled
 *	onComplete = null				Will be called once the content is displayed
 *	onCleanup = null				Will be called just before closing
 *	onClosed = null					Will be called once FancyBox is closed
 */
Load::lib("html");
class FancyBox
{
    private $opciones;
    private $id;
    private $tipo;
    public function FancyBox($tipo = "imagen", $opciones = null)
    {
        if (is_array($tipo)) {
            $opciones = $tipo;
            $tipo = "imagen";
        } else {
            if ($tipo == "imagen" && $opciones == null) {
                $opciones = array("transitionIn" => "none", "transitionOut" => "none");
            }
            if ($tipo == "galeria" && $opciones == null) {
 /**
  * Callback que se ejecuta antes de guardar o modificar un registro
  */
 public function before_save()
 {
     Load::lib('utils');
     $this->url = $this->url ? Utils::slug($this->url) : Utils::slug($this->nombre);
     if ($this->getUrlRegistrada()) {
         if ($this->mensaje) {
             $taxonomia = $this->tipo == self::CATEGORIA ? 'categoría' : 'etiqueta';
             Flash::error('La ' . $taxonomia . ' con el nombre dado ya se encuentra registrada.');
         }
         return 'cancel';
     }
 }
Пример #22
0
 public function login()
 {
     $this->title = 'Iniciar sesión';
     Load::lib('SdAuth');
     if (!SdAuth::isLogged()) {
         if (Input::hasPost('txt_login')) {
             Flash::warning(SdAuth::getError());
         }
         Input::delete('txt_password');
         return FALSE;
     } else {
         return Router::redirect('/');
     }
 }
Пример #23
0
<?php

/**
 * Dailyscript - Web | App | Media
 *
 * Clase que se utiliza para validar los accesos a los usuarios
 *
 * @category    Sistema
 * @package     Libs
 * @author      Iván D. Meléndez
 * @copyright   Copyright (c) 2012 Dailyscript Team (http://www.dailyscript.com.co)
 * @version     1.0
 */
Load::lib('acl2');
Load::models('sistema/perfil');
class MkcAcl
{
    /**
     *
     * @var SimpleAcl
     */
    protected static $_acl = null;
    /**
     * arreglo con los templates para cada usuario
     *
     * @var array 
     */
    protected $_templates = array();
    /**
     * Método constructor
     */
Пример #24
0
 /**
  * Constructor
  *
  * @param string $module modulo al que pertenece el controlador
  * @param string $controller nombre del controlador
  * @param string $action nombre de la accion
  * @param array $parameters parametros enviados por url
  * */
 public function __construct($module, $controller, $action, $parameters)
 {
     //TODO: enviar un objeto
     $this->module_name = $module;
     $this->controller_name = $controller;
     $this->parameters = $parameters;
     $this->action_name = $action;
     //$this->cache['group'] = "$controller.$action";//.$id";
     //deprecated
     if ($this->libs) {
         // Carga las librerias indicadas
         foreach ($this->libs as $lib) {
             Load::lib($lib);
         }
     }
     //Carga de modelos
     if ($this->models) {
         call_user_func_array(array($this, 'models'), $this->models);
     }
 }
<?php

Load::lib('PHPMailer/PHPMailerAutoload');
Load::lib('auth');
Load::model('Usuario');
class RestaurarcuentaController extends AppController
{
    public function restaurarcuenta()
    {
        View::template('sbadmin');
        if (Input::hasPost('correo')) {
            $Usuario = new Usuario();
            $direccion = $_POST['correo']['email'];
            if ("SELECT count(*) FROM usuario WHERE email = '{$direccion}'" == 1) {
                $mail = new PHPMailer();
                $mail->isSMTP();
                //$mail­>SMTPDebug = 2;
                $mail->SMTPAuth = true;
                $mail->SMTPSecure = "ssl";
                $mail->Host = "smtp.gmail.com";
                $mail->Port = 465;
                $mail->Username = "******";
                $mail->Password = "******";
                $mail->setFrom('*****@*****.**', 'Gestión Documental');
                //$mail­>AddReplyTo("*****@*****.**", "Steven Ruiz");
                $mail->Subject = "asunto";
                $mail->msgHTML("mensaje");
                //$address = "*****@*****.**";
                $mail->addAddress($_POST['correo']['email'], "...");
                if (!$mail->send()) {
                    echo "Error al enviar: " . $mail->ErrorInfo;
Пример #26
0
 public function mensajeId()
 {
     Load::lib("formato");
     return "TXTMN" . Formato::ceros(rand(0, 1000000), 8);
 }
Пример #27
0
<?php

/**
 * Dailyscript - Web | App | Media
 *
 * Clase que se utiliza para la carga de archivos e imágenes
 *
 * @category    
 * @package     Libs
 * @author      Iván D. Meléndez
 * @copyright   Copyright (c) 2013 Dailyscript Team (http://www.dailyscript.com.co) 
 */
Load::lib('wideimage/WideImage');
class MkcUpload
{
    /**
     * Nombre del input del archivo
     *
     * @var string
     */
    public $file;
    /**
     * Extensión del achivo
     *
     * @var string
     */
    public $file_ext;
    /**
     * Nombre con el que se guardará el archivo
     *
     * @var string
Пример #28
0
	function ImageThumbRebuild()
	{
				$load = new Load();
		$load->lib('io');
		$o_dirs = IoHandler::ReadDir(IMAGE_PATH.'product/');
		$dirs = array();
		foreach ($o_dirs as $i => $dir)
		{
			if (preg_match('/product\/\d{4}-\d{2}-\d{2}/', $dir))
			{
				$dirs[] = $dir;
			}
		}
		$thumbwidth = $this->Config['thumbwidth'];
		$thumbheight = $this->Config['thumbheight'];
				$op = $_GET['op'];
		if ($op == 'run')
		{
			$od = $_GET['od'];
			$dir = $dirs[$od];
			$files = IoHandler::ReadDir($dir);
			foreach ($files as $i => $src_file)
			{
				$dst_file = str_replace('/product/', '/product/s-', $src_file);
				resize_image($src_file, $dst_file, $thumbwidth, $thumbheight);
			}
			echo '更新了目录[ '.$dir.' ],有[ <b>'.count($files).'</b> ]张缩略图被生成!';
			return;
		}
		$cronLength = count($dirs);
		include(handler('template')->file('@admin/tttuangou_imagethumb_rebuild'));
	}
Пример #29
0
function ajherrorlog($type='',$log='',$halt=1) {
	$logfile = ROOT_PATH . 'errorlog/'.$type . '-' . date('Y-m').'.php';
	if (!is_file($logfile)) {
		$log ="<? exit; ?>\r\n" . $log;
	}
	$log = "[".my_date_format(time(),"Y-m-d H:i:s")."]" . $log . "\r\n";

	global $IoHandler;
	if(is_null($IoHandler)) {
		$load = new Load();
		$load->lib('io');
		$IoHandler = new IoHandler();
		$log = " \r\n ------------------------------------------------------ \r\n " . $log;
	}
	if (!is_dir(dirname($logfile))) {
		$IoHandler->MakeDir(dirname($logfile));
	}

	$IoHandler->WriteFile($logfile,$log,'a');

	if($halt) {
		exit();
	}
}
Пример #30
0
<?php

Load::lib('fpdf/fpdf');
class PDF extends FPDF
{
    private $tipo;
    function Header()
    {
        //Logo Reparar Ruta
        //$ruta = PUBLIC_PATH. 'default/public/img/cintillo.png';
        //$this->Image($ruta,8,8,199,25);
        //Título
        $t = utf8_decode('PLANILLA DE AFILIACIÓN');
        $this->Ln(20);
        $this->SetFont('Times', 'B', 12);
        $this->Cell(0, 10, $t, 0, 1, 'C');
        $this->SetFont('Times', 'B', 8);
        $this->Cell(0, 1, 'Sistema Autogestionado de Salud', 0, 1, 'C');
        $this->SetFont('Times', 'B', 12);
        // Quitar por recomendacion d xiomanra $this->Cell(0,10,'EMPRESA MIXTA SOCIALISTA ARROZ DEL ALBA, S.A.',0,1,'C');
        $this->Ln(10);
    }
    function Footer()
    {
        $this->SetFont('Times', '', 12);
        $this->SetY(-22);
        $this->SetFont('Times', 'I', 9);
        $this->Cell(0, 2, utf8_decode('Carretera nacional vía Turen, sector E, planta Arroz del Alba, S.A Piritu Estado Portuguesa'), 0, 1, 'C', 0);
        $this->SetFont('Times', 'BI', 9);
        $this->Cell(0, 4, utf8_decode('Teléfonos 0256-3361377 / 3361455 / 3361333 / 3362000 / 3361255 '), 0, 0, 'C', 0);
    }