if (!defined('ZBX_PAGE_NO_MENU') && $page['file'] != 'profile.php') { CProfile::update('web.paging.lastpage', $page['file'], PROFILE_TYPE_STR); } CProfile::flush(); // END Transactions if havn't been ----------------- if (isset($DB) && isset($DB['TRANSACTIONS']) && $DB['TRANSACTIONS'] != 0) { error(S_TRANSACTION_HAVE_NOT_BEEN_CLOSED_ABORTING); DBend(false); } //-------------------------------------------------- show_messages(); $post_script = ''; if (uint_in_array($page['type'], array(PAGE_TYPE_HTML_BLOCK, PAGE_TYPE_HTML))) { if (!is_null($USER_DETAILS) && isset($USER_DETAILS['debug_mode']) && $USER_DETAILS['debug_mode'] == GROUP_DEBUG_MODE_ENABLED) { COpt::profiling_stop('script'); COpt::show(); } } if ($page['type'] == PAGE_TYPE_HTML) { $post_script .= 'var page_refresh = null;' . "\n"; if (isset($JS_TRANSLATE)) { $post_script .= 'var newLocale = ' . zbx_jsvalue($JS_TRANSLATE) . "\n"; $post_script .= 'var locale = (typeof(locale) == "undefined" ? {} : locale);' . "\n"; $post_script .= 'for(key in newLocale){locale[key] = newLocale[key];}' . "\n"; } $post_script .= 'function zbxCallPostScripts(){' . "\n"; if (isset($ZBX_PAGE_POST_JS)) { foreach ($ZBX_PAGE_POST_JS as $num => $script) { $post_script .= $script . "\n"; } }