20 parent::__construct($oConfig,
$oDb);
38 $sContent =
'<div class="ch_profiler_switch" onclick="ch_profiler_switch(this)">+</div><div class="ch_profiler_content">'.$sContent.
'</div>';
39 return '<div class="ch_profiler_plank_wrapper" style="width:' .
getParam(
'main_div_width') .
'"><div class="ch_profiler_plank ch-def-margin-sec-leftright"><span class="ch_profiler_plank_title">' .
$sTitle .
'</span>' .
$sContent .
'</div>';
44 return $this->_isAjaxOutput ?
"{$sName}{$sVal} | " :
"<u>$sName</u><b>$sVal</b>";
47 function table ($a, $sHighlight =
'')
49 if ($this->_isAjaxOutput) {
54 $table[] = array_keys($r);
56 $rr = array_values($r);
57 if (
false !== strpos($rr[0],
' '))
58 $rr[0] = str_replace(
' ',
'-', $rr[0]);
65 $s =
'<table id="'.$sId.
'" class="ch_profiler_table">';
69 foreach ($r
as $k => $v)
71 $s .=
"<thead><tr>$th</tr></thead><tbody>";
74 foreach ($r
as $k => $v) {
76 if ($sHighlight && $k == $sHighlight)
77 $sClass =
' class="highlight" ';
79 $s .=
"<td $sClass>".htmlspecialchars_adv($v).
"</td>";
83 $s .=
'</tbody></table>';
84 $s .=
'<script type="text/javascript">$(\'#'.$sId.
'\').tablesorter();</script>
';
88 function _isAjaxRequest ()
90 if (isset($_SERVER['HTTP_X_REQUESTED_WITH
']) and $_SERVER['HTTP_X_REQUESTED_WITH
'] == 'XMLHttpRequest
')
92 if (isset($_GET['ch_profiler_ajax_request
']))
94 if (preg_match('/popup\.php/
', ch_html_attribute($_SERVER['PHP_SELF
'])))
96 if (preg_match('/vote\.php/
', ch_html_attribute($_SERVER['PHP_SELF
'])))
98 if (!empty($_GET['r
']) && (preg_match('/^poll\/set_answer/
', $_GET['r
']) || preg_match('/^poll\/get_poll_block/
', $_GET['r
']) || preg_match('/^poll\/get_questions/
', $_GET['r
'])))
100 if (preg_match('/pageBuilder\.php/
', ch_html_attribute($_SERVER['PHP_SELF
'])) && $_REQUEST['action
'] == 'load
')