Beispiel #1
0
 public function __construct($options)
 {
     set_time_limit(0);
     ini_set('memory_limit', '512M');
     glz_importApplicationLib('PHPExcel/Classes/PHPExcel/IOFactory.php');
     $csv = new PHPExcel_Reader_CSV();
     $csv->setDelimiter($options['delimiter']);
     $csv->setEnclosure($options['enclosure']);
     $excel = $csv->load($options['filePath']);
     $this->worksheet = $excel->getActiveSheet();
 }
Beispiel #2
0
<?php

/**
 * This file is part of the GLIZY framework.
 * Copyright (c) 2005-2012 Daniele Ugoletti <*****@*****.**>
 *
 * For the full copyright and license information, please view the COPYRIGHT.txt
 * file that was distributed with this source code.
 */
define('K_PATH_CACHE', org_glizy_Paths::getRealPath('CACHE'));
define('K_PATH_URL_CACHE', org_glizy_Paths::getRealPath('CACHE'));
define('K_PATH_IMAGES', org_glizy_Paths::getRealPath('APPLICATION_TEMPLATE'));
glz_importApplicationLib('tcpdf/tcpdf.php');
glz_importApplicationLib('tcpdf/config/lang/eng.php');
class org_glizy_template_layoutManager_PDF extends org_glizy_template_layoutManager_PHP
{
    private $pageUrl;
    private $pageTitle;
    function __construct($fileName = '', $rootPath = '')
    {
        parent::__construct('pdf.php', $rootPath);
        $this->pageUrl = GLZ_HOST . "/index.php?" . __Request::get('__url__');
        $this->pageUrl = str_replace('&printPdf=1', '', $this->pageUrl);
        $this->pageTitle = $this->currentMenu->title;
    }
    function apply(&$regionContent)
    {
        $templateSource = parent::apply($regionContent);
        $xml = new SimpleXMLElement(utf8_encode($templateSource));
        // TCPDF stuff:
        // create new PDF document