PageRenderTime 28ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/Wap/User/User_FeedBack.asp

https://github.com/joechen2010/health
ASP | 212 lines | 194 code | 10 blank | 8 comment | 0 complexity | f60dbd7b701f034685ccb74255b51fab MD5 | raw file
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
  2. <%option explicit%>
  3. <!--#include file="../Conn.asp"-->
  4. <!--#include file="../KS_Cls/Kesion.CommonCls.asp"-->
  5. <% Response.ContentType="text/vnd.wap.wml" %><?xml version="1.0" encoding="utf-8"?>
  6. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
  7. <wml>
  8. <head>
  9. <meta http-equiv="Cache-Control" content="no-Cache"/>
  10. <meta http-equiv="Cache-Control" content="max-age=0"/>
  11. </head>
  12. <card id="main" title="投诉管理">
  13. <p>
  14. <%
  15. Dim KSCls
  16. Set KSCls = New JobManage
  17. KSCls.Kesion()
  18. Set KSCls = Nothing
  19. %>
  20. </p>
  21. </card>
  22. </wml>
  23. <%
  24. Class JobManage
  25. Private KS
  26. Private TotalPut,CurrentPage,MaxPerPage
  27. Private Prev
  28. Private Sub Class_Initialize()
  29. Set KS=New PublicCls
  30. End Sub
  31. Private Sub Class_Terminate()
  32. Set KS=Nothing
  33. End Sub
  34. Public Sub Kesion()
  35. IF Cbool(KSUser.UserLoginChecked)=False Then
  36. Response.redirect DomainStr&"User/Login/"
  37. Exit Sub
  38. End If
  39. Select Case KS.S("Action")
  40. Case "Show" Call View()
  41. Case "del" call FeedBackDel()
  42. Case "Add" call Add()
  43. Case "DoSave" call AddSave()
  44. Case Else Call JobList()
  45. End Select
  46. If Prev=True Then
  47. Response.Write "<anchor>返回上一页<prev/></anchor><br/>"
  48. End If
  49. Response.Write "<br/>"
  50. Response.Write "<a href=""Index.asp?" & KS.WapValue & """>我的地盘</a><br/>" &vbcrlf
  51. Response.Write "<a href=""" & KS.GetGoBackIndex & """>返回首页</a>" &vbcrlf
  52. End Sub
  53. Sub JobList()
  54. %>
  55. <a href="User_FeedBack.asp?Action=Add&amp;<%=KS.WapValue%>">我要投诉</a><br/>
  56. <%
  57. MaxPerPage=10
  58. If KS.S("page") <> "" Then
  59. CurrentPage = KS.ChkClng(KS.S("page"))
  60. Else
  61. CurrentPage = 1
  62. End If
  63. Dim Param:Param=" where UserName='" & KSUser.UserName & "'"
  64. Dim RS:Set RS=Server.CreateObject("ADODB.RECORDSET")
  65. RS.Open "Select * From KS_FeedBack " & Param & " order By ID",Conn,1,1
  66. If RS.EOF And RS.BOF Then
  67. Response.Write "您没有发表任意见或投诉!<br/>"
  68. Else
  69. TotalPut = RS.RecordCount
  70. If CurrentPage < 1 Then CurrentPage = 1
  71. If (CurrentPage - 1) * MaxPerPage > totalPut Then
  72. If (totalPut Mod MaxPerPage) = 0 Then
  73. CurrentPage = totalPut \ MaxPerPage
  74. Else
  75. CurrentPage = totalPut \ MaxPerPage + 1
  76. End If
  77. End If
  78. If CurrentPage > 1 and (CurrentPage - 1) * MaxPerPage < totalPut Then
  79. RS.Move (CurrentPage - 1) * MaxPerPage
  80. Else
  81. CurrentPage = 1
  82. End If
  83. Call ShowJobList(RS)
  84. End If
  85. %>
  86. <br/>
  87. 操作说明<br/>
  88. 投诉/意见管理放置的是您投诉及对本站的建议记录<br/>
  89. 您可以删除未处理的记录<br/>
  90. <%
  91. End Sub
  92. Sub ShowJobList(RS)
  93. Dim str,i
  94. Do While Not RS.EOF
  95. 'Dim bh:bh=RS("ID")
  96. 'IF Len(BH)=1 Then
  97. 'BH="00"& BH
  98. 'ElseIf Len(BH)=2 Then
  99. 'BH="0" & BH
  100. 'End If
  101. 'BH="YJ" & year(RS("Adddate")) & Month(RS("Adddate")) & BH
  102. If RS("Accepted")="" or isnull(RS("Accepted")) Then
  103. Response.Write "[待]"
  104. Else
  105. Response.Write "[已]"
  106. End If
  107. 'Response.Write "" & BH & ":"
  108. Response.Write "<a href='User_FeedBack.asp?Action=Show&amp;ID=" & RS("ID") & "&amp;" & KS.WapValue & "'>" & RS("Title") & "</a> "
  109. If RS("Accepted")="" or isnull(RS("Accepted")) Then
  110. Response.Write "<a href='User_FeedBack.asp?Action=del&amp;ID=" & RS("ID") & "&amp;" & KS.WapValue & "'>删除</a>"
  111. End If
  112. Response.Write "<br/>"
  113. RS.MoveNext
  114. I = I + 1
  115. If I >= MaxPerPage Then Exit Do
  116. Loop
  117. Response.Write KS.ShowPagePara(TotalPut, MaxPerPage, "User_FeedBack.asp", True, "位", CurrentPage, "" & KS.WapValue & "")
  118. End Sub
  119. Sub Add()
  120. Dim ID,RS,RealName,Tel,Sex
  121. ID=KS.ChkClng(KS.S("ID"))
  122. %>
  123. 我要投诉<br/>
  124. 意见主题:<input type="text" name="Title<%=Minute(Now)%><%=Second(Now)%>" value=""/><br/>
  125. 意见对象:<input type="text" name="Object<%=Minute(Now)%><%=Second(Now)%>" value=""/><br/>
  126. 意见内容:<input type="text" name="Content<%=Minute(Now)%><%=Second(Now)%>" value=""/><br/>
  127. 期望方案:<input type="text" name="Hopesolution<%=Minute(Now)%><%=Second(Now)%>" value=""/><br/>
  128. <anchor>立即投诉<go href="User_FeedBack.asp?Action=DoSave&amp;<%=KS.WapValue%>" method="post">
  129. <postfield name="Title" value="$(Title<%=Minute(Now)%><%=Second(Now)%>)"/>
  130. <postfield name="Object" value="$(Object<%=Minute(Now)%><%=Second(Now)%>)"/>
  131. <postfield name="Content" value="$(Content<%=Minute(Now)%><%=Second(Now)%>)"/>
  132. <postfield name="Hopesolution" value="$(Hopesolution<%=Minute(Now)%><%=Second(Now)%>)"/>
  133. <postfield name="TrainID" value="<%=ID%>"/>
  134. </go></anchor>
  135. <br/>
  136. <%
  137. End Sub
  138. Sub AddSave()
  139. If KS.S("Title")="" Then
  140. Response.Write "请输入主题!<br/>"
  141. Prev=True
  142. Exit Sub
  143. End If
  144. If KS.S("Content")="" Then
  145. Response.Write "请输入内容!<br/>"
  146. Prev=True
  147. Exit Sub
  148. End If
  149. Dim ID:ID=KS.ChkClng(KS.S("ID"))
  150. Dim RS:Set RS=Server.CreateObject("adodb.recordset")
  151. RS.Open "select * from KS_FeedBack where UserName='" & KSUser.UserName & "' And id=" & ID,Conn,1,3
  152. If RS.EOf Then
  153. RS.Addnew
  154. RS("Adddate")=Now
  155. End If
  156. RS("UserName")=KSUser.UserName
  157. RS("Title")=KS.S("Title")
  158. RS("Object")=KS.S("Object")
  159. RS("Content")=KS.S("Content")
  160. RS("Hopesolution")=KS.S("Hopesolution")
  161. RS.Update
  162. RS.Close
  163. set RS=Nothing
  164. Response.Write "你的投诉已提交,请耐心等待处理结果!<br/>"
  165. Response.Write "<a href=""User_FeedBack.asp?" & KS.WapValue & """>投诉建议</a><br/>"
  166. End Sub
  167. Sub View()
  168. Dim ID,RS
  169. ID=KS.ChkClng(KS.S("ID"))
  170. Set RS=Server.CreateOBject("ADODB.RECORDSET")
  171. RS.Open "Select * from ks_feedback where id=" & ID,Conn,1,1
  172. IF RS.EOF Then
  173. RS.Close:Set RS=Nothing
  174. Response.Write "出错了!<br/>"
  175. Prev=True
  176. Exit Sub
  177. End If
  178. %>
  179. 查看详情<br/>
  180. 意见主题:<%=RS("Title")%><br/>
  181. 意见对象:<%=RS("Object")%><br/>
  182. 意见内容:<%=RS("Content")%><br/>
  183. 希望结果:<%=RS("hopesolution")%><br/><br/>
  184. <%
  185. If RS("Accepted")="" or isnull(RS("Accepted")) Then
  186. Response.Write "待受理中...<br/>"
  187. Else
  188. %>
  189. :<%=RS("AcceptEd")%><br/>
  190. 处理时间:<%=RS("AcceptTime")%><br/>
  191. 处理结果:<%=RS("AcceptResult")%><br/>
  192. <%
  193. End If
  194. RS.Close:Set RS=Nothing
  195. Prev=True
  196. End Sub
  197. Sub FeedBackDel()
  198. Conn.Execute("Delete from KS_FeedBack where (Accepted='' or Accepted is null ) And UserName='" & KSUser.UserName &"' And ID=" & KS.ChkClng(KS.S("ID")))
  199. Response.Redirect KS.GetDomain&"User/User_FeedBack.asp?" & KS.WapValue & ""
  200. End Sub
  201. End Class
  202. %>