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

📄 exhibit.asp

📁 实现一个用JSP、Servlet技术实现的小型物流网站系统。实现功能如下:管理员通过登录该系统
💻 ASP
字号:
<%dbdns="../../"%>
<!--#include file="../../inc/conn.asp"-->
<!--#include file="../cook.asp"-->
<%if fla7<>1 then
response.write "<script>alert('操作权限出错,您没有权限操作些功能');history.go(-1);</Script>"
Response.End 
end if%>
<%if request("Submit")="删 除" then
id=replace(request("id")," ","")
id=split(id,",")
for i=0 to UBound(id)
conn.execute("delete from SMT_exhibit where SMT_id=" & id(i))
next
elseif request("Submit")="审 核" then
id=replace(request("id")," ","")
id=split(id,",")
for i=0 to UBound(id)
conn.execute("update SMT_exhibit set SMT_key=1 where SMT_id="&id(i))
next
end if
%>
<%=citycss%>
<script>
function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }
</script>
<script>
function oa_tool1(){
window.parent.mm.rows="20,200,10,*";
}
</script>

<body style="margin:5">
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#cccccc" bordercolordark="#FFFFFF">
<form name="form1" method="post" action="exhibit.asp">
<tr align=center bgcolor=#efefef><td height=25 align=center><input type="text" name="word">  <input type="submit" name="Submit" value="展会搜索">  <a href="exhibit.asp?cha=yes">10天内到期</a> <a href="exhibit.asp?key2=false">已关闭</a> <a href="exhibit.asp?zc=yes" class=red>正常展会</a> <a href="exhibit.asp?key=0">待审</a> <a href="exhibit.asp?last=yes">到期</a> <a href="exhibit.asp?key=2">正常推荐</a> <a href="exhibit.asp">所有</a></td></tr>
</form>
</table>

<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#cccccc" bordercolordark="#FFFFFF">
<form name="from1" method="post" action="exhibit.asp?word=<%=request("word")%>&cha=<%=request("cha")%>&key=<%=request("key")%>&key2=<%=request("key2")%>&last=<%=request("last")%>&zc=<%=request("zc")%>">
<%if request("word")<>"" then
sql="select * from SMT_exhibit where (SMT_z_name like'%"&request("word")&"%' or SMT_z_lr like'%"&request("word")&"%' or SMT_z_others like'%"&request("word")&"%') and SMT_key<>0 order by SMT_id desc"
elseif request("cha")<>"" then
sql="select * from SMT_exhibit where SMT_z_lastdate<("&SMT_citytime&"+10) and (SMT_z_lastdate-"&SMT_citytime&")>0 order by SMT_id desc"
elseif request("key2")<>"" then
sql="select * from SMT_exhibit where SMT_key2=0 order by SMT_id desc"
elseif request("zc")<>"" then
sql="select * from SMT_exhibit where SMT_key<>0 and SMT_key2=1 and (SMT_z_lastdate-"&SMT_citytime&")>0 order by SMT_id desc"
elseif request("last")<>"" then
sql="select * from SMT_exhibit where (SMT_z_lastdate-"&SMT_citytime&")<=0 order by SMT_id desc"
elseif request("key")<>"" then
sql="select * from SMT_exhibit where SMT_key="&request("key")&" and SMT_key2=1 and (SMT_z_lastdate-"&SMT_citytime&")>0 order by SMT_id desc"
else
sql="select * from SMT_exhibit order by SMT_id desc"
end if
set rs=server.createobject("adodb.recordset")                     
rs.open sql,conn,1,1                     
if rs.eof and rs.bof then                     
	response.write "<tr><td align=center>暂无内容</td></tr>"
else  
'分页的实现 
listnum=23
Rs.pagesize=listnum
page=Request("page")
if (page-Rs.pagecount) > 0 then
page=Rs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
Rs.absolutepage=page
'编号的实现
j=rs.recordcount
j=j-(page-1)*listnum%>
<%i=0
nn=request("page")
if nn="" then
n=0
else
nn=nn-1
n=listnum*nn
end if%>
<tr align=center bgcolor=#efefef>
 <td width="5%" height=20>编号</td>
 <td width=*>标 题 <font color=red>(点击查看)</font></td>
 <td width="4%">发布</td>
 <td width="5%">点击</td>
 <td width="18%">展出时间</td>
 <td width="10%">有效期</td>
 <td width="4%">状态</td>
 <td width="4%">操作</td>
 <td width="4%">修改</td>
 <td width="4%">选择</td>
</tr>
<%do while not rs.eof and i<listnum
n=n+1%>
<tr align=center>
 <td height=22><%=n%></td>
 <td align=left>&nbsp;<a href=# onclick="javascript:window.open('zh_view.asp?id=<%=rs("SMT_id")%>','_blank','width=780,height=400,scrollbars=yes')"><%=rs("SMT_z_name")%></a><%if rs("SMT_key")=2 then%> <font color=red>[推荐]</font><%elseif rs("SMT_key")=0 then%> <font color=green>[待审]</font><%end if%></td>
 <td><%if rs("SMT_z_enrol")=0 then%>企业<%elseif rs("SMT_z_enrol")=1 then%><font color=green>后台</font><%else%><font color=red>代理</font><%end if%></td>
 <td><%=rs("SMT_htc")%></td>
 <td><%=rs("SMT_z_begindate")%><font color=red><strong>/</strong></font><%=rs("SMT_z_lastdate")%></td>
<%aaa=rs("SMT_z_begindate")-date()
if aaa<0 then
bbb="<strong><font color=blue>-</font></strong>"
elseif aaa<10 and aaa>=0 then
bbb="<strong><font color=red>"&aaa&"</font>/"&rs("SMT_z_lastdate")-rs("SMT_z_begindate")&"</strong>"
else
bbb="<strong>"&aaa&"/"&rs("SMT_z_lastdate")-rs("SMT_z_begindate")&"</strong>"
end if
%>
 <td title="离开展天数/展出天数<%=vbCrLf%>“-”表示已过期"><%=bbb%></td>
 <td><%if rs("SMT_key2")=1 then%>开启<%else%><font color=red>关闭</font><%end if%></td>
 <td><a href=lx.asp?id=<%=rs("SMT_id")%> onclick="oa_tool1()" target=top>操作</a></td>
 <td><a href=exhibit_edit.asp?page=<%=request("page")%>&id=<%=rs("SMT_id")%>>修改</a></td>
 <td><input type="checkbox" name="ID" value="<%=rs("SMT_id")%>" style="border:0"></td>
</tr>
<%rs.movenext 
i=i+1 
j=j-1
loop%>
<tr>
<%filename="exhibit.asp?word="&request("word")&"&cha="&request("cha")&"&key="&request("key")&"&key2="&request("key2")&"&last="&request("last")&"&zc="&request("zc")&""%>
<td colspan=10 align=right bgcolor=#efefef height=20><%=Rs.recordcount%> 条展会&nbsp;&nbsp;<%=listnum%> 条展会/页&nbsp;&nbsp;共 <%=Rs.pagecount%> 页 
      <% if page=1 then %>
      <%else%>
      <a href=<%=filename%>>|<<</a>&nbsp; 
      <a href=<%=filename%>&page=<%=page-1%>><<</a>&nbsp; 
      <a href=<%=filename%>&page=<%=page-1%>>[<%=page-1%>]</a>&nbsp;<%end if%>
<% if Rs.pagecount=1 then %>
<%else%>[<%=page%>]
<%end if%>
	  <% if Rs.pagecount-page <> 0 then %>
      <a href=<%=filename%>&page=<%=page+1%>>[<%=page+1%>]</a>&nbsp; 
      <a href=<%=filename%>&page=<%=page+1%>>>></a>&nbsp; 
      <a href=<%=filename%>&page=<%=Rs.pagecount%>>>>|</a>&nbsp; 
	  <%end if%> <input name="chkall" type="checkbox" id="chkall" value="select" onclick="CheckAll(this.form)" style="border:0">全选 <input type="submit" name="Submit" value="审 核"<%if request("key")="" or request("key")<>0 then%> disabled<%end if%>> <input type="submit" name="Submit" value="删 除">&nbsp;&nbsp;</td>
<%end if%></tr>
</form>
</table>
</body>
</html>

⌨️ 快捷键说明

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