📄 admin_hw.asp
字号:
<%@ codepage ="936" %><!--#include file="../inc/config.asp"-->
<!--#include file="../conn/dbconn1.asp" -->
<%
'┌─ 风云ASP在线 ────────────────────────┐
'│ │
'│ 作者:赵振波. http://www.fyasp.com │
'│ │
'│ Q Q:176189168 │
'│ │
'│ Email:service@fyasp.com │
'│ │
'│ 程序定做,系统开发,网站制作,提供高质量的网络产品、技术和服务!│
'│ │
'│【版权声明】 │
'│ │
'│ 本程序版权归坐看风云所有,未经授权擅自修改、复制或散布本程序│
'│ │
'│的部分或全部,将承受严厉的民事和刑事处罚,对已知的违反者将给予法 │
'│ │
'│律范围内的全面制裁。对非法使用此程序所造成的一切后果本人概不负责!│
'│ │
'└─────────────────── http://www.fyasp.com ──┘
%>
<%
id=session("id")
user=session("user")
pass=session("pass")
if id="" or user="" or pass="" then
session("pageid")="manage"
response.redirect "../login/login.asp"
else
id=session("id")
%><%
'┌─ 风云ASP在线 ────────────────────────┐
'│ │
'│ 作者:赵振波. http://www.fyasp.com │
'│ │
'│ Q Q:176189168 │
'│ │
'│ Email:fy96@163.com │
'│ │
'│ 程序定做,系统开发,网站制作,提供高质量的网络产品、技术和服务!│
'│ │
'│【版权声明】 │
'│ │
'│ 本程序版权归坐看风云所有,未经授权擅自修改、复制或散布本程序│
'│ │
'│的部分或全部,将承受严厉的民事和刑事处罚,对已知的违反者将给予法 │
'│ │
'│律范围内的全面制裁。对非法使用此程序所造成的一切后果本人概不负责!│
'│ │
'└─────────────────── http://www.fyasp.com ──┘
if request("action")="alldel" then
rcID=trim(request("rcID"))
if instr(rcID,",")>0 then
dim idarr,i
idArr=split(rcID)
for i = 0 to ubound(idArr)
call DelArticle(clng(idarr(i)))
next
else
call DelArticle(clng(rcID))
end if
sub DelArticle(ID)
sqlDel="select * from hw where userid='"&session("id")&"' and id=" & CLng(ID)
Set rsDel= Server.CreateObject("ADODB.Recordset")
rsDel.open sqlDel,conn,1,3
rsDel.delete
rsDel.update
set rsDel=nothing
end sub
Response.Write "信息删除成功..."
Response.write("<script>alert(""信息删除成功!"");location.href=""Admin_hw.asp"";</script>")
Response.end
end if
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Style.css" rel="stylesheet" type="text/css">
<SCRIPT language=javascript>
function unselectall()
{
if(document.del.chkAll.checked){
document.del.chkAll.checked = document.del.chkAll.checked&0;
}
}
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;
}
}
function ConfirmDel()
{
if(confirm("确定要删除选中的信息吗?一旦删除将不能恢复!"))
return true;
else
return false;
}
</SCRIPT>
</head>
<BODY leftMargin=0 topMargin=0 marginwidth="0" marginheight="0">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
<table border="0" width="96%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="50%" height="13">·货物信息管理</td>
<form method="post" action="?" name="Form1">
<td width="50%" height="13" align="right">信息搜索:<input type="text" name="KeyWord" size="20" value="<% = Request("KeyWord")%>" class="face"> <input type="submit" name="Submit" value="搜" class="button"></td>
</form>
</tr>
</table>
<div align="center">
<table class=tableBorder width="98%" border=1 cellpadding=5 cellspacing=1 bordercolor="#A6D2FF" style="border-collapse: collapse">
<tbody>
<tr>
<th height=21 sytle="line-height:150%" width="33">
<span style="font-size: 9pt; font-weight:400">选择</span></th>
<th height=21 width="496"><span style="font-size: 9pt; font-weight:400">标题</span></th>
<th height=21 width="88"><span style="font-size: 9pt; font-weight:400">货物名</span></th>
<th height=21 width="60"><span style="font-size: 9pt; font-weight:400">状态</span></th>
<th height=21 width="60"><span style="font-size: 9pt; font-weight:400">推荐</span></th>
<th height=21 width="111"><span style="font-size: 9pt; font-weight:400">添加时间</span></th>
<th height=21 width="52"><span style="font-size: 9pt; font-weight:400">修改</span></th>
</tr><%
Dim rdsInfo '/通告的数据库对象及SQL语句/
Dim sqlInfo
Dim rdsTotalRec
Dim strKeyWord '/关键字/
Dim intPage '/当前页/
Dim intTotalRec '/所有记录/
Dim intInfoCot '/通告条数/
Dim intInfoCount
Dim n,p,ii '/定义一些临时变量/
Dim strState
strKeyWord = Request("KeyWord")
sh=Request("sh")
intPage = Trim(Request("Page"))
if intPage = "" then
intPage = 1
else
intPage = Clng(intPage)
end if
intInfoCot =10
strsql=" and userid='"&session("id")&"' "
if sh<>"" then
sh=cint(sh)
strsql=strsql&" and sh="&sh&""
end if
if strKeyWord <> "" then
strsql=strsql&" and (title like '%"&strKeyWord&"%' or hwname like '%"&strKeyWord&"%' or bz like '%"&strKeyWord&"%')"
end if
set rdsInfo = Server.CreateObject("ADODB.Recordset")
set rdsTotalRec = Conn.Execute("Select Count(id) from hw Where title<>'' "&strsql&"")
intTotalRec = rdsTotalRec(0)
sqlInfo = "Select * from hw Where title<>'' "&strsql&" Order By id Desc"
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
%>
<form name="del" method="Post" action="?action=alldel" onsubmit="return ConfirmDel();">
<tr>
<td class=forumRow height=21 sytle="line-height:150%">
<p align="center"><input name='rcID' type='checkbox' onclick="unselectall()" id="rcID" value='<% = rdsInfo("id")%>'></td>
<td class=forumRow height=21 sytle="line-height:150%" align="center"><a href="../showhw.asp?id=<% = rdsInfo("id")%>" target="_blank"><% = rdsInfo("title")%></a></td>
<td class=forumRow height=21 sytle="line-height:150%" align="center"><% = rdsInfo("hwname")%></td>
<td class=forumRow height=21 sytle="line-height:150%" align="center"><% if rdsInfo("sh")<>"1" then%>
<font color="#428EFF">锁定</font>
<%else%>
<font color="#ff0000">开通</font>
<%end if%></td>
<td class=forumRow height=21 sytle="line-height:150%" align="center"><% if rdsInfo("tj")<>"1" then%>
<font color="#428EFF">否</font>
<%else%>
<font color="#ff0000">是</font>
<%end if%></td>
<td class=forumRow height=21 sytle="line-height:150%" align="center"><% = rdsInfo("time")%></td>
<td class=forumRow height=21 sytle="line-height:150%" align="center">
<a href="#" onclick="{if(confirm('免费版无此功能')){return false;}return false;}">修改</a></td></tr><%
rdsInfo.MoveNext
loop
else
Response.Write "<tr><td colspan=""7"" class=""forumRow""> <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
%>
<tr>
<td class=forumRow colspan="7"><input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
选中本页显示的所有记录<input name="submit" type='submit' value='删除选定的信息'></td>
</tr>
<tr>
<td class=forumRow colspan="7"><table border="0" width="96%" cellspacing="0" cellpadding="0" align="center">
<form method="post" action="InfoEaa.asp" name="Form2">
<input type="hidden" name="KeyWord" value="<% = strKeyWord%>">
<input type="hidden" name="strfcclass" value="<% = strfcclass%>">
<input type="hidden" name="sh" value="<% =sh%>">
<input type="hidden" name="class" value="<% =strclass%>">
<tr>
<td width="43%" height="30" valign="middle">页次:<b><%= intPage %></b>/<b><%= n %></b>页 每页<b><%= intInfoCot %></b>条 共<b><%= intTotalRec %></b>条</td>
<td width="57%" 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 &"&strfcclass="& strfcclass &"&sh="&sh&"&class="&strclass&"' title=首页><font face=webdings>9</font></a> "
end if
if p * 10 > 0 then Response.Write "<a href='?Page="&Cstr(p*10)&"&sh="&sh&"&class="&strclass&"&KeyWord="& strKeyWord &"&strfcclass="& strfcclass &"' 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)&"&sh="&sh&"&class="&strclass&"&KeyWord="& strKeyWord &"&strfcclass="& strfcclass &"'>"+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)&"&sh="&sh&"&class="&strclass&"&KeyWord="& strKeyWord &"&strfcclass="& strfcclass &"' 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)&"&sh="&sh&"&class="&strclass&"&KeyWord="& strKeyWord &"&strfcclass="& strfcclass &"' 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>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html><%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -