帝国cms后台 多栏目刷新内容页
添加时间:2013-6-6 点击量:
帝国cms后台 刷新内容页面 默认只能刷新所有或者单个栏面前目今的所有内容页面,但有时实际须要刷新多个栏面前目今的页面
找到e/admin/ChangeData.php文件
本来的栏目是单选菜单
< name=classid id=classid>
<option value=0>所有栏目</option>
<?=¥class?>
</>
改为:
< name=classid[] size=12 multiple id=classid[] style=width:310px>
<option value=0>所有栏目</option>
<?=¥class?>
</>
并且改进了e/admin/DoRehtml.php的代码如下:
<?php
define(EmpireCMSAdmin, 1);
require (../../class/connect.php);
require (../../class/db_sql.php);
require (../../class/functions.php);
¥link = db_connect();
¥empire = new mysqlquery();
¥editor = 1;
//验证用户
¥lur = is_login();
¥logininid = ¥lur[userid];
¥loginin = ¥lur[username];
¥loginrnd = ¥lur[rnd];
¥loginlevel = ¥lur[groupid];
¥loginadminstyleid = ¥lur[adminstyleid];
¥add = ¥_GET;
¥havehtml = (int)¥add[havehtml];
¥tbname = ¥add[tbname];
¥count = count(¥tbname);
// 附加法度开端
if (!is_array(¥add[classid])) { //传递非数组值时,在栏目里点击信息操纵时应用
¥add[classid] = array( ¥add[classid] );
}
if (¥add[classid][0] == 0) {
¥add[classid] = array(0);
}
¥count1 = count(¥add[classid]);
for (¥m = 0; ¥m < ¥count1; ¥m++) {
¥classid = ¥add[classid][¥m];
// 附加法度停止
//刷新所有表
if (!¥count) {
¥j = 0;
¥tsql = ¥empire->query( tbname {¥dbtbpre}enewstable order by tid);
while (¥tr = ¥empire->fetch(¥tsql)) {
¥tbname[¥j] = ¥tr[tbname];
¥j++;
}
¥count = count(¥tbname);
}
esetcookie(retablenum, ¥count, 0, 1);
esetcookie(rechecktablenum, 0, 0, 1);
¥url = ../ecmschtml.php?enews=ReNewsHtml&classid=¥classid&=¥add[]&retype=¥add[retype]&startday=¥add[startday]&endday=¥add[endday]&startid=¥add[startid]&endid=¥add[endid]&havehtml=¥havehtml&reallinfotime= . time();
echo <link href=../adminstyle/ . ¥loginadminstyleid . /adminstyle.css rel=stylesheet type=text/css><br><center>栏目id=¥classid 要刷新的表的总个数为:<font color=red>¥count</font>个</center><br>;
for (¥i = 0; ¥i < ¥count; ¥i++) {
¥trueurl = ¥url . &tbname= . ¥tbname[¥i];
echo <table width=100% border=0 align=center cellpadding=3 cellspacing=1 class=tableborder><tr class=header><td>刷新数据表: . ¥tbname[¥i] . </td></tr><tr><td bgcolor=#ffffff><iframe frameborder=0 height=35 id= . ¥tbname[¥i] . scrolling=no src=\ . ¥trueurl . \ width=\100%\></iframe></td></tr></table>;
}
}
db_close();
¥empire = null;
?>
<iframe frameborder=0 height=35 id=checkrehtml scrolling=no src=CheckRehtml.php?first=1&=<?php echo ¥add[] ?> width=100%></iframe>
容易发怒的意思就是: 别人做了蠢事, 然后我们代替他们, 表现出笨蛋的样子。—— 蔡康永
帝国cms后台 刷新内容页面 默认只能刷新所有或者单个栏面前目今的所有内容页面,但有时实际须要刷新多个栏面前目今的页面
找到e/admin/ChangeData.php文件
本来的栏目是单选菜单
< name=classid id=classid>
<option value=0>所有栏目</option>
<?=¥class?>
</>
改为:
< name=classid[] size=12 multiple id=classid[] style=width:310px>
<option value=0>所有栏目</option>
<?=¥class?>
</>
并且改进了e/admin/DoRehtml.php的代码如下:
<?php
define(EmpireCMSAdmin, 1);
require (../../class/connect.php);
require (../../class/db_sql.php);
require (../../class/functions.php);
¥link = db_connect();
¥empire = new mysqlquery();
¥editor = 1;
//验证用户
¥lur = is_login();
¥logininid = ¥lur[userid];
¥loginin = ¥lur[username];
¥loginrnd = ¥lur[rnd];
¥loginlevel = ¥lur[groupid];
¥loginadminstyleid = ¥lur[adminstyleid];
¥add = ¥_GET;
¥havehtml = (int)¥add[havehtml];
¥tbname = ¥add[tbname];
¥count = count(¥tbname);
// 附加法度开端
if (!is_array(¥add[classid])) { //传递非数组值时,在栏目里点击信息操纵时应用
¥add[classid] = array( ¥add[classid] );
}
if (¥add[classid][0] == 0) {
¥add[classid] = array(0);
}
¥count1 = count(¥add[classid]);
for (¥m = 0; ¥m < ¥count1; ¥m++) {
¥classid = ¥add[classid][¥m];
// 附加法度停止
//刷新所有表
if (!¥count) {
¥j = 0;
¥tsql = ¥empire->query( tbname {¥dbtbpre}enewstable order by tid);
while (¥tr = ¥empire->fetch(¥tsql)) {
¥tbname[¥j] = ¥tr[tbname];
¥j++;
}
¥count = count(¥tbname);
}
esetcookie(retablenum, ¥count, 0, 1);
esetcookie(rechecktablenum, 0, 0, 1);
¥url = ../ecmschtml.php?enews=ReNewsHtml&classid=¥classid&=¥add[]&retype=¥add[retype]&startday=¥add[startday]&endday=¥add[endday]&startid=¥add[startid]&endid=¥add[endid]&havehtml=¥havehtml&reallinfotime= . time();
echo <link href=../adminstyle/ . ¥loginadminstyleid . /adminstyle.css rel=stylesheet type=text/css><br><center>栏目id=¥classid 要刷新的表的总个数为:<font color=red>¥count</font>个</center><br>;
for (¥i = 0; ¥i < ¥count; ¥i++) {
¥trueurl = ¥url . &tbname= . ¥tbname[¥i];
echo <table width=100% border=0 align=center cellpadding=3 cellspacing=1 class=tableborder><tr class=header><td>刷新数据表: . ¥tbname[¥i] . </td></tr><tr><td bgcolor=#ffffff><iframe frameborder=0 height=35 id= . ¥tbname[¥i] . scrolling=no src=\ . ¥trueurl . \ width=\100%\></iframe></td></tr></table>;
}
}
db_close();
¥empire = null;
?>
<iframe frameborder=0 height=35 id=checkrehtml scrolling=no src=CheckRehtml.php?first=1&=<?php echo ¥add[] ?> width=100%></iframe>