📄 manage_news.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file=../DataBase/conn.asp-->
<%
if session("admin_name")="" then
response.Redirect("login.asp")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新闻信息管理</title>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
.style3 {font-size: 14px;
font-weight: bold;
}
body,td,th {
font-size: 12px;
}
-->
</style>
<link href="../css/mangage.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style5 {color: #990000}
-->
</style>
</head>
<body>
<table width="230" border="0" align="center">
<tr>
<td height="30"><div align="center" class="style3">新闻信息管理</div></td>
</tr>
<tr>
<td><div align="right"><a href="javascript:" onClick="javascript:window.open('Manage_newsadd.asp','','width=500,height=550,toolbar=no,location=no,status=no,menubar=no')">添加新闻信息</a> </div></td>
</tr>
<tr>
<td>
<form name="orderform" method="post" action="">
<table width="100%" border="0" cellspacing="1" bgcolor="#000000">
<tr>
<td bgcolor="#FFFFFF"><table width="530" border="0" align="center">
<tr>
<td><input name="search" type="checkbox" id="search2" value="true">
关键字:
<input name="title" type="text" id="title" value="<%=request("title")%>" size="25">
<select name="type" id="select">
<option value="Title">标题</option>
<option value="Content">内容</option>
</select>
<input type="submit" name="Submit" value=" 查 询 ">
<% If request("search")<>"" or request("search1")<>"" Then %>
<input name="Submit2" type="button" onClick="location='Manage_news.asp'" value=" 返回查询 ">
<% End If %>
<div align="right"></div></td>
</tr>
<tr>
<td><input name="search1" type="checkbox" id="search12" value="true">
分 类:
<select name="fenlei" >
<option value="新闻报道">新闻报道</option>
<option value="新车报道">新车报道</option>
<option value="集团动向">集团动向</option>
<option value="站内公告">站内公告</option>
</select></td>
</tr>
</table></td>
</tr>
</table>
</form>
<table width="530" border="0" align="center" cellspacing="1">
<tr bgcolor="#595859" class="css">
<td width="45" height="23"><div align="center" class="style1">ID</div></td>
<td width="95"><div align="center" class="style1"> 新闻类型</div></td>
<td width="96"><div align="center"><span class="style1"> 新闻标题</span></div></td>
<td width="155"><div align="center" class="style1"> 发布时间</div></td>
<td width="123"><div align="center" class="style1">操作</div></td>
</tr>
<tr class="css">
<td bgcolor="#FFFFFF" colspan="5">
<%
if request("del")<>"" then
sql1="delete from tb_News where id="&request("del")
conn.execute(sql1)
end if
shum=30
if request("search")<>"" and request("search1")="" then
set rs=server.CreateObject("adodb.recordset")
sql="select * from tb_News where "&request("type")&" like '%"&request("title")&"%'"
rs.open sql,conn,1,1
elseif request("search")<>"" and request("search1")<>"" then
set rs=server.CreateObject("adodb.recordset")
sql="select * from tb_News where "&request("type")&" like '%"&request("title")&"%' and Type='"&request("fenlei")&"'"
rs.open sql,conn,1,1
elseif request("search1")<>"" and request("serach")="" then
set rs=server.CreateObject("adodb.recordset")
sql="select * from tb_News where Type='"&request("fenlei")&"'"
rs.open sql,conn,1,1
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from tb_News "
rs.open sql,conn,1,1
end if
if not rs.eof then
tel=rs.recordcount
rs.pagesize=shum
maxpage=rs.pagecount
requestpage=clng(request("p"))
if requestpage="" or requestpage=0 then
requestpage=1
end if
if requestpage>maxpage then
requestpage=maxpage
end if
if not requestpage=1 then
rs.move (requestpage-1)*rs.pagesize
end if
for i=1 to rs.pagesize and not rs.eof
%>
<table width="100%" border="0" cellspacing="0">
<tr>
<td width="9%"><div align="center"><%=rs("ID")%></div></td>
<td width="19%"><div align="center"><%=rs("Type")%></div></td>
<td width="18%"><div align="center"><%=rs("Title")%></div></td>
<td width="31%"><div align="center" class="css"><%=rs("IssueDate")%></div></td>
<td width="13%"><div align="center"><a href="javascript:" onClick="javascript:window.open('Manage_newsopen.asp?id=<%=rs("id")%>','','width=500,height=550,toolbar=no,location=no,status=no,menubar=no')">详细</a> </div></td>
<td width="10%"><div align="center"><a href="Manage_news.asp?del=<%=rs("id")%>&p=<%=requestpage%>" onClick="return confirm('你真的删除吗?')">删除</a></div></td>
</tr>
</table>
<%
Rs.MoveNext
if rs.eof then exit for
next
Rs.Close
Set Rs=Nothing
else
response.Write("暂无车辆信息")
end if
%>
</td>
</tr>
<tr bgcolor="#F0F0F0">
<td height="24" colspan="5">
<div align="right"><span class="css">共<%= maxpage %>页 当前页:<%= requestpage %>
</span>
<span class="css">
<%if request("search")<>"" and request("search1")="" then%>
<a href="Manage_news.asp?p=<%=requestpage-1%>&search=true&type=<%=request("type")%>&title=<%=request("title")%>">上一页</a> <a href=Manage_news.asp?p=<%=requestpage+1%>&search=true&type=<%=request("type")%>&title=<%=request("title")%>>下一页</a></span> </div>
<%elseif request("search")<>"" and request("search1")<>"" then%>
<a href="Manage_news.asp?p=<%=requestpage-1%>&search=true&search1=true&type=<%=request("type")%>&title=<%=request("title")%>&fenlei=<%=request("fenlei")%>">上一页</a> <a href=Manage_news.asp?p=<%=requestpage+1%>&search=true&search1=true&type=<%=request("type")%>&title=<%=request("title")%>&fenlei=<%=request("fenlei")%>>下一页</a>
<% elseif request("search1")<>"" and request("serach")="" then %>
<span class="css"><a href="Manage_news.asp?p=<%=requestpage-1%>&search1=true&fenlei=<%= request("fenlei") %>">上一页</a> <a href=Manage_Cars_news.asp?p=<%=requestpage+1%>&search1=true&fenlei=<%= request("fenlei") %>>下一页</a></span>
<% Else %>
<span class="css"><a href="Manage_news.asp?p=<%=requestpage-1%>">上一页</a> <a href=Manage_news.asp?p=<%=requestpage+1%>>下一页</a></span>
<% End If %>
</div>
</td>
</tr>
</table></td>
</tr>
</table>
<div align="center"></div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -