<%@ codepage ="936" %>
<%charset="gb2312"%>
<%Session.CodePage=936%>
<!--#include file="admin.asp"-->
<!--#include file="conn.asp"-->
<%if Request.QueryString("no")="eshop" then

dim SQL, Rs, contentID,CurrentPage
CurrentPage = request("Page")
contentID=request("ID")

set rs=server.createobject("adodb.recordset")
sqltext="delete from about where Id="& contentID
rs.open sqltext,conn,3,3
set rs=nothing
conn.close
response.redirect "About_Manage.asp"
end if

%>
<%
set rs=server.createobject("adodb.recordset")
sqltext="select * from about where ntype=1 order by owner, id desc"
rs.open sqltext,conn,1,1

dim MaxPerPage
MaxPerPage=12

dim text,checkpage
text="0123456789"
Rs.PageSize=MaxPerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next

If checkpage<>0 then
If NOT IsEmpty(request("page")) Then
CurrentPage=Cint(request("page"))
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
Else
CurrentPage= 1
End If
If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
CurrentPage=1
End if

call list

If Rs.recordcount > MaxPerPage then
end if

'显示帖子的子程序
Sub list()%>
<!-- #include file="Inc/Head.asp" -->
<div align=center>
<TABLE class=tableBorder1 style="WIDTH: 100%" cellSpacing=0 cellPadding=3 
align=center border=0>
  <TBODY>
  <TR>
    <TD height=50></TD></TR></TBODY></TABLE>
<TABLE class=tableBorder cellSpacing=0 cellPadding=0 width="85%" align=center border=0>
	<tr> 
		<TH align=left height=23 class="tableHeaderText"><div align="center"><font color=white>关于我们管理</font></div></TH>
	</tr>
	<tr> 
	  <td height="25" class=forumRow_shui>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
            <td><div align="center"> 
              <table width="100%" border="0" cellspacing="1" cellpadding="2">
                <tr> 
                  <td class=forumrow_hui width="12%" height="25"> <div align="center">ID</div></td>
                  <td class=forumrow_hui width="43%"> <div align="center">标题</div></td>
                  <td class=forumrow_hui width="15%"> <div align="center">操作</div></td>
                  <td class=forumrow_hui width="15%"> <div align="center">操作</div></td>
                </tr>
                <%
if not rs.eof then
i=0
do while not rs.eof
%>
                <tr> 
                  <td class=forumRow height="22"> <div align="center"><%=rs("owner")%></div></td>
				  <td class=forumRow>&nbsp;&nbsp;<%=rs("title")%></td>
                  <td class=forumRow bgcolor="#E3E3E3"> 
                    <div align="center"><a href="About_Edit.asp?id=<%=rs("id")%>&owner=<%=owner%>">修改</a></div></td>
                  <td class=forumRow> <div align="center"><a href="About_Manage.asp?id=<%=rs("id")%>&amp;no=eshop&owner=<%=owner%>" onclick="javascript:return confirm('确实要删除吗？');">删除</a></div></td>
                </tr>
                <% 
i=i+1 
if i >= MaxPerpage then exit do 
rs.movenext 
loop 
end if 
%>
                <tr> 
                  <td class=forumrow_hui height="25" colspan="5">&nbsp;&nbsp; <%
Response.write "<strong><font color='#000000'>-> 全部-</font>"
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;"
Response.write "<strong><font color='#000000'>第</font>" & "<font color=#FF0000>" & Cstr(CurrentPage) &  "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font></strong>&nbsp;"
If currentpage > 1 Then
response.write "<strong><a href='About_Manage?&page="+cstr(1)+"&owner="&request("owner")&"'><font color='#000000'>首页</font></a><font color='#ffffff'> </font></strong>"
Response.write "<strong><a href='About_Manage?page="+Cstr(currentpage-1)+"&owner="&request("owner")&"'><font color='#000000'>上一页</font></a><font color='#ffffff'> </font></strong>"
Else
Response.write "<strong><font color='#000000'>上一页 </font></strong>"
End if
If currentpage < Rs.PageCount Then
Response.write "<strong><a href='About_Manage?page="+Cstr(currentPage+1)+"&owner="&request("owner")&"'><font color='#000000'>下一页</font></a><font color='#ffffff'> </font>"
Response.write "<a href='About_Manage?page="+Cstr(Rs.PageCount)+"&owner="&request("owner")&"'><font color='#000000'>尾页</font></a></strong>&nbsp;&nbsp;"
Else
Response.write ""
Response.write "<strong><font color='#000000'>下一页</font></strong>&nbsp;&nbsp;"
End if
'response.write "</td><td align='right'>"
'response.write "<font color='#000000' >转到：</font><input type='text' name='page' size=4 maxlength=4 class=smallInput value="&Currentpage&">&nbsp;"
'response.write "<input class=buttonface type='submit'  value='Go'  name='cndok'>&nbsp;&nbsp;"
%></td>
                </tr>
              </table>
			  <%
End sub
rs.close

%>
            </div></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<!-- #include file="Inc/Foot.asp" -->
