PageRenderTime 46ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/plugins/yet-another-photoblog/lib/Savant2-2.4.3/Savant2/tests/templates/compile_bad.tpl.php

https://github.com/Mercedes/ratonesytortillas
PHP | 35 lines | 27 code | 8 blank | 0 comment | 0 complexity | 19da93ccbe022e972e426765a37f202f MD5 | raw file
  1. {* Savant2_Compiler_basic *}
  2. {tpl 'header.tpl.php'}
  3. <p>{$varivari; $this->$varivari}</p>
  4. <p>{$this->variable1; global $_SERVER;}</p>
  5. <p>{$this->variable2; $obj =& new StdClass;}</p>
  6. <p>{$this->variable3; eval("echo 'bad guy!';")}</p>
  7. <p>{$this->key0; print_r($this->_compiler);}</p>
  8. <p>{$this->key1; File::read('/etc/passwd');}</p>
  9. <p>{$this->key2; include "/etc/passwd";}</p>
  10. <p>{$this->reference1; include $this->findTemplate('template.tpl.php') . '../../etc/passwd';}</p>
  11. <p>{$this->reference2; $newvar = $this; $newvar =& $this; $newvar = & $this; $newvar
  12. =
  13. &
  14. $this;
  15. $newvar = array(&$this); }</p>
  16. <p>{$this->reference3; $thisIsOk; $thisIs_OK; $function(); }</p>
  17. <p>{$this->variable1; echo parent::findTemplate('template.tpl.php')}</p>
  18. <ul>
  19. {foreach ($this->set as $key => $val): $this->$key; $this->$val(); }
  20. <li>{$key} = {$val} ({$this->set[$key]})</li>
  21. {endforeach; echo htmlspecialchars(file_get_contents('/etc/httpd/php.ini')); }
  22. </ul>
  23. {['form', 'start']}
  24. {['form', 'text', 'example', 'default value', 'My Text Field:']}
  25. {['form', 'end']}
  26. <p style="clear: both;"><?php echo "PHP Tags" ?>
  27. {tpl 'footer.tpl.php'}