<?php
class Smarty_Compiler extends Smarty {
var $_folded_blocks = array(); // keeps folded template blocks
var $_current_file = null; // the current template being compiled
var $_current_line_no = 1; // line number for error messages
var $_capture_stack = array(); // keeps track of nested capture buffers
var $_plugin_info = array(); // keeps track of plugins to load
var $_init_smarty_vars = false;
var $_permitted_tokens = array('true','false','yes','no','on','off','null');
var $_db_qstr_regexp = null; // regexps are setup in the constructor
var $_si_qstr_regexp = null;
var $_qstr_regexp = null;
var $_func_regexp = null;
var $_reg_obj_regexp = null;
var $_var_bracket_regexp = null;
var $_num_const_regexp = null;
var $_dvar_guts_regexp = null;
var $_dvar_regexp = null;
var $_cvar_regexp = null;
var $_svar_regexp = null;
var $_avar_regexp = null;
var $_mod_regexp = null;
var $_var_regexp = null;
var $_parenth_param_regexp = null;
var $_func_call_regexp = null;
var $_obj_ext_regexp = null;
var $_obj_start_regexp = null;
var $_obj_params_regexp = null;
var $_obj_call_regexp = null;
var $_cacheable_state = 0;
var $_cache_attrs_count = 0;
var $_nocache_count = 0;
var $_cache_serial = null;
var $_cache_include = null;
var $_strip_depth = 0;
var $_additional_newline = "\n";
/**#@-*/
/**
* The class constructor.
*/
function Smarty_Compiler()
{
// matches double quoted strings:
// "foobar"
// "foo\"bar"
$this->_db_qstr_regexp = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"';
// matches single quoted strings:
// 'foobar'
// 'foo\'bar'
$this->_si_qstr_regexp = '\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'';
// matches single or double quoted strings
$this->_qstr_regexp = '(?:' . $this->_db_qstr_regexp . '|' . $this->_si_qstr_regexp . ')';
// matches bracket portion of vars
// [0]
// [foo]
// [$bar]
$this->_var_bracket_regexp = '\[\$?[\w\.]+\]';
// matches numerical constants
// 30
// -12
// 13.22
$this->_num_const_regexp = '(?:\-?\d+(?:\.\d+)?)';
// matches $ vars (not objects):
// $foo
// $foo.bar
// $foo.bar.foobar
// $foo[0]
// $foo[$bar]
// $foo[5][blah]
// $foo[5].bar[$foobar][4]
$this->_dvar_math_regexp = '(?:[\+\*\/\%]|(?:-(?!>)))';
$this->_dvar_math_var_regexp = '[\$\w\.\+\-\*\/\%\d\>\[\]]';
$this->_dvar_guts_regexp = '\w+(?:' . $this->_var_bracket_regexp
. ')*(?:\.\$?\w+(?:' . $this->_var_bracket_regexp . ')*)*(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?';
$this->_dvar_regexp = '\$' . $this->_dvar_guts_regexp;
// matches config vars:
// #foo#
// #foobar123_foo#
$this->_cvar_regexp = '\#\w+\#';
// matches section vars:
// %foo.bar%
$this->_svar_regexp = '\%\w+\.\w+\%';
// matches all valid variables (no quotes, no modifiers)
$this->_avar_regexp = '(?:' . $this->_dvar_regexp . '|'
. $this->_cvar_regexp . '|' . $this->_svar_regexp . ')';
// matches valid variable syntax:
// $foo
// $foo
// #foo#
// #foo#
// "text"
// "text"
$this->_var_regexp = '(?:' . $this->_avar_regexp . '|' . $this->_qstr_regexp . ')';
// matches valid object call (one level of object nesting allowed in parameters):
// $foo->bar
// $foo->bar()
// $foo->bar("text")
// $foo->bar($foo, $bar, "text")
// $foo->bar($foo, "foo")
// $foo->bar->foo()
// $foo->bar->foo->bar()
// $foo->bar($foo->bar)
// $foo->bar($foo->bar())
// $foo->bar($foo->bar($blah,$foo,44,"foo",$foo[0].bar))
$this->_obj_ext_regexp = '\->(?:\$?' . $this->_dvar_guts_regexp . ')';
$this->_obj_restricted_param_regexp = '(?:'
. '(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')(?:' . $this->_obj_ext_regexp . '(?:\((?:(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')'
. '(?:\s*,\s*(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . '))*)?\))?)*)';
$this->_obj_single_param_regexp = '(?:\w+|' . $this->_obj_restricted_param_regexp . '(?:\s*,\s*(?:(?:\w+|'
. $this->_var_regexp . $this->_obj_restricted_param_regexp . ')))*)';
$this->_obj_params_regexp = '\((?:' . $this->_obj_single_param_regexp
. '(?:\s*,\s*' . $this->_obj_single_param_regexp . ')*)?\)';
$this->_obj_start_regexp = '(?:' . $this->_dvar_regexp . '(?:' . $this->_obj_ext_regexp . ')+)';
$this->_obj_call_regexp = '(?:' . $this->_obj_start_regexp . '(?:' . $this->_obj_params_regexp . ')?(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?)';
// matches valid modifier syntax:
// |foo
// |@foo
// |foo:"bar"
// |foo:$bar
// |foo:"bar":$foobar
// |foo|bar
// |foo:$foo->bar
$this->_mod_regexp = '(?:\|@?\w+(?::(?:\w+|' . $this->_num_const_regexp . '|'
. $this->_obj_call_regexp . '|' . $this->_avar_regexp . '|' . $this->_qstr_regexp .'))*)';
// matches valid function name:
// foo123
// _foo_bar
$this->_func_regexp = '[a-zA-Z_]\w*';
// matches valid registered object:
// foo->bar
$this->_reg_obj_regexp = '[a-zA-Z_]\w*->[a-zA-Z_]\w*';
// matches valid parameter values:
// true
// $foo
// $foo|bar
// #foo#
// #foo#|bar
// "text"
// "text"|bar
// $foo->bar
$this->_param_regexp = '(?:\s*(?:' . $this->_obj_call_regexp . '|'
. $this->_var_regexp . '|' . $this->_num_const_regexp . '|\w+)(?>' . $this->_mod_regexp . '*)\s*)';
// matches valid parenthesised function parameters:
//
// "text"
// $foo, $bar, "text"
// $foo|bar, "foo"|bar, $foo->bar($foo)|bar
$this->_parenth_param_regexp = '(?:\((?:\w+|'
. $this->_param_regexp . '(?:\s*,\s*(?:(?:\w+|'
. $this->_param_regexp . ')))*)?\))';
// matches valid function call:
// foo()
// foo_bar($foo)
// _foo_bar($foo,"bar")
// foo123($foo,$foo->bar(),"foo")
$this->_func_call_regexp = '(?:' . $this->_func_regexp . '\s*(?:'
. $this->_parenth_param_regexp . '))';
}
/**
* compile a resource
*
* sets $compiled_content to the compiled source
* @param string $resource_name
* @param string $source_content
* @param string $compiled_content
* @return true
*/
function _compile_file($resource_name, $source_content, &$compiled_content)
{
if ($this->security) {
// do not allow php syntax to be executed unless specified
if ($this->php_handling == SMARTY_PHP_ALLOW &&
!$this->security_settings['PHP_HANDLING']) {
$this->php_handling = SMARTY_PHP_PASSTHRU;
}
}
$this->_load_filters();
$t
没有合适的资源?快使用搜索试试~ 我知道了~
AK企业网站系统.7z
共284个文件
php:88个
gif:84个
htm:68个
0 下载量 14 浏览量
2023-03-15
08:24:35
上传
评论
收藏 314KB 7Z 举报
温馨提示
AK企业网站系统.7z
资源推荐
资源详情
资源评论
收起资源包目录
AK企业网站系统.7z (284个子文件)
db.ak 43KB
render.inc.bin 13KB
ui.css 10KB
reset.css 9KB
style.css 9KB
admin.css 8KB
index.css 6KB
iframe.css 1KB
tool.gif 15KB
body.gif 9KB
icons.gif 5KB
img_12.gif 3KB
icon_warning.gif 3KB
icon_info.gif 3KB
addapp.gif 2KB
img_9.gif 2KB
mb_15.gif 2KB
shopping.gif 2KB
loading.gif 1KB
menu_home.gif 1KB
i_menu_home.gif 1KB
menu_hover.gif 1KB
i_menu_hover.gif 1KB
QQ.gif 1KB
img_6.gif 1KB
search_btn.gif 1KB
picture.gif 964B
logo.gif 896B
logo.gif 864B
links_bg.gif 833B
loading.gif 763B
header_i_bg.gif 721B
img_1.gif 667B
folder.gif 618B
waiting.gif 597B
img_8.gif 572B
comment.gif 567B
orders.gif 551B
t_2.gif 486B
i_menu_a.gif 403B
s_btn.gif 403B
i_menu_line.gif 369B
mb_14g.gif 344B
go_top.gif 325B
go_down.gif 322B
links.gif 319B
attach.gif 317B
leftmenu.gif 307B
mb_14.gif 298B
i_c_bg.gif 292B
img_7.gif 288B
banner_bottom.gif 268B
bg.gif 246B
gotop.gif 245B
search_input.gif 238B
mb_16.gif 235B
next_btn.gif 233B
previous_btn.gif 225B
c_line.gif 218B
i_bg.gif 213B
more.gif 180B
nav_bg.gif 176B
search.gif 173B
img_11.gif 160B
i_foot_bg.gif 152B
c_bg.gif 139B
close.gif 128B
img_13.gif 102B
img_15.gif 100B
icon06.gif 99B
img_16.gif 98B
progress.gif 94B
progressbg.gif 93B
img_17.gif 93B
title.gif 91B
img_14.gif 91B
codebg.gif 89B
toparrow.gif 80B
new.gif 79B
down.gif 78B
ico03.gif 73B
img_18.gif 68B
icon04.gif 67B
nav_hover.gif 66B
line_2.gif 59B
icon02.gif 56B
icon05.gif 55B
empty.gif 49B
icon01.gif 48B
dot_r.gif 46B
dot.gif 45B
dot_w.gif 44B
admincp_moduleitem.htm 18KB
admincp_module.htm 8KB
admincp_category_edit.htm 6KB
,page_home.htm 5KB
admincp_items.htm 4KB
layout.htm 4KB
admincp_welcome.htm 4KB
,guestbook.htm 3KB
共 284 条
- 1
- 2
- 3
资源评论
qq_38220914
- 粉丝: 605
- 资源: 4312
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功