Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.11 KB | None | 0 0
  1.         static function doLoad ($FILE, $REPLACE = NULL)
  2.         {
  3.                 if (array_key_exists ($FILE, $this->TEMPLATES))
  4.                         return self::doEval ($this->TEMPLATES[$FILE], $REPLACE);
  5.                
  6.                 if (file_exists (TEMPLATE . 'tpl/' . $FILE . '.tpl'))
  7.                 {
  8.                         if (is_readable (TEMPLATE . 'tpl/' . $FILE . '.tpl'))
  9.                         {
  10.                                 if (filesize (TEMPLATE . 'tpl/' . $FILE . '.tpl') > 0)
  11.                                 {
  12.                                         $fh = fopen (TEMPLATE . 'tpl/' . $FILE . '.tpl', 'r');
  13.                                         $this->TEMPLATES[$FILE] = $fc = fread ($fh, filesize (TEMPLATE . 'tpl/' . $FILE . '.tpl'));
  14.                                         fclose ($fh);
  15.                                        
  16.                                         return self::doEval ($fc, $REPLACE);
  17.                                 }
  18.                         }
  19.                 }
  20.                
  21.                 $this->TEMPLATES[$FILE] = '';
  22.                 return 0;
  23.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement