read_parentclass.asp
上传用户:llrg7406
上传日期:2007-03-02
资源大小:654k
文件大小:5k
源码类别:

教育系统应用

开发平台:

Delphi

  1. <%@ Language=VBScript %>
  2. <!--#include file ="identify.asp"-->
  3. <%
  4. son_title = Request.QueryString("title")
  5. if trim(son_title) = "书库" or len(son_title)=0 then
  6. Response.Redirect "readmain.asp"
  7. end if
  8. set conn = server.CreateObject("adodb.connection")
  9. conn.Open application("dsn")
  10. sql1 = "select a.id,a.title,a.type_id from bookwarelist a,bookwarelist b where b.title = '" & son_title & "' and a.title = b.parent"
  11. set rs0 = server.CreateObject("adodb.recordset")
  12. rs0.Open sql1,conn
  13. if rs0.EOF then
  14. rs0.Close
  15. set rs0 = nothing
  16. Response.Redirect "readmain.asp"
  17. else
  18. parent_title = rs0("title")
  19. parent_type_id = rs0("type_id")
  20. end if
  21. rs0.Close
  22. set rs0 = nothing
  23. if trim(parent_title) = "书库" or len(parent_title)=0 then
  24. conn.Close
  25. set conn = nothing
  26. Response.Redirect "readmain.asp"
  27. end if
  28. %>
  29. <html>
  30. <head>
  31. <meta NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
  32. <link rel="stylesheet" type="text/css" href="xcss.css">
  33. <STYLE>
  34. <!--
  35. #page {position:absolute; z-index:0; left:0px; top:0px}
  36. .tt3 {font: 9pt/12pt "宋体"}
  37. .tt2 {font: 12pt/15pt "宋体"}
  38. a {color: blue;text-decoration:none}
  39. a:hover {color: blue;text-decoration:underline}
  40. -->
  41. </style>
  42. <script language=javascript>
  43. function show_onclick() {
  44. if(top.window.f2.cols != "0,*")
  45. {
  46. top.window.f2.cols = "0,*";
  47. }
  48. else
  49. {
  50. top.window.f2.cols = "300,*";
  51. }
  52. }
  53. </script>
  54. <script LANGUAGE="javascript">
  55. <!--
  56. function add_bm(bookid)
  57. {
  58. window.open("add_bookmark.asp?bookid=" + bookid,"_blank","height=430,width=300,status=no,toolbar=no,menubar=no,location=no");
  59. }
  60. function add_comment(bookid)
  61. {
  62. window.open("add_comment2.asp?bookid=" + bookid,"_blank","height=550,width=550,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,top=0,left=0");
  63. }
  64. //-->
  65. </script></head>
  66. <body topmargin="0" background="images/zapsmbknd.gif">
  67. <TABLE BORDER=0 CELLSPACING=0 WIDTH="100%" >
  68. <TR>
  69. <TD VALIGN=top WIDTH="8%" BGCOLOR="#e0e0e0" class="tt3">&nbsp;
  70. <BR><CENTER>
  71. <A href="read_parentclass.asp?title=<%=parent_title%>">上一级</A><br>
  72. <A href="xmain.asp">回首页</A>
  73. <BR><a href="#" onclick="javascript:show_onclick();">显示菜单</A></CENTER>
  74. </TD>
  75. <TD WIDTH="84%">
  76. <TABLE border=0 width="90%" align=center>
  77. <tr><td>
  78. <BR><B><FONT FACE="楷体_GB2312"><FONT COLOR="#ff6666"><FONT SIZE=+3><%=parent_title%></FONT></FONT></FONT></B>
  79. </td></tr>
  80. </table>
  81. <HR SIZE=1 NOSHADE WIDTH="94%" color="#ee9b73">
  82. <TABLE border=0 width="90%" align=center>
  83. <tr>
  84. <%
  85. i_temp = -1
  86. sql1 = "select id,title,type_id from bookwarelist where parent = '" & parent_title & "'"
  87. set rs1 = server.CreateObject("adodb.recordset")
  88. rs1.Open sql1,conn
  89. while not rs1.eof
  90. id = rs1("id")
  91. title = rs1("title")
  92. type_id = rs1("type_id")
  93. i_temp = i_temp + 1
  94. if i_temp = 3 then
  95. Response.Write "</tr><tr>"
  96. i_temp = 0
  97. end if
  98. %>
  99.           <TD class=tt3 width="30%"><br><IMG height=10 src="images/ar.gif" 
  100.             width=15><a href="read_class.asp?title=<%=title%>&type_id=<%=type_id%>"><b><%=title%></b></a></TD>
  101. <%
  102. rs1.MoveNext
  103. wend
  104. rs1.Close
  105. set rs1 = nothing
  106. %>            
  107. </TR>
  108. </TABLE>
  109. <%
  110. ' 书名列表
  111. if len(parent_type_id)>0 and (not (parent_type_id=0)) then
  112. b_type = parent_type_id
  113. %>
  114. <br>
  115. <br>
  116. <TABLE border=0 width="90%" align=center>
  117. <tr>
  118. <td>
  119. <b>类别<font color=red><%=parent_title%></font>的书名列表</b><br><hr>
  120. <%
  121. if len(b_type)=0 then
  122. Response.End
  123. end if
  124. sql = "select bookid,name,Author,times from BookDetail where  type=" & b_type 
  125. set rs = server.CreateObject("adodb.recordset")
  126. rs.Open sql,conn
  127. while not rs.EOF
  128. %>
  129. <nobr><a href="readbook.asp?bookid=<%=rs("bookid")%>" title="作者:<%=rs("Author")%>" target="xbody"><img SRC="images/plus.gif" border="0" WIDTH="18" HEIGHT="19"><%=rs("name")%>(<%=rs("times")%>)</a> &nbsp;<%=rs("Author")%>  &nbsp;<a href="#" onclick="add_bm(<%=rs("bookid")%>);">加书签</a>  &nbsp;<a href="#" onclick="add_comment(<%=rs("bookid")%>);">写书评</a></nobr><br>
  130. <%
  131. rs.MoveNext
  132. wend
  133. %>
  134. </td>
  135. </tr>
  136. </table>
  137. <%
  138. end if
  139. conn.Close
  140. set conn = nothing
  141. %>
  142. </TD>
  143. <TD VALIGN=bottom WIDTH="8%" BGCOLOR="#e0e0e0" class="tt3"> </TD>
  144. </TR>
  145. <TR>
  146. <TD VALIGN=top WIDTH="8%" BGCOLOR="#e0e0e0" class="tt3"> </TD>
  147. <TD WIDTH="84%" class="tt3">
  148. <HR SIZE=1 WIDTH="94%" color="#ee9b73">
  149. <CENTER>
  150. <table WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="1" align="center">
  151. <tr align="middle">
  152. <td height="10"><img height="1" src="images/dot.gif" width="500"></td></tr>
  153. <tr align="middle">
  154. <td>若有任何意见或者建议,请<a href="mailto:zhang95@263.net" style="TEXT-DECORATION: underline">写信给我们</a>
  155. <br><span style="FONT-FAMILY: verdana">&copy; CopyRight 1999 All Rights Reserved</span>科技有限公司</p>
  156. </td>
  157. </tr>
  158. </table>
  159. </TD>
  160. <TD VALIGN=top WIDTH="8%" BGCOLOR="#e0e0e0" class="tt3">
  161. <BR><CENTER>
  162. <A href="read_parentclass.asp?title=<%=parent_title%>">上一级</A><br>
  163. <A href="xmain.asp">回首页</A>
  164. <BR><a href="#" onclick="javascript:show_onclick();">显示菜单</A></CENTER>
  165. </TD>
  166. </TR>
  167. </TABLE>
  168. <BR>
  169. </body>
  170. </html>