⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pro_top.asp

📁 狼道公司源码下载
💻 ASP
字号:
<!--#include file="../Inc/Conn.asp" -->
<!--#include file="Check.asp" -->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理页面</title>
<LINK href="style.css" type=text/css rel=stylesheet>

</head>
<body leftmargin=0 bottommargin=0 rightmargin=0 topmargin=0>
<script src="images/admin.js" type="text/javascript"></script>
<div class=menuskin id=popmenu 
      onmouseover="clearhidemenu();highlightmenu(event,'on')" 
      onmouseout="highlightmenu(event,'off');dynamichide(event)" style="Z-index:100"></div>
<div align=center>

<script language = JavaScript>
function showsetting(myform){
 for (var j=0;j<7;j++){
 var tab = eval('document.all.settable'+j);
 if(myform.AdsType.selectedIndex==j)
 tab.style.display = '';
 else
 tab.style.display = 'none';
 }
}
</script>
<!--#include file="Top.asp" -->

<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
    <tr>
      <th>产品管理</th>
    </tr>
<tr>
  <td height=23 colspan=2 align="center" class=BodyTitle style="FONT-SIZE: 9pt; FILTER: dropshadow(color=#FFFFFF,offx=1,offy=1); COLOR: #000000;"><a href="Pro_Top.asp">所有推荐</a>&nbsp;
  <%
  Set rs=server.CreateObject("adodb.recordset")
  rs.open "select * from Class1 Order by OrderID",Conn,1,1
  do while not rs.eof  
  %>
  <A href="?ClassID1=<%=rs("ID")%>"><%=rs("Title")%></A> 
  <%
  rs.movenext
  loop
  rs.close
  set rs=nothing  
  %>
  </td>
</tr>
</table>
<BR>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
    <tr>
      <th width="5%" noWrap>编号</th>
      <th width="18%" noWrap>产品类别</th>
      <th width="43%" noWrap>名称</th>
      <th width="10%" noWrap>浏览次数</th>
      <th width="12%" noWrap>设置</th>
      <th width="12%" noWrap>管理</th>
    </tr>
<%
Page=Request("Page")
if Page="" then Page=1
if Not isnumeric(Page) then Page=1
if CInt(Page)<1 then Page=1
Page=Abs(Cint(Page))
PCount=0
RCount=0
PSize=16

ClassID1=Request("ClassID1")
if ClassID1<>"" then
   SQLStr="select Class1.Title as ClassName,Product.ID,Product.Title,Product.Hits,FlagTop from Product,Class1 where Product.ClassID1="&ClassID1&" and Product.ClassID1=Class1.ID and FlagTop=1  order by Product.ID desc" 
else
   SQLStr="select  Class1.Title as ClassName,Product.ID,Product.Title,Product.Hits,FlagTop from Product,Class1 where Class1.ID=Product.ClassID1 and FlagTop=1 order by Product.ID desc" 
end if
Set rs=server.CreateObject("adodb.recordset")


rs.open SQLStr,Conn,1,1
if not rs.eof then
  rs.pagesize=Psize
  RCount=rs.recordcount
  PCount=rs.PageCount
  if Cint(Page)>CInt(PCount) then Page=PCount
  rs.absolutepage=Page
end if

i=0
do while not rs.eof  and i<CInt(PSize)
i=i+1
%>
<tr height="25">
 <td class=forumRow align=center><%=i%></td>
 <td align=left class=forumRow><%=rs("ClassName")%></td>
 <td align=left class=forumRow>
 <a href="/ProductInfo.asp?ID=<%=rs("ID")%>" target="_blank"><%=rs("Title")%></a> </td>
 <td align=center class=forumRow><%=Rs("Hits")%></td>
 <td align=center class=forumRow>
 <%
 if rs("FlagTop")="1" then
 %>
 <a href="Pro_OK.asp?ID=<%=rs("ID")%>&ClassID1=<%=ClassID1%>&Page=<%=Page%>&act=topno&FL=yes">取消推荐</a>
 <%
 else
 %>
 <a href="Pro_OK.asp?ID=<%=rs("ID")%>&ClassID1=<%=ClassID1%>&Page=<%=Page%>&act=topyes&FL=yes">设为推荐</a>
 <%end if%>
 &nbsp;</td>
 <td align=center noWrap class=forumRow>
<a href="Pro_Mod.asp?ID=<%=rs("ID")%>&Page=<%=Page%>&FL=yes">修改</a>   | <A HREF="Pro_OK.asp?ID=<%=rs("ID")%>&act=del&ClassID1=<%=ClassID1%>&Page=<%=Page%>&FL=yes" onClick="Ask('<%=rs("Title")%>')">删除</A></td>
 </tr>
 
  <%
 rs.movenext
 loop
 rs.close
 set rs=nothing
 %>
 
<tr height="25">
  <td colspan="6" align=center class=forumRow><div title="<BR>">
    <table cellspacing=1 width='100%' border=0>
      <form method=Post action=DownList.asp>
        <tr>
          <td align=center> 共有产品 <font COLOR=#FF0000><B><%=RCount%></B></font> &nbsp;<a href="?Page=1&ClassID1=<%=ClassID1%>">首 页</a>&nbsp;<a href="?Page=<%=Page-1%>&ClassID1=<%=ClassID1%>">上一页</a>&nbsp;<a href="?Page=<%=Page+1%>&ClassID1=<%=ClassID1%>">下一页</a>&nbsp;<a href="?Page=<%=PCount%>&ClassID1=<%=ClassID1%>">尾 页</a> &nbsp;页次:<strong><font color=red><%=Page%></font>/<%=PCount%></strong>页 &nbsp;转到:&nbsp;
              <select name="KingYang" style="font-size: 9pt" onChange="ChangePage(this.value)">
                <%
			for i=1 to PCount
			%>
                <option value="<%=i%>" <%if i=CInt(Page) then Response.Write(" selected")%>>第<%=i%>页</option>
                <%
			Next
			%>
              </select>          </td>
        </tr>
      </FORM>
    </table>
  </div></td>
  </tr>
 </table>
</div>
</body></html>

<script language="vbscript">
  sub Ask(Title)
    if not confirm("您确定要删除"&Title&"吗?") then
	   window.event.returnvalue=false
	   exit sub
	end if
  end sub
  
    sub ChangePage(page)
    window.location="?Page="&Page&"&ClassID1=<%=ClassID1%>"
  end sub
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -