echo htmlspecialcharsbx($arOption[0]); ?> "><?php echo htmlspecialcharsbx($val); ?> </textarea> <?php } ?> </td> </tr> <?php } ?> <?php $ACTIVE = CPerfomanceKeeper::IsActive(); ?> <tr> <td valign="top" width="50%"> <?php echo GetMessage("PERFMON_OPT_ACTIVE"); ?> : </td> <td valign="middle" width="50%"> <?php if ($ACTIVE) { ?> <?php echo GetMessage("PERFMON_OPT_ACTIVE_Y"); ?>
$obGeSHi = new GeSHi($arRes["SQL_TEXT"], 'sql'); $html = $obGeSHi->parse_code(); } else { $html = str_replace(array(" ", "\n"), array(" ", "<br>"), htmlspecialcharsbx($arRes["SQL_TEXT"])); } $html = '<span onmouseover="addTimer(this)" onmouseout="removeTimer(this)" id="' . $f_SQL_ID . '_sql_backtrace">' . $html . '</span>'; $row->AddViewField("SQL_TEXT", $html); $arActions = array(array("DEFAULT" => "Y", "TEXT" => GetMessage("PERFMON_INDEX_DETAILS"), "ACTION" => $lAdmin->ActionRedirect('perfmon_index_detail.php?lang=' . LANG . '&ID=' . $f_ID))); if ($f_SQL_ID) { $arActions[] = array("TEXT" => GetMessage("PERFMON_INDEX_EXPLAIN"), "ACTION" => 'jsUtils.OpenWindow(\'perfmon_explain.php?lang=' . LANG . '&ID=' . $arQuery["ID"] . '\', 600, 500);'); } $row->AddActions($arActions); } $lAdmin->AddFooter(array(array("title" => GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value" => $rsData->SelectedRowsCount()))); $aContext = array(); if ($go || !CPerfomanceKeeper::IsActive()) { $aContext[] = array("TEXT" => GetMessage("PERFMON_INDEX_ANALYZE"), "LINK" => "javascript:" . $lAdmin->ActionDoGroup(0, "analyze_start")); } $lAdmin->AddAdminContextMenu($aContext); $lAdmin->CheckListMode(); $APPLICATION->SetTitle(GetMessage("PERFMON_INDEX_TITLE")); require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php"; CJSCore::Init(array("ajax", "popup")); ?> <script> var toolTipCache = new Array; function drawTooltip(result, _this) { if (!_this) _this = this;
public static function SetActive($bActive = false, $end_time = 0) { if ($bActive) { if (!CPerfomanceKeeper::IsActive()) { RegisterModuleDependences("main", "OnPageStart", "perfmon", "CPerfomanceKeeper", "OnPageStart", "1"); RegisterModuleDependences("main", "OnEpilog", "perfmon", "CPerfomanceKeeper", "OnEpilog", "1000"); RegisterModuleDependences("main", "OnAfterEpilog", "perfmon", "CPerfomanceKeeper", "OnBeforeAfterEpilog", "1"); RegisterModuleDependences("main", "OnAfterEpilog", "perfmon", "CPerfomanceKeeper", "OnAfterAfterEpilog", "1000"); RegisterModuleDependences("main", "OnLocalRedirect", "perfmon", "CPerfomanceKeeper", "OnAfterAfterEpilog", "1000"); } COption::SetOptionInt("perfmon", "end_time", $end_time); } else { if (CPerfomanceKeeper::IsActive()) { UnRegisterModuleDependences("main", "OnPageStart", "perfmon", "CPerfomanceKeeper", "OnPageStart"); UnRegisterModuleDependences("main", "OnEpilog", "perfmon", "CPerfomanceKeeper", "OnEpilog"); UnRegisterModuleDependences("main", "OnAfterEpilog", "perfmon", "CPerfomanceKeeper", "OnBeforeAfterEpilog"); UnRegisterModuleDependences("main", "OnAfterEpilog", "perfmon", "CPerfomanceKeeper", "OnAfterAfterEpilog"); UnRegisterModuleDependences("main", "OnLocalRedirect", "perfmon", "CPerfomanceKeeper", "OnAfterAfterEpilog"); } } }
</tr> <?php $tabControl->BeginNextTab(); if (COption::GetOptionString("perfmon", "total_mark_value") == "measure" && CPerfomanceKeeper::IsActive()) { ?> <script>setTimeout('ShowDev();', 200);</script> <?php } ?> <tr> <td id="dev_table"> <?php if (COption::GetOptionString("perfmon", "total_mark_value") == "measure") { ?> <?php if (CPerfomanceKeeper::IsActive()) { $interval = COption::GetOptionInt("perfmon", "end_time") - time(); } else { $internal = COption::GetOptionInt("perfmon", "total_mark_duration"); } $hours = intval($interval / 3600); $interval -= $hours * 3600; $minutes = intval($interval / 60); $interval -= $minutes * 60; $seconds = intval($interval); echo GetMessage("PERFMON_PANEL_MINUTES", array("#HOURS#" => $hours, "#MINUTES#" => $minutes, "#SECONDS#" => $seconds)); ?> <?php } else { ?> <table border="0" cellpadding="0" cellspacing="0" class="internal" width="100%">