$_W['config']['setting']['maxtimeurl']) { $data = array( 'type' => '1', 'runtime' => ENDTIME - STARTTIME, 'runurl' => $_W['sitescheme'] . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'createtime' => TIMESTAMP ); pdo_insert('core_performance', $data); } function _forward($c, $a) { $file = IA_ROOT . '/web/source/' . $c . '/' . $a . '.ctrl.php'; if (!file_exists($file)) { list($section, $a) = explode('-', $a); $file = IA_ROOT . '/web/source/' . $c . '/' . $section . '/' . $a . '.ctrl.php'; } return $file; } function _calc_current_frames(&$frames) { global $_W, $controller, $action; $_W['page']['title'] = (isset($_W['page']['title']) && !empty($_W['page']['title'])) ? $_W['page']['title'] : ($frames['dimension'] == 2 ? $frames['title'] : ''); if (empty($frames['section']) || !is_array($frames['section'])) { return true; } foreach ($frames['section'] as &$frame) { if (empty($frame['menu'])) { continue; } $finished = false; foreach ($frame['menu'] as $key => &$menu) { if (defined('IN_MODULE') && $menu['multilevel']) { foreach ($menu['childs'] as $module_child_key => $module_child_menu) { $query = parse_url($module_child_menu['url'], PHP_URL_QUERY); $server_query = parse_url($_W['siteurl'], PHP_URL_QUERY); if (strpos($server_query, $query) === 0) { $menu['childs'][$module_child_key]['active'] = 'active'; break; } } } else { $query = parse_url($menu['url'], PHP_URL_QUERY); parse_str($query, $urls); if (empty($urls)) { continue; } if (defined('ACTIVE_FRAME_URL')) { $query = parse_url(ACTIVE_FRAME_URL, PHP_URL_QUERY); parse_str($query, $get); } else { $get = $_GET; $get['c'] = $controller; $get['a'] = $action; } if (!empty($do)) { $get['do'] = $do; } if (strpos($get['do'], 'post') !== false && !in_array($key, array('platform_menu'))) { $_W['page']['title'] = ''; continue; } $diff = array_diff_assoc($urls, $get); if (empty($diff) || $key == 'platform_menu' && $get['a'] == 'menu' && in_array($get['do'], array('display')) || $key == 'platform_site' && in_array($get['a'], array('style', 'article', 'category')) || $key == 'mc_member' && in_array($get['a'], array('editor', 'group', 'fields')) || $key == 'profile_setting' && in_array($get['a'], array('passport', 'tplnotice', 'notify', 'common')) || $key == 'profile_payment' && in_array($get['a'], array('refund')) || $key == 'statistics_visit' && in_array($get['a'], array('site', 'setting')) || $key == 'platform_reply' && in_array($get['a'], array('reply-setting')) || $key == 'system_setting_thirdlogin' && in_array($get['a'], array('thirdlogin')) || $key == 'system_cloud_sms' && in_array($get['a'], array('profile')) || $key == 'wxapp_profile_payment' && in_array($get['a'], array('refund'))) { $menu['active'] = ' active'; $_W['page']['title'] = !empty($_W['page']['title']) ? $_W['page']['title'] : $menu['title']; $finished = true; break; } } } if ($finished) { break; } } }