<?php
require("../class/functions.php");
require("../class/t_functions.php");
$editor=1;
@set_time_limit(0);
//定时刷新任务
function user_DoTimeRepage(){
global $empire,$dbtbpre;
user_DoAutoUpAndDownInfo();//自动上/下线
$todaytime=time();
$b=0;
$sql=$empire->query("select doing,classid,doid from {$dbtbpre}enewsdo where isopen=1 ");
while($r=$empire->fetch($sql))
{
$b=1;
if($r[doing]==1)//生成栏目
{
$cr=explode(',',$r[classid]);
$count=count($cr)-1;
for($i=1;$i<$count;$i++)
{
if(empty($cr[$i]))
{
continue;
}
$cr[$i]=(int)$cr[$i];
ReListHtml($cr[$i],1);
}
}
elseif($r[doing]==2)//生成专题
{
$cr=explode(',',$r[classid]);
$count=count($cr)-1;
for($i=1;$i<$count;$i++)
{
if(empty($cr[$i]))
{
continue;
}
$cr[$i]=(int)$cr[$i];
ListHtmlIndex($cr[$i],$ret_r[0],0);
}
}
elseif($r[doing]==3)//生成自定义列表
{
$cr=explode(',',$r[classid]);
$count=count($cr)-1;
for($i=1;$i<$count;$i++)
{
if(empty($cr[$i]))
{
continue;
}
$cr[$i]=(int)$cr[$i];
$ur=$empire->fetch1("select listid,pagetitle,filepath,filetype,totalsql,listsql,maxnum,lencord,listtempid,pagekeywords,pagedescription from {$dbtbpre}enewsuserlist where listid='".$cr[$i]."'");
ReUserlist($ur,"../");
}
}
elseif($r[doing]==4)//生成自定义页面
{
$cr=explode(',',$r[classid]);
$count=count($cr)-1;
for($i=1;$i<$count;$i++)
{
if(empty($cr[$i]))
{
continue;
}
$cr[$i]=(int)$cr[$i];
$ur=$empire->fetch1("select id,path,pagetext,title,pagetitle,pagekeywords,pagedescription,tempid from {$dbtbpre}enewspage where id='".$cr[$i]."'");
ReUserpage($ur[id],$ur[pagetext],'../'.$ur[path],$ur[title],$ur[pagetitle],$ur[pagekeywords],$ur[pagedescription],$ur[tempid]);
}
}
elseif($r[doing]==5)//生成自定义JS
{
$cr=explode(',',$r[classid]);
$count=count($cr)-1;
for($i=1;$i<$count;$i++)
{
if(empty($cr[$i]))
{
continue;
}
$cr[$i]=(int)$cr[$i];
$ur=$empire->fetch1("select jsid,jsname,jssql,jstempid,jsfilename from {$dbtbpre}enewsuserjs where jsid='".$cr[$i]."'");
ReUserjs($ur,'../');
}
}
elseif($r[doing]==6)//生成标题分类页面
{
$cr=explode(',',$r[classid]);
$count=count($cr)-1;
for($i=1;$i<$count;$i++)
{
if(empty($cr[$i]))
{
continue;
}
$cr[$i]=(int)$cr[$i];
ListHtml($cr[$i],$ret_r,5);
}
}
else//生成首页
{
$indextemp=GetIndextemp();
NewsBq($classid,$indextemp,1,0);
}
$empire->query("update {$dbtbpre}enewsdo set lasttime=$todaytime where doid='$r[doid]'");
}
if($b)
{
//echo "最后执行时间:".date("Y-m-d H:i:s",$todaytime)."<br><br>";
}
}
//定时上线/下线
function user_DoAutoUpAndDownInfo(){
global $empire,$dbtbpre,$class_r,$emod_r,$public_r;
$todaytime=time();
$sql=$empire->query("select id,classid,infouptime,infodowntime from {$dbtbpre}enewsinfovote where infouptime>0 or infodowntime>0");
while($r=$empire->fetch($sql))
{
if(!$class_r[$r[classid]]['tbname'])
{
continue;
}
//上线
if($r['infouptime']&&$r['infouptime']<=$todaytime)
{
$infor=$empire->fetch1("select * from {$dbtbpre}ecms_".$class_r[$r[classid]][tbname]."_check where id='$r[id]' limit 1");
if(!$infor['id'])
{
continue;
}
//签发
if($infor['isqf'])
{
$qfr=$empire->fetch1("select checktno from {$dbtbpre}enewswfinfo where id='$r[id]' and classid='$r[classid]' limit 1");
if($qfr['checktno']!='100')
{
continue;
}
}
$empire->query("update {$dbtbpre}ecms_".$class_r[$r[classid]][tbname]."_index set checked=1 where id='$r[id]' limit 1");
$pubid=ReturnInfoPubid($r['classid'],$r['id']);
$empire->query("update {$dbtbpre}enewsinfovote set infouptime=0 where pubid='$pubid' limit 1");
//互转
MoveCheckInfoData($class_r[$r[classid]][tbname],0,$infor['stb'],"id='$r[id]'");
AddClassInfos($r['classid'],'','+1');
//刷新信息
GetHtml($infor['classid'],$infor['id'],$infor,1);
//刷新列表
ReListHtml($r[classid],1);
}
//下线
if($r['infodowntime']&&$r['infodowntime']<=$todaytime)
{
$mid=$class_r[$r[classid]][modid];
$tbname=$class_r[$r[classid]][tbname];
$pf=$emod_r[$mid]['pagef'];
$stf=$emod_r[$mid]['savetxtf'];
//主表
$infor=$empire->fetch1("select * from {$dbtbpre}ecms_".$class_r[$r[classid]][tbname]." where id='".$r[id]."' limit 1");
if(!$infor['id'])
{
continue;
}
//签发
if($infor['isqf'])
{
$qfr=$empire->fetch1("select checktno from {$dbtbpre}enewswfinfo where id='$r[id]' and classid='$r[classid]' limit 1");
if($qfr['checktno']!='100')
{
continue;
}
}
//分页字段
if($pf)
{
if(strstr($emod_r[$mid]['tbdataf'],','.$pf.','))
{
$finfor=$empire->fetch1("select ".$pf." from {$dbtbpre}ecms_".$tbname."_data_".$infor[stb]." where id='$r[id]' limit 1");
$infor[$pf]=$finfor[$pf];
}
if($stf&&$stf==$pf)//存放文本
{
$infor[$pf]=GetTxtFieldText($infor[$pf]);
}
}
DelNewsFile($infor[filename],$infor[newspath],$infor[classid],$infor[$pf],$infor[groupid]);
$empire->query("update {$dbtbpre}ecms_".$class_r[$r[classid]][tbname]."_index set checked=0,havehtml=0 where id='$r[id]' limit 1");
$pubid=ReturnInfoPubid($r['classid'],$r['id']);
$empire->query("update {$dbtbpre}enewsinfovote set infodowntime=0 where pubid='$pubid' limit 1");
//互转
MoveCheckInfoData($class_r[$r[classid]][tbname],1,$infor['stb'],"id='$r[id]'");
AddClassInfos($r['classid'],'','-1');
//刷新列表
ReListHtml($r[classid],1);
}
}
}
//user_DoTimeRepage();//自动刷新页面
//db_close();
//$empire=null;
?>
没有合适的资源?快使用搜索试试~ 我知道了~
帝国ecms 十大人物评选投票系统二次开发
共13个文件
php:11个
dat:1个
swp:1个
3星 · 超过75%的资源 需积分: 9 10 下载量 59 浏览量
2016-01-12
17:14:40
上传
评论
收藏 18KB ZIP 举报
温馨提示
帝国默认的投票系统功能非常单一,不适合做图文并茂的投票,而且还限制特别多, 我就想如果能像做其他页面模板一样 建立一个投票 那页面制作上就很好发挥个性话,于是就自己加了一个小插件吧 其实也就是多写了几个自定义的函数
资源推荐
资源详情
资源评论
收起资源包目录
enews_spring_vote.zip (13个子文件)
enews
votefun.php 5KB
zixun.php 2KB
gbookfun.php 2KB
spring.php 4KB
iptables.dat 3KB
back
votefun.php 5KB
gbookfun.php 2KB
index.php 2KB
spring_local.php 4KB
index.php 2KB
create.php 6KB
.spring.php.swp 12KB
iptables.php 3KB
共 13 条
- 1
资源评论
- 一飞2016-07-01请问下,这怎么用啊
- weixieju2019-04-30没有使用方法,浪费积分
- study9992019-06-17可惜没有说明
jjnet
- 粉丝: 0
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功