p_index.asp
上传用户:comthink
上传日期:2021-05-06
资源大小:1280k
文件大小:3k
源码类别:

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

开发平台:

HTML/CSS

  1. <!--#include file="conn.asp"-->
  2. <!-- #include file="inc/const.asp" -->
  3. <%
  4. stats="查看照片"
  5. dim picid,classname,classnum
  6. dim currentPage,totalrec,Pcount,page_count,endpage
  7. dim filename,filesize,picset,classid,addtime,postuser,postuserid,picinfo,hits
  8. dim abgcolor,altstr
  9. if Cint(GroupSetting(17))=1 then
  10. Errmsg=Errmsg+"<br>"+"<li>您没有访问班级相册的权限,请<a href=login.asp>登陆</a>或者同管理员联系。"
  11. founderr=true
  12. end if
  13. if founderr then
  14. call head()
  15. call head_var("错误信息",Request.ServerVariables("HTTP_REFERER"))
  16. call txl_error()
  17. else
  18. call head()
  19. call head_var("班级相册","p_index.asp")
  20. if founderr then
  21. call txl_error()
  22. else
  23. call main()
  24. if founderr then call txl_error()
  25. end if
  26. end if
  27. call foot()
  28. sub main()
  29. abgcolor="tablebody2"
  30. %>
  31. <table width="<%=txl_body(0)%>" cellpadding="0" cellspacing="0" align="center" style="border:1px <%=txl_body(9)%> solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 1px;">  
  32. <tr> 
  33. <td width=120 bgcolor=<%=txl_body(10)%> align="center" valign="top">
  34. <br>
  35. <a href=p_send.asp><img src="<%=txl_info(6)&txl_skinpic(10)%>"  height="25" border=0></a> <br><br>
  36. <a href=p_my.asp><img src="<%=txl_info(6)&txl_skinpic(11)%>"  height="25" border=0></a> <br><br>
  37. <br><br><br>
  38. <%
  39. set rs=server.createobject("adodb.recordset")
  40. sql="select classid,classname,classinfo from imgclass order by classid"
  41. rs.open sql,conn,1
  42. if rs.eof and rs.bof then
  43. response.write "<p>还没有设定班级照片类别</p>"
  44. else
  45. ClassNum=rs.recordcount
  46. do while not rs.eof
  47. response.write "<a href=""p_more.asp?classid="&rs("classid")&""" title="""&rs("classinfo")&"""><img src="""&txl_info(7)&"dot02.gif"" border=0>&nbsp;"&rs("classname")&"</a><br><br>"
  48. rs.movenext
  49. loop
  50. end if
  51. %>
  52. </td>
  53. <td width=* bgcolor=<%=txl_body(10)%>  valign="top"><br>
  54. <table cellpaddin=0 cellspacing=0 border=5 bordercolor=<%=txl_body(21)%> width=98%>
  55. <%
  56. dim i
  57. for i=0 to classNum
  58. response.write "<tr><td height=100>&nbsp;"
  59. sql="select top 5 picid,filename,filesize,addtime,postuser,picinfo,hits from imgdata where classid="&i&" and picset<2 order by addtime desc"
  60. set rs=conn.execute(sql)
  61. do while not rs.eof 
  62. altstr="&#13&#10  〓〓  "&rs("postuser")&"上传  〓〓  "
  63. altstr=altstr&"&#13&#10"
  64. altstr=altstr&"&#13&#10  照片大小:"&int(rs("filesize")/1024)
  65. altstr=altstr&"K"
  66. altstr=altstr&"&#13&#10  上传日期:"&rs("addtime")
  67. altstr=altstr&"&#13&#10  详细说明:"&rs("picinfo")
  68. altstr=altstr&"&#13&#10"
  69. response.write "&nbsp;&nbsp;<a href=""p_show.asp?id="&rs("picid")&""" target=_blank title="""&altstr&"""><img src="""&txl_info(12)&rs("filename")&""" border=0  width=100 height=85></a>&nbsp;&nbsp;"
  70. rs.movenext
  71. loop
  72. response.write "</td></tr>"
  73. Next
  74. %>
  75. </table>
  76. <br>
  77. </td>
  78. </tr>
  79. </table>
  80. <%
  81. end sub
  82. %>