$templet = str_replace("{style}", $cfg_df_style, $row['templet']); $homeFile = dirname(__FILE__) . '/' . $row['position']; $homeFile = str_replace("//", "/", str_replace("\\", "/", $homeFile)); $fp = fopen($homeFile, 'w') or die("无法更新网站主页到:{$homeFile} 位置"); fclose($fp); $tpl = $cfg_basedir . $cfg_templets_dir . '/' . $templet; if (!file_exists($tpl)) { $tpl = $cfg_basedir . $cfg_templets_dir . '/default/index.htm'; if (!file_exists($tpl)) { exit("无法找到主页模板:{$tpl} "); } } $GLOBALS['_arclistEnv'] = 'index'; $pv->SetTemplet($tpl); $pv->SaveToHtml($homeFile); $pv->Close(); if (empty($nextdo)) { ShowMsg("<b>完成主页更新任务!完成所有更新任务!</b>", "close::tgtable"); exit; } else { $jumpurl = GetNextUrl(); ShowMsg("完成主页更新! 现在跳转到其它更新任务...", $jumpurl, 0, 500); exit; } } else { if ($dopost == 'makeparenttype') { require_once DEDEDATA . "/cache/inc_catalog_base.inc"; require_once DEDEINC . '/arc.listview.class.php'; $notallowArr = array('dopost', 'f', 'del', 'curpage', 'morejob'); $jumpurl = GetNextUrl($notallowArr); if (empty($typeid)) {