1、在e/class/hinfofun.php添加
//更新当前时间信息-function gengxin_all($classid,$id,$userid,$username){
global $empire,$class_r,$dbtbpre;
if(empty($classid))
{printerror("ErrorUrl","history.go(-1)");}
//验证权限
$doselfinfo=CheckLevel($userid,$username,$classid,"news");
//编辑权限
if(!$doselfinfo['doeditinfo'])
{
printerror("NotEditInfoLevel","history.go(-1)");
}
$count=count($id);
if(empty($count))
{printerror("Notgengxinid","history.go(-1)");}
for($i=0;$i<$count;$i++)
{
$add.="id='$id[$i]' or ";
}
$todaytime=date("Y-m-d H:i:s");//获取当前时间
$time=to_time("$todaytime");//对当前时间进行转换
$add=substr($add,0,strlen($add)-4);
$sql=$empire->query("update {$dbtbpre}ecms_".$class_r[$classid][tbname]." set newstime='$time'".$update." where ".$add);
$sql=$empire->query("select * from {$dbtbpre}ecms_".$class_r[$classid][tbname]." where ".$add);
while($r=$empire->fetch($sql))
{
//投稿增加积分
if($r[ismember]&&$r[userid]&&!$r[haveaddfen])
{
$cr=$empire->fetch1("select classid,addinfofen from {$dbtbpre}enewsclass where classid='$r[classid]'");
if($cr[addinfofen])
{
AddInfoFen($cr[addinfofen],$r[userid]);
if($cr[addinfofen]<0)
{
BakDown($r[classid],$r[id],0,$r[userid],$r[username],$r[title],abs($cr[addinfofen]),3);
}
}
$usql=$empire->query("update {$dbtbpre}ecms_".$class_r[$classid][tbname]." set haveaddfen=1 where id=$r[id]");
}
//返回自定义字段
$ret_r=ReturnAddF($r,$class_r[$r[classid]][modid],$userid,$username,2,1,0);
//刷新信息
GetHtml($r,$ret_r);
}
//刷新列表
//ReListHtml($classid,1);
if($sql)
{
//操作日志
insert_dolog("classid=".$classid."<br>classname=".$class_r[$classid][classname]);
printerror("gengxinSuccess",$_SERVER['HTTP_REFERER']);
}
else
{printerror("DbError","history.go(-1)");}
}
//更新当前时间信息-by
2、在admin/ecmsinfo.php
elseif($enews=="NoCheckNews_all")//取消审核信息
{
$bclassid=$_POST['bclassid'];
$classid=$_POST['classid'];
$id=$_POST['id'];
NoCheckNews_all($classid,$id,$logininid,$loginin);
}
下面添加
//当前时间-by besoo
elseif($enews=="gengxin_all")
{
$bclassid=$_POST['bclassid'];
$classid=$_POST['classid'];
$id=$_POST['id'];
gengxin_all($classid,$id,$logininid,$loginin);
}
//当前时间-by besoo
3、在data/html/list/listinfo.php文件
<input type="submit" name="Submit9" value="取消审核" onClick="document.listform.enews.value='NoCheckNews_all';document.listform.action='ecmsinfo.php';">
下面添加
<input type="submit" name="Submit88888" value="设为当前时间" onClick="document.listform.enews.value='gengxin_all';document.listform.action='ecmsinfo.php';">
4、在e/data/language/gb/pub/message.php文件 添加提示语言
'gengxinSuccess'=>'更新时间成功',