<!--#include file="inc/conn.asp"-->
<!--#include file="inc/Function.asp"-->
<%
Session.CodePage=65001
Response.Charset="UTF-8"
Call ConnectionDataBase()
Action = Request("Action")
Select Case Action
	Case "GetCity"
		Call GetCity
	Case "GetArea"
		Call GetArea
End Select

Sub GetCity()
	id = Request.QueryString("id")
	Call ChkNumber(ID,"0{$}<option value='0'>参数错误</option>")
	Sql="Select cityid,city From T_City Where father='"& id &"'"
	SetRs Rs,Sql,conn,1,1
	IF Not Rs.Eof Then
		cityid=Rs("cityid")
		Do While Not Rs.eof
			Str=Str & "<option value='"& Rs("cityid") &"'>"& Rs("city") & "</option>"
		Rs.movenext
		loop
	End IF
	DisRs Rs
	Call CloseDatabase
	Response.Write cityid & "{$}" & Str
End Sub

Sub GetArea()
	id = Request.QueryString("id")
	Call ChkNumber(ID,"<option value='0'>参数错误</option>")
	Sql="Select areaid,area From T_Area Where father='"& id &"'"
	SetRs Rs,Sql,conn,1,1
	IF Not Rs.Eof Then
		Do While Not Rs.eof
			Str=Str & "<option value='"& Rs("areaid") &"'>"& Rs("area") & "</option>"
		Rs.movenext
		loop
	End IF
	DisRs Rs
	Call CloseDatabase
	Response.Write Str
End Sub
%>