最近在用反应表单在做旅行预定的功用,已基本上完成。由于其间触及改动不少源文件及数据库结构,所以我们在运用进程请自行根据需要挑选。
由于我做的功用比较复杂,不适合群众的需求,所以我只挑出了一部分比较有用的功用,中心假如有什么过错,欢迎在此帖反应。我也是个菜鸟,能帮多少帮多少。

第一步 添加字段

phome_enewsfeedback

添加
ddno varchar(30) 订单号
retext varchar(120) 客服回复

假如你不想改动数据库结构,便利今后晋级,主张直接在后台办理信息反应字段里添加,ddno 的初始值设为:<?=$ddno?>

后台表单模板里手艺参加以下代码,不要运用主动生成,不然用户能够自己修正订单号了:


<?=$ddno?>
<input name="ddno" type="hidden" id="ddno" value="<?=$ddno?>">




上传以下图片:

第二步 修正源代码
/e/tool/feedback/index.php
找个方位,添加反应编号生成的代码


$ddno=time();//反应编号




修正/e/admin/tool/showfeedback.php 添加回馈回复,处理订单功用
这个页面首要便是添加一个FORM,几个文本框,我们能够对照自己的代码添加上去,form input这些都是我加上去的


<form name="form1" method="post" action="feedback.php">
<input name="enews" type="hidden" id="enews" value="ReOrder">
<input name="bid" type="hidden" id="id" value="<?=$bid?>">
<input name="id" type="hidden" id="id" value="<?=$id?>">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class=tableborder>
<tr class=header>
<td height="25" colspan="2">所属分类:<?=$br[bname]?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="25">提交者:</td>
<td width="81%" height="25">
<?=$username?>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">发布时刻:</td>
<td height="25">
<?=$r[saytime]?>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">IP地址:</td>
<td height="25">
<?=$r[ip]?>
</td>
</tr>
<?=$feedbackinfo?>
<tr class=header>
<td height="25" colspan="2">订单处理</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">客服回复:</td>
<td height="25">
<textarea name="retext" cols="60" rows="9" id="retext"><?=$r[retext]?></textarea>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">&nbsp;</td>
<td height="25">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" colspan="2"><div align="center">[ <a href="javascript:window.close();">关
闭</a> ]</div></td>
</tr>
</table>
</form>




修正/e/admin/tool/feedback 获取表单的值
找到


include "../".LoadLang("pub/fun.php");



在上面添加


elseif($enews=="ReOrder")
{
$id=$_POST['id'];
$bid=$_POST['bid'];
$retext=$_POST['retext'];
ReOrder($id,$bid,$retext,$logininid,$loginin);
}




修正/e/class/com_functions.php 添加ReOrder函数



//回复反应 2010-10-16 by 成名
function ReOrder($id,$bid,$retext,$userid,$username){
global $empire,$dbtbpre;
$id=(int)$id;
$bid=(int)$bid;
if(!$id||!$retext)
{
printerror("EmptyReGbooktext","history.go(-1)");
}
//验证权限
//CheckLevel($userid,$username,$classid,"feedback");
$sql=$empire->query("update {$dbtbpre}enewsfeedback set retext='$retext' where id='$id';");
if($sql)
{
//操作日志
insert_dolog("id=".$id);
echo"<script>opener.parent.main.location.href='feedback.php?bid=$bid';window.close();</script>";
exit();
}
else
{printerror("DbError","history.go(-1)");}
}




上传以下图片:

第三步,为你的反应添加查找功用,当然前台你也能够加上这个功用,便利用户查找

修正一个文件就能够了/e/admin/tool/feedback.php
详细怎样修正我们参阅:/e/admin/shopsys/listdb.php,




上传以下图片:

声明:有的资源均来自网络转载,版权归原作者所有,如有侵犯到您的权益 请联系邮箱:123456@qq.com 我们将配合处理!

原文地址:帝国cms的信息反馈增加反馈编号加回复功能发布于2023-03-10 17:04:14

相关推荐