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

📄 default.asp

📁 北京商务网
💻 ASP
字号:
<%@ codepage ="936" %>
<%
if instr(session("flag"),"52")=0 then
response.redirect "../login.asp"
response.end
end if
%>
<!--#include file="../../conn/dbconn2.asp" -->
<!--#include file="../Config.asp"-->
<link rel="stylesheet" type="text/css" href="../style.css">
<body bgcolor="#FFFFFF" marginheight=0 marginwidth=0 leftmargin=0>
<SCRIPT>
function view(url){ 
var url; window.open(url,'_blank','status=no,scrollbars=yes,top=20,left=110,width=600,height=460'); 
}
</SCRIPT>
<%
dim totalPut 
dim CurrentPage
dim TotalPages
if not isempty(request("selAnnounce")) then
idlist=request("selAnnounce")
if instr(idlist,",")>0 then
dim idarr
idArr=split(idlist)
dim id
for i = 0 to ubound(idarr)
id=clng(idarr(i))
call deleteannounce(id)
next
else
call deleteannounce(clng(idlist))
end if
end if 
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
typeid=request("typeid")
set rs=server.createobject("adodb.recordset") 
sql="select * from sqtk"
if typeid<>"" then
sql=sql & " where sptk like '%"&cstr(typeid)&"%'"
end if
sql=sql & " order by id desc"
rs.open sql,conn,1,1 
if rs.eof and rs.bof then 
response.write "<p align='center'>对不起,没有您要查询的信息</p>" 
else 
totalPut=rs.recordcount 
if currentpage<1 then 
currentpage=1 
end if 
if (currentpage-1)*MaxPerPage>totalput then 
if (totalPut mod MaxPerPage)=0 then 
currentpage= totalPut \ MaxPerPage 
else 
currentpage= totalPut \ MaxPerPage + 1 
end if 
end if 
if currentPage=1 then 
showContent totalput,MaxPerPage
showpage totalput,MaxPerPage,"default.asp"
else 
if (currentPage-1)*MaxPerPage<totalPut then 
rs.move (currentPage-1)*MaxPerPage 
dim bookmark 
bookmark=rs.bookmark 
showContent totalput,MaxPerPage
showpage totalput,MaxPerPage,"default.asp"
else 
currentPage=1 
showContent totalput,MaxPerPage
showpage totalput,MaxPerPage,"default.asp"
end if 
end if 
rs.close 
end if 
set rs=nothing
sub showContent (totalput,MaxPerPage)
%>
<Form name="Form1" method="POST" action="default.asp">
<TABLE width="600" border=0 align="center" cellPadding=3 cellSpacing=1>
  <TBODY>
  <Form name="search" method="POST" action="default.asp">
    <TR> 
      <TD width="207" height=30 align="right"> <font color="#ff0000">请选择订阅邮件的行业类别:</font></TD>
      <TD width="378" valign="middle"> &nbsp; <select name="typeid" size="1" class=f11 id="typeid" onChange="MenuChange(this)">
          <option selected>==选择行业分类==</option>
          <option value="01">农林牧渔</option>
          <option value="02">服装、服饰</option>
          <option value="03">安全、防护</option>
          <option value="04">食品、饮料</option>
          <option value="05">电子电工</option>
          <option value="06">印刷、出版</option>
          <option value="07">纺织、皮革</option>
          <option value="08">环保保护</option>
          <option value="09">玩  具</option>
          <option value="10">能源动力</option>
          <option value="11">建材、房地产</option>
          <option value="12">通  讯</option>
          <option value="13">交通运输</option>
          <option value="14">工业用品</option>
          <option value="15">商业服务</option>
          <option value="16">家居用品</option>
          <option value="17">化  工</option>
          <option value="18">包装、纸</option>
          <option value="19">家用电器</option>
          <option value="20">医药、保养</option>
          <option value="21">汽摩及配件</option>
          <option value="22">电脑、软件</option>
          <option value="23">礼品、工艺品</option>
          <option value="24">库存积压产品</option>
          <option value="25">运动、休闲</option>
          <option value="26">冶金矿产</option>
          <option value="27">办公、文教</option>
        </select>
          
        <INPUT name="image" type=image src="../images/search1.gif" align=absMiddle border=0></TD>
    </TR>
  </FORM>
</TABLE>
<br>
<CENTER> 
  <TABLE width="550" border="1" cellpadding="4" cellspacing="0" bordercolor="#111111" bordercolorlight="#CAE6FF" bordercolordark="#CAE6FF" bgcolor="efefef" style="border-collapse: collapse">
    <TR height=25 bgcolor="#cccccc"> 
      <TD width="38" align="center" bgcolor="#E6F3FF"><font color="#Ff6600"><b>ID号</b></font></td>
      <TD width="98" align="center" bgcolor="#E6F3FF"><b><font color="#Ff6600">订阅人</font></b></TD>
      <TD width="135" align="center" bgcolor="#E6F3FF"><b><font color="#Ff6600">订阅邮箱</font></b></TD>
      <TD width="74" align="center" bgcolor="#E6F3FF"><b><font color="#Ff6600">订阅类别</font></b></TD>
      <TD width="85" align="center" bgcolor="#E6F3FF"><font color="#Ff6600"><b>订阅日期</b></font></TD>
      <TD width="44" align="center" bgcolor="#E6F3FF"> <input type='submit' value='删除'></td>
    </TR>
    <%do while not rs.eof%>
    <TR height="20" bgcolor="#ffffff"> 
      <TD align="center"><font face="Arial"><b><%=rs("id")%></b></font></td>
      <TD align="center"><a href=javascript:view('view_sqtk.asp?id=<%=rs("id")%>')><%=rs("user")%></a></td>
      <TD align="center"><%=rs("email")%></td>
      <TD align="center"><%=rs("emailtype")%></td>
      <TD align="center"><font face="Arial"><%=rs("dateandtime")%></font></TD>
      <TD align="center"> <input type='checkbox' name='selAnnounce' value='<%=cstr(rs("id"))%>'></td>
    </TR>
    <% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
  </TABLE>
</CENTER>
<div align="center">
  <%
end sub
function showpage(totalnumber,maxperpage,filename) 
dim n 
if totalnumber mod maxperpage=0 then 
n= totalnumber \ maxperpage 
else 
n= totalnumber \ maxperpage+1 
end if 
if CurrentPage<2 then 
response.write "<table border=0 width=600 cellspacing=0 cellpadding=0>" 
response.write "<tr height=40>"
response.write "<td align=left>"
response.write "共<font color=#ff6600><b>"&n&"</b></font>页&nbsp;第<font color=#ff6600><b>"&CurrentPage&"</b></font>页&nbsp;共检索到<font color=#ff6600><b>"&totalnumber&"</b></font>条相关信息</td>" 
response.write "<td align=right>"
response.write "【最前页】【上一页】" 
else 
response.write "<table border=0 width=550 cellspacing=0 cellpadding=0>"
response.write "<tr height=40>"
response.write "<td align=left>"
response.write "共<font color=#ff6600><b>"&n&"</b></font>页&nbsp;第<font color=#ff6600><b>"&CurrentPage&"</b></font>页&nbsp;共检索到<font color=#ff6600><b>"&totalnumber&"</b></font>条相关信息</td>" 
response.write "<td align=right>"
response.write "【<a href="&filename&"?page=1&search="&search&"&txtitle="&request("txtitle")&">最前页</a>】" 
response.write "【<a href="&filename&"?page="&CurrentPage-1&"&search="&search&"&txtitle="&request("txtitle")&">上一页</a>】&nbsp;" 
end if 
if n-currentpage<1 then 
response.write "【下一页】【最后页】" 
else 
response.write "【<a href="&filename&"?page="&(CurrentPage+1)&"&search="&search&"&txtitle="&request("txtitle")&">" 
response.write "下一页</a>】【<a href="&filename&"?page="&n&"&search="&search&"&txtitle="&request("txtitle")&">最后页</a>】" 
end if 
response.write "</td>"
response.write "</tr>"
response.write "</table>"
response.write "</form>" 
end function
sub deleteannounce(id)
dim rs,sql
set rs=server.createobject("adodb.recordset")
sql="delete from sqtk where id="&cstr(id)
conn.execute sql
if err.Number<>0 then
err.clear
response.write "删 除 失 败 !<br>"
end if
End sub
%>
</div>

⌨️ 快捷键说明

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