国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > CMS > 帝國(guó)Empire > 正文

帝國(guó)CMS6.0留言板加字段和驗(yàn)證碼得方法

2024-08-28 12:21:37
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

1、在數(shù)據(jù)庫(kù)的前綴名_enewsgbook表中添加您要顯示的字段,比如我要加標(biāo)題"gtitle"字段,可以用工具添加,也可以執(zhí)行sql添加:ALTER TABLE 前綴名_enewsgbook ADD gtitle VARCHAR(100);

2、修改e/enews/gbookfun.php,第11行左右:

  1. $name=RepPostStr(trim($add[name])); 
  2.         $email=RepPostStr($add[email]); 
  3.         $call=RepPostStr($add[call]); 
  4.         $lytext=RepPostStr($add[lytext]); 
  5.         $gtitle=RepPostStr(trim($add[gtitle]));  //增加的gtitle 
  6.         if(emptyempty($bid)||emptyempty($gtitle)||emptyempty($name)||emptyempty($email)||!trim 
  7. ($lytext))  //gtitle字段檢測(cè)不允許為空 

第56行左右:

  1. $sql=$empire->query("insert into {$dbtbpre}enewsgbook(name,gtitle,email,`call`,lytime,lytext,retext,bid,ip,checked,userid,username) values('$name','$gtitle','$email','$call','$lytime','$lytext','','$bid','$ip','$br[checked]','$userid','$username');"); //插入字段記錄 

3、修改e/data/template/gbooktemp.txt,第50行左右:

  1. $query="select lyid,name,gtitle,email,`call`,lytime,lytext,retext from {$dbtbpre}enewsgbook where bid='$bid' and checked=0";   //查詢字段中添加gtitle 

4、修改e/class/t_functions.php,第2106行左右:

  1. $listtemp=str_replace("[!--lyid--]",$r['lyid'],$listtemp);//id 
  2.     $listtemp=str_replace("[!--lytext--]",nl2br($r['lytext']),$listtemp);//留言內(nèi)容 
  3.     $listtemp=str_replace("[!--retext--]",nl2br($r['retext']),$listtemp);//回復(fù) 
  4.     $listtemp=str_replace("[!--lytime--]",format_datetime($r['lytime'],$formatdate),$listtemp); 
  5.     $listtemp=str_replace("[!--name--]",$r['name'],$listtemp); 
  6.     $listtemp=str_replace("[!--gtitle--]",$r['gtitle'],$listtemp); 

5、修改e/class/functions.php,第2934行左右添加:

  1. $listtemp_center=str_replace("[!--lyid--]","<?=/$r[lyid]?>",$listtemp_center); 
  2.     $listtemp_center=str_replace("[!--name--]","<?=/$r[name]?>",$listtemp_center); 
  3.     $listtemp_center=str_replace("[!--gtitle--]","<?=/$r[gtitle]?>",$listtemp_center); 

6、然后修改留言模板

(1)加入必填項(xiàng):<input name="gtitle" type="text" id="gtitle" />

(2)加入驗(yàn)證碼:<input type=text name=key><img src="/e/ShowKey/?v=gbook" onClick="this.src= this.src +'&xx='+Math.random()" alt="看不清楚,點(diǎn)擊刷新">

(3)后臺(tái)開啟留言驗(yàn)證:系統(tǒng)參數(shù)修改------信息設(shè)置---留言驗(yàn)證碼

至此,留言字段添加成功.

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 黔西| 池州市| 辉南县| 图木舒克市| 甘德县| 兰西县| 余江县| 镇平县| 建平县| 青岛市| 津市市| 贵德县| 昌黎县| 镇江市| 丰县| 基隆市| 扎鲁特旗| 桃江县| 民和| 九龙县| 新乡县| 伊春市| 历史| 那坡县| 西乌| 如东县| 漠河县| 抚远县| 景德镇市| 龙胜| 玉门市| 东城区| 余江县| 临安市| 海兴县| 凤山县| 绿春县| 平度市| 平度市| 界首市| 安庆市|