NetBook.asp
上传用户:ahxunteng
上传日期:2022-05-16
资源大小:1606k
文件大小:10k
源码类别:

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

开发平台:

VBScript

  1. <%@ LANGUAGE=VBScript CodePage=936%>
  2. <%option explicit%>
  3. <%Response.Buffer=True%>
  4. <!--#include file="Include/System.asp"-->
  5. <!--#include file="Include/StrLeft.asp"-->
  6. <%If Session("UserName")="" Then
  7. response.redirect"Server.asp"
  8. end if%>
  9. <%
  10. dim Id,rst,sql
  11. Id=Session("UserName")
  12. set rst = Server.CreateObject("ADODB.recordset")
  13. sql="select * from User where UserName='"&Id&"'"
  14. rst.open sql,conn,1,1
  15. %>
  16. <!--#include file="Include/Head.asp" -->
  17. <TABLE cellPadding=0 cellSpacing=0 class='Middle_Title'>
  18. <TR> 
  19. <TD vAlign=top class='M_Left_Td'> 
  20. <table cellpadding="0" cellspacing="0" align="center" class='M_Left_Title'>
  21. <tr>
  22. <td valign="top">
  23. <% Call Left_Member() %>
  24. </td>
  25. </tr>
  26. </table> 
  27. </TD>
  28. <%if strSkins <= 200 and strSkins >= 1 then%>
  29. <TD class='M_Jgx_TD'><IMG src='../img/1x1_pix.gif' width=1 height=2></TD>
  30. <%
  31. elseif strSkins <= 250 and strSkins >= 201 then '新风格==============================================================
  32. %>
  33. <%end if%>
  34. <TD vAlign=top> 
  35. <TABLE cellPadding=0 cellSpacing=0 align='center' class='M_Center_Title'>
  36. <% Call Style_Adcolumn() '广告栏 %>
  37. <!-- 留言中心 -->
  38. <TR>
  39. <TD>
  40. <TABLE cellSpacing=0 cellPadding=0  align="center" class='MC_Pt_Title'>
  41. <TR>
  42. <TD class='MC_Pt_TD1'><IMG src='../img/1x1_pix.gif' width=3 height=1></TD>
  43. <TD class='MC_Pt_TD2'><IMG src='../img/1x1_pix.gif' width=3 height=1></TD>
  44. <TD class='MC_Pt_TD3'><SPAN class=Glow>
  45. 留言中心
  46. &nbsp;</SPAN></TD>
  47. <TD class='MC_Pt_TD4'><div align="right">
  48. &nbsp;</div></TD>
  49. <TD class='MC_Pt_TD5'><IMG src='../img/1x1_pix.gif' width=3 height=1></TD>
  50. </TR>
  51. </TABLE>
  52. </TD>
  53. </TR>
  54. <TR> 
  55. <TD>
  56. <TABLE cellSpacing=0 cellPadding=0  align="center" class='MC_ServeNr_Title'>
  57. <TR><TD height=10><IMG src='../img/1x1_pix.gif' width=3 height=1></TD></TR>
  58. <TR> 
  59. <TD>
  60. <!--  -->
  61. <table width="90%" border="0" align="center" cellpadding="0" cellspacing="5">
  62. <tr> 
  63. <td><div align="center"><img src="../img/newsico.gif" width="12" height="13"
  64. >&nbsp;&nbsp;<b><%=Session("UserName")%></b> 的留言专区</div></td>
  65. </tr>
  66. <tr> 
  67. <td style="line-height: 150%">
  68. &nbsp;&nbsp;&nbsp;&nbsp;<%=Session("UserName")%>,这里是您的专用私密留言簿,您可在此给我们留言,我们会尽力在24小时内在此答复您,请不要忘记回来察看回复哦!<br>
  69. &nbsp;&nbsp;&nbsp;&nbsp;如您已经在我站购物,汇款后请到这里进行汇款登记,填写您的订单号码、汇款时间、汇往我们哪个账号,以便我们核查您的款项的到帐情况并及时为您发货。</td>
  70. </tr>
  71. </table>
  72. <form method="post" action="NetBookSave.asp">
  73. <input type=hidden readonly name="Name" value="<%=Session("UserName")%>">
  74. <table width="90%" border="0" align="center" cellpadding="4" cellspacing="1">
  75. <tr> 
  76. <td width="22%" align="right">用户名称:</td>
  77. <td width="78%"><font> 
  78. <input type="text" readonly name="Name2" maxlength="36" value="<%if Session("UserName")="" then response.write"未注册用户" end if%><%=Session("UserName")%>" style="background-color: #FFFFFF; border-style: solid; border-color: #FFFFFF" class="smallInput">
  79. </font></td>
  80. </tr>
  81. <tr> 
  82. <td align="right">公司名称:</td>
  83. <td width="78%"><font> 
  84. <input type="text" name="Comane" size="30" maxlength="36" value="<%=rst("Comane")%>" style="font-size: 14px" class="smallInput">
  85. </font></td>
  86. </tr>
  87. <tr> 
  88. <td align="right">联系人:</td>
  89. <td width="78%"><font> 
  90. <input type="text" name="Somane" size="12" maxlength="30" value="<%=rst("Somane")%>" style="font-size: 14px" class="smallInput">
  91. </font></td>
  92. </tr>
  93. <tr> 
  94. <td align="right">联系电话:</td>
  95. <td width="78%"><font> 
  96. <input type="text" name="Phone" size="20" maxlength="36" value="<%=rst("Phone")%>" style="font-size: 14px" class="smallInput">
  97. </font></td>
  98. </tr>
  99. <tr> 
  100. <td align="right">联系传真:</td>
  101. <td width="78%"><font> 
  102. <input type="text" name="Fox" size="20" maxlength="36" value="<%=rst("Fox")%>" style="font-size: 14px" class="smallInput">
  103. </font></td>
  104. </tr>
  105. <tr> 
  106. <td align="right">E-mail:</td>
  107. <td width="78%"><font> 
  108. <input type="text" name="Email" size="20" maxlength="36" value="<%=rst("Email")%>" style="font-size: 14px" class="smallInput">
  109. </font></td>
  110. </tr>
  111. <tr> 
  112. <td width="22%" align="right">留言标题:</td>
  113. <td width="78%"><font>
  114. <input type="text" name="Title" size="22" maxlength="36" style="font-size: 14px; width: 320; height: 19" class="smallInput">
  115. </font></td>
  116. </tr>
  117. <tr> 
  118. <td width="22%" align="right">留言内容:</td>
  119. <td width="78%"><font>
  120. <textarea rows="6" name="Content" cols="50" style="font-size: 14px" class="smallInput"></textarea> 
  121. </font></td>
  122. </tr>
  123. <tr> 
  124. <td width="22%" align="right"></td>
  125. <td width="78%"><input type="submit" value="提交你的留言" name="cmdOk"
  126. > &nbsp; <input type="reset" value="复位" name="cmdReset"> </td>
  127. </tr>
  128. </table>
  129. </form>
  130. <%
  131. dim name,rs
  132. name=Session("UserName")
  133. set rs=server.createobject("adodb.recordset")
  134. sql="select * from Book where name='"&name&"'or name='管理员'order by id desc"
  135. rs.open sql,conn,1,1
  136. dim MaxPerPageB
  137. MaxPerPageB=10
  138. '假如没有数据时
  139. If rs.eof and rs.bof then
  140. 'call showpages
  141. response.write "<p align='center'><font color='#ff0000'>您还没任何留言资料</font></p>"
  142. response.end
  143. End if
  144. '取得页数,并判断留言输入的是否数字类型的数据,如不是将以第一页显示
  145. dim text,checkpage,CurrentPage,i
  146. text="0123456789"
  147. Rs.PageSize=MaxPerPageB
  148. for i=1 to len(request("page"))
  149. checkpage=instr(1,text,mid(request("page"),i,1))
  150. if checkpage=0 then
  151. exit for
  152. end if
  153. next
  154. If checkpage<>0 then
  155. If NOT IsEmpty(request("page")) Then
  156. CurrentPage=Cint(request("page"))
  157. If CurrentPage < 1 Then CurrentPage = 1
  158. If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
  159. Else
  160. CurrentPage= 1
  161. End If
  162. If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
  163. Else
  164. CurrentPage=1
  165. End if
  166. call showpages
  167. call list
  168. If Rs.recordcount > MaxPerPageB then
  169. call showpages
  170. end if
  171. '显示帖子的子程序
  172. Sub list()
  173. %> 
  174. <table width="90%" height="19" border="0" align="center" cellpadding="0" cellspacing="0">
  175. <tr> 
  176. <td width="14%" height="18" bgcolor="#eeeeee"><img src="../img/arrow.gif" width="16" height="13"><strong>留言列表</strong></td>
  177. <td width="86%" bgcolor="#eeeeee"> <%
  178. Response.write "<strong><font color='#000000'>-> 全部-</font>"
  179. Response.write "共</font>" & "<font color=#FF0000>" & Cstr(Rs.RecordCount) & "</font>" & "<font color='#000000'>条留言</font></strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
  180. Response.write "<strong><font color='#000000'>第</font>" & "<font color=#FF0000>" & Cstr(CurrentPage) &  "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font></strong>&nbsp;"
  181. If currentpage > 1 Then
  182. response.write "<strong><a href='NetBook.asp?&page="+cstr(1)+"'><font color='#000000'>首页</font></a><font color='#ffffff'> </font></strong>"
  183. Response.write "<strong><a href='NetBook.asp?page="+Cstr(currentpage-1)+"'><font color='#000000'>上一页</font></a><font color='#ffffff'> </font></strong>"
  184. Else
  185. Response.write "<strong><font color='#000000'>上一页 </font></strong>"
  186. End if
  187. If currentpage < Rs.PageCount Then
  188. Response.write "<strong><a href='NetBook.asp?page="+Cstr(currentPage+1)+"'><font color='#000000'>下一页</font></a><font color='#ffffff'> </font>"
  189. Response.write "<a href='NetBook.asp?page="+Cstr(Rs.PageCount)+"'><font color='#000000'>尾页</font></a></strong>&nbsp;&nbsp;"
  190. Else
  191. Response.write ""
  192. Response.write "<strong><font color='#000000'>下一页</font></strong>&nbsp;&nbsp;"
  193. End if
  194. %> </td>
  195. </tr>
  196. <tr> 
  197. <td height="1" colspan="2" bgcolor="#999999"></td>
  198. </tr>
  199. </table>
  200. <%
  201. If rs.eof and rs.bof then
  202. call showpages
  203. response.write ""
  204. response.end
  205. End if
  206. %> <br>
  207. <table width="90%" height="18" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#666666">
  208. <tr bgcolor="#99CCFF"> 
  209. <td width="56%" height="25" align="center" bgcolor="#CCCCCC"
  210. ><p align="center"><font color="#000000"><b>留言主题</b></font></p></td>
  211. <td width="22%" height="21" align="center" bgcolor="#CCCCCC"><font color="#000000"><b>时间</b></font></td>
  212. <td width="22%" height="21" align="center" bgcolor="#CCCCCC"><font color="#000000"><b>回复</b></font></td>
  213. </tr>
  214. <%
  215. if not rs.eof then
  216. i=0
  217. do while not rs.eof
  218. %>
  219. <tr bgcolor="#99CCFF"> 
  220. <td height="22" bgcolor="#FFFFFF">
  221. <%if rs("name")="管理员"then%>
  222. 『网站公告』 
  223. <%end if%> 
  224. <a href="javascript:winopen('NetBookRe.asp?id=<%=rs("id")%>&amp;name=<%=rs("name")%>')"><%=rs("title")%></a>
  225. </td>
  226. <td height="1" bgcolor="#FFFFFF" align="center">&nbsp; <%=rs("time")%></td>
  227. <td height="1" bgcolor="#FFFFFF" align="center">&nbsp; <%If rs("rebook")<>"" Then%> 
  228. <a href="javascript:winopen('NetBookRe.asp?id=<%=rs("id")%>&amp;name=<%=rs("name")%>')">回复</a> 
  229. <%else%>
  230. 无 
  231. <%End If%> &nbsp;
  232. </td>
  233. </tr>
  234. <%
  235. i=i+1
  236. if i >= MaxPerPageB then exit do
  237. rs.movenext
  238. loop
  239. end if
  240. %>
  241. <%end sub%>
  242. </table>
  243. <!--  -->
  244. </TD>
  245. </TR>
  246. <TR> 
  247. <TD height=10><IMG src='../img/1x1_pix.gif' width=3 height=1></TD>
  248. </TR>
  249. </table>
  250. </TD>
  251. </TR>
  252. <%
  253. rst.close
  254. set rst=nothing
  255. %>
  256. <!-- 留言中心 End -->
  257. <TR> 
  258. <TD> 
  259. <TABLE cellSpacing=0 cellPadding=0  align="center" class='MC_bottom_title'>
  260. <tr> 
  261. <td>
  262. </td>
  263. </tr>
  264. <tr><td class='MC_bottom_Td2'></td></tr>
  265. </table>
  266. </TD>
  267. </TR>
  268. <TR><TD height=10><IMG src='../img/1x1_pix.gif' width=3 height=1></TD></TR>
  269. </TABLE>
  270. </TD>
  271. <%if strSkins <= 200 and strSkins >= 1 then%>
  272. </TR>
  273. </TABLE>
  274. <!--#include file="Include/Foot.asp" -->
  275. <%
  276. elseif strSkins <= 250 and strSkins >= 201 then '新风格==============================================================
  277. %>
  278. <TD class='M_Jgx_TD'><IMG src='../img/1x1_pix.gif' width=1 height=2></TD>
  279. <TD vAlign=top background="../Skin/201/line-mid-glay.gif" width="6"><img border="0" src="../Skin/201/line-shadow-glay-
  280. mid.gif" width="6" height="146"></TD>
  281. <TD vAlign=top class='Mr_TitlePt'><% Call Right_Download() %></TD>
  282. </TR>
  283. </TABLE>
  284. <!--#include file="Include/Foot4.asp" -->
  285. <%end if%>