⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 place_cha.asp

📁 信息管理系统!很简单的课程设计!类似于城市信息交换的网站!
💻 ASP
字号:
<%'注意:防止多次发送,以及防止非法登录


if session("admin_login")<>true then
	response.Write("<html><link href=../style.css rel=stylesheet type=text/css><body><table height=100% width=100% align=center valign=middle><tr><td align=center valign=center><p align=center>您没有登录或者已经超时!!请点击下面的链接,进入登录界面!!</p><p align=center>--&gt;&gt; <a href=../login/login.asp>登录</a> &lt;&lt;--</p></td></tr></table></body></html>")
	response.end
end if
%>

<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../conn/fun.asp"-->
<!--#include file="../../conn/fso.asp"-->
<%
place_id = TxtToLng("place_id",3)
city_id = TxtToLng("city_id",3)
city_idb = city_id
area_id = TxtToLng("area_id",3)
area_idb = area_id
action = DellrBlank("action",2)

if action = "change" then
	
	place_name = DellrBlank("place_name",1)
	if place_name = "" then
		response.Write("<script>window.alert(""请填写区域名称!!"");history.back()</script>")
		conn.close()
		set conn = nothing
		response.end()
	end if
	place_city = TxtToLng("city",1)
	place_area = TxtToLng("area",1)
	place_id = clng(request("place_id"))
	
	SQL = "update place set place_name='" & place_name & "',place_city=" & place_city & ",place_area=" & place_area & " where place_id=" & place_id
	conn.execute(SQL)
	
	call MakeCityArea
	call MakeCityArea02
	call MakeAreaPlace
	conn.close
	set conn = nothing
	
	response.Write("<script language='javascript'>window.opener.location.href='place.asp?city_id="&city_idb&"&area_id="&area_idb&"';window.close();</script>")
	response.End()
end if

set rs = conn.execute("select * from city_area_place where place_id=" & place_id)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="../../conn/cityarea.js"></script>
<title>区域信息修改</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style></head>
<script language="javascript">
function check()
{
	if(document.formaddplace.place_name.value=='')
	{
		alert("请填写区域名称!!");
		return false;
		document.formaddplace.place_name.focus();
	}
}

</script>
<body>
		<table width="100%" height="100%"  border="0" cellpadding="4" cellspacing="1" bgcolor="#336633">
		<form name="formaddplace" method="post" action="?action=change" onSubmit="return check()">
        		<tr bgcolor="#FFFFFF">
        				<td height="3" colspan="2" background="../Images/topbg.gif">区域管理 &gt;&gt; 修改区域信息</td>
   				</tr>
        		<tr bgcolor="#FFFFFF">
        				<td width="28%" height="25">区域名称:</td>
        				<td width="72%"><input type="text" name="place_name" class="txttable" value="<%=rs("place_name")%>">
   						<input type="hidden" name="place_id" value="<%=place_id%>">
                        <input name="city_id" type="hidden" value="<%=city_id%>">                        <input name="area_id" type="hidden" value="<%=area_id%>"></td>
   				</tr>
        		<tr bgcolor="#FFFFFF">
        				<td height="25">所属城市:</td>
   				        <td width="72%"><select name="city" onChange=chsel()>
   				        		<option value="<%=rs("id")%>" selected><%=rs("city_name")%></option>
								<%call ListCity%>
		        		</select></td>
        		</tr>
        		<tr bgcolor="#FFFFFF">
        				<td height="25">所属地区:</td>
   				        <td width="72%"><select name="area">
                        		<option value="<%=rs("area_id")%>" selected><%=rs("area_name")%></option>
                        		</select></td>
        		</tr>
        		<tr align="center" bgcolor="#FFFFFF">
        				<td height="25" colspan="2"><input type="submit" name="Submit" value="修改" class="button01"> 
   						<input type="reset" name="Submit2" value="重置" class="button01"> 
   						<input type="button" name="Submit3" value="关闭" onclick="window.close()" class="button01"></td>
		        </tr>
   		</form>
		</table>

</body>
</html>
<%
rs.close
set rs = nothing
conn.close
set conn = nothing
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -