?? 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 + -