userts.jsp
上传用户:helenhuo66
上传日期:2007-06-01
资源大小:865k
文件大小:2k
源码类别:

百货/超市行业

开发平台:

Java

  1. <%@ page contentType="text/html;charset=GBK" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ include file="top.jsp"%>
  3. <link href="css.css" rel="stylesheet" type="text/css">
  4.         <div align="center">
  5.           <center>
  6.         <table border="0" width="600" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
  7.           <tr> 
  8.             <td width="380" height="25"> 
  9.               <%
  10.   String errmsg="";
  11.   String user_name="";
  12.   String sub_number="";
  13.   boolean founderr=false;
  14.     if(request.getParameter("user_name").equals("")){
  15.         founderr=true;
  16.         errmsg=errmsg+"<br>"+"<li>使用投诉功能要提供用户账号";
  17. }
  18.     else
  19.         user_name=request.getParameter("user_name");
  20.     
  21.     if(request.getParameter("sub_number").equals("")){
  22.         founderr=true;
  23.         errmsg=errmsg+"<br>"+"<li>使用投诉功能要提供订单号";
  24. }
  25.     else
  26.         sub_number=request.getParameter("sub_number");
  27.     
  28.     if(founderr==false){
  29.         sql="select * from sub where sub_number='"+sub_number+"' and user_name='"+user_name+"'";
  30. rs=mdb.executeQuery(sql);
  31.         if(!rs.next()){
  32.             founderr=true;
  33.             errmsg=errmsg+"<br>"+"<li>用户没有此订单信息";
  34. }
  35.         else{
  36.             sql="select * from ts where sub_number='"+sub_number+"'";
  37. rs=mdb.executeQuery(sql);
  38.             if(!rs.next()){
  39. sql="insert into ts(user_name,sub_number) values('"+user_name+"','"+sub_number+"')";
  40. mdb.executeInsert(sql);
  41.             }
  42. else{
  43.                 founderr=true;
  44.                 errmsg=errmsg+"<BR>"+"<li>请不要重复提交投诉信息!";
  45. }
  46. }
  47. }
  48.      %>
  49.               <div align="center"><font color="#FFFFFF"><b> 
  50.                 <%if(founderr==true)
  51.             out.print("请确认你的投诉信息");
  52.         else
  53.             out.print(" 您的投诉信息已经确认!");
  54.         %>
  55.                 </b></font></div></td>
  56.           </tr>
  57.           <tr> 
  58.             <td width="100%" height="25">
  59.             <%
  60.         if(founderr==true)
  61.             out.print(errmsg);
  62.         else{%>您的投诉订单为:<font color=red><%=sub_number%></font><br>我们会尽快的处理给您一个满意的答复</td>
  63. <%}%>
  64.           </tr>
  65.         </table>
  66.           </center>
  67. </div>
  68. <%@ include file="copy.jsp"%>