includes/template.php
changeset 128 01955bf53f96
parent 125 fb31c951d3a2
child 133 af0f6ec48de3
equal deleted inserted replaced
127:a2b20a832447 128:01955bf53f96
   941     {
   941     {
   942       //die($tpl_filename);
   942       //die($tpl_filename);
   943       $h = fopen($tpl_filename, 'w');
   943       $h = fopen($tpl_filename, 'w');
   944       if(!$h) return $text;
   944       if(!$h) return $text;
   945       $t = addslashes($text);
   945       $t = addslashes($text);
   946       fwrite($h, '<?php $md5 = \''.$md5.'\'; $tpl_text = \''.$t.'\'; ?>');
   946       $notice = <<<EOF
       
   947 
       
   948 /*
       
   949  * NOTE: This file was automatically generated by Enano and is based on compiled code. Do not edit this file.
       
   950  * If you edit this file, any changes you make will be lost the next time the associated source template file is edited.
       
   951  */
       
   952 
       
   953 EOF;
       
   954       fwrite($h, '<?php ' . $notice . ' $md5 = \''.$md5.'\'; $tpl_text = \''.$t.'\'; ?>');
   947       fclose($h);
   955       fclose($h);
   948     }
   956     }
   949     return $text; //('<pre>'.htmlspecialchars($text).'</pre>');
   957     return $text; //('<pre>'.htmlspecialchars($text).'</pre>');
   950   }
   958   }
   951   
   959