📄 admin_city_pro.asp
字号:
<!--#include file="config.asp" -->
<!--#include file="conn.asp" -->
<!--#include file="admin_admininfo.asp"-->
<!--#include file="sub_change.asp" -->
<%
if session("adminname")<>adminname or session("adminpwd")<>adminpwd then
response.Redirect("admin_login.asp")
end if
Dim order,updata,errormax,msg
order=trim(request.QueryString("order"))
updata=trim(request.QueryString("updata"))
if updata="ok" then
dim id,pro,proall,prosim,location,pass
id=trim(request.QueryString("id"))
if len(id)=0 or IsNumeric(id)=flase then errormax=errormax&"编号错误,请刷新本页面后操作!<br>" end if
pro=strchange(trim(request.form("pro")))
if len(pro)=0 or len(pro)>4 then errormax=errormax&"省份不能为空或者大于4个字符!<br>" end if
proall=strchange(trim(request.form("proall")))
if len(proall)=0 or len(proall)>20 then errormax=errormax&"省份全称不能为空或者大于20个字符!<br>" end if
prosim=strchange(trim(request.form("prosim")))
if len(prosim)=0 or len(proasim)>2 then errormax=errormax&"省份简称不能为空或者大于2个字符!<br>" end if
location=strchange(trim(request.form("location")))
if location="" then errormax=errormax&"排名不能为空!<br>" end if
pass=strchange(trim(request.form("pass")))
if pass<>1 then pass=0 end if
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")
if len(errormax)>0 then
errormax="<br><br><font style='color: #FF0000; font-size: 10pt'>抱歉:以下字段数据需要修改。<br>" & errormax &"</font>"
else
set rs_updata=server.CreateObject("adodb.recordset")
rs_updata.open "select * from 省份 where 编号="&id,conn,3,3
rs_updata("省份")=pro
rs_updata("省份全称")=proall
rs_updata("省份简称")=prosim
rs_updata("排名")=location
rs_updata("审核")=pass
rs_updata("修改")=now()&"|"&userip
rs_updata.update
rs_updata.close
set rs_updata=nothing
end if
end if
if updata="reset" then
dim rs_reset,i
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")
set rs_reset=server.CreateObject("adodb.recordset")
rs_reset.open "select * from 省份 order by 排名 asc",conn,3,3
i=1
Do while Not rs_reset.eof and not rs_reset.bof
rs_reset("排名")=i
rs_reset("修改")=now()&"|"&userip
rs_reset.update
i=i+1
rs_reset.MoveNext
Loop
rs_reset.close
set rs_reset=nothing
end if
set rs=server.CreateObject("adodb.recordset")
select case order
case "notype"
rs.open "select * from 省份 where 审核=0 order by 排名 asc",conn,1,1
msg="未审核省份"
case "yestype"
rs.open "select * from 省份 where 审核=1 order by 排名 asc",conn,1,1
msg="已审核省份"
case else
rs.open "select * from 省份 order by 排名 asc",conn,1,1
msg="<b>所有省份</b>"
end select
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>【后台管理】省份管理 - <%=sitename%></title>
<link href="admin.css" rel="stylesheet" type="text/css">
<SCRIPT language='javascript' src='inc/pop.js'></SCRIPT>
</head>
<body leftmargin="0" topmargin="0">
<div align="center">
<!--#include file="admin_top_city.asp" -->
<br>
<table width="90%" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
<tr>
<td height="40" align="center" style="line-height: 16pt"><b>省份管理</b></td>
</tr>
</table>
<table width="90%" border="0" cellpadding="5" cellspacing="1" bgcolor="#DFEAF2">
<tr bgcolor="#333333">
<td height="20" bgcolor="#FFFFFF" colspan="2">选择:
<a href="?">所有省份</a> ※
<a href="?order=yestype">已审核省份</a>|<a href="?order=notype">未审核省份</a> ※
<a href="?updata=reset">重新计算</a>
</td>
</tr>
<tr bgcolor="#333333">
<td bgcolor="#FFFFFF" colspan="2" height="25"><%response.write msg&" 共有<font color='red'>"&rs.recordcount& "</font>条记录"&errormax%></td>
</tr>
</table>
<hr color="#000000" width="90%">
<table border="0" cellpadding="3" width="90%" bgcolor="#99CCFF" height="35" style="border: 1px solid #3399FF">
<tr>
<td width="70" align="center">编号</td>
<td width="70" align="center">省份</td>
<td width="125" align="center">省份全称</td>
<td width="70" align="center">省份简称</td>
<td width="70" align="center">排名</td>
<td width="30" align="center">审核</td>
<td width="50" align="center">提交</td>
<td width="220" align="center">修改</td>
<td width="*" align="center">常用选项</td>
</tr>
</table>
<%Do while Not rs.eof and not rs.bof%>
<table border="0" cellpadding="3" width="90%" onMouseOver='this.style.backgroundColor="#DFEAF2"' onMouseOut='this.style.backgroundColor=""' <%if cint(rs("编号"))=cint(id) then response.write "style='border: 1px solid #FF0000'" end if%>>
<form method="POST" action="?updata=ok&id=<%=rs("编号")%>" name="pro">
<tr>
<td width="70" align="center">【<%=rs("编号")%>】</td>
<td width="70" align="center"><input type="text" name="pro" size="8" value="<%=rs("省份")%>"></td>
<td width="125" align="center"><input type="text" name="proall" size="16" value="<%=rs("省份全称")%>"></td>
<td width="70" align="center"><input type="text" name="prosim" size="8" value="<%=rs("省份简称")%>"></td>
<td width="70" align="center"><input type="text" name="location" size="8" value="<%=rs("排名")%>"></td>
<td width="30" align="center"><input type="checkbox" name="pass" value="1" <%if rs("审核")=1 then response.write "checked"%>></td>
<td width="50" align="center"><input type="submit" value="提交" name="sub"></td>
<td width="220"><%=rs("修改")%></td>
<td width="*"> <a href="admin_city.asp?order=pro&pro=<%=rs("省份")%>">该地区所有城市</a> </td>
</tr>
</form>
</table>
<%
rs.MoveNext
Loop
rs.close
set rs=nothing
%>
<hr color="#000000" width="90%">
<table width="90%" border="0" cellpadding="10" cellspacing="0">
<tr>
<td align="right" style="line-height: 16pt"><a href="#">>><span lang="zh-cn">返回</span>TOP<<</a></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -