Login   Register  
PHP Classes
elePHPant
Icontem

File: sptpl.inc

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Andrioli Darvin  >  SpoolTemplate  >  sptpl.inc  >  Download  
File: sptpl.inc
Role: Auxiliary script
Content type: text/plain
Description: Class main include
Class: SpoolTemplate
Database report generation based on templates
Author: By
Last change: added new includes
Date: 2004-03-05 12:36
Size: 1,897 bytes
 

Contents

Class file image Download
<?php
$TemplateDir
='./';


define('DEBUG',0);
function 
myErrorHandler ($errno$errstr$errfile$errline) {
    echo 
"FATAL [$errno$errstr\n";
    echo 
"  Fatale error in line ".$errline." of file ".$errfile;
    
$GLOBALS['dbg']->print_stack();
    exit(
1);
}
function 
my_assert_handler ($file$line$code) {
   echo 
"<hr>Assertion Failed:
       File '
$file'<br>
       Line '
$line'<br>
       Code '
$code'<br><hr>";
}

if (
DEBUG)
   {
   
$old_error_handler set_error_handler("myErrorHandler");
   
assert_options (ASSERT_ACTIVE1);
   
assert_options (ASSERT_BAIL1);
   
assert_options (ASSERT_WARNING0);
   
assert_options (ASSERT_QUIET_EVAL1);
   
assert_options (ASSERT_CALLBACK'my_assert_handler');
   }
else
   {
   
assert_options (ASSERT_ACTIVE0);
   }


// definitions required by CRow
define('NONE','n');


// Basic include. You must include all the following module in order to get
// Spooltemplate work.
require_once('sptpl_GlobalFunc.php');
require_once(
'sptpl_clsCounter.php');
require_once(
'sptpl_clsDataStorage.php');
require_once(
'sptpl_clsPageMgr.php');
require_once(
'sptpl_clsFont.php');
require_once(
'sptpl_clsNewPage.php');
require_once(
'sptpl_clsRow.php');
require_once(
'sptpl_clsBlock.php');
require_once(
'sptpl_clsColumn.php');
require_once(
'sptpl.php');
require_once(
'CXml2Array.php');

// Comment out the following two row if you want use the class CPagePrinter.
// Notice: you must comment out the line extension=php_printer.dll on your php.ini
// You may download the APrint module from
// It works only on Windows box.
// require_once('sptpl_clsPagePrinter.php');
// require_once('Aprint.php');

// Comment out the following rows if you want the pdf output (CPagePdf)
// require_once('sptpl_clsPagePdf.php');
// require_once('pdf/class.pdf.php');
// define('PDFFONTDIR','../pdf/fonts/');
?>