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

📄 jobnews.asp

📁 asp+access开发的网上购物程序
💻 ASP
字号:
<%@ codepage ="936" %><%if instr(session("flag"),"43")=0 thenresponse.redirect "../login.asp"response.endend 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 CurrentPagedim TotalPagesdim i,jif not isempty(request("page")) thencurrentPage=cint(request("page"))elsecurrentPage=1end ifdim rsdim sqldim bzbz=request("bz")if not isempty(request("selAnnounce")) thenidlist=request("selAnnounce")if instr(idlist,",")>0 thendim idarridArr=split(idlist)dim idfor i = 0 to ubound(idarr)id=clng(idarr(i))call deleteannounce(id)nextelsecall deleteannounce(clng(idlist))end ifend if set rs=server.createobject("adodb.recordset") sql="select * from News where bz=8 order by NewsID 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,MaxPerPageshowpage totalput,MaxPerPage,"default.asp"else if (currentPage-1)*MaxPerPage<totalPut then rs.move (currentPage-1)*MaxPerPage dim bookmark bookmark=rs.bookmark showContent totalput,MaxPerPageshowpage totalput,MaxPerPage,"default.asp"else currentPage=1 showContent totalput,MaxPerPageshowpage totalput,MaxPerPage,"default.asp"end if end if rs.close end if set rs=nothingsub showContent (totalput,MaxPerPage)%><CENTER><TABLE border=0 cellPadding=3 cellSpacing=0 width="600" style="border-collapse: collapse" bordercolor="#111111"><TBODY><TR bgcolor="#ffffcc"><TD align=left bgcolor="#FFFFFF"> <Form name="Form1" method="POST" action="../zxdt/default.asp"><p align="center"><img src="../images/search.gif">&nbsp;搜索关键字:<input type="text" name="txtitle" size="25" style="font-size: 9pt">&nbsp;&nbsp;<select style="font-size: 9pt" name="bz"><option value="" selected>显示所有信息</option><option value="8">人才市场动态</option>  end select</select>&nbsp;<INPUT align=absMiddle border=0 src="../images/search1.gif" type=image name="I2"></p></TBODY></TABLE><CENTER><TABLE border="0" cellspacing="0" width="600" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111"><TR><TD align=left height=25><a href="newadd.asp"><img border=0 alt="录入网站最新动态" src="../images/add.gif"></a></TD></TR></TABLE><TABLE border="1" cellspacing="0" width="600" cellpadding="4" bgcolor="efefef" style="border-collapse: collapse" bordercolor="#111111" bordercolorlight="#CAE6FF" bordercolordark="#CAE6FF"><TR height=25 bgcolor="#cccccc"><TD width="45" align="left" bgcolor="#F0F8FF"><font color="#Ff6600"><b>ID号</b></td><TD width="345" align="center" bgcolor="#F0F8FF"><font color="#Ff6600"><b>网站动态标题</b></TD><TD width="127" align="center" bgcolor="#F0F8FF"><font color="#FF6600"><b>公告类型</b></font></TD><TD width="96" align="center" bgcolor="#F0F8FF"><font color="#Ff6600"><b>发布日期</b></TD><TD width="36" align="center" bgcolor="#F0F8FF"><font color="#Ff6600"><b>修改</b></td><TD width="51" align="center" bgcolor="#F0F8FF"><font color="#Ff6600"><input type='submit' value='删除'></td></TR><%do while not rs.eof%><TR height="20" bgcolor="#ffffff"> <TD width="45" align="left"><font face="Arial"><b><%=rs("Newsid")%></b></font> </td><TD width="345"><a href=javascript:view('../zxdt/info.asp?Newsid=<%=rs("Newsid")%>')><%=rs("Newstitle")%></a> </td><TD width="127" align="center"><font face="Arial"><%if rs("bz")=0 then%>会员助手说明<%elseif rs("bz")=1 then%>首页热点关注<%elseif rs("bz")=2 then%>供求商机公告<%elseif rs("bz")=3 then%>会员登录公告<%elseif rs("bz")=4 then%><%if rs("open")<>"0" then%>重要信息(<font color="#FF0000">公布</font>)<%else%>重要信息(<font color="#3766D0">暂停</font>)<%end if%><%elseif rs("bz")=5 then%>会员推荐公告<%elseif rs("bz")=6 then%>会员常见问题<%elseif rs("bz")=7 then%>诚邀合作代理<%elseif rs("bz")=8 then%>人才市场动态<%end if%></font></TD><TD width="96" align="center"><%=rs("date")%> </TD><TD width="36" align="center"><a href="../zxdt/edit.asp?Newsid=<%=rs("Newsid")%>"><img alt="修改信息" border="0" src="../images/edit.gif"></a></td><TD width="51" align="center"><input type='checkbox' name='selAnnounce' value='<%=cstr(rs("Newsid"))%>'></td></TR><% i=i+1if i>=MaxPerPage then exit dors.movenextloop%></TABLE></CENTER><%end subfunction 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=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 "【<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 functionsub deleteannounce(id)dim rs,sqlset rs=server.createobject("adodb.recordset")sql="delete from [News] where Newsid="&cstr(id)conn.execute sqlif err.Number<>0 thenerr.clearresponse.write "删 除 失 败 !<br>"end ifEnd sub%>

⌨️ 快捷键说明

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