📄 infomgr.asp
字号:
<!--#Include file="../Common/Inc_DatConn.asp"-->
<!--#Include file="Common/Inc_Config.asp"-->
<!--#Include file="Common/Inc_Function.asp"-->
<%
'┌─ 风云ASP在线 ────────────────────────┐
'│ │
'│ 作者:赵振波. http://www.fyasp.com │
'│ │
'│ Q Q:176189168 │
'│ │
'│ Email:fy96@163.com │
'│ │
'│ 程序定做,系统开发,网站制作,提供高质量的网络产品、技术和服务!│
'│ │
'│【版权声明】 │
'│ │
'│ 本程序版权归坐看风云所有,未经授权擅自修改、复制或散布本程序│
'│ │
'│的部分或全部,将承受严厉的民事和刑事处罚,对已知的违反者将给予法 │
'│ │
'│律范围内的全面制裁。对非法使用此程序所造成的一切后果本人概不负责!│
'│ │
'└─────────────────── http://www.fyasp.com ──┘
%>
<%if IsTimeOut(Session("strAccount"),Session("strPassWord")) then Response.Redirect "index.asp"%>
<html>
<head>
<title><% = strSiteName%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="Common/Site.css" type="text/css">
<script language="javascript">
function ViewInfo(ID) {
popupWin = window.open('ViewInfo.asp?Id='+ ID,'','width=482,height=350,scrollbars=yes')
}
function DelInfo(ID) {
popupWin = window.open('Oper.asp?Oper=DelInfo2&ID='+ ID,'','width=300,height=150,scrollbars=no')
}
function DelgqInfo(ID) {
popupWin = window.open('Oper.asp?Oper=DelgqInfo&ID='+ ID,'','width=300,height=150,scrollbars=no')
}
function tj(ID) {
popupWin = window.open('Oper.asp?Oper=tj&ID='+ ID,'','width=300,height=150,scrollbars=no')
}
function qxtj(ID) {
popupWin = window.open('Oper.asp?Oper=qxtj&ID='+ ID,'','width=300,height=150,scrollbars=no')
}
function editInfo(ID) {
popupWin = window.open('edit_Info.asp?ID='+ ID,'','width=495,height=500,scrollbars=no')
}
</script>
</head>
<body leftMargin="0" topMargin="2">
<!--#Include file="Common/inc_Top.asp"-->
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="105" valign="top" style="border-left: 1px solid rgb(0,0,0); border-right: 1px solid rgb(0,0,0)" class="bottom"><br>
<!--#Include file="Common/Inc_Button.asp"-->
</td>
<td valign="top" style="border-right: 1px solid rgb(0,0,0)" align="center">
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="50">当前位置:<a href="Main.asp">管理首页</a> -> 信息管理</td>
</tr>
</table>
<table border="0" width="96%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="51%" height="25">
<%
if Session("intUserLevel") > 2 then
Response.Write "<input onclick=""parent.location.href='InfoEaa.asp'"" type=""button"" value=""审 批"" class=""button"">"
end if
%><%Response.Write "<input onclick=""parent.location.href='#'"" type=""button"" value=""删除所有过期信息"" class=""button1"">"
%> <a href="javascript:DelgqInfo(1)"><img border="0" src="<% = strImageUrl%>del.gif" align="absmiddle" alt="确定删除所有过期信息"></a>
</td>
<form method="post" action="InfoMgr.asp" name="Form1">
<td width="49%" height="25" align="right">信息搜索:<input type="text" name="Keyword" size="20" value="<% = Request("Keyword")%>" class="face">
<select size="1" name="typejj">
<option value="1" selected>按标题</option>
<option value="2">按电话</option>
<option value="3">按内容</option>
</select> <input type="submit" name="Submit" value="搜" class="button"></td>
</form>
</tr>
</table>
<table border="0" width="96%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="100%" class="booktable">
<table border="0" width="100%" cellspacing="1" cellpadding="0">
<tr>
<td width="6%" height="30" class="bottom" align="center">编 号</td>
<td width="6%" height="30" class="bottom" align="center">类 型</td>
<td width="47%" height="30" class="bottom" align="center">标 题</td>
<td width="7%" height="30" class="bottom" align="center">状 态</td>
<td width="17%" height="30" class="bottom" align="center">发布时间</td>
<td width="17%" height="30" class="bottom" align="center">操 作</td>
</tr>
<%
Dim rdsInfo '/通告的数据库对象及SQL语句/
Dim sqlInfo
Dim strKeyword '/关键字/
Dim rdsTotalRec
Dim intPage '/当前页/
Dim intTotalRec '/所有记录/
Dim intInfoCot '/通告条数/
Dim intInfoCount
Dim n,p,ii '/定义一些临时变量/
Dim strState
strKeyword = Request("Keyword")
typejj = Request("typejj")
intPage = Trim(Request("Page"))
if intPage = "" then
intPage = 1
else
intPage = Clng(intPage)
end if
intInfoCot = 10
set rdsInfo = Server.CreateObject("ADODB.Recordset")
if strKeyword <> "" then
if typejj=1 then
set rdsTotalRec = Conn.Execute("Select Count(InfoKey) From Dat_Information Where State = 1 And Topic like '%"& strKeyword &"%'")
intTotalRec = rdsTotalRec(0)
sqlInfo = "Select * From Dat_Information Where State = 1 And Topic like '%"& strKeyword &"%' Order By InfoKey Desc"
end if
if typejj=2 then
set rdsTotalRec = Conn.Execute("Select Count(InfoKey) From Dat_Information Where State = 1 And Tel like '%"& strKeyword &"%'")
intTotalRec = rdsTotalRec(0)
sqlInfo = "Select * From Dat_Information Where State = 1 And Tel like '%"& strKeyword &"%' Order By InfoKey Desc"
end if
if typejj=3 then
set rdsTotalRec = Conn.Execute("Select Count(InfoKey) From Dat_Information Where State = 1 And Content like '%"& strKeyword &"%'")
intTotalRec = rdsTotalRec(0)
sqlInfo = "Select * From Dat_Information Where State = 1 And Content like '%"& strKeyword &"%' Order By InfoKey Desc"
end if
else
set rdsTotalRec = Conn.Execute("Select Count(InfoKey) From Dat_Information Where State = 1")
intTotalRec = rdsTotalRec(0)
sqlInfo = "Select * From Dat_Information Where State = 1 Order By InfoKey Desc"
end if
rdsInfo.Open sqlInfo,Conn,1,1
if not rdsInfo.EOF then
if intTotalRec mod intInfoCot = 0 then
n = intTotalRec \ intInfoCot
else
n = intTotalRec \ intInfoCot + 1
end if
rdsInfo.MoveFirst
if intPage > n then intPage = n
if intPage < 1 then intPage = 1
rdsInfo.Move (intPage - 1) * intInfoCot
do while not rdsInfo.EOF and intInfoCount < Clng(intInfoCot)
intInfoCount = intInfoCount + 1
if rdsInfo("State") = 1 then
strState = "<font color=""#FF0000"">活动</font>"
end if
xxlx3=rdsInfo("InfoClass")
Select Case xxlx3
Case "1"
strInfoClass = "<font color=#009933>[销售]</font>"
Case "2"
strInfoClass = "<font color=#ff0000>[求购]</font>"
Case "3"
strInfoClass = "<font color=#FF00FF>[要闻]</font>"
Case "4"
strInfoClass = "<font color=#008080>[动态]</font>"
Case "5"
strInfoClass = "<font color=#0000FF>[招聘]</font>"
Case "6"
strInfoClass = "<font color=#9900FF>[求职]</font>"
Case "7"
strInfoClass = "<font color=#CC6600>[展会]</font>"
Case "8"
strInfoClass = "[其它]"
End Select
%>
<tr>
<td height="25" align="center" class="banma1"><% = rdsInfo("InfoKey")%></td>
<td height="25" class="banma2" align="center"><% = strInfoClass%></td>
<td height="25" class="banma2"> <a href="javascript:ViewInfo(<% = rdsInfo("InfoKey")%>)"><% = rdsInfo("Topic")%></a></td>
<td height="25" align="center" class="banma1"><% = strState%></td>
<td height="25" align="center" class="banma1"><% = FormatTime(rdsInfo("CreateTime"),5)%></td>
<td height="25" align="center" class="banma2"><%if rdsInfo("tj")=1 then%> <a href="javascript:qxtj(<% = rdsInfo("InfoKey")%>)"><img border="0" src="<% = strImageUrl%>j.gif" align="absmiddle" alt="取消推荐"></a><%else%> <a href="javascript:tj(<% = rdsInfo("InfoKey")%>)"><img border="0" src="<% = strImageUrl%>nj.gif" align="absmiddle" alt="设为推荐信息"></a><%end if%> <a href="#" onclick="{if(confirm('免费版不提供此功能?')){return false;}return false;}"><img border="0" src="<% = strImageUrl%>edit.gif" align="absmiddle" alt="编辑信息"></a> <a href="javascript:DelInfo(<% = rdsInfo("InfoKey")%>)"><img border="0" src="<% = strImageUrl%>del.gif" align="absmiddle" alt="删除"></a></td>
</tr>
<%
rdsInfo.MoveNext
loop
else
Response.Write "<tr><td width=""100%"" height=""25"" colspan=""7"" class=""banma1""> <font color=""#FF0000"">没有供求信息...</font></td></tr>"
end if
rdsInfo.Close
set rdsInfo = nothing
if intPage - 1 mod 10 = 0 then
p = (intPage - 1) \ 10
else
p = (intPage - 1) \ 10
end if
%>
</table>
</td>
</tr>
</table>
<table border="0" width="96%" cellspacing="0" cellpadding="0" align="center">
<form method="post" action="InfoMgr.asp" name="Form2">
<input type="hidden" name="Keyword" value="<% = strKeyword%>">
<input type="hidden" name="typejj" value="<% = typejj%>">
<tr>
<td width="30%" height="30" valign="middle">页次:<b><%= intPage %></b>/<b><%= n %></b>页 每页<b><%= intInfoCot %></b>条 共<b><%= intTotalRec %></b>条</td>
<td width="70%" height="30" valign="middle"><div align="right">分页:
<%
if intPage = 1 then
Response.Write "<font face=webdings>9</font> "
else
Response.Write "<a href='?Page=1&Keyword="& strKeyword &"&typejj="& typejj &"' title=首页><font face=webdings>9</font></a> "
end if
if p * 10 > 0 then Response.Write "<a href='?Page="&Cstr(p*10)&"&Keyword="& strKeyword &"&typejj="& typejj &"' title=上十页><font face=webdings>7</font></a> "
Response.Write "<b>"
for ii = p * 10 + 1 to P * 10 + 10
if ii = intPage then
Response.Write "<font color=""#FF0000"">"+Cstr(ii)+"</font> "
else
Response.Write "<a href='?Page="&Cstr(ii)&"&Keyword="& strKeyword &"&typejj="& typejj &"'>"+Cstr(ii)+"</a> "
end if
if ii = n then exit for
next
Response.Write "</b>"
if ii < n then Response.Write "<a href='?Page="&Cstr(ii)&"&Keyword="& strKeyword &"&typejj="& typejj &"' title=下十页><font face=webdings>8</font></a> "
if intPage=n then
Response.Write "<font face=webdings>:</font> "
else
Response.Write "<a href='?Page="&Cstr(n)&"&Keyword="& strKeyword &"&typejj="& typejj &"' title=尾页><font face=webdings>:</font></a> "
end if
%>
转到:<input type="text" name="Page" size="2" maxlength="10" value="<%= intPage %>" class="face"> <input type="submit" value="Go" name="submit" class="button">
</div></td>
</tr>
</form>
</table>
<br>
</td>
</tr>
</table>
<!--#Include file="Common/Inc_Bottom.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -