PageRenderTime 27ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/system/smarty/templates_c/%%23^23A^23A54099%%debug.tpl.php

http://three-cms.googlecode.com/
PHP | 263 lines | 246 code | 14 blank | 3 comment | 40 complexity | b7569c9681af6dbd8e3e86c8959bd3ad MD5 | raw file
Possible License(s): GPL-3.0
  1. <?php /* Smarty version 2.6.26, created on 2009-09-15 16:27:45
  2. compiled from ../../system/smarty/debug.tpl */ ?>
  3. <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
  4. smarty_core_load_plugins(array('plugins' => array(array('function', 'assign_debug_info', '../../system/smarty/debug.tpl', 3, false),array('function', 'cycle', '../../system/smarty/debug.tpl', 119, false),array('modifier', 'escape', '../../system/smarty/debug.tpl', 102, false),array('modifier', 'string_format', '../../system/smarty/debug.tpl', 105, false),array('modifier', 'debug_print_var', '../../system/smarty/debug.tpl', 121, false),)), $this); ?>
  5. <?php echo smarty_function_assign_debug_info(array(), $this);?>
  6. <?php ob_start(); ?>
  7. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  8. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  9. <head>
  10. <title>Smarty Debug Console</title>
  11. <?php echo '
  12. <style type="text/css">
  13. /* <![CDATA[ */
  14. body, h1, h2, td, th, p {
  15. font-family: sans-serif;
  16. font-weight: normal;
  17. font-size: 0.9em;
  18. margin: 1px;
  19. padding: 0;
  20. }
  21. h1 {
  22. margin: 0;
  23. text-align: left;
  24. padding: 2px;
  25. background-color: #f0c040;
  26. color: black;
  27. font-weight: bold;
  28. font-size: 1.2em;
  29. }
  30. h2 {
  31. background-color: #9B410E;
  32. color: white;
  33. text-align: left;
  34. font-weight: bold;
  35. padding: 2px;
  36. border-top: 1px solid black;
  37. }
  38. body {
  39. background: black;
  40. }
  41. p, table, div {
  42. background: #f0ead8;
  43. }
  44. p {
  45. margin: 0;
  46. font-style: italic;
  47. text-align: center;
  48. }
  49. table {
  50. width: 100%;
  51. }
  52. th, td {
  53. font-family: monospace;
  54. vertical-align: top;
  55. text-align: left;
  56. width: 50%;
  57. }
  58. td {
  59. color: green;
  60. }
  61. .odd {
  62. background-color: #eeeeee;
  63. }
  64. .even {
  65. background-color: #fafafa;
  66. }
  67. .exectime {
  68. font-size: 0.8em;
  69. font-style: italic;
  70. }
  71. #table_assigned_vars th {
  72. color: blue;
  73. }
  74. #table_config_vars th {
  75. color: maroon;
  76. }
  77. /* ]]> */
  78. </style>
  79. '; ?>
  80. </head>
  81. <body>
  82. <h1>Smarty Debug Console</h1>
  83. <h2>included templates &amp; config files (load time in seconds)</h2>
  84. <div>
  85. <?php unset($this->_sections['templates']);
  86. $this->_sections['templates']['name'] = 'templates';
  87. $this->_sections['templates']['loop'] = is_array($_loop=$this->_tpl_vars['_debug_tpls']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
  88. $this->_sections['templates']['show'] = true;
  89. $this->_sections['templates']['max'] = $this->_sections['templates']['loop'];
  90. $this->_sections['templates']['step'] = 1;
  91. $this->_sections['templates']['start'] = $this->_sections['templates']['step'] > 0 ? 0 : $this->_sections['templates']['loop']-1;
  92. if ($this->_sections['templates']['show']) {
  93. $this->_sections['templates']['total'] = $this->_sections['templates']['loop'];
  94. if ($this->_sections['templates']['total'] == 0)
  95. $this->_sections['templates']['show'] = false;
  96. } else
  97. $this->_sections['templates']['total'] = 0;
  98. if ($this->_sections['templates']['show']):
  99. for ($this->_sections['templates']['index'] = $this->_sections['templates']['start'], $this->_sections['templates']['iteration'] = 1;
  100. $this->_sections['templates']['iteration'] <= $this->_sections['templates']['total'];
  101. $this->_sections['templates']['index'] += $this->_sections['templates']['step'], $this->_sections['templates']['iteration']++):
  102. $this->_sections['templates']['rownum'] = $this->_sections['templates']['iteration'];
  103. $this->_sections['templates']['index_prev'] = $this->_sections['templates']['index'] - $this->_sections['templates']['step'];
  104. $this->_sections['templates']['index_next'] = $this->_sections['templates']['index'] + $this->_sections['templates']['step'];
  105. $this->_sections['templates']['first'] = ($this->_sections['templates']['iteration'] == 1);
  106. $this->_sections['templates']['last'] = ($this->_sections['templates']['iteration'] == $this->_sections['templates']['total']);
  107. ?>
  108. <?php unset($this->_sections['indent']);
  109. $this->_sections['indent']['name'] = 'indent';
  110. $this->_sections['indent']['loop'] = is_array($_loop=$this->_tpl_vars['_debug_tpls'][$this->_sections['templates']['index']]['depth']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
  111. $this->_sections['indent']['show'] = true;
  112. $this->_sections['indent']['max'] = $this->_sections['indent']['loop'];
  113. $this->_sections['indent']['step'] = 1;
  114. $this->_sections['indent']['start'] = $this->_sections['indent']['step'] > 0 ? 0 : $this->_sections['indent']['loop']-1;
  115. if ($this->_sections['indent']['show']) {
  116. $this->_sections['indent']['total'] = $this->_sections['indent']['loop'];
  117. if ($this->_sections['indent']['total'] == 0)
  118. $this->_sections['indent']['show'] = false;
  119. } else
  120. $this->_sections['indent']['total'] = 0;
  121. if ($this->_sections['indent']['show']):
  122. for ($this->_sections['indent']['index'] = $this->_sections['indent']['start'], $this->_sections['indent']['iteration'] = 1;
  123. $this->_sections['indent']['iteration'] <= $this->_sections['indent']['total'];
  124. $this->_sections['indent']['index'] += $this->_sections['indent']['step'], $this->_sections['indent']['iteration']++):
  125. $this->_sections['indent']['rownum'] = $this->_sections['indent']['iteration'];
  126. $this->_sections['indent']['index_prev'] = $this->_sections['indent']['index'] - $this->_sections['indent']['step'];
  127. $this->_sections['indent']['index_next'] = $this->_sections['indent']['index'] + $this->_sections['indent']['step'];
  128. $this->_sections['indent']['first'] = ($this->_sections['indent']['iteration'] == 1);
  129. $this->_sections['indent']['last'] = ($this->_sections['indent']['iteration'] == $this->_sections['indent']['total']);
  130. ?>&nbsp;&nbsp;&nbsp;<?php endfor; endif; ?>
  131. <font color=<?php if ($this->_tpl_vars['_debug_tpls'][$this->_sections['templates']['index']]['type'] == 'template'): ?>brown<?php elseif ($this->_tpl_vars['_debug_tpls'][$this->_sections['templates']['index']]['type'] == 'insert'): ?>black<?php else: ?>green<?php endif; ?>>
  132. <?php echo ((is_array($_tmp=$this->_tpl_vars['_debug_tpls'][$this->_sections['templates']['index']]['filename'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
  133. </font>
  134. <?php if (isset ( $this->_tpl_vars['_debug_tpls'][$this->_sections['templates']['index']]['exec_time'] )): ?>
  135. <span class="exectime">
  136. (<?php echo ((is_array($_tmp=$this->_tpl_vars['_debug_tpls'][$this->_sections['templates']['index']]['exec_time'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.5f") : smarty_modifier_string_format($_tmp, "%.5f")); ?>
  137. )
  138. <?php if ($this->_sections['templates']['index'] == 0): ?>(total)<?php endif; ?>
  139. </span>
  140. <?php endif; ?>
  141. <br />
  142. <?php endfor; else: ?>
  143. <p>no templates included</p>
  144. <?php endif; ?>
  145. </div>
  146. <h2>assigned template variables</h2>
  147. <table id="table_assigned_vars">
  148. <?php unset($this->_sections['vars']);
  149. $this->_sections['vars']['name'] = 'vars';
  150. $this->_sections['vars']['loop'] = is_array($_loop=$this->_tpl_vars['_debug_keys']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
  151. $this->_sections['vars']['show'] = true;
  152. $this->_sections['vars']['max'] = $this->_sections['vars']['loop'];
  153. $this->_sections['vars']['step'] = 1;
  154. $this->_sections['vars']['start'] = $this->_sections['vars']['step'] > 0 ? 0 : $this->_sections['vars']['loop']-1;
  155. if ($this->_sections['vars']['show']) {
  156. $this->_sections['vars']['total'] = $this->_sections['vars']['loop'];
  157. if ($this->_sections['vars']['total'] == 0)
  158. $this->_sections['vars']['show'] = false;
  159. } else
  160. $this->_sections['vars']['total'] = 0;
  161. if ($this->_sections['vars']['show']):
  162. for ($this->_sections['vars']['index'] = $this->_sections['vars']['start'], $this->_sections['vars']['iteration'] = 1;
  163. $this->_sections['vars']['iteration'] <= $this->_sections['vars']['total'];
  164. $this->_sections['vars']['index'] += $this->_sections['vars']['step'], $this->_sections['vars']['iteration']++):
  165. $this->_sections['vars']['rownum'] = $this->_sections['vars']['iteration'];
  166. $this->_sections['vars']['index_prev'] = $this->_sections['vars']['index'] - $this->_sections['vars']['step'];
  167. $this->_sections['vars']['index_next'] = $this->_sections['vars']['index'] + $this->_sections['vars']['step'];
  168. $this->_sections['vars']['first'] = ($this->_sections['vars']['iteration'] == 1);
  169. $this->_sections['vars']['last'] = ($this->_sections['vars']['iteration'] == $this->_sections['vars']['total']);
  170. ?>
  171. <tr class="<?php echo smarty_function_cycle(array('values' => "odd,even"), $this);?>
  172. ">
  173. <th>{$<?php echo ((is_array($_tmp=$this->_tpl_vars['_debug_keys'][$this->_sections['vars']['index']])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
  174. }</th>
  175. <td><?php echo smarty_modifier_debug_print_var($this->_tpl_vars['_debug_vals'][$this->_sections['vars']['index']]); ?>
  176. </td></tr>
  177. <?php endfor; else: ?>
  178. <tr><td><p>no template variables assigned</p></td></tr>
  179. <?php endif; ?>
  180. </table>
  181. <h2>assigned config file variables (outer template scope)</h2>
  182. <table id="table_config_vars">
  183. <?php unset($this->_sections['config_vars']);
  184. $this->_sections['config_vars']['name'] = 'config_vars';
  185. $this->_sections['config_vars']['loop'] = is_array($_loop=$this->_tpl_vars['_debug_config_keys']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
  186. $this->_sections['config_vars']['show'] = true;
  187. $this->_sections['config_vars']['max'] = $this->_sections['config_vars']['loop'];
  188. $this->_sections['config_vars']['step'] = 1;
  189. $this->_sections['config_vars']['start'] = $this->_sections['config_vars']['step'] > 0 ? 0 : $this->_sections['config_vars']['loop']-1;
  190. if ($this->_sections['config_vars']['show']) {
  191. $this->_sections['config_vars']['total'] = $this->_sections['config_vars']['loop'];
  192. if ($this->_sections['config_vars']['total'] == 0)
  193. $this->_sections['config_vars']['show'] = false;
  194. } else
  195. $this->_sections['config_vars']['total'] = 0;
  196. if ($this->_sections['config_vars']['show']):
  197. for ($this->_sections['config_vars']['index'] = $this->_sections['config_vars']['start'], $this->_sections['config_vars']['iteration'] = 1;
  198. $this->_sections['config_vars']['iteration'] <= $this->_sections['config_vars']['total'];
  199. $this->_sections['config_vars']['index'] += $this->_sections['config_vars']['step'], $this->_sections['config_vars']['iteration']++):
  200. $this->_sections['config_vars']['rownum'] = $this->_sections['config_vars']['iteration'];
  201. $this->_sections['config_vars']['index_prev'] = $this->_sections['config_vars']['index'] - $this->_sections['config_vars']['step'];
  202. $this->_sections['config_vars']['index_next'] = $this->_sections['config_vars']['index'] + $this->_sections['config_vars']['step'];
  203. $this->_sections['config_vars']['first'] = ($this->_sections['config_vars']['iteration'] == 1);
  204. $this->_sections['config_vars']['last'] = ($this->_sections['config_vars']['iteration'] == $this->_sections['config_vars']['total']);
  205. ?>
  206. <tr class="<?php echo smarty_function_cycle(array('values' => "odd,even"), $this);?>
  207. ">
  208. <th>{#<?php echo ((is_array($_tmp=$this->_tpl_vars['_debug_config_keys'][$this->_sections['config_vars']['index']])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
  209. #}</th>
  210. <td><?php echo smarty_modifier_debug_print_var($this->_tpl_vars['_debug_config_vals'][$this->_sections['config_vars']['index']]); ?>
  211. </td></tr>
  212. <?php endfor; else: ?>
  213. <tr><td><p>no config vars assigned</p></td></tr>
  214. <?php endif; ?>
  215. </table>
  216. </body>
  217. </html>
  218. <?php $this->_smarty_vars['capture']['default'] = ob_get_contents(); $this->assign('debug_output', ob_get_contents());ob_end_clean(); ?>
  219. <?php if (isset ( $this->_tpl_vars['_smarty_debug_output'] ) && $this->_tpl_vars['_smarty_debug_output'] == 'html'): ?>
  220. <?php echo $this->_tpl_vars['debug_output']; ?>
  221. <?php else: ?>
  222. <script type="text/javascript">
  223. // <![CDATA[
  224. if ( self.name == '' ) {
  225. var title = 'Console';
  226. }
  227. else {
  228. var title = 'Console_' + self.name;
  229. }
  230. _smarty_console = window.open("",title.value,"width=680,height=600,resizable,scrollbars=yes");
  231. _smarty_console.document.write('<?php echo ((is_array($_tmp=$this->_tpl_vars['debug_output'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
  232. ');
  233. _smarty_console.document.close();
  234. // ]]>
  235. </script>
  236. <?php endif; ?>