📄 admin_sysprovinceandcity.asp
字号:
<!--#include file="../../conn/conn.asp" -->
<!--#include file="../../Inc/Commoncode.asp" -->
<!--#include file="../checkvalid.asp" -->
<%
If Not FRAdminLevel(102) Then
Call ErrorMsg()
End If
%>
<%
fid=request("fid")
if request("step")="add" then
province_city=request("province_city")
enprovince_city=request("enprovince_city")
if province_city="" then
response.write "<script>alert('对不起,中文省份不能为空!');location.href='javascript:history.back()';</script>"
Response.End
end if
if enprovince_city="" then
response.write "<script>alert('对不起,英文省份不能为空!');location.href='javascript:history.back()';</script>"
Response.End
end if
sql="select * from JOB_provinceandcity"
set rs=Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,3
rs.addnew
rs("province_city")=province_city
rs("enprovince_city")=enprovince_city
rs("fid")=fid
rs.Update
rs.Close
set rs=nothing
Response.Redirect "Admin_Sysprovinceandcity.asp?fid="&fid&"&ceng="&request("ceng")
end if
if request("step")="del" then
conn.execute("delete from JOB_provinceandcity where fid="&request("id"))
conn.execute("delete from JOB_provinceandcity where id="&request("id"))
Response.Redirect "Admin_Sysprovinceandcity.asp?fid="&fid&"&ceng="&request("ceng")
end if
if request("step")="alldel" then
sql="select * from JOB_provinceandcity order by id desc"
set rs=Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if not rs.eof then
do while not rs.eof
if rs("fid")<>0 then
sqlt="select * from JOB_provinceandcity where id="&rs("fid")&" order by id desc"
set rst=Server.CreateObject("ADODB.Recordset")
rst.open sqlt,conn,1,1
if (rst.eof and rst.bof) then
conn.execute("delete from JOB_provinceandcity where fid="&rs("fid")&"")
end if
rst.close
end if
rs.movenext
loop
end if
rs.close
set rs=nothing
Response.Redirect "Admin_Sysprovinceandcity.asp?fid="&fid&"&ceng="&request("ceng")
end if
if request("step")="modi" then
province_city=request("province_city")
enprovince_city=request("enprovince_city")
if province_city="" then
response.write "<script>alert('对不起,中文省份不能为空!');location.href='javascript:history.back()';</script>"
Response.End
end if
if enprovince_city="" then
response.write "<script>alert('对不起,英文省份不能为空!');location.href='javascript:history.back()';</script>"
Response.End
end if
conn.execute("update JOB_provinceandcity set province_city='"&province_city&"',enprovince_city='"&enprovince_city&"' where id="&request("id"))
Response.Redirect "Admin_Sysprovinceandcity.asp?fid="&fid&"&ceng="&request("ceng")
end if
if request("step")="order" then
set rs=server.CreateObject("adodb.recordset")
sql="select date from JOB_provinceandcity where id="&request("id")
rs.open sql,conn,1,3
rs("date")=now()
rs.update
rs.close
set rs=nothing
Response.Redirect "Admin_Sysprovinceandcity.asp?fid="&fid&"&ceng="&request("ceng")
end if
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>系统区域信息设置</title>
<LINK href=../css/style.css rel=stylesheet type="text/css">
</head>
<body>
<table width="98%" border="0" cellspacing="1" cellpadding="2" align=center class="tableBorder">
<tr>
<th height=25 colspan="2" class="tableHeaderText">系统区域信息管理 </th>
</tr>
<tr>
<td colspan="2"><p><B>注意</B>:<BR>
①区域分类直接与会员及会员发布的信息相关联,删除上级分类同时将删除该类别下的所有小分类以及所有相关的信息。<BR>
</td>
</tr>
<%
ceng=request("ceng")
if request("fid")="" then
fid=0
else
fid=request("fid")
end if
if fid=0 then
ceng=1
end if%>
<tr>
<td width="10%" height=25><B>操作选项</B></td>
<td><a href="Admin_Sysprovinceandcity.asp?fid=0">返回一级分类 </a>| <a href="Admin_Sysprovinceandcity.asp?fid=<%=fid%>&step=alldel&ceng=<%=ceng%>">清理垃圾数据</a> | [<a href="javascript:location.reload()">刷新页面</a>] </td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
<%if fid<>0 then
set rsw=conn.execute("select province_city from JOB_provinceandcity where id="&fid)
province_city=rsw("province_city")
rsw.close
set rsw=nothing
%><tr>
<th class="tableHeaderText" colspan=4 height=25><%=province_city%>各<%
select case ceng
case 2
response.Write "城市"
case 3
response.Write "县区"
end select
%>列表</th>
</tr>
<%else%>
<tr>
<th class="tableHeaderText" colspan=4 height=25>一级区域列表</th>
</tr>
<%end if%>
<tr align="center">
<%
sql="select * from JOB_provinceandcity where fid="&fid&" order by date desc"
set rs=Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if (rs.eof and rs.bof) then
response.write "<td height=20>暂无内容</td>"
else
n=0
do while not rs.eof
n=n+1%>
<td height="25" align="left"><%=rs("province_city")%> (<%=rs("enprovince_city")%>) </td><td align="center"><input name="Submit" type="button" class="inputs" onClick="window.location='Admin_Sysprovinceandcity.asp?fid=<%=fid%>&id=<%=rs("id")%>&step=order&ceng=<%=ceng%>'" value="排序">
<%if ceng<3 then%><input name="Submit1" type="button" class="inputs" id="Submit1" onClick="window.location='Admin_Sysprovinceandcity.asp?fid=<%=rs("id")%>&ceng=<%=ceng+1%>'" value="子类">
<%end if%>
<input name="Submit2" type="button" class="inputs" id="Submit2" onClick="window.location='Admin_Sysprovinceandcity.asp?fid=<%=fid%>&id=<%=rs("id")%>&step=mod&ceng=<%=ceng%>'" value="修改">
<input name="Submit3" type="button" class="inputs" id="Submit3" onClick="window.location='Admin_Sysprovinceandcity.asp?fid=<%=fid%>&id=<%=rs("id")%>&step=del&ceng=<%=ceng%>'" value="删除">
</td>
<%if n mod 2=0 then response.write"</tr><tr align=center>"
rs.movenext
loop
end if
rs.close
set rs=nothing%>
</tr>
</table>
<%if request("step")<>"mod" then%>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
<tr>
<th class="tableHeaderText" colspan=5 height=25>新增分类</th>
</tr>
<form name="addpc" action="Admin_Sysprovinceandcity.asp?step=add&fid=<%=fid%>&ceng=<%=ceng%>" method="post">
<tr>
<td width="15%"><div align="right">中文名称:</div></td>
<td width="20%"><input type="text" name="province_city"></td>
<td width="15%"><div align="right">英文名称:</div></td>
<td width="20%"><input name="enprovince_city" type="text"></td>
<td width="15%"><input name="Submit4" type="submit" class="inputs" value="提交"></td>
</tr>
</form>
</table>
<%else%>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
<tr>
<th class="tableHeaderText" colspan=5 height=25>修改分类</th>
</tr>
<%id=request("id")%>
<form name="addpc" action="Admin_Sysprovinceandcity.asp?step=modi&fid=<%=fid%>&id=<%=id%>&ceng=<%=ceng%>" method="post">
<% set rsw=conn.execute("select * from JOB_provinceandcity where id="&id)%>
<tr>
<td width="15%"><div align="right">中文名称:</div></td>
<td width="20%"><input type="text" name="province_city" value="<%=rsw("province_city")%>"></td>
<td width="15%"><div align="right">英文名称:</div></td>
<td width="20%"><input name="enprovince_city" type="text" value="<%=rsw("enprovince_city")%>"></td>
<td width="15%"><input name="Submit4" type="submit" class="inputs" value="提交"></td>
</tr>
<%rsw.close
set rsw=nothing
%>
</form>
</table>
<%end if%>
<!--#include file="../inc/copy.asp" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -