成都网站建设设计

将想法与焦点和您一起共享

帝国cms搜索内容字段 帝国cms搜索内容字段设置

帝国cms 判断搜索字段的字段不能为空?

!doctype html

创新互联建站科技有限公司专业互联网基础服务商,为您提供绵阳电信机房机柜租用高防服务器,成都IDC机房托管,成都主机托管等互联网服务。

html

head

meta charset="UTF-8"

titleUntitled Document/title

/head

body

script

function CheckSearchForm(){

    if(document.getElementById("searchform").stitle.value=="")

    {

            alert("请输入标题");

            return false;

    }

    if(document.getElementById("searchform").swriter.value=="")

    {

            alert("请输入作者");

            return false;

    }

    return true;

}

/script

form name="searchform" id="searchform" method="post" action="/e/search/index.php" onsubmit="return CheckSearchForm();"

table width="550" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder"

input type="hidden" name="tbname" value="zhengshu"

input type="hidden" name="tempid" value="1"

input type="hidden" name="andor" value="and"

tr class="header"

  td colspan="2"新闻搜索/td

/tr

tr bgcolor="#FFFFFF"

  td width="97"姓名:/td

  td width="388"

      input type="hidden" name="show[]" value="title"

      input type="hidden" name="hh[]" value="LK"

      input name="keyboard[]" type="text" id="stitle"

  /td

/tr

tr bgcolor="#FFFFFF"

  td编号:/td

  td

      input type="hidden" name="show[]" value="xingming"

      input type="hidden" name="hh[]" value="LK"

      input name="keyboard[]" type="text" id="swriter"

  /td

/tr

    tr bgcolor="#FFFFFF"

  td /td

  td

    input type="submit" name="Submit" value="马上搜索"

    font color="#666666"(不设置为不限)/font

  /td

/tr

/table

/form

/body

/html

帝国CMS搜索功能 求 帝国高手指点一下

form  id="searchform" name="searchform" method="post" action="/e/search/index.php" target="_blank"      

input style="float:left;" class="main text" maxlength="70"  size="42" type="text" name="keyboard" id="keyboard" value="" /    

input type="hidden" name="show" value="title,smalltext" /    

input type="hidden" name="tempid" value="1" /    

input style="float:left;"  type="image" value=" 搜 索 " src="/images/img/searchbutton.jpg" //form

上面代码是搜索标题和简介的,你说的全站搜索,只能搜索标题和简介,内容是无法参与搜索的

帝国cms怎么批量修改采集来的数据字段内容信息

进入数据库后,找到你存放数据的那个表,因为一旦修改的时候出现错误的话,你又不知道改回来后果是很严重的,建议大家先备份这个表的数据,我来里以表‘phome_ecms_news’为例,因为我的数据还没入库所以真实要修改的数据是‘phome_ecms_infotmp_news’,一定要找对表哦,别乱改。下图是我所找到的临时数据对应的表的部分截图。

核对好数据后只要写sql语修改表里的对应字段的内容信息就可以了,比如我要修改‘newstime’发布时间字段,把有含有‘2014-03-15’改成‘2012-03-15’只要写这样的sql语句

update phome_ecms_infotmp_news set newstime=replace(newstime,'2014-03-12','2012-03-12')

WHERE newstime like '%2014-03-12%' ,点击SQL,再点击UPDATE如下图

把刚刚写的好sql语句放在上图中 2 所示的输入框里,原来有的语句要删除哦 ,如下图,再点击下图中的‘执行’按钮

出现下图后点击图中我用红框标出的地方 ‘创建 PHP 代码’

点击 ‘创建 PHP 代码’ 后出现下图了,再点击下图中的 ‘执行’按钮,要往下面拉一点哦,不然可以看不到这个 按钮

6

现在再看看这个数据表里的 时间字段 里的内容,是不是改了,如果你想改标题,只要把上面的sql语句表名,和字段名改对就行了。


新闻名称:帝国cms搜索内容字段 帝国cms搜索内容字段设置
标题网址:http://chengdu.cdxwcx.cn/article/ddcsops.html