<!--#include file="ljconn.asp"-->
<html><head><title>商品管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../img/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {
	font-size: 12px;
	font-weight: bold;
}
.style3 {font-size: 12px}
.style4 {font-size: 12; }
-->
</style>
</head>
<body>
<%
'//删除商品
selectbookid=request("selectbookid")
if selectbookid<>"" then
conn.execute "delete from job_link where id in ("&selectbookid&")"
response.Redirect "managelink.asp"
response.End
end if
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr> 
<form name="form1" method="post" action="">
<td height="100"> 
<%'开始分页
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from job_link order by id desc",conn,1,1
'else
'elseif selectm="按商品名称" then
'rs.open "select * from link where bookname like '%"+key+"%' order by id desc",conn,1,1
'else
'rs.open "select * from link where xh like '%"+key+"%' order by id desc",conn,1,1
'end if
%>
<table class="tableBorder" width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr> 
<td colspan="6" align="center" background="img/admin_bg_1.gif"><span class="style2"><font color="#ffffff">图片管理</font></span></td>
</tr>
<tr> 
<td colspan="6" align="left" bgcolor="#D7D7FF"></td>
</tr>
<tr bgcolor="#E8F1FF"> 
<td width="13%" align="center"><span class="style3">编号</span></td>

<td align="center"><span class="style3">图片名称</span></td>
<td width="22%" align="center"><span class="style3">加入时间</span></td>
</tr>
<%if rs.eof then%>
<tr><td colspan=5><span class="style3">抱歉,没找到你想要的!<a href="managelink.asp">返回>>></a></span></td>
</tr>
<%else%>
				      <%
	if not isempty(request("page")) then
      					currentPage=cint(request("page"))
   					else
      					currentPage=1
   					end if
					rs.pagesize=15
   					totalPut=rs.recordcount '记录总数    
   					totalPage=rs.pagecount    
   					MaxPerPage=rs.pagesize    
      				if currentpage<1 then    
          				currentpage=1    
      				end if    
      				if currentpage>totalPage then    
          				currentpage=totalPage    
      				end if    
   					if currentPage=1 then    
      					showContent    
                        showpages1
    				else    
         				if (currentPage-1)*MaxPerPage<totalPut then    
         					rs.move  (currentPage-1)*MaxPerPage    
         					dim bookmark    
         					bookmark=rs.bookmark '移动到开始显示的记录位置    
         					showContent    
                  showpages1
      					end if    
   					end if    
					'set rs=nothing      
					rs.close    
					set conn=nothing
					%>
  <%sub showContent   
					dim i
					%>
  <%for i=1 to rs.pagesize%>
<tr bgcolor="#E8F1FF"> 
<td height="20" align="center"><a href=editqydt.asp?id=<%=rs("id")%> class="style4"><%=rs("id")%></a></td>

<td width="30%" STYLE='PADDING-LEFT: 10px'> <a href=editlink.asp?id=<%=rs("id")%> class="style4"> 
<%=rs("title")%>
</a></td>
<td align="center"> <span class="style4"><%=rs("adddate")%></span></td>
</tr>
  <%rs.movenext
  if rs.eof then exit for
  next
  %> 
    <%end sub%>

  <%
sub showpages1()     
dim n     
n=totalPage
%>
  <tr align="center" bgcolor="#E8F1FF">
    <td height="20" colspan="6">
      <span class="style3">
      <% If currentPage <> 1 Then %>
      &nbsp;<a href="managelink.asp?Page=1" class="top">首页</a>&nbsp;<a href="managelink.asp?Page=<%=(currentPage-1)%>" class="top">上一页</a>
        <%else%>
&nbsp;首页&nbsp;上一页
      <% End If %>
      <% If currentPage <> rs.PageCount Then %>

      <a href="managelink.asp?Page=<%=(currentPage+1)%>" class="top">下一页</a>&nbsp;<a href="managelink.asp?Page=<%=totalPage%>" class="top">尾页</a>
      <%else%>
      下一页&nbsp;尾页
      <% End If %>      

      第<%=currentPage%>页/共<%=totalPage%>页&nbsp;共有<%=rs.RecordCount%>条</span></td>
  </tr>
  <%end sub%>
<tr bgcolor="#E8F1FF"> 
<td height="30" colspan="6" align="right"><span class="style3">
  <!--#include file="copyright.asp"-->
  <span style="display:none">全选 
    <input type="checkbox" name="checkbox" value="Check All" onClick="mm()">
    <input type="submit" name="Submit" value="删 除" onClick="return test();">
&nbsp;</span></td>
</tr>
</table>
				
<table width="12" height="7" border="0" cellpadding="0" cellspacing="0">
<tr> 
<td height=7></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
<%end if%>
</body>
</html>
<script>
function test()
{
  if(!confirm('确认删除吗？')) return false;
}
</script>
<script language=javascript>
function mm()
{
   var a = document.getElementsByTagName("input");
   if(a[0].checked==true){
   for (var i=0; i<a.length; i++)
      if (a[i].type == "checkbox") a[i].checked = false;
   }
   else
   {
   for (var i=0; i<a.length; i++)
      if (a[i].type == "checkbox") a[i].checked = true;
   }
}
</script>
