viewreturn.asp
上传用户:btntkt
上传日期:2021-04-16
资源大小:5296k
文件大小:21k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

DOS

  1. <!--#include file="conn.asp"-->
  2. <!--#include file="config.asp"-->
  3. <html>
  4. <head>
  5. <title>网软天下购物系统,网络购物系统,asp购物系统,免费购物系统,网上商城购物系统。--意见反馈</title>
  6. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  7. <link href="skin/skin<%=skinid%>/css.css" rel="stylesheet" type="text/css">
  8. </head>
  9. <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
  10. <!--#include file="include/head.asp"-->
  11. <table width="1000" border="0"  align="center" cellspacing="0" cellpadding="0">
  12.   <tr>
  13.     <td width="41" valign="top"><table width="100%" height="184" border="0" cellpadding="0" cellspacing="0">
  14.       <tr>
  15.         <td height="30" align="right" valign="top"><img src="skin/skin<%=skinid%>/jiao.gif" width="15" height="17"></td>
  16.       </tr>
  17.       <tr>
  18.         <td height="90"><div align="right"><img src="images/ttts.gif" width="26" height="110" /></div></td>
  19.       </tr>
  20.       <tr>
  21.         <td height="30">&nbsp;</td>
  22.       </tr>
  23.     </table></td>
  24. <td width="190" valign="top"style="BORDER-bottom:<%=skincolor%> 1px solid;BORDER-left:<%=skincolor%> 1px solid; BORDER-right:<%=skincolor%> 1px solid;">
  25. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  26.   <tr>
  27.         <td><table width="190" height="190" border="0" cellpadding="0" cellspacing="0">
  28.           <tr>
  29.               <td align="center" valign="middle" background="skin/skin<%=skinid%>/index_2.gif"><!--#include file="userinfo.asp"--></td>
  30.           </tr>
  31.         </table></td>
  32.       </tr>
  33.       <tr>
  34.         <td><img src="images/index_4.gif" width="190" height="12" alt="" /></td>
  35.       </tr>
  36.       <tr>
  37.         <td><!--#include file="shopcart.asp"--></td>
  38.       </tr>
  39.       <tr>
  40.         <td>&nbsp;</td>
  41.       </tr>
  42.     </table></td>
  43.     <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  44.       <tr>
  45.         <td height="28" background="skin/skin<%=skinid%>/pdbg01.gif"><div align="center">尊敬的客户,留下您宝贵的建议,我们愿为您提供更好的服务!</div></td>
  46.       </tr>
  47.       <tr>
  48.         <td><span class="b">
  49.           
  50.         </span>
  51.           <table width="100%" align="center" border="0" cellspacing="0" cellpadding="0"  bordercolor="#CCCCCC">
  52.               <tr> 
  53.                 <td bordercolor="#FFFFFF" bgcolor="#FFFFFF"><br>
  54.                   <table width="95%"  border="0" cellspacing="0" cellpadding="0">
  55.                     <tr> 
  56.                       <td valign="top"> <table width="100%"  border="0" cellspacing="0" cellpadding="0">
  57.                           <tr> 
  58.                             <td background="img/bg1_4color_.jpg"><img src=img/bg1_4color_.jpg" width="1" height="3"></td>
  59.                           </tr>
  60.                         </table>
  61.                          
  62.                         </p>
  63.                         <table width="100%" border="0" cellspacing="0" cellpadding="0">
  64.                           <tr> 
  65.                             <td><table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
  66.                                 <tr> 
  67.                                   <td height="1" bgcolor="cccccc"><img src="img/dot_03.gif" width="9" height="1" border="0"></td>
  68.                                 </tr>
  69.                                 <tr> 
  70.                                   <td height="25" bgcolor="efefef"> <strong>&nbsp;&nbsp; 
  71.                                     </strong><b>留言信息</b></td>
  72.                                 </tr>
  73.                                 <tr> 
  74.                                   <td height="1" bgcolor="cccccc"><img src="img/dot_03.gif" width="9" height="1" border="0"></td>
  75.                                 </tr>
  76.                               </table>
  77.                               <table width="98%" border="0" align="center">
  78.                                 <tr> 
  79.                                   <td align="center"> 
  80.                                     <%
  81. Function unHtml(content)
  82. ON ERROR RESUME NEXT
  83. unHtml=content
  84. IF content <> "" Then
  85. unHtml=Server.HTMLEncode(unHtml)
  86. unHtml=Replace(unHtml,vbcrlf,"<br>")
  87. unHtml=Replace(unHtml,chr(9),"&nbsp;&nbsp;&nbsp;&nbsp;")
  88. unHtml=Replace(unHtml," ","&nbsp;")
  89. End IF
  90. IF Err.Number <>0 Then
  91. unHtml= "HTML转换中出错请联系管理员<br>"
  92. Err.Clear
  93. End IF
  94. End Function
  95. %>
  96.                                     <%
  97. set rs=server.createobject("adodb.recordset")
  98. rs.open "select * from guestbook where online=1 order by id desc",conn,3,2
  99. 'dim page
  100. 'dim e_page
  101. 'e_page=5 '每页显示留言数
  102. 'rs.pagesize=e_page
  103. 'if request.querystring("page")="" or request.querystring("page")=0 then
  104. 'page=1
  105. 'else
  106. 'page=request.querystring("page")
  107. 'rs.absolutepage=trim(request.querystring("page"))
  108. 'end if
  109. %>
  110.                                     <SCRIPT language=JavaScript>
  111. function is_number(str)
  112. {
  113. exp=/[^0-9()-]/g;
  114. if(str.search(exp) != -1)
  115. {
  116. return false;
  117. }
  118. return true;
  119. }
  120. function CheckInput(){
  121. if(form.name.value==''){
  122. alert("您没有填写昵称!");
  123. form.name.focus();
  124. return false;
  125. }
  126. if(form.name.value.length>20){
  127. alert("昵称不能超过20个字符!");
  128. form.name.focus();
  129. return false;
  130. }
  131. if(!is_number(document.form.qq.value)){
  132. alert("QQ号必须是数字!");
  133. form.qq.focus();
  134. return false;
  135. }
  136. if(form.content.value==''){
  137. alert("您没有填写留言内容!");
  138. form.content.focus();
  139. return false;
  140. }
  141. if(form.content.value.length>255){
  142. alert("留言内容不能超过255个字符!");
  143. form.content.focus();
  144. return false;
  145. }
  146. return true;
  147. }
  148. </SCRIPT>
  149.                                     <br> 
  150.                                     <%
  151. if rs.eof and rs.bof then
  152. %>
  153.                                     <table width="380" border="0" align="center" cellpadding="4" >
  154.                                       <tr> 
  155.                                         <td height="40" align="center"> <p>还没有任何留言!</p></td>
  156.                                       </tr>
  157.                                     </table>
  158.                                     <%else%>
  159.                                     <%
  160.    rs.PageSize =10 '每页记录条数
  161. iCount=rs.RecordCount '记录总数
  162. iPageSize=rs.PageSize
  163.      maxpage=rs.PageCount 
  164.      page=request("page")
  165.      per_page=rs.PageSize
  166.     
  167.     if Not IsNumeric(page) or page="" then
  168.         page=1
  169.     else
  170.         page=cint(page)
  171.     end if
  172.     
  173.     if page<1 then
  174.         page=1
  175.     elseif  page>maxpage then
  176.         page=maxpage
  177.     end if
  178.     
  179.     rs.AbsolutePage=Page
  180. if page=maxpage then
  181. x=iCount-(maxpage-1)*iPageSize
  182. else
  183. x=iPageSize
  184. end if
  185. %>
  186.                                     <table width="100%" border="0">
  187.                                       <tr> 
  188.                                         <td colspan="12" height="25" align="center" bgcolor="#FFFFFF" > 
  189.                                        
  190.                                         </td>
  191.                                       </tr>
  192.                                     </table>
  193.                                     <%
  194. For i=1 To x
  195. 'do while not rs.eof and e_page>0
  196. %>
  197.                                     <TABLE width=100% border=0 align="center" cellPadding=0 cellSpacing=1 bgcolor="#CCCCCC">
  198.                                       <TBODY>
  199.                                         <TR> 
  200.                                           <TD bgcolor="f1f1f1"><TABLE width="100%" border=0 cellpadding="0" cellspacing="0">
  201.                                               <TBODY>
  202.                                                 <TR bgcolor="f1f1f1"> 
  203.                                                   <TD width="67" height="23" align="center" bgcolor="f1f1f1"><font color="#FF0000">&nbsp;</font></TD>
  204.                                                   <TD width="464" align="right"> 
  205.                                                     <%if rs("qq")<>"" then%>
  206.                                                     <img src="images/qq.gif" width="16" height="16" border="0"> 
  207.                                                     <%=rs("qq")%> 
  208.                                                     <%end if%>
  209.                                                     &nbsp; 
  210.                                                     <%if rs("email")<>"" then%>
  211.                                                     <a href="mailto:<%=rs("email")%>" target="_blank" title=Email:<%=rs("email")%>><img src="images/email.gif" width="14" height="15" border="0"></a> 
  212.                                                     <a href="mailto:<%=rs("email")%>" target="_blank" title=Email:<%=rs("email")%>><%=rs("email")%></a> 
  213.                                                     <%end if%>
  214.                                                     <%if rs("url")<>"" then%>
  215.                                                     <a href="<%=rs("url")%>" target="_blank" title=主页:<%=rs("url")%>><img src="images/url.gif" width="16" height="16" border="0"></a> 
  216.                                                     <a href="<%=rs("url")%>" target="_blank" title=主页:<%=rs("url")%>><%=rs("url")%></a> 
  217.                                                     <%end if%>
  218.                                                     &nbsp;</TD>
  219.                                                 </TR>
  220.                                               </TBODY>
  221.                                             </TABLE></TD>
  222.                                         </TR>
  223.                                         <TR> 
  224.                                           <TD><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  225.                                               <TBODY>
  226.                                                 <TR> 
  227.                                                   <TD bgcolor="#FFFFFF"> <TABLE width="100%" border=0 style="table-layout:fixed;word-break:break-all">
  228.                                                       <TBODY>
  229.                                                         <TR> 
  230.                                                           <TD width="109"><img src="images/<%=rs("sex")%>.gif"></TD>
  231.                                                           <TD colspan="2"> <strong><font color="<%=flzhbt%>">姓名:</font></strong><font color="<%=flzhzt%>"><%=rs("name")%></font><br> 
  232.                                                             <strong><font color="<%=flzhbt%>">内容:</font></strong><font color="<%=flzhzt%>"><%=unHtml(rs("content"))%></font></TD>
  233.                                                         </TR>
  234.                                                         <TR> 
  235.                                                           <TD colspan="2">&nbsp;</TD>
  236.                                                           <TD width="250" align="right"><%=rs("time")%></TD>
  237.                                                         </TR>
  238.                                                       </TBODY>
  239.                                                     </TABLE></TD>
  240.                                                 </TR>
  241.                                               </TBODY>
  242.                                             </TABLE></TD>
  243.                                         </TR>
  244.                                         <%if rs("reply")<>"" then%>
  245.                                         <TR> 
  246.                                           <TD bgColor=#f2f2f2> <table width="100%" border="0" style="table-layout:fixed;word-break:break-all">
  247.                                               <tr> 
  248.                                                 <td width="10">&nbsp;</td>
  249.                                                 <td width="567"><font color="#FF0000">管理员回复:</font><br> 
  250.                                                   <%=unHtml(rs("reply"))%></td>
  251.                                               </tr>
  252.                                             </table></TD>
  253.                                         </TR>
  254.                                         <%end if%>
  255.                                       </TBODY>
  256.                                     </TABLE>
  257.                                     <br> 
  258.                                     <%
  259. 'e_page=e_page-1
  260. 'rs.movenext
  261. 'loop
  262. RS.MoveNext
  263. next
  264. %>
  265.                                     <table width="100%" border="0">
  266.                                       <tr> 
  267.                                         <td> 
  268.                                          <%
  269. call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
  270. Sub PageControl(iCount,pagecount,page,table_style,font_style)
  271. '生成上一页下一页链接
  272.     Dim query, a, x, temp
  273.     action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
  274.     query = Split(Request.ServerVariables("QUERY_STRING"), "&")
  275.     For Each x In query
  276.         a = Split(x, "=")
  277.         If StrComp(a(0), "page", vbTextCompare) <> 0 Then
  278.             temp = temp & a(0) & "=" & a(1) & "&"
  279.         End If
  280.     Next
  281.     Response.Write("<table width=100% border=0 cellpadding=0 cellspacing=0 >" & vbCrLf )        
  282.     Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR >" & vbCrLf )
  283.     Response.Write("<TD align=center height=40>" & vbCrLf )
  284.     Response.Write(font_style & vbCrLf )    
  285.     if page<=1 then
  286.         Response.Write ("首 页 " & vbCrLf)        
  287.         Response.Write ("上一页 " & vbCrLf)
  288.     else        
  289.         Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首 页</A> " & vbCrLf)
  290.         Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上一页</A> " & vbCrLf)
  291.     end if
  292.     if page>=pagecount then
  293.         Response.Write ("下一页 " & vbCrLf)
  294.         Response.Write ("尾 页 " & vbCrLf)            
  295.     else
  296.         Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下一页</A> " & vbCrLf)
  297.         Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾 页</A> " & vbCrLf)            
  298.     end if
  299.     Response.Write(" 页次:" & page & "/" & pageCount & "页" &  vbCrLf)
  300.     Response.Write(" 共有" & iCount & "条留言" &  vbCrLf)
  301.     Response.Write(" 转到" & "<INPUT CLASS=wenbenkuang TYEP=TEXT NAME=page SIZE=2 Maxlength=5 VALUE=" & page & ">" & "页"  & vbCrLf & "<INPUT CLASS=go-wenbenkuang type=submit value=GO>")
  302.     Response.Write("</TD>" & vbCrLf )                
  303.     Response.Write("</TR></form>" & vbCrLf )        
  304.     Response.Write("</table>" & vbCrLf )        
  305. End Sub
  306. %>
  307.                                         </td>
  308.                                       </tr>
  309.                                     </table>
  310.                                     <%
  311. rs.close
  312. set rs=nothing
  313. end if
  314. %>
  315.                                   </td>
  316.                                 </tr>
  317.                                 <tr> 
  318.                                   <td align="center"><FORM action=fksave.asp method=post name="form" id="form">
  319.                                       <br>
  320.                                       <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
  321.                                         <tr> 
  322.                                           <td height="1" bgcolor="cccccc"><img src="img/dot_03.gif" width="9" height="1" border="0"></td>
  323.                                         </tr>
  324.                                         <tr> 
  325.                                           <td height="25" bgcolor="efefef"> <strong>&nbsp;&nbsp;<img src="img/dot_03.gif" width="9" height="9" border="0"> 
  326.                                             </strong><strong>用户留言</strong></td>
  327.                                         </tr>
  328.                                         <tr> 
  329.                                           <td height="1" bgcolor="cccccc"><img src="img/dot_03.gif" width="9" height="1" border="0"></td>
  330.                                         </tr>
  331.                                       </table>
  332.                                       <TABLE width="100%" border=0 cellPadding=0 cellSpacing=1>
  333.                                         <TBODY>
  334.                                         <TD height="30">&nbsp;&nbsp; 姓名: 
  335.                                           <input name=name class="wenbenkuang" id="name">
  336.                                             邮箱: 
  337.                                             <input  name=email class="wenbenkuang" id="email2"></TD>
  338.                                         </TR>
  339.                                         <TR> 
  340.                                           <TD height="30"> &nbsp;&nbsp; OICQ: 
  341.                                             <input name=qq class="wenbenkuang" id="qq3">
  342.                                             性别: 
  343.                                             <label> 
  344.                                             <input name="sex" type="radio" value="boy" checked>
  345.                                             先生</label> <label> 
  346.                                             <input type="radio" name="sex" value="girl">
  347.                                             小姐</label></TD>
  348.                                         </TR>
  349.                                         <TR> 
  350.                                           <TD height="30">&nbsp;&nbsp; 网址: 
  351.                                             <input name=url class="wenbenkuang" id="url" value="http://">
  352.                                             验证码: 
  353.                                             <input class="wenbenkuang" name="verifycode" type="text" value="<%If GetCode=9999 Then Response.Write "9999"%>" maxlength="4" size="6" /> 
  354.                                             <img src="GetCode.asp" /> </TD>
  355.                                         </TR>
  356.                                         <TR> 
  357.                                           <TD height="30">&nbsp;&nbsp; 留言内容:</TD>
  358.                                         </TR>
  359.                                         <TR> 
  360.                                           <TD height="130" noWrap> &nbsp;&nbsp; 
  361.                                             <textarea name=content cols=60 rows=8 id="content" class="wenbenkuang"></textarea> 
  362.                                           </TD>
  363.                                         <TR> 
  364.                                           <TD height="30" colspan="2"> &nbsp;&nbsp; 
  365.                                             <input name="submit" type=submit class="go-wenbenkuang" id="submit" value=我要留言> 
  366.                                             &nbsp;&nbsp; <input name="submit3" type=reset class="go-wenbenkuang" id="submit3" value=清除重来> 
  367.                                             <%
  368. Randomize '初始代随机数种子
  369. num1=rnd() '产生随机数num1
  370. num1=int(26*num1)+65 '修改num1的范围以使其是A-Z范围的Ascii码,以防表单名出错
  371. session("antry")="test"&chr(num1) '产生随机字符串
  372. %>
  373.                                             <input name="temp" type="hidden" id="temp" value="<%=session("antry")%>"> 
  374.                                           </TD>
  375.                                         </TR>
  376.                                       </TABLE>
  377.                                     </FORM></td>
  378.                                 </tr>
  379.                               </table></td>
  380.                           </tr>
  381.                         </table>
  382.                       
  383.                       </td>
  384.                     </tr>
  385.                   </table>
  386.                   <br>
  387.                 </td>
  388.               </tr>
  389.             </table></td>
  390.       </tr>
  391.     </table></td>
  392. <td width="68"style="BORDER-left:<%=skincolor%> 1px solid;">&nbsp;</td>
  393.   </tr>
  394. </table>
  395. <!--#include file="include/foot.asp"-->
  396. </body>
  397. </html>
  398. <SCRIPT LANGUAGE="JavaScript">
  399. <!--
  400. function checkspace(checkstr) {
  401.   var str = '';
  402.   for(i = 0; i < checkstr.length; i++) {
  403.     str = str + ' ';
  404.   }
  405.   return (str == checkstr);
  406. }
  407. function checkfk()
  408. {
  409.    if(checkspace(document.fkinfo.fksubject.value)) {
  410. document.fkinfo.fksubject.focus();
  411.     alert("您没有填写主题!");
  412. return false;
  413.   }
  414.    if(checkspace(document.fkinfo.fkusername.value)) {
  415. document.fkinfo.fkusername.focus();
  416.     alert("请填写您的姓名!");
  417. return false;
  418.   }
  419.    if(checkspace(document.fkinfo.fklaizi.value)) {
  420. document.fkinfo.fklaizi.focus();
  421.     alert("请填写您来自哪里!");
  422. return false;
  423.   }
  424.      if(checkspace(document.fkinfo.fkcontent.value)) {
  425. document.fkinfo.fkcontent.focus();
  426.     alert("请填写反馈信息内容!");
  427. return false;
  428.   }
  429.   if(document.fkinfo.fkemail.value.length!=0)
  430.   {
  431.     if (document.fkinfo.fkemail.value.charAt(0)=="." ||        
  432.          document.fkinfo.fkemail.value.charAt(0)=="@"||       
  433.          document.fkinfo.fkemail.value.indexOf('@', 0) == -1 || 
  434.          document.fkinfo.fkemail.value.indexOf('.', 0) == -1 || 
  435.          document.fkinfo.fkemail.value.lastIndexOf("@")==document.fkinfo.fkemail.value.length-1 || 
  436.          document.fkinfo.fkemail.value.lastIndexOf(".")==document.fkinfo.fkemail.value.length-1)
  437.      {
  438.       alert("Email地址格式不正确!");
  439.       document.fkinfo.fkemail.focus();
  440.       return false;
  441.       }
  442.    }
  443.  else
  444.   {
  445.    alert("Email不能为空!");
  446.    document.fkinfo.fkemail.focus();
  447.    return false;
  448.    }
  449. }
  450. //-->
  451. </script>