Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static function doLoad ($FILE, $REPLACE = NULL)
- {
- if (array_key_exists ($FILE, $this->TEMPLATES))
- return self::doEval ($this->TEMPLATES[$FILE], $REPLACE);
- if (file_exists (TEMPLATE . 'tpl/' . $FILE . '.tpl'))
- {
- if (is_readable (TEMPLATE . 'tpl/' . $FILE . '.tpl'))
- {
- if (filesize (TEMPLATE . 'tpl/' . $FILE . '.tpl') > 0)
- {
- $fh = fopen (TEMPLATE . 'tpl/' . $FILE . '.tpl', 'r');
- $this->TEMPLATES[$FILE] = $fc = fread ($fh, filesize (TEMPLATE . 'tpl/' . $FILE . '.tpl'));
- fclose ($fh);
- return self::doEval ($fc, $REPLACE);
- }
- }
- }
- $this->TEMPLATES[$FILE] = '';
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement