<?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_ACTIVE, 1);
 
   assert_options (ASSERT_BAIL, 1);
 
   assert_options (ASSERT_WARNING, 0);
 
   assert_options (ASSERT_QUIET_EVAL, 1);
 
   assert_options (ASSERT_CALLBACK, 'my_assert_handler');
 
   }
 
else
 
   {
 
   assert_options (ASSERT_ACTIVE, 0);
 
   }
 
 
 
// 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/');
 
?>
 
 
 |