<?php
require_once (dirname(__FILE__) . "/../include/common.inc.php");
$row = $dsql->GetOne("Select uptime From `cmsxx_arccache` where md5hash = 'autonew';");
if(!is_array($row)) exit(autonew(5));
$interval=60; //时间 秒
if(time() - $row['uptime'] < $interval ) exit();
autonew($no);
function machom($no=''){
define('DEDEADMIN', ereg_replace("[/]{1,}",'/',dirname(__FILE__) ) );
require_once(dirname(__FILE__)."/../include/common.inc.php");
require_once(dirname(__FILE__)."/../include/arc.partview.class.php");
$dsql = new DedeSql(false);
$row = $dsql->GetOne("Select * From cmsxx_homepageset");
$dsql->Close();
$templet=$row['templet'];
$position=$row['position'];
$homeFile = DEDEADMIN."/".$position;
$homeFile = str_replace("","/",$homeFile);
$homeFile = str_replace("//","/",$homeFile);
$templet = str_replace("{style}",$cfg_df_style,$templet);
$pv = new PartView();
$GLOBALS['_arclistEnv'] = 'index';
$pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet);
$pv->SaveToHtml($homeFile);
}
function autonew($no=''){
global $dsql;
$sql = "SELECT id FROM `cmsxx_archives` where arcrank <>'0' limit $no ;";
$dsql->SetQuery($sql);
$dsql->Execute();
while($row = $dsql->GetArray()){
$id = $row['id'];
$time = time() - rand(0,$interval * 10);
$dsql->ExecuteNoneQuery("Update `cmsxx_arctiny` set `arcrank`='0', `sortrank`='$time' where id = '$id';");
$dsql->ExecuteNoneQuery("Update `cmsxx_archives` set `arcrank`='0', `sortrank`='$time', `pubdate`='$time' where id = '$id';");
}
machom($no);
$dsql->ExecuteNoneQuery("Update `cmsxx_arccache` set `uptime`=".time()." where md5hash = 'autonew'");
}
?>织梦cms教程
织梦CMS自动更新主页方法
- 自动更新
-
60S看懂今天自动更新新闻插件
插件介绍60S看懂今天自动更新新闻插件,代码已二开对接新接口,已做成插件,可直接导入使用,简洁明了!插件截图功能列表:支持自定义发布新闻分类(注明);支持自定义新闻标题(快捷简洁);优化每日新闻的图片风格,增...
-
织梦CMS自动更新主页方法
<?php require_once (dirname(__FILE__) . "/../include/common.inc.php"); $row = $dsql->GetOne("Select uptime From `cmsxx_arccache` where md5hash = 'autonew';"); if(!is_array($row)) exit(autonew(5)); $interval=60; /...
-
1W多条自动更新的IPTV直播源分享
分享GitHub上的一个自动更新IPTV直播源项目, 每两小时自动更新一次,含有超过1w+数量的IPTV 列表,丰富且全面!项目地址:https://github.com/HerbertHe/iptv-sources
-
DedeCMS文章动态实时显示浏览次数方法
使用DedeCMS建站时,在文章页的信息页面,官方给出的调用文章浏览次数的标签是:{dede:field.click/}这个标签调用...
-
织梦CMS一天24小时内发布帖子标题加红色
1、打开arclist.htm文件,找到输出文章标题的代码块,通常是类似这样的代码:<a href="[field:arcurl/]" title="[...
-
织梦CMS报错“CSRF Token Check Failed”解决办法
织梦CMS报错“CSRF Token Check Failed”,以下是解决办法:1、打开dede/config.php,找到第63行:function csrf_ch...
-
channel标签调用子级栏目currentstyle无效
织梦CMS使用channel标签调用子级栏目显示currentstyle无效,解决方法如下:打开include/taglib/channel.lib.php...
-
织梦CMS后台登录界面验证码无法显示解决方法
问题我们发现织梦CMS后台登录界面的验证码无法显示,头部还多了一行空行,这种是什么问题?现在系统无法登录了,怎...

