Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Sobota, 24. október 2026

Rozdiely pre phpPlatonLib/templateSystems/phpTemplate/Attic/phpTemplate.class.php medzi verziami 1.11 a 1.12

verzia 1.11, 2002/08/04 18:15:50 verzia 1.12, 2002/08/12 23:07:30
Riadok 9 
Riadok 9 
 // NOT APPLICABLE NOW! It is printed "as is" outside <?php ?> tags.  // NOT APPLICABLE NOW! It is printed "as is" outside <?php ?> tags.
  */   */
   
 if (! isset($__phpTemplate_fnc_idx)) {  if (! isset($phpTemplate_cfg)) {
         $__phpTemplate_fnc_idx = 0;          $phpTemplate_cfg = array(
                           'load_function'        => null,
                           'method_function_name' => '__phpTemplate_function_',
                           'method_function_idx'  => 0
                           );
 }  }
   
 /* Output method (bit array) */  /* Output method (bit array) */
Riadok 54  class phpTemplate
Riadok 58  class phpTemplate
         var $_set_vars  = null;          var $_set_vars  = null;
         var $_method    = null;          var $_method    = null;
         var $_filename  = null;          var $_filename  = null;
           var $_load_fnc  = null;
         var $_debug     = 1;          var $_debug     = 1;
         var $_prepended = 0;          var $_prepended = 0;
   
         function phpTemplate($filename = '', $method = PHP_TEMPLATE_METHOD_NORMAL)          function phpTemplate($filename = '', $method = PHP_TEMPLATE_METHOD_NORMAL)
         {          {
                   global $phpTemplate_cfg;
   
                 foreach (array_keys($this->_tag) as $key) {                  foreach (array_keys($this->_tag) as $key) {
                         $this->_tag[$key] = preg_quote($this->_tag[$key]);                          $this->_tag[$key]            = preg_quote($this->_tag[$key]);
                         $this->_tag[$key.'_striped'] = stripslashes($this->_tag[$key]);                          $this->_tag[$key.'_striped'] = stripslashes($this->_tag[$key]);
                 }                  }
   
                 $this->_method   = $method;                  $this->_method   = $method;
                 $this->_filename = $filename;                  $this->_filename = $filename;
                   $this->_load_fnc = $phpTemplate_cfg['load_function'];
                 $this->reload();                  $this->reload();
   
                 return true;                  return true;
Riadok 85  class phpTemplate
Riadok 93  class phpTemplate
                 $this->_method = $method;                  $this->_method = $method;
         }          }
   
           function setLoadFunction($function_name)
           {
                   if (isset($this)) {
                           $this->_load_fnc = $function_name;
                   } else {
                           global $phpTemplate_cfg;
                           $phpTemplate_cfg['load_function'] = $function_name;
                   }
           }
   
         function _load($filename)          function _load($filename)
         {          {
                 if ($f = fopen($filename, 'r')) {                  if (isset($this->_load_fnc)) {
                           $load_fnc = $this->_load_fnc;
                           $data     = $load_fnc($filename);
                   } else {
                         $data = '';                          $data = '';
                         while ($tmp_data = fread($f, 1024)) {                          if ($f = fopen($filename, 'r')) {
                                 $data .= $tmp_data;                                  while ($tmp_data = fread($f, 1024)) {
                                           $data .= $tmp_data;
                                   }
                                   fclose($f);
                         }                          }
                         fclose($f);  
                         return $this->_stringTransform($data);  
                 }                  }
   
                 return array('phpTemplate DEBUG: file not found: '.$filename);                  if (! isset($data) || $data === false) {
                           return array('phpTemplate ERROR: cannot load template: '.$filename);
                   }
   
                   return $this->_stringTransform($data);
         }          }
   
         function load($filename)          function load($filename)
Riadok 380  class phpTemplate
Riadok 406  class phpTemplate
   
                 if ($this->_method & PHP_TEMPLATE_METHOD_FUNCTION) {                  if ($this->_method & PHP_TEMPLATE_METHOD_FUNCTION) {
                         /* getting function name */                          /* getting function name */
                         global $__phpTemplate_fnc_idx;                          global $phpTemplate_cfg;
                         $function_name = '__phpTemplate_function_'.$__phpTemplate_fnc_idx;                          $function_name = $phpTemplate_cfg['method_function_prefix']
                         $__phpTemplate_fnc_idx++;                                  . $phpTemplate_cfg['method_function_idx'];
                           $phpTemplate_cfg['method_function_idx']++;
   
                         return "if (! function_exists('$function_name')) {"                          return "if (! function_exists('$function_name')) {"
                                 ." function $function_name() {\n"                                  ." function $function_name() {\n"

Legend:
Odstranené z verzie1.11  
zmenené riadky
  Pridané vo verzii1.12

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok