ACCOUNT_TYPE_SIGN)), 'info'); } if (defined('FRAME') && FRAME == 'wxapp') { itoast('', url('account/display', array('type' => WXAPP_TYPE_SIGN)), 'info'); } } $acl = permission_build(); if (empty($acl[$controller][$_W['role']]) || (!in_array($controller.'*', $acl[$controller][$_W['role']]) && !in_array($action, $acl[$controller][$_W['role']]))) { message('不能访问, 需要相应的权限才能访问!'); } } require _forward($controller, $action); define('ENDTIME', microtime()); if (empty($_W['config']['setting']['maxtimeurl'])) { $_W['config']['setting']['maxtimeurl'] = 10; } if ((ENDTIME - STARTTIME) > $_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 $controller, $action; if (!empty($frames['section']) && is_array($frames['section'])) { foreach ($frames['section'] as &$frame) { if (empty($frame['menu'])) { continue; } foreach ($frame['menu'] as $key => &$menu) { $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; } $diff = array_diff_assoc($urls, $get); if (empty($diff) || $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 == 'wxapp_payment' && in_array($get['a'], array('refund'))) { $menu['active'] = ' active'; } } } } }