PEEL Shopping
Open source ecommerce : PEEL Shopping
smarty_internal_templatebase.php
Go to the documentation of this file.
1 <?php
19 
32  public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null, $display = false, $merge_tpl_vars = true, $no_output_filter = false)
33  {
34  $GLOBALS['smarty_create_time'] = microtime_float();
35  if ($template === null && $this instanceof $this->template_class) {
36  $template = $this;
37  }
38  if (!empty($cache_id) && is_object($cache_id)) {
39  $parent = $cache_id;
40  $cache_id = null;
41  }
42  if ($parent === null && ($this instanceof Smarty || is_string($template))) {
43  $parent = $this;
44  }
45  // create template object if necessary
46  $_template = ($template instanceof $this->template_class)
47  ? $template
48  : $this->smarty->createTemplate($template, $cache_id, $compile_id, $parent, false);
49  // if called by Smarty object make sure we use current caching status
50  if ($this instanceof Smarty) {
51  $_template->caching = $this->caching;
52  }
53  // merge all variable scopes into template
54  if ($merge_tpl_vars) {
55  // save local variables
56  $save_tpl_vars = $_template->tpl_vars;
57  $save_config_vars = $_template->config_vars;
58  $ptr_array = array($_template);
59  $ptr = $_template;
60  while (isset($ptr->parent)) {
61  $ptr_array[] = $ptr = $ptr->parent;
62  }
63  $ptr_array = array_reverse($ptr_array);
64  $parent_ptr = reset($ptr_array);
65  $tpl_vars = $parent_ptr->tpl_vars;
66  $config_vars = $parent_ptr->config_vars;
67  while ($parent_ptr = next($ptr_array)) {
68  if (!empty($parent_ptr->tpl_vars)) {
69  $tpl_vars = array_merge($tpl_vars, $parent_ptr->tpl_vars);
70  }
71  if (!empty($parent_ptr->config_vars)) {
72  $config_vars = array_merge($config_vars, $parent_ptr->config_vars);
73  }
74  }
75  if (!empty(Smarty::$global_tpl_vars)) {
77  }
78  $_template->tpl_vars = $tpl_vars;
79  $_template->config_vars = $config_vars;
80  }
81  // dummy local smarty variable
82  if (!isset($_template->tpl_vars['smarty'])) {
83  $_template->tpl_vars['smarty'] = new Smarty_Variable;
84  }
85  if (isset($this->smarty->error_reporting)) {
86  $_smarty_old_error_level = error_reporting($this->smarty->error_reporting);
87  }
88  // check URL debugging control
89  if (!$this->smarty->debugging && $this->smarty->debugging_ctrl == 'URL') {
90  if (isset($_SERVER['QUERY_STRING'])) {
91  $_query_string = $_SERVER['QUERY_STRING'];
92  } else {
93  $_query_string = '';
94  }
95  if (false !== strpos($_query_string, $this->smarty->smarty_debug_id)) {
96  if (false !== strpos($_query_string, $this->smarty->smarty_debug_id . '=on')) {
97  // enable debugging for this browser session
98  setcookie('SMARTY_DEBUG', true);
99  $this->smarty->debugging = true;
100  } elseif (false !== strpos($_query_string, $this->smarty->smarty_debug_id . '=off')) {
101  // disable debugging for this browser session
102  setcookie('SMARTY_DEBUG', false);
103  $this->smarty->debugging = false;
104  } else {
105  // enable debugging for this page
106  $this->smarty->debugging = true;
107  }
108  } else {
109  if (isset($_COOKIE['SMARTY_DEBUG'])) {
110  $this->smarty->debugging = true;
111  }
112  }
113  }
114  // must reset merge template date
115  $_template->smarty->merged_templates_func = array();
116  // get rendered template
117  // disable caching for evaluated code
118  if ($_template->source->recompiled) {
119  $_template->caching = false;
120  }
121  // checks if template exists
122  if (!$_template->source->exists) {
123  if ($_template->parent instanceof Smarty_Internal_Template) {
124  $parent_resource = " in '{$_template->parent->template_resource}'";
125  } else {
126  $parent_resource = '';
127  }
128  throw new SmartyException("Unable to load template {$_template->source->type} '{$_template->source->name}'{$parent_resource}");
129  }
130  // read from cache or render
131  if (!($_template->caching == Smarty::CACHING_LIFETIME_CURRENT || $_template->caching == Smarty::CACHING_LIFETIME_SAVED) || !$_template->cached->valid) {
132  // render template (not loaded and not in cache)
133  if (!$_template->source->uncompiled) {
134  $_smarty_tpl = $_template;
135  if ($_template->source->recompiled) {
136  if ($this->smarty->debugging) {
138  }
139  $code = $_template->compiler->compileTemplate($_template);
140  if ($this->smarty->debugging) {
142  }
143  if ($this->smarty->debugging) {
145  }
146  try {
147  ob_start();
148  eval("?>" . $code);
149  unset($code);
150  } catch (Exception $e) {
151  ob_get_clean();
152  throw $e;
153  }
154  } else {
155  if (!$_template->compiled->exists || ($_template->smarty->force_compile && !$_template->compiled->isCompiled)) {
156  $_template->compileTemplateSource();
157  }
158  if ($this->smarty->debugging) {
160  }
161  if (!$_template->compiled->loaded) {
162  include($_template->compiled->filepath);
163  if ($_template->mustCompile) {
164  // recompile and load again
165  $_template->compileTemplateSource();
166  include($_template->compiled->filepath);
167  }
168  $_template->compiled->loaded = true;
169  } else {
170  $_template->decodeProperties($_template->compiled->_properties, false);
171  }
172  try {
173  ob_start();
174  if (empty($_template->properties['unifunc']) || !is_callable($_template->properties['unifunc'])) {
175  throw new SmartyException("Invalid compiled template for '{$_template->template_resource}'");
176  }
177  array_unshift($_template->_capture_stack,array());
178  //
179  // render compiled template
180  //
181  $_template->properties['unifunc']($_template);
182  // any unclosed {capture} tags ?
183  if (isset($_template->_capture_stack[0][0])) {
184  $_template->capture_error();
185  }
186  array_shift($_template->_capture_stack);
187  } catch (Exception $e) {
188  ob_get_clean();
189  throw $e;
190  }
191  }
192  } else {
193  if ($_template->source->uncompiled) {
194  if ($this->smarty->debugging) {
196  }
197  try {
198  ob_start();
199  $_template->source->renderUncompiled($_template);
200  } catch (Exception $e) {
201  ob_get_clean();
202  throw $e;
203  }
204  } else {
205  throw new SmartyException("Resource '$_template->source->type' must have 'renderUncompiled' method");
206  }
207  }
208  $_output = ob_get_clean();
209  if (!$_template->source->recompiled && empty($_template->properties['file_dependency'][$_template->source->uid])) {
210  $_template->properties['file_dependency'][$_template->source->uid] = array($_template->source->filepath, $_template->source->timestamp, $_template->source->type);
211  }
212  if ($_template->parent instanceof Smarty_Internal_Template) {
213  $_template->parent->properties['file_dependency'] = array_merge($_template->parent->properties['file_dependency'], $_template->properties['file_dependency']);
214  foreach ($_template->required_plugins as $code => $tmp1) {
215  foreach ($tmp1 as $name => $tmp) {
216  foreach ($tmp as $type => $data) {
217  $_template->parent->required_plugins[$code][$name][$type] = $data;
218  }
219  }
220  }
221  }
222  if ($this->smarty->debugging) {
224  }
225  // write to cache when nessecary
226  if (!$_template->source->recompiled && ($_template->caching == Smarty::CACHING_LIFETIME_SAVED || $_template->caching == Smarty::CACHING_LIFETIME_CURRENT)) {
227  if ($this->smarty->debugging) {
229  }
230  $_template->properties['has_nocache_code'] = false;
231  // get text between non-cached items
232  $cache_split = preg_split("!/\*%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*\/(.+?)/\*/%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*/!s", $_output);
233  // get non-cached items
234  preg_match_all("!/\*%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*\/(.+?)/\*/%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*/!s", $_output, $cache_parts);
235  $output = '';
236  // loop over items, stitch back together
237  foreach ($cache_split as $curr_idx => $curr_split) {
238  // escape PHP tags in template content
239  $output .= preg_replace('/(<%|%>|<\?php|<\?|\?>)/', '<?php echo \'$1\'; ?>', $curr_split);
240  if (isset($cache_parts[0][$curr_idx])) {
241  $_template->properties['has_nocache_code'] = true;
242  // remove nocache tags from cache output
243  $output .= preg_replace("!/\*/?%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*/!", '', $cache_parts[0][$curr_idx]);
244  }
245  }
246  if (!$no_output_filter && !$_template->has_nocache_code && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) {
248  }
249  // rendering (must be done before writing cache file because of {function} nocache handling)
250  $_smarty_tpl = $_template;
251  try {
252  ob_start();
253  eval("?>" . $output);
254  $_output = ob_get_clean();
255  } catch (Exception $e) {
256  ob_get_clean();
257  throw $e;
258  }
259  // write cache file content
260  $_template->writeCachedContent($output);
261  if ($this->smarty->debugging) {
263  }
264  } else {
265  // var_dump('renderTemplate', $_template->has_nocache_code, $_template->template_resource, $_template->properties['nocache_hash'], $_template->parent->properties['nocache_hash'], $_output);
266  if (!empty($_template->properties['nocache_hash']) && !empty($_template->parent->properties['nocache_hash'])) {
267  // replace nocache_hash
268  $_output = str_replace("{$_template->properties['nocache_hash']}", $_template->parent->properties['nocache_hash'], $_output);
269  $_template->parent->has_nocache_code = $_template->parent->has_nocache_code || $_template->has_nocache_code;
270  }
271  }
272  } else {
273  if ($this->smarty->debugging) {
275  }
276  try {
277  ob_start();
278  array_unshift($_template->_capture_stack,array());
279  //
280  // render cached template
281  //
282  $_template->properties['unifunc']($_template);
283  // any unclosed {capture} tags ?
284  if (isset($_template->_capture_stack[0][0])) {
285  $_template->capture_error();
286  }
287  array_shift($_template->_capture_stack);
288  $_output = ob_get_clean();
289  } catch (Exception $e) {
290  ob_get_clean();
291  throw $e;
292  }
293  if ($this->smarty->debugging) {
295  }
296  }
297  if ((!$this->caching || $_template->has_nocache_code || $_template->source->recompiled) && !$no_output_filter && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) {
298  $_output = Smarty_Internal_Filter_Handler::runFilter('output', $_output, $_template);
299  }
300  if (isset($this->error_reporting)) {
301  error_reporting($_smarty_old_error_level);
302  }
303  // display or fetch
304  if ($display) {
305  if ($this->caching && $this->cache_modified_check) {
306  $_isCached = $_template->isCached() && !$_template->has_nocache_code;
307  $_last_modified_date = @substr($_SERVER['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3);
308  if ($_isCached && $_template->cached->timestamp <= strtotime($_last_modified_date)) {
309  switch (PHP_SAPI) {
310  case 'cgi': // php-cgi < 5.3
311  case 'cgi-fcgi': // php-cgi >= 5.3
312  case 'fpm-fcgi': // php-fpm >= 5.3.3
313  header('Status: 304 Not Modified');
314  break;
315 
316  case 'cli':
317  if (/* ^phpunit */!empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS'])/* phpunit$ */) {
318  $_SERVER['SMARTY_PHPUNIT_HEADERS'][] = '304 Not Modified';
319  }
320  break;
321 
322  default:
323  header($_SERVER['SERVER_PROTOCOL'].' 304 Not Modified');
324  break;
325  }
326  } else {
327  switch (PHP_SAPI) {
328  case 'cli':
329  if (/* ^phpunit */!empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS'])/* phpunit$ */) {
330  $_SERVER['SMARTY_PHPUNIT_HEADERS'][] = 'Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->cached->timestamp) . ' GMT';
331  }
332  break;
333 
334  default:
335  header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->cached->timestamp) . ' GMT');
336  break;
337  }
338  echo $_output;
339  }
340  } else {
341  echo $_output;
342  }
343  // debug output
344  if ($this->smarty->debugging) {
346  }
347  if ($merge_tpl_vars) {
348  // restore local variables
349  $_template->tpl_vars = $save_tpl_vars;
350  $_template->config_vars = $save_config_vars;
351  }
352  $GLOBALS['peel_debug'][] = array('template' => 'Display template Smarty <b>' . $_template->source->name .'</b>' . ($_template->smarty->force_compile?' - <span class="bold">recompile forced</span> (=> you are working local or with recompile forced in your configuration file)':''), 'duration' => microtime_float() - $GLOBALS['smarty_create_time'], 'start' => $GLOBALS['smarty_create_time'] - $GLOBALS['script_start_time']);
353  return;
354  } else {
355  if ($merge_tpl_vars) {
356  // restore local variables
357  $_template->tpl_vars = $save_tpl_vars;
358  $_template->config_vars = $save_config_vars;
359  }
360  $GLOBALS['peel_debug'][] = array('template' => 'Fetch template Smarty <b>' . $_template->source->name .'</b>' . ($_template->smarty->force_compile?' - <span class="bold">recompile forced</span> (=> you are working local or with recompile forced in your configuration file)':''), 'duration' => microtime_float() - $GLOBALS['smarty_create_time'], 'start' => $GLOBALS['smarty_create_time'] - $GLOBALS['script_start_time']);
361  // return fetched content
362  return $_output;
363  }
364  }
365 
374  public function display($template = null, $cache_id = null, $compile_id = null, $parent = null)
375  {
376  // display template
377  $this->fetch($template, $cache_id, $compile_id, $parent, true);
378  }
379 
389  public function isCached($template = null, $cache_id = null, $compile_id = null, $parent = null)
390  {
391  if ($template === null && $this instanceof $this->template_class) {
392  return $this->cached->valid;
393  }
394  if (!($template instanceof $this->template_class)) {
395  if ($parent === null) {
396  $parent = $this;
397  }
398  $template = $this->smarty->createTemplate($template, $cache_id, $compile_id, $parent, false);
399  }
400  // return cache status of template
401  return $template->cached->valid;
402  }
403 
410  public function createData($parent = null)
411  {
412  return new Smarty_Data($parent, $this);
413  }
414 
426  public function registerPlugin($type, $tag, $callback, $cacheable = true, $cache_attr = null)
427  {
428  if (isset($this->smarty->registered_plugins[$type][$tag])) {
429  throw new SmartyException("Plugin tag \"{$tag}\" already registered");
430  } elseif (!is_callable($callback)) {
431  throw new SmartyException("Plugin \"{$tag}\" not callable");
432  } else {
433  $this->smarty->registered_plugins[$type][$tag] = array($callback, (bool) $cacheable, (array) $cache_attr);
434  }
435 
436  return $this;
437  }
438 
446  public function unregisterPlugin($type, $tag)
447  {
448  if (isset($this->smarty->registered_plugins[$type][$tag])) {
449  unset($this->smarty->registered_plugins[$type][$tag]);
450  }
451 
452  return $this;
453  }
454 
462  public function registerResource($type, $callback)
463  {
464  $this->smarty->registered_resources[$type] = $callback instanceof Smarty_Resource ? $callback : array($callback, false);
465  return $this;
466  }
467 
474  public function unregisterResource($type)
475  {
476  if (isset($this->smarty->registered_resources[$type])) {
477  unset($this->smarty->registered_resources[$type]);
478  }
479 
480  return $this;
481  }
482 
490  public function registerCacheResource($type, Smarty_CacheResource $callback)
491  {
492  $this->smarty->registered_cache_resources[$type] = $callback;
493  return $this;
494  }
495 
502  public function unregisterCacheResource($type)
503  {
504  if (isset($this->smarty->registered_cache_resources[$type])) {
505  unset($this->smarty->registered_cache_resources[$type]);
506  }
507 
508  return $this;
509  }
510 
523  public function registerObject($object_name, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array())
524  {
525  // test if allowed methodes callable
526  if (!empty($allowed)) {
527  foreach ((array) $allowed as $method) {
528  if (!is_callable(array($object_impl, $method))) {
529  throw new SmartyException("Undefined method '$method' in registered object");
530  }
531  }
532  }
533  // test if block methodes callable
534  if (!empty($block_methods)) {
535  foreach ((array) $block_methods as $method) {
536  if (!is_callable(array($object_impl, $method))) {
537  throw new SmartyException("Undefined method '$method' in registered object");
538  }
539  }
540  }
541  // register the object
542  $this->smarty->registered_objects[$object_name] =
543  array($object_impl, (array) $allowed, (boolean) $smarty_args, (array) $block_methods);
544  return $this;
545  }
546 
554  public function getRegisteredObject($name)
555  {
556  if (!isset($this->smarty->registered_objects[$name])) {
557  throw new SmartyException("'$name' is not a registered object");
558  }
559  if (!is_object($this->smarty->registered_objects[$name][0])) {
560  throw new SmartyException("registered '$name' is not an object");
561  }
562  return $this->smarty->registered_objects[$name][0];
563  }
564 
571  public function unregisterObject($name)
572  {
573  if (isset($this->smarty->registered_objects[$name])) {
574  unset($this->smarty->registered_objects[$name]);
575  }
576 
577  return $this;
578  }
579 
588  public function registerClass($class_name, $class_impl)
589  {
590  // test if exists
591  if (!class_exists($class_impl)) {
592  throw new SmartyException("Undefined class '$class_impl' in register template class");
593  }
594  // register the class
595  $this->smarty->registered_classes[$class_name] = $class_impl;
596  return $this;
597  }
598 
606  public function registerDefaultPluginHandler($callback)
607  {
608  if (is_callable($callback)) {
609  $this->smarty->default_plugin_handler_func = $callback;
610  } else {
611  throw new SmartyException("Default plugin handler '$callback' not callable");
612  }
613 
614  return $this;
615  }
616 
624  public function registerDefaultTemplateHandler($callback)
625  {
626  if (is_callable($callback)) {
627  $this->smarty->default_template_handler_func = $callback;
628  } else {
629  throw new SmartyException("Default template handler '$callback' not callable");
630  }
631 
632  return $this;
633  }
634 
642  public function registerDefaultConfigHandler($callback)
643  {
644  if (is_callable($callback)) {
645  $this->smarty->default_config_handler_func = $callback;
646  } else {
647  throw new SmartyException("Default config handler '$callback' not callable");
648  }
649 
650  return $this;
651  }
652 
660  public function registerFilter($type, $callback)
661  {
662  $this->smarty->registered_filters[$type][$this->_get_filter_name($callback)] = $callback;
663  return $this;
664  }
665 
673  public function unregisterFilter($type, $callback)
674  {
675  $name = $this->_get_filter_name($callback);
676  if (isset($this->smarty->registered_filters[$type][$name])) {
677  unset($this->smarty->registered_filters[$type][$name]);
678  }
679 
680  return $this;
681  }
682 
689  public function _get_filter_name($function_name)
690  {
691  if (is_array($function_name)) {
692  $_class_name = (is_object($function_name[0]) ?
693  get_class($function_name[0]) : $function_name[0]);
694  return $_class_name . '_' . $function_name[1];
695  } else {
696  return $function_name;
697  }
698  }
699 
707  public function loadFilter($type, $name)
708  {
709  $_plugin = "smarty_{$type}filter_{$name}";
710  $_filter_name = $_plugin;
711  if ($this->smarty->loadPlugin($_plugin)) {
712  if (class_exists($_plugin, false)) {
713  $_plugin = array($_plugin, 'execute');
714  }
715  if (is_callable($_plugin)) {
716  $this->smarty->registered_filters[$type][$_filter_name] = $_plugin;
717  return true;
718  }
719  }
720  throw new SmartyException("{$type}filter \"{$name}\" not callable");
721  }
722 
730  public function unloadFilter($type, $name)
731  {
732  $_filter_name = "smarty_{$type}filter_{$name}";
733  if (isset($this->smarty->registered_filters[$type][$_filter_name])) {
734  unset ($this->smarty->registered_filters[$type][$_filter_name]);
735  }
736 
737  return $this;
738  }
739 
746  private function replaceCamelcase($match) {
747  return "_" . strtolower($match[1]);
748  }
749 
756  public function __call($name, $args)
757  {
758  static $_prefixes = array('set' => true, 'get' => true);
759  static $_resolved_property_name = array();
760  static $_resolved_property_source = array();
761 
762  // method of Smarty object?
763  if (method_exists($this->smarty, $name)) {
764  return call_user_func_array(array($this->smarty, $name), $args);
765  }
766  // see if this is a set/get for a property
767  $first3 = strtolower(substr($name, 0, 3));
768  if (isset($_prefixes[$first3]) && isset($name[3]) && $name[3] !== '_') {
769  if (isset($_resolved_property_name[$name])) {
770  $property_name = $_resolved_property_name[$name];
771  } else {
772  // try to keep case correct for future PHP 6.0 case-sensitive class methods
773  // lcfirst() not available < PHP 5.3.0, so improvise
774  $property_name = strtolower(substr($name, 3, 1)) . substr($name, 4);
775  // convert camel case to underscored name
776  $property_name = preg_replace_callback('/([A-Z])/', array($this,'replaceCamelcase'), $property_name);
777  $_resolved_property_name[$name] = $property_name;
778  }
779  if (isset($_resolved_property_source[$property_name])) {
780  $_is_this = $_resolved_property_source[$property_name];
781  } else {
782  $_is_this = null;
783  if (property_exists($this, $property_name)) {
784  $_is_this = true;
785  } else if (property_exists($this->smarty, $property_name)) {
786  $_is_this = false;
787  }
788  $_resolved_property_source[$property_name] = $_is_this;
789  }
790  if ($_is_this) {
791  if ($first3 == 'get')
792  return $this->$property_name;
793  else
794  return $this->$property_name = $args[0];
795  } else if ($_is_this === false) {
796  if ($first3 == 'get')
797  return $this->smarty->$property_name;
798  else
799  return $this->smarty->$property_name = $args[0];
800  } else {
801  throw new SmartyException("property '$property_name' does not exist.");
802  return false;
803  }
804  }
805  if ($name == 'Smarty') {
806  throw new SmartyException("PHP5 requires you to call __construct() instead of Smarty()");
807  }
808  // must be unknown
809  throw new SmartyException("Call of unknown method '$name'.");
810  }
811 
812 }
813 
814 ?>
static runFilter($type, $content, Smarty_Internal_Template $template)
Run filters over content.
foreach(array('date1', 'date2', 'type', 'renewals', 'width') as $item) $data
Definition: chart-data.php:29
getRegisteredObject($name)
return a reference to a registered object
unregisterCacheResource($type)
Unregisters a cache resource.
display($template=null, $cache_id=null, $compile_id=null, $parent=null)
displays a Smarty template
fetch($template=null, $cache_id=null, $compile_id=null, $parent=null, $display=false, $merge_tpl_vars=true, $no_output_filter=false)
fetches a rendered Smarty template
unregisterObject($name)
unregister an object
static end_compile($template)
End logging of compile time.
registerDefaultTemplateHandler($callback)
Registers a default template handler.
static start_cache($template)
Start logging of cache time.
registerObject($object_name, $object_impl, $allowed=array(), $smarty_args=true, $block_methods=array())
Registers object to be used in templates.
registerDefaultPluginHandler($callback)
Registers a default plugin handler.
static $global_tpl_vars
#@-
registerFilter($type, $callback)
Registers a filter function.
static end_cache($template)
End logging of cache time.
unloadFilter($type, $name)
unload a filter of specified type and name
microtime_float()
microtime_float()
Definition: fonctions.php:2776
const CACHING_LIFETIME_CURRENT
Smarty plugin to format text blocks.
static start_compile($template)
Start logging of compile time.
loadFilter($type, $name)
load a filter of specified type and name
unregisterFilter($type, $callback)
Unregisters a filter function.
const CACHING_LIFETIME_SAVED
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))
Definition: chart-data.php:160
unregisterPlugin($type, $tag)
Unregister Plugin.
registerCacheResource($type, Smarty_CacheResource $callback)
Registers a cache resource to cache a template's output.
_get_filter_name($function_name)
Return internal filter name.
static end_render($template)
End logging of compile time.
unregisterResource($type)
Unregisters a resource.
$GLOBALS['page_columns_count']
__call($name, $args)
Handle unknown class methods.
registerResource($type, $callback)
Registers a resource to fetch a template.
static display_debug($obj)
Opens a window for the Smarty Debugging Consol and display the data.
registerPlugin($type, $tag, $callback, $cacheable=true, $cache_attr=null)
Registers plugin to be used in templates.
$match
Definition: search.php:86
isCached($template=null, $cache_id=null, $compile_id=null, $parent=null)
test if cache is valid
registerDefaultConfigHandler($callback)
Registers a default template handler.
createData($parent=null)
creates a data object
registerClass($class_name, $class_impl)
Registers static classes to be used in templates.
static start_render($template)
Start logging of render time.

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:17 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.