婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 網站建設 > 建站知識 > dede讓未審核內容每分鐘審核一篇并更新至首頁

dede讓未審核內容每分鐘審核一篇并更新至首頁

POST TIME:2018-02-04 22:36

plus下新建文件makeid.php內容如下:   dede教程-598080707.net

<?php
$lasttime=filemtime($_SERVER['DOCUMENT_ROOT']."/index.html");
$interval=180; //更新時間秒為單位180秒=3分鐘 3分鐘審核一篇   跟版網:www.5loveb.com
if((time()-$lasttime)>$interval)
{
require_once(dirname(__FILE__)."/../include/common.inc.php");
$row = $dsql->GetOne("select id from`dede_archives` where arcrank = -1"); // 找到未審核的文章排序根據你的要求修改下
$aid= $row['id'];
if($aid!=''){
//審核文章
$upquery = "Update `dede_archives` set arcrank =0 where id='$aid';";
$upquery1 = "Update `dede_arctiny` set arcrank =0 where id='$aid';";
$rs = $dsql->ExecuteNoneQuery($upquery);
$rs1 = $dsql->ExecuteNoneQuery($upquery1);
$isremote = (empty($isremote)? 0 : $isremote);
function MakeArt($aid, $mkindex=FALSE, $ismakesign=FALSE, $isremote=0)
{
global $envs, $typeid;
require_once(DEDEINC.'/arc.archives.class.php');
if($ismakesign) $envs['makesign'] = 'yes';
$arc = new Archives($aid);
$reurl = $arc->MakeHtml($isremote);
return $reurl;
}
$arcID=$aid;
$artUrl = MakeArt($aid,true,true,$isremote);
require_once(DEDEINC.'/arc.partview.class.php');
$envs = $_sys_globals = array();
$envs['aid'] = 0;
$pv = new PartView();
$row = $pv->dsql->GetOne('SELECT * FROM `cn_homepageset`');
$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();
exit();
}else exit();
}
?>

然后在首頁模板里面最后面加入 <script src="/plus/mkaid.php" language="javascript"></script> 就ok了



收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266
主站蜘蛛池模板: 康乐县| 浠水县| 正蓝旗| 泰兴市| 拉萨市| 增城市| 潢川县| 鄂尔多斯市| 滨州市| 吉木萨尔县| 汪清县| 明水县| 闽侯县| 紫金县| 叶城县| 池州市| 资兴市| 年辖:市辖区| 汕头市| 颍上县| 台山市| 田阳县| 铁岭县| 黄陵县| 江永县| 沈丘县| 武川县| 通州市| 潜江市| 郑州市| 绥江县| 兴和县| 龙海市| 海丰县| 成都市| 三台县| 海阳市| 阿克陶县| 昆山市| 会宁县| 沁源县|