wenda.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. $id=intval($_GET[id]);
  5. if(empty($_SESSION["SHOPUSER"])){php_toheader("openw.php");}
  6. while1("id,bh,userid","yjcode_pro where id=".$id." and zt=0");if(!$row1=mysql_fetch_array($res1)){Audit_alert("商品不存在或未上架",weburl,"parent.");}
  7. $userid=returnuserid($_SESSION["SHOPUSER"]);
  8. $probh=$row1[bh];
  9. if($_GET[yjcode]=="wd"){
  10. zwzr();
  11. $txt=sqlzhuru1($_POST["s1"]);
  12. $mybh=returnbh();
  13. intotable("yjcode_wenda","bh,probh,userid,selluserid,sj,uip,txt,hftxt","'".$mybh."','".$probh."',".$userid.",".$row1[userid].",'".getsj()."','".getuip()."','".$txt."',''");
  14. php_toheader("wenda.php?id=".$id."&t=suc");
  15. }
  16. ?>
  17. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  18. <html xmlns="http://www.w3.org/1999/xhtml">
  19. <head>
  20. <meta http-equiv="x-ua-compatible" content="ie=7" />
  21. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  22. <title>问答咨询</title>
  23. <? include("../tem/cssjs.html");?>
  24. <style type="text/css">
  25. .yjcode1{float:left;width:650px;}
  26. .yjcode1 textarea{float:left;width:610px;height:300px;border:#ddd solid 1px;margin:20px;font-size:14px;}
  27. .yjcode2{float:left;width:650px;}
  28. .yjcode2 input{float:left;margin:0 20px;width:610px;color:#fff;border-radius:2px;height:40px;border:0;cursor:pointer;background-color:#1E9FFF;}
  29. .suc{float:left;width:410px;font-size:14px;color:#6B6B6B;background:url(../img/suc.jpg) no-repeat;background-position:110px 120px;padding:130px 0 0 240px;height:50px;line-height:35px;text-align:center;height:250px;text-align:left;}
  30. .suc strong{font-size:16px;color:#ff6600;}
  31. </style>
  32. <script language="javascript">
  33. function tj(){
  34. if(document.f1.s1.value==""){alert("请输入要咨询的问题");document.f1.s1.focus();return false;}
  35. layer.msg('正在处理中,请稍等', {icon: 16 ,time: 0,shade :0.25});
  36. f1.action="wenda.php?id=<?=$id?>&yjcode=wd";
  37. }
  38. function miaos(){
  39. parent.location.reload();
  40. }
  41. </script>
  42. </head>
  43. <body>
  44. <? if($_GET[t]=="suc"){?>
  45. <div class="suc">
  46. <strong>提交成功,等待商家审核并回复</strong><br>
  47. <span id="miao">5</span>秒后自动跳转(如未跳转,请刷新)
  48. </div>
  49. <script language="javascript">
  50. setTimeout("miaos()",4000);
  51. </script>
  52. <? }else{?>
  53. <form name="f1" method="post" onsubmit="return tj()">
  54. <div class="yjcode1"><textarea name="s1" placeholder="请输入您要咨询的问题"></textarea></div>
  55. <div class="yjcode2"><input type="submit" value="提交问题" /></div>
  56. </form>
  57. <? }?>
  58. </body>
  59. </html>