本篇文章给大家谈谈帝国cms+$info,以及帝国败家子对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。
本文目录一览:
- 1、帝国CMS系统内置标签[!--info.next--]和[!--info.pre--]的调用
- 2、帝国cms怎么批量添加信息的tags
- 3、封面栏目实现一行两列的方法 帝国cms
- 4、帝国CMS问题
- 5、帝国cms 伪静态后台怎么设置
- 6、帝国cms 搜索代码用get跳转到/e/action/listinfo.php表单中的参数怎么传递
1、帝国CMS系统内置标签[!--info.next--]和[!--info.pre--]的调用
这是因为你那篇文章是当前栏目的最后一篇文章,所以显示返回列表,如果你在那个栏目再发新文章,重新刷新生成所有信息页面(要勾选全部),然后再去浏览那篇文章会发现出现下一篇了。
还有不明白的地方,可以通过我用户名找到我。dedecms、帝国cms、仿站问题都可以来找我
2、帝国cms怎么批量添加信息的tags
修改步骤:
1、以下代码加入到admin/ecmsinfo.php,在任意2个elseif中间插入就行
elseif($enews=="AddTags_all")//列表批量添加Tags
{
$classid=$_POST['classid'];
$id=$_POST['id'];
$tags=$_POST['add_listtags'];
$newstime=time();
eInsertTags2($tags,$classid,$id,$newstime);
}
2、将以下代码加入到class/uesrfun.php
//加入TAG表
function eInsertTags2($tags,$classid,$id,$newstime){
global $empire,$dbtbpre,$class_r;
if(!trim($tags))
{
printerror("TAGS信息不能为空", "", 1, 0, 1);
return '';
}
$count = count($id); //统计ID数量
$tags = RepPostVar($tags);
$tag = explode(",", $tags);
if (emptyempty($count))
{
printerror("未选择信息ID", "", 1, 0, 1);
}
if (count($tag)1)
{
printerror("只能添加一个TAGS词", "", 1, 0, 1);
}
$classid=(int)$classid;
$id[$i] = (int)$id[$i];
$mid=(int)$class_r[$classid][modid];
for($i=0;$i$count;$i++)
{
$tbname=$class_r[$classid][tbname];//获取表名
$r=$empire-fetch1("select tagid from {$dbtbpre}enewstags where tagname='$tags' limit 1");
$t = $empire-fetch1("select infotags from {$dbtbpre}ecms_".$tbname." where id='$id[$i]'");
$taga=$t['infotags'].",".$tags; //组合TAGS
$tagb[$i] = explode(",",$taga); //设置数组
$tagc=array_values(array_unique($tagb[$i])); //数组排重
for($t=0;$tcount($tagc);$t++)
{//二级子循环TAGS数组输出
$newtags[$i].= ",".$tagc[$t];
}
if($r[tagid])
{
$datar=$empire-fetch1("select tagid,classid,newstime from {$dbtbpre}enewstagsdata where tagid='$r[tagid]' and id='$id[$i]' and mid='$mid' limit 1");
if($datar[tagid])
{
if($datar[classid]!=$classid||$datar[newstime]!=$newstime)
{
$empire-query("update {$dbtbpre}enewstagsdata set classid='$classid',newstime='$newstime' where tagid='$r[tagid]' and id='$id[$i]' and mid='$mid' limit 1");
}
}
else
{
$empire-query("update {$dbtbpre}enewstags set num=num+1 where tagid='$r[tagid]'");
$empire-query("update {$dbtbpre}ecms_".$tbname." set infotags='".trim($newtags[$i],",")."' where id='$id[$i]'");
$empire-query("insert into {$dbtbpre}enewstagsdata(tagid,classid,id,newstime,mid) values('$r[tagid]','$classid','$id[$i]','$newstime','$mid');");
}
}
else
{
$empire-query("update {$dbtbpre}ecms_".$tbname." set infotags='".trim($newtags[$i],",")."' where id='$id[$i]'");
$empire-query("insert into {$dbtbpre}enewstags(tagname,num,isgood,cid) values('$tags',1,0,0);");
$tagid=$empire-lastid();
$empire-query("insert into {$dbtbpre}enewstagsdata(tagid,classid,id,newstime,mid) values('$tagid','$classid','$id[$i]','$newstime','$mid');");
}
}
printerror("批量添加TAGS成功", "", 1, 0, 1);
}
3、信息管理列表模板最后一列修改成以下代码,在e/data/html/list/文件夹内
td height="25" colspan="8"
table width="100%" border="0" cellpadding="0" cellspacing="0"
tr
td width="68%" height="25"
font color="#666666"备注:多选框蓝色为未审核信息;发布者红色为会员投稿;信息ID粗体为未生成,点击ID可刷新页面./font
/td
td width="32%" input type="text" name="add_listtags" id="add_listtags" size="50" value="" /
input type="submit" name="Submit100" value="添加TAGS" onClick="document.listform.enews.value='AddTags_all';document.listform.action='ecmsinfo.php';"
/td
/tr
/table
/td
3、封面栏目实现一行两列的方法 帝国cms
以下代码适用于帝国CMS6.6版,7.0版不同处在代码注释处已标明。
找到e/admin/ChangeData.php文件
原先的栏目是单选菜单
select name="classid" id="classid"
option value="0"所有栏目/option
?=$class?
/select
改为:
select name="classid[]" size="12" multiple id="classid[]" style="width:310px"
option value="0"所有栏目/option
?=$class?
/select
并且改进了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);/pp// 附加程序开始
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("select tbname from {$dbtbpre}enewstable order by tid"); // 帝国cms7.0版 这里有个条件为:where intb=0
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=ReNewsHtmlclassid=$classidfrom=$add[from]retype=$add[retype]startday=$add[startday]endday=$add[endday]startid=$add[startid]endid=$add[endid]havehtml=$havehtmlreallinfotime=" . time();
echo "link href='../adminstyle/" . $loginadminstyleid . "/adminstyle.css' rel='stylesheet' type='text/css'
center栏目id=$classid 要刷新的表的总个数为:font color=red$count/font个/center
";
for ($i = 0; $i $count; $i++) {
$trueurl = $url . "tbname=" . $tbname[$i];
echo "table width='100%' border=0 align=center cellpadding=3 cellspacing=1 class=tablebordertr class=headertd刷新数据表:" . $tbname[$i] . "/td/trtrtd bgcolor='#ffffff'iframe frameborder=0 height=35 id='" . $tbname[$i] . "' scrolling=no src="" . $trueurl . "" width="100%"/iframe/td/tr/table";
}
}
db_close();
$empire = null;
?/ppiframe frameborder=0 height=35 id="checkrehtml" scrolling=no src="CheckRehtml.php?first=1from=?php echo $add[from] ?" width="100%"/iframe
4、帝国CMS问题
万能标签
操作类型:按栏目调用 0 栏目最新信息 (栏目ID=栏目ID)
调用格式:
[ecmsinfo]栏目ID/专题ID,显示条数,标题截取数,是否显示栏目名,操作类型,模板ID,只显示有标题图片,附加SQL条件,显示排序[/ecmsinfo]
参数 参数说明
栏目ID/专题ID 多个栏目ID与专题ID可用,号格开,如'1,2' ,当前ID='selfinfo'
显示条数 显示前几条记录
标题截取数 截取几个字符
是否显示栏目名 0为不显示,1为显示
操作类型 具体看操作类型说明
标签模板ID 标签模板ID,显示的样式模板
只显示有标题图片 0为不限制,1为只显示有标题图片的信息
附加SQL条件 附加调用条件,如:"title='帝国'"
显示排序 可指定按相应的字段排序,如:"id desc"
比如我要当前栏目的所有子栏目,栏目下显示一条最新的信息,假设模板ID为100
[ecmsinfo]'selfinfo',1,0,0,0,100,0[/ecmsinfo]
5、帝国cms 伪静态后台怎么设置
帝国cms 伪静态后台设置方法:
1、在网站根目录(web文件夹)下建一个文件,文件名及后缀格式为:httpd.ini
备注:该文件的创建很简单,可以随意命名txt文件为该文件名即可。
2、用txt/记事本模式打开httpd.ini文件,将下面的内容复制到该文件内:
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteEngine On
#伪静态规则
3、在“#伪静态规则”下面写入对应网站的伪静态规则即可。
4、帝国CMS伪静态规则(应以官方文件为准):
RewriteRule ^([0-9]+).([0-9]+)/$ e/action/ShowInfo.php?classid=$1id=$2 [L]
RewriteRule ^([0-9]+).([0-9]+)$ $1.$2/ [L,R=301]
RewriteRule ^([0-9]+)/$ e/action/ListInfo/?classid=$1 [L]
RewriteRule ^([0-9]+)$ $1/ [L,R=301]
RewriteRule ^list([0-9]+).([0-9]+)/$ e/action/ListInfo/index.php?page=$1classid=$2 [L]
RewriteRule ^list([0-9]+).([0-9]+)$ list$1.$2/ [L,R=301]
RewriteRule ^archive([0-9]+).([0-9]+)-([0-9]+)-([0-9]+)/$ e/action/ListInfo.php?classid=$1mid=1tempid=9starttime=$2-$3-$4endtime=$2-$3-$4 [L]
RewriteRule ^archive([0-9]+).([0-9]+)-([0-9]+)-([0-9]+)$ ^archive([0-9]+).([0-9]+)-([0-9]+)-([0-9]+)/ [L,R=301]
6、帝国cms 搜索代码用get跳转到/e/action/listinfo.php表单中的参数怎么传递
我明白你的意思。但我建议不要用 GET 传递这样的变量。。很容易出问题。。在没有看到代码之前,我也很难下定论你哪里出了问题。。
建议你用一个 SESSION 变量来传递数组变量比较好一点。。只不过这需要多跳转一下页面。。
思路如下:
某一页,POST 提交到 play.php 页
如果 play.php 页收到 POST 请求。
使用 SESSION 记录下所有 ID。
play.php 自己跳转往自己,防刷新。
中断程序。免得下面的播放器显示了。。
$_SESSION['ids']=$_POST['id'];
如果 play.php 没有收到 POST 请求。显示播放器开始播放。。
url.php 页。读取 SESSION 记录下来的 ID。生成地址列表。。
$id = $_SESSION['ids'][0];
关于帝国cms+$info和帝国败家子的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。