📄 newsmanage.asp
字号:
<!--#include file = include.asp-->
<!--#include file = rijcm.asp-->
<!--#include file = CheckPurview.asp-->
<%
Domain=Request.ServerVariables("SERVER_NAME")
gFilePath=Request.ServerVariables("PATH_INFO")
gFilePath=lcase(left(gFilePath,instrRev(gFilePath,"/")))
CountN=len(gFilePath)
gFilePath=lcase(left(gFilePath,CountN-1))
gFilePath=lcase(left(gFilePath,instrRev(gFilePath,"/")))
AllPath=Domain&gfilepath
page=request.querystring("page")
if page<=1 or page="" then page=1
Set rs=Server.CreateObject("Adodb.Recordset")
dim class2:class2=session("class")
class2="'"&class2&"'"
class2=replace(class2,",","','")
keyword=request.form("KeyWord")
if keyword="" then
keyword=session("KeyWord")
keyword=replace(replace(replace(replace(keyword,"'","‘"),"<","<"),">",">")," "," ")
else
keyword=replace(replace(replace(replace(keyword,"'","‘"),"<","<"),">",">")," "," ")
session("KeyWord")=keyword
end if
if request("action")="Search" then
if request("SearchType")="comname" then
if session("purview")="管理员" then
sql="select * from news where comname like '%"&keyword&"%' order by newsid desc"
else
sql="select * from news where comname like '%"&keyword&"%' and finder='"&session("username")&"' order by newsid desc"
end if
else
if session("purview")="管理员" then
sql="select * from news where finder='"&keyword&"' order by newsid desc"
else
sql="select * from news where finder='"&session("username")&"' order by newsid desc"
end if
end if
else
if session("purview")="管理员" then
sql="Select * from News where BigClass='"&request.querystring("BigClass")&"' and smallClass='"&request.querystring("smallClass")&"' order by newsid desc "
else
sql="Select * from News where BigClass='"&request.querystring("BigClass")&"' and smallClass='"&request.querystring("smallClass")&"' and (finder='"&session("username")&"' or ( resources=1 and SmallClass in ("&class2&") ) ) order by newsid desc "
end if
end if
rs.open sql,conn,1,3
rs.pagesize=20
for i=1 to rs.pagesize*(page-1)
if not rs.eof then
rs.movenext
end if
next
if ccur(page)=ccur(rs.pagecount) then
NextPage=Page
else
NextPage=page+1
end if
if Page=1 then
AscendPage=page
else
AscendPage=Page-1
end if
%>
<body background="images/BLogo.gif">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#4397c5">
<tr bgcolor="#FFFFFF">
<td colspan="4" height="25"> <!--#include file = topMenu.htm--></td>
</tr>
<form method="post" action="newsmanage.asp">
<tr bgcolor="#FFFFFF">
<td valign="middle" width="27%" background="images/BLogo.gif" height="25" align="center">
<a href=NewsAdd.asp?SmallClass=<%=request.querystring("SmallClass")%>&BigClass=<%=request.querystring("BigClass")%>>添加商务信息</a><br>
</td>
<td valign="middle" width="27%" background="images/BLogo.gif" height="25" align="center"> </td>
<td width="73%" height="25" colspan="2" valign="top" background="images/BLogo.gif" align="center">
<select name="SearchType">
<option value="comname">企业名称</option>
<option value="finder">商务代表</option>
</select>
<input type="text" name="KeyWord">
<input type="hidden" name=action value="Search">
<input type="submit" value="搜索">
</td>
</tr>
</form>
<tr bgcolor="#FFFFFF" valign="middle" align="center">
<td height="2" colspan="4" background="images/BLogo.gif">
<form name=form method=post action=NewsSave.asp?result=exe>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#F5F5F5">
<tr bgcolor="#666666">
<td width="8%">
<div align="center"><font color="#FFFFFF"> 地区</font></div>
</td>
<td width="33%">
<div align="center"><font color="#FFFFFF">企业名称</font></div>
</td>
<td width="13%">
<div align="center"><font color="#FFFFFF">联系电话</font></div>
</td>
<td width="7%">
<div align="center"><font color="#FFFFFF">商务代表</font></div>
</td>
<td width="11%" height="20">
<div align="center"><font color="#FFFFFF">登记时间</font></div>
</td>
<td width="10%">
<div align="center"><font color="#FFFFFF">操作</font></div>
</td>
<td width="18%">
<div align="center"><font color="#FFFFFF">状态</font></div>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#CCCCCC">
<%
if rs.eof and rs.bof then
%>
<tr bgcolor="#FFFFFF">
<td align="center" colspan="5"><font color=red>暂时没有商务信息</font></td>
</tr>
<%
response.end
else
for i=1 to rs.pagesize
if rs.eof then exit for
%>
<tr bgcolor="#FFFFFF">
<td height=20 width="8%" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';> <%=rs("smallclass")%></td>
<td width="33%" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';><a href=Newsview.asp?NewsID=<%=rs("NewsID")%>><%=rs("comname")%></a></td>
<td width="13%" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';><%=rs("tel")%></td>
<td width="7%" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';><%=rs("finder")%></td>
<td height=20 width="11%" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor=''; align="center"><%=formatdatetime(rs("date"),1)%></td>
<td height=20 width="5%" align=center onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';><a href=NewsModify.asp?NewsID=<%=rs("NewsID")%>&action=Modify>修改</a></td>
<td height=20 width="5%" align=center onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';><a href="del.asp?newsid=<%=rs("newsid")%>" onclick='{if(confirm("警告:信息一旦删除将无法恢复,您确定要删除吗?!")){return true;}return false;}'>删除</a></td>
<td height=20 colspan="2" align=center onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor=''; width="18%">
<input type=hidden name=comname value=<%=rs("comname")%>>
目前状态: <%if rs("resources")=1 then%> 共享
<input type="Checkbox" value="<%=rs("NewsID")%>" class=checkboxClass name="DelID">
<%else%> 不共享
<input type="Checkbox" value="<%=rs("NewsID")%>" name="DelID" class=checkboxClass title="不共享">
<%end if%> </td>
</tr>
<%
rs.movenext
next
%>
<tr bgcolor="#FFFFFF">
<td height=20 colspan=9 align=right onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';>
<input type=hidden Name=BigClass value=<%=request("BigClass")%>>
<input type=hidden Name=SmallClass value=<%=request("SmallClass")%>>
<input type=radio name=exe value="res" class=checkboxClass>
设置共享
<input type=radio name=exe value="unres" class=checkboxClass>
设置不共享
<input type=submit value="执行" onclick="return operation()">
<input type="checkbox" name="chkall" onclick="CheckAll(this.form)" class=checkboxClass>
选中所有 </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height=20 colspan=9 onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';>
<a href="NewsManage.asp?Page=1&SmallClass=<%=request("SmallClass")%>&BigClass=<%=request("BigClass")%>&action=<%=request("action")%>&SearchType=<%=request("SearchType")%>">首页</a>
<a href="NewsManage.asp?Page=<%=AscendPage%>&SmallClass=<%=request("SmallClass")%>&BigClass=<%=request("BigClass")%>&action=<%=request("action")%>&SearchType=<%=request("SearchType")%>">上一页</a>
<a href="NewsManage.asp?Page=<%=NextPage%>&SmallClass=<%=request("SmallClass")%>&BigClass=<%=request("BigClass")%>&action=<%=request("action")%>&SearchType=<%=request("SearchType")%>">下一页</a>
<a href="NewsManage.asp?Page=<%=rs.pagecount%>&SmallClass=<%=request("SmallClass")%>&BigClass=<%=request("BigClass")%>&action=<%=request("action")%>&SearchType=<%=request("SearchType")%>">尾页</a>
<b><font color=red><%=Page%></font>/<%=rs.pagecount%></b>
<select onchange="if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}">
<%
for i=1 to rs.pagecount
%>
<option value="NewsManage.asp?Page=<%=i%>&SmallClass=<%=request("SmallClass")%>&BigClass=<%=request("BigClass")%>&action=<%=request("action")%>&SearchType=<%=request("SearchType")%>" <%if ccur(page)=ccur(i) then response.write"selected"%>>第<%=i%>页</option>
<%
next
%>
</select>
</td>
</tr>
</table>
</form>
</td>
</tr>
<%end if%>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -