2) { if(count($hostarr) > 3 && $hostarr[0] == 'www') { $hostdomain = $hostarr[0]; } else { $hostdomain = $hostarr[0]; } } }dd($hostdomain); if(!empty($hostdomain)) mydomain(rawurlencode($hostdomain)); } } //变量处理 if(!empty($_SGET['viewnews'])) { $_SGET['action'] = 'viewnews'; $_SGET['itemid'] = intval($_SGET['viewnews']); } elseif(!empty($_SGET['viewspace'])) { $_SGET['action'] = 'viewspace'; $_SGET['itemid'] = intval($_SGET['viewspace']); } elseif(!empty($_SGET['viewthread'])) { $_SGET['action'] = 'viewthread'; $_SGET['tid'] = intval($_SGET['viewthread']); } elseif(!empty($_SGET['category'])) { $_SGET['action'] = 'category'; $_SGET['catid'] = intval($_SGET['category']); } elseif(!empty($_SGET['mygroup'])) { $_SGET['action'] = 'mygroup'; $_SGET['gid'] = intval($_SGET['mygroup']); } elseif(!empty($_SGET['spacelist'])) { $_SGET['action'] = 'spacelist'; $_SGET['type'] = $_SGET['spacelist']; } elseif(empty($_SGET['action']) && !empty($_SGET['uid'])) { $_SGET['action'] = 'space'; $_SGET['uid'] = intval($_SGET['uid']); } else { $_SGET['action'] = empty($_SGET['action'])?'index':trim(preg_replace("/[^a-z0-9\-\_]/i", '', trim($_SGET['action']))); } // added by lwx at 2009-4-30 9:58 // 关闭某些功能 dz_do_action('disable_function_by_action', $_SGET); // end of hook //站点关闭 if(!empty($_SCONFIG['closesite']) && $_SGET['action'] != 'login') { getcookie(1); if(empty($_SGLOBAL['group']['groupid']) || $_SGLOBAL['group']['groupid'] != 1) { if(empty($_SCONFIG['closemessage'])) $_SCONFIG['closemessage'] = $lang['site_close']; messagebox('error', $_SCONFIG['closemessage'].'
'); } } //限制分页500 if(!empty($_SGET['page'])) { if($_SGET['page'] > 500) { messagebox('error', 'page_limit'); } } //关键字、描述、导航、标题 $keywordarr = $descriptionarr = $guidearr = $titlearr = array(); //自定义频道 if($_SGET['action'] == 'channel') { $_SGET['name'] = empty($_SGET['name'])?'':trim(preg_replace("/[^a-z0-9\-\_]/i", '', trim($_SGET['name']))); if(!empty($_SGET['name'])) { $scriptfile = S_ROOT.'./channel/channel_'.$_SGET['name'].'.php'; if(file_exists($scriptfile)) { include_once($scriptfile); exit(); } } } //自定义模型 if($_SGET['action'] == 'model') { $_SGET['name'] = empty($_SGET['name'])?'':trim(preg_replace("/[^a-z0-9\-\_]/i", '', trim($_SGET['name']))); if(!empty($_SGET['name'])) { if(!empty($_SGET['itemid'])) { $scriptfile = S_ROOT.'./modelview.php'; } else { $scriptfile = S_ROOT.'./modelindex.php'; } if(file_exists($scriptfile)) { include_once($scriptfile); exit(); } } } //系统频道 if($_SGET['action'] != 'index') { $scriptfile = S_ROOT.'./'.$_SGET['action'].'.php'; if(file_exists($scriptfile)) { include_once($scriptfile); exit(); } } //默认首页 if(!empty($channels['default']) && $channels['default'] != 'index.php') { if(strpos($channels['default'], '?')) { sheader(S_URL.'/'.$channels['default']); exit(); } else { include_once(S_ROOT.'./'.$channels['default']); } } else { header('Location: /'); exit(); if(!empty($_SCONFIG['htmlindex'])) { $_SHTML['action'] = 'index'; $_SGLOBAL['htmlfile'] = gethtmlfile($_SHTML); ehtml('get', $_SCONFIG['htmlindextime']); $_SCONFIG['debug'] = 0; } include_once(S_ROOT.'./include/common.inc.php'); $title = $_SCONFIG['sitename']; $keywords = $_SCONFIG['sitename']; $description = $_SCONFIG['sitename']; include template('index'); ob_out(); if(!empty($_SCONFIG['htmlindex'])) { ehtml('make'); } else { maketplblockvalue('cache'); } } ?>