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

首頁 > CMS > 帝國Empire > 正文

帝國CMS留言板加字段和驗證碼得教程方法

2024-07-09 23:00:41
字體:
供稿:網(wǎng)友

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

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

        $name=RepPostStr(trim($add[name]));        $email=RepPostStr($add[email]);        $call=RepPostStr($add[call]);        $lytext=RepPostStr($add[lytext]);        $gtitle=RepPostStr(trim($add[gtitle]));  //增加的gtitle        if(empty($bid)||empty($gtitle)||empty($name)||empty($email)||!trim($lytext))  //gtitle字段檢測不允許為空



第56行左右

$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行左右

$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行左右

$listtemp=str_replace("[!--lyid--]",$r['lyid'],$listtemp);//id    $listtemp=str_replace("[!--lytext--]",nl2br($r['lytext']),$listtemp);//留言內(nèi)容    $listtemp=str_replace("[!--retext--]",nl2br($r['retext']),$listtemp);//回復    $listtemp=str_replace("[!--lytime--]",format_datetime($r['lytime'],$formatdate),$listtemp);    $listtemp=str_replace("[!--name--]",$r['name'],$listtemp);    $listtemp=str_replace("[!--gtitle--]",$r['gtitle'],$listtemp);



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

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



6、然后修改留言模板
(1)加入必填項: <input name="gtitle" type="text" id="gtitle" />
(2)加入驗證碼: <input type=text name=key><img src="/e/ShowKey/?v=gbook" onClick="this.src= this.src +'&xx='+Math.random()" alt="看不清楚,點擊刷新">
(3)后臺開啟留言驗證: 系統(tǒng)參數(shù)修改------信息設置 ---留言驗證碼

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

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 马公市| 阳西县| 和平县| 商都县| 鹰潭市| 旅游| 荥经县| 岳阳县| 沭阳县| 昆明市| 南汇区| 商丘市| 蚌埠市| 五河县| 开阳县| 汝阳县| 兰坪| 札达县| 陆河县| 潜江市| 广灵县| 永春县| 荔浦县| 阜平县| 太康县| 二手房| 通辽市| 东乡县| 鹤壁市| 张家口市| 新巴尔虎左旗| 万年县| 河北区| 石河子市| 丰台区| 兴文县| 兴文县| 龙州县| 民乐县| 石景山区| 志丹县|