37 public function compile($args, $compiler, $parameter, $tag)
40 $compiler->has_output =
true;
43 if ($_attr[
'nocache']) {
44 $compiler->tag_nocache =
true;
46 unset($_attr[
'nocache']);
53 $compiler->tag_nocache = $compiler->tag_nocache || !$tag_info[1];
55 $_paramsArray = array();
56 foreach ($_attr as $_key => $_value) {
58 $_paramsArray[] =
"$_key=>$_value";
59 }
elseif ($compiler->template->caching && in_array($_key,$tag_info[2])) {
60 $_value = str_replace(
"'",
"^#^",$_value);
61 $_paramsArray[] =
"'$_key'=>^#^.var_export($_value,true).^#^";
63 $_paramsArray[] =
"'$_key'=>$_value";
66 $_params =
'array(' . implode(
",", $_paramsArray) .
')';
67 $function = $tag_info[0];
69 if (!is_array($function)) {
70 $output =
"<?php echo {$function}({$_params},\$_smarty_tpl);?>\n";
71 }
else if (is_object($function[0])) {
72 $output =
"<?php echo \$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['{$tag}'][0][0]->{$function[1]}({$_params},\$_smarty_tpl);?>\n";
74 $output =
"<?php echo {$function[0]}::{$function[1]}({$_params},\$_smarty_tpl);?>\n";
const PLUGIN_FUNCTION
plugin types
compile($args, $compiler, $parameter, $tag)
Compiles code for the execution of a registered function.
getAttributes($compiler, $attributes)
This function checks if the attributes passed are valid.
if(strlen($date2)== '10') if($type== 'users-by-age'&&a_priv('admin_users', true)) elseif($type== 'forums-count'&&a_priv('admin_content', true)) elseif($type== 'forums-categories'&&a_priv('admin_content', true)) elseif($type== 'users-count'&&a_priv('admin_users', true)) elseif($type== 'product-categories'&&a_priv('admin_products', true)) elseif($type== 'users-by-sex'&&a_priv('admin_users', true)) elseif($type== 'users-by-country'&&a_priv('admin_users', true)) elseif($type== 'sales'&&a_priv('admin_sales', true))