www.gusucode.com > 创想设计Flash相册 1.0源码程序 > Photo\admin\Add_xi.asp
<%@language=vbscript codepage=936 %> <!--#include file="session.asp"--> <!--#include file="conn.asp"--> <html> <head> <title>后台管理</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link rel="stylesheet" href="Admin_Style.css"> <style type="text/css"> <!-- .style2 {color: #FFFFFF} .style3 {color: #FF0000} --> </style> <% dim rs,sql Set rs=server.createobject("adodb.recordset") rs.pagesize=10 sql="select * from images order by id DESC" rs.open sql,conn,1,1 tit=rs.recordcount 'rs.addnew 'rs("title")=title 'rs("author")=author 'rs("content")=content 'rs.update 'response.write("<script language=javascript>alert('添加成功');window.location=('admin_article.asp');</script>") %> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border" align=center> <tr align="center"> <td height=25 colspan=2 class="topbg"><strong>相 册 管 理</strong> </tr> </table> <% if tit=0 then%> <td height="24" colspan="7"><div align="center">您还未发布任何相片!</div> </td> <%else%> <% if len(request("page"))=0 then ipage=1 else ipage=request("page") end if rs.absolutepage=ipage if ipage=1 then x=1 else x=rs.pagesize*(ipage-1)+1 end if %> <table cellpadding="2" cellspacing="5" border="0" width="100%" class="border" align=center> <tr align="center"> <td width="7%" height=53 class="topbg"><div align="center">序号</div></td> <td width="16%" height=53 class="topbg">说明</td> <td width="24%" class="topbg"><div align="center">发布时间</div></td> <td width="32%" class="topbg">图片路径</td> <td class="topbg">管理</td> </tr> <% for i =1 to rs.pagesize if not rs.eof then %> <tr align="center"> <td height=12 class="topbg"><div align="center"><font color="#555555"><%=x%></font></div></td> <td class="topbg"><font color="#555555"><%=left(rs("img_text"),6)%>..</font></td> <td class="topbg"><div align="center"><font color="#555555"><%=rs("time")%></font></div></td> <td class="topbg"><font color="#555555"><%=rs("img_b")%></font> <a href="../gallery/<%=rs("img_b")%>" target="_blank">看图</a></td> <td class="topbg"><a href="Add_xi_adddel.asp?id=<%=rs("id")%>" onClick="javascript:return confirm('你确定要删除?')">删除</a></td> </tr> <% x=x+1 end if if not rs.eof then rs.movenext next%> <tr> <td colspan='5' align=center><div align="center"><font color=#ff0000><%=rs.pagesize%></font><font color="#FFFFFF">/页</font><font color="#FFFFFF"> 当前在</font><font color=#ff0000><%= ipage%></font><font color="#FFFFFF">页 </font> <%if cint(ipage)=1 then%> <font color="#FFFFFF">第一页 | 上一页 |</font> <%else%> <font color="#FFFFFF"><a href="add_xi.asp?page=1">第一页</a>|</font> <a href="add_xi.asp?page=<%=ipage-1%>">上一页</a> | <%end if%> <%if cint(ipage)=cint(rs.pagecount) then%> <font color="#FFFFFF">下一页 | 最后一页 </font> <% else %> <a href="add_xi.asp?page=<% = ipage+1%>">下一页</a> | <a href="add_xi.asp?page=<%=rs.pagecount%>"> 最后一页</a> | <%end if%></div></td> </tr> </table> <%end if%> <table cellpadding="2" cellspacing="1" border="0" width="100%" class="border" align=center> <tr align="center"> <td height=25 class="topbg"> </td> </tr> </table> </body> </html>