<%
class cls_bixin
     public adminid,adminname,adminpswd,level
	 public member_id,username,password,zclx
	 public userip
	 public act
Private Sub Class_Initialize()
       
		act=request("action")		
		
		
		
		If IsNumeric(member_id) = 0 Or member_id="" Then member_id=0
		member_id = Clng(member_id)
		userip = getIP()
		
		
End Sub
function showtitle(n,num,id)
response.Write"<table width='98%' border='0' align='center' cellpadding='0' cellspacing='0'>"
			rs.open"select top "&n&" * from c_Article where ClassID="&id&" order by orderid desc,id desc",conn,1,1
			 if not rs.eof and not rs.bof then			
			 do while not rs.eof 
response.Write"<tr>"               
'response.Write"<td width='11%' height='24' align='center'>"                    
'response.Write"<img src='images/d.jpg' width='9' height='10' />"
'response.Write"</td>"
response.Write"<td width='70%' class='hg'>"
response.Write"·<a href=newshow.asp?Cid="&rs("ClassID")&"&pid="&rs("id")&" target='_blank'>"
if len(rs("title"))<num then
	response.Write rs("title")
else
	response.Write left(rs("title"),num)&".."
end if
response.Write"</a>"
response.Write"</td><td width='30%'>["
GetDateCode2(rs("Updatetime"))
response.Write"]</td>"
response.Write"</tr>" 
response.Write"<tr>"                      
response.Write" <td colspan='2' background='images/x.jpg'><img src='images/x.jpg' width='34' height='6' /></td>"                  
response.Write"</tr>"
              rs.movenext
              loop
             else
			 	response.Write "<font color=red style='font-size:12px'>暂未添加内容！</font>"
			  end if 	
			  rs.close     
response.Write"</table>"                   
end function
function showtitle2(n,num,id)
response.Write"<table width='95%' border='0' align='center' cellpadding='0' cellspacing='0'>"
			rs.open"select top "&n&" * from c_Article where ClassID="&id&" order by id desc",conn,1,1
			 if not rs.eof and not rs.bof then			
			 do while not rs.eof 
response.Write"<tr>"               
response.Write"<td width='11%' height='24' align='center'>"                    
response.Write"<img src='images/d.jpg' width='9' height='10' />"
response.Write"</td>"
response.Write"<td width='89%' class='hg'>"
response.Write"<a href=newshow.asp?Cid="&rs("ClassID")&"&pid="&rs("id")&">"
if len(rs("title"))<num then
	response.Write rs("title")
else
	response.Write left(rs("title"),num)&".."
end if
response.Write"</a>"
response.Write"</td>"
response.Write"</tr>" 
response.Write"<tr>"                      
response.Write" <td colspan='2' background='images/x.jpg'><img src='images/x.jpg' width='34' height='6' /></td>"                  
response.Write"</tr>"
              rs.movenext
              loop
             else
			 	response.Write "<font color=red style='font-size:12px'>暂未添加内容！</font>"
			  end if 	
			  rs.close     
response.Write"</table>"                   
end function
					
					
public Function GetDateCode2(sDate)  
	Dim sReturn
	If Not IsDate(sDate) Or IsNull(sDate) Then sDate = Now()
	sReturn=Year(sDate) &"-"& Right("0" & Month(sDate),2) &"-"& Right("0" & Day(sDate),2)	
	response.write sReturn
End Function

public Function showclstitle(id)  
	rs.open"select ClassName from ClassList where ClassID="&id,conn,1,1
			 if not rs.eof and not rs.bof then			
			 	response.Write rs("classname")
             else
			 	response.Write "<font color=red style='font-size:12px'>暂未添加栏目！</font>"
			 end if 	
			 rs.close  
End Function


'验证后台管理员登陆
Public Sub chkadmin()

        dim logined,loginrs
		logined=false
        adminname=session(cookies_name&"adminname")
		adminpswd=session(cookies_name&"adminpswd")
		if adminname="" or adminpswd="" then logined=true
	
		set loginrs=execute("select adminid,[level] from admin where adminname='"&adminname&"' and adminpswd='"&adminpswd&"'")
		
		if loginrs.eof then
		 logined=true
		 else
		adminid=loginrs(0)
		level=loginrs(1)
		end if
		
		loginrs.close
		set loginrs=nothing
		
		If logined Then
		response.Write("<script>alert('您没有登陆或登陆超时！请重新登陆！');parent.location.href='adminlogin.asp'</script>")
		response.End()
		end if	
		
End Sub
'验证管理员是否登陆!返回值为bool
Public Function chkadmined()
        dim logined,loginrs
		logined=true
        adminname=session(cookies_name&"adminname")
		adminpswd=session(cookies_name&"adminpswd")
		if adminname="" or adminpswd="" then logined=true
		set loginrs=execute("select adminid from admin where adminname='"&adminname&"' and adminpswd='"&adminpswd&"'")
		if loginrs.eof then
		 logined=false
		End if
		loginrs.close
		set loginrs=nothing
		chkadmined=logined
			
End Function

'验证前台会员登陆
Public Function chklogin()
        dim logined,loginrs
		logined=true
        username=Request.Cookies(cookies_name)("username")
		password=Request.Cookies(cookies_name)("password")
		
  if username="" and password="" then   
		logined=false
  else
      set loginrs=execute("select member_id,zclx from c_members where username='"&username&"' and password='"&password&"' and sh=0")
		if loginrs.eof then
		   logined=false
		else
		member_id=loginrs(0)
		zclx=loginrs(1)
		end if
		loginrs.close
		set loginrs=nothing
  end if
		chklogin=logined	
End Function


'运行数据库
Public Function Execute(Command)
		If Not IsObject(Conn) Then ConnectionDatabase		
			On Error Resume Next
			Set Execute = Conn.Execute(Command)
			If Err Then
				err.Clear
				Set Conn = Nothing
				Response.Write "<h3>数据库连接错误！</h3><p>（1）64位系统的用户请在iis应用程序池开启对32位的支持</p><p>（2）网站目录给users用户完全控制的权限</p><p>（3）C:\windows\temp文件夹给everyone完全控制的权限</p>"
				Response.End
			End If
End Function
  '得到来访页面网址
  public function tmpstr()
  
  Tmpstr = Request.ServerVariables("HTTP_REFERER")  
  
  end function
 
  '得到当前页面网址
Public Function geturl()
	dim str,host,url,keyword,full  
       str="http://"  
       host = Request.ServerVariables("HTTP_HOST")  
       url = Request.ServerVariables("PATH_INFO") '或url  
       keyword = Request.ServerVariables("QUERY_STRING")  
       if keyword <> "" then  
       full = str&host&url&"?"&keyword  
      else  
       full = str&host&url  
       end if
      geturl=full
End Function
Public Sub SaveCookie(username, password, CookieDate)
		select Case CookieDate
			Case 0
				'not save
			Case 1
				Response.Cookies(cookies_name).Expires = Date + 1
			Case 2
				Response.Cookies(cookies_name).Expires = Date + 31
			Case 3
				Response.Cookies(cookies_name).Expires = Date + 365
			Case Else
		End select
		Response.Cookies(cookies_name).Path = webdir
		'不加密用户名,使登录的时候直接返回用户名.减少用户输入.
		Response.Cookies(cookies_name)("username") = username
		Response.Cookies(cookies_name)("password") = password
		
	End Sub
	
'插入数据时 该表格的自动编号
Public Function getid(tname)
if tname="" or isnull(tname) then oa.msgshow("请在d_table中插入该表值")
dim trs
if not isobject(conn) then connectiondatabase()
set trs=server.createobject("adodb.recordset")
trs.open "select tid from d_table where tname='"&tname&"'",conn,1,3
if not trs.eof then 
'response.Write("update d_table set tid=tid+1 where tname='" & tname & "'")
execute("update d_table set tid=tid+1 where tname='" & tname & "'")
getid=trs(0)+1
else

 execute("insert into d_table (tname,tid) values ('" & tname & "',1)")
 getid=1
end if
trs.close
set trs=nothing
End Function

'通过查询语句得到结果集
public function getrow(sql)
dim arryrs
set arryrs=oa.execute(sql)
if not arryrs.eof then
getrow=arryrs.getrows()
else
getrow=null
end if
arryrs.close
set arryrs=nothing
End function

'防止SQL注入
public Function sqlrequest(sSql)
    sSql=request(ssql)
	If ISNull(sSql) Then Exit Function
	sSql=Trim(sSql)
	If sSql="" Then Exit Function
	sSql=Replace(sSql,Chr(0),"")
	sSql=Replace(sSql,"'","‘")
	sSql=Replace(sSql," ","")
	sSql=Replace(sSql,"%","％")
		ssql=replace(sSql, ">", "》")
	ssql= replace(sSql, "<", "《")	
	sqlrequest=sSql
End Function
'心静如水修改,脏话过滤代码开始
public sub checkbad(content)
  dim message,bad,max,i
  message="fuck/kao/我靠/我操/我日/你妈/去死/法轮功/大法/美女/色情/情色/性爱/性交/口交/做爱/作爱/激情"
  bad=split(message,"/")
  max=ubound(bad)
  for i=0 to max
   if instr(content,bad(i))<>0 then
    response.Write("<script>alert('你输入的内容被管理员禁止\n\n发布失败');history.go(-1)</script>")
    response.End()
   end if
  next
end sub
'得到访问者IP
public Function getip() 
		Dim strIPAddr 
		If Request.ServerVariables("HTTP_X_FORWARDED_FOR") = "" OR InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), "unknown") > 0 Then 
			strIPAddr = Request.ServerVariables("REMOTE_ADDR") 
		ElseIf InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ",") > 0 Then 
			strIPAddr = Mid(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), 1, InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ",")-1) 
			actforip=Request.ServerVariables("REMOTE_ADDR")
		ElseIf InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ";") > 0 Then 
			strIPAddr = Mid(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), 1, InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ";")-1)
			actforip=Request.ServerVariables("REMOTE_ADDR")
		Else 
			strIPAddr = Request.ServerVariables("HTTP_X_FORWARDED_FOR") 
			actforip=Request.ServerVariables("REMOTE_ADDR")
		End If 
		getip = Trim(Mid(strIPAddr, 1, 30))
End Function 
  private function JoinChar(strUrl)'向地址中加入 ? 或 &
	if strUrl="" then
		JoinChar=""
		exit function
	end if
	if InStr(strUrl,"?")<len(strUrl) then 
		if InStr(strUrl,"?")>1 then
			if InStr(strUrl,"&")<len(strUrl) then 
				JoinChar=strUrl & "&"
			else
				JoinChar=strUrl
			end if
		else
			JoinChar=strUrl & "?"
		end if
	else
		JoinChar=strUrl
	end if
end function

'将内容转化为运行格式
public function uncoder(fString)
	if not isnull(fString) then
		fString = replace(fString, "&gt;", ">")
		fString = replace(fString, "&lt;", "<")
		fString = Replace(fString, "&nbsp;",CHR(32))
		fString = Replace(fString, "&nbsp;",CHR(9))
		fString = Replace(fString, "&quot;",CHR(34))
		fString = Replace(fString, "&#39;",CHR(39))
		fString = Replace(fString, "",CHR(13))
		fString = Replace(fString, "</P><P> ", CHR(10) & CHR(10))
		fString = Replace(fString, "<BR> ",CHR(10) )
		uncoder = fString
	end if
end function
'将内容转化为HTML格式
public function coder(fString)
	if not isnull(fString) then
		fString = replace(fString, ">", "&gt;")
		fString = replace(fString, "<", "&lt;")
		fString = Replace(fString, CHR(32), "&nbsp;")
		fString = Replace(fString, CHR(9), "&nbsp;")
		fString = Replace(fString, CHR(34), "&quot;")
		fString = Replace(fString, CHR(39), "&#39;")
		fString = Replace(fString, CHR(13), "")
		fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
		fString = Replace(fString, CHR(10), "<BR> ")
		coder = fString
	end if
end function

 '去掉非文字内容以便取得前N位字符的内容
public Function GetInnerText(strHtml)

        dim regEx

        Set regEx = New RegExp

        regEx.Pattern = "<\/?[^>]*>"

        regEx.Global = True

        regEx.IgnoreCase = True

        GetInnerText = regEx.Replace(strHtml,"")

        Set regEx = Nothing
		GetInnerText=replace(GetInnerText," ","")
		GetInnerText=replace(GetInnerText,"&nbsp;","")

End Function

public sub msgshow(msg)
response.Write("<script>alert('"&msg&"');history.go(-1)</script>")
response.end
end sub

'弹出提示框，返回指定页面
public sub msgshowurl(msg,url)
response.Write("<script>alert('"&msg&"');location.href='"&url&"'</script>")
response.end
end sub
'弹出提示框，关闭窗口
public sub msgclose(msg)
response.Write("<script>alert('"&msg&"');window.close()</script>")
response.end
end sub

'弹出页面操作，刷新母页面
public sub msgopenshow(msg)
response.Write("<script>alert('操作成功');window.opener.location.reload();window.close()</script>")
response.end
end sub

'判断包含双字节字符的字符串长度：汉字一个算两个，英文一个算一个 
public Function getStrLen(str)
dim x,y,i
x = len(str)
y = 0 
for i = 1 to x 
if asc(mid(str,i,1))<0 or asc(mid(str,i,1))>255 then
y = y + 2 '双字节 
else
y = y + 1'ascii码字符 
end if 
next
getStrLen = y 
End Function

'来源页面是否是来自于本网站
Public Function chkhost()
		Dim server_v1, server_v2
		chkhost = False
		
		server_v1 = CStr(Request.ServerVariables("HTTP_REFERER"))
		server_v2 = CStr(Request.ServerVariables("SERVER_NAME"))
		If server_v1 = GetUrl Then
'			Exit Function
		End If
		If Mid(server_v1, 8, Len(server_v2)) = server_v2 Then chkhost = True
	End Function
	
'检查字符串是否为
'typ数字英文和"_"组合
'none除特殊字符外的所有
'num数字，电话
'gb32是否为汉字
'email是否为email
Public Function chkchar(char,typ)
		Dim  i,void,c,regEx
		chkchar = True
		If Len(char) = 0 Then
			chkchar = true
			Exit Function
		End If
	  select case typ
	         case "char"
		void="0123456789abcdefghijklmnqporstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_"	 
		For i = 1 To Len(char)
			c = LCase(Mid(char, i, 1))
			If InStr(void, c) <= 0 Then
				chkchar = False
				Exit Function
			End If
		Next
			case "none"
		void="~!@#$%^&*_+/., \?<>;\``-=/.,;"
		For i = 1 To Len(char)
			c = LCase(Mid(char, i, 1))
			If InStr(void, c) > 0 Then
				chkchar = False
				Exit Function
			End If
		next
		    case "gb32"
		void="0123456789abcdefghijklmnqporstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~!@#$%^&*( )_+/., \?<>;\1``-=/.,;"
		For i = 1 To Len(char)
			c = LCase(Mid(char, i, 1))
			If InStr(void, c) > 0 Then
				chkchar = False
				Exit Function
			End If
		next
		  case "num"
		void="0123456789－-,"
		For i = 1 To Len(char)
			c = LCase(Mid(char, i, 1))
			If InStr(void, c) <= 0 Then
				chkchar = False
				Exit Function
			End If
		next
		 
		  case "email"
		if instr(char,".")<4 or instr(char,"@")<2 then
		chkchar=false
		end if
		
	   end select
     
End Function

public Function GetDateCode(sDate,sMode)
	Dim sReturn
	If Not IsDate(sDate) Or IsNull(sDate) Then sDate = Now()
	sReturn=Year(sDate) & Right("0" & Month(sDate),2) & Right("0" & Day(sDate),2)
	select Case sMode
		Case "1"
			sReturn=sReturn & Right("0" & Hour(sDate),2)
		Case "2"
			sReturn=sReturn & Right("0" & Hour(sDate),2) & Right("0" & Minute(sDate),2)
		Case "3"
			sReturn=sReturn & Right("0" & Hour(sDate),2) & Right("0" & Minute(sDate),2) & Right("0" & Second(sDate),2)
	End select
	GetDateCode=sReturn
End Function

public function getweburl(wname)
 select case wname
        case "新闻类别"
		getweburl="news.asp"
		case "产品类别"
		getweburl="productlist.asp"
		case "留言类别"
		getweburl="guestbook.asp"
 end select
end function
'根据classid得到栏目名称	
public function getclassname(classid)
    dim rsclassname
    set rsclassname=execute("select classname from classlist where classid="&classid)
	if rsclassname.eof or rsclassname.bof then
	getclassname="错误参数"
	else
	getclassname=rsclassname(0)
	end if
	rsclassname.close
	set rsclassname=nothing
end function


'栏目添加是的下拉菜单
public sub Class_Option(CurrentID,RootID)
	dim rsClass,sqlClass,strTemp,tmpDepth,i
	
	if Rootid=0 then
		sqlclass="select * from classlist where class_link is null order by RootID,OrderID"
	elseif RootID<>0 then
			sqlclass="select * from classlist where rootid="&rootid&" and class_link is null and Depth=0 order by RootID,OrderID"
	end if	
	
    set rsClass=oa.execute(sqlclass)
	if rsClass.eof and rsClass.bof then

	else
		do while not rsClass.eof
			response.write"<option value='" & rsClass("ClassID") & "'"
	
			if trim(rsClass("ClassID"))=trim(CurrentID) then
				 response.write " selected"
			end if
			response.write">"
				response.write rsClass("ClassName")
			response.write "</option>"
			if rsClass("child")<>0 then
			set rs=oa.execute("select classid,classname,class_cell,class_show,class_sfdh,class_Row,class_link,class_pic,child,rootid,depth,nextid from classlist where ParentID="&rsClass("classid")&" and Depth=1 and class_link is null order by rootid,orderid")
do while not rs.eof
response.write "<option value='" & rs("ClassID") & "'"
	
			if trim(rs("ClassID"))=trim(CurrentID) then
				response.write " selected"
			end if
			response.write  ">"
			if rs("NextID")>0 then
							response.write  "├&nbsp;"
						else
							response.write "└&nbsp;"
						end if
				response.write  rs("ClassName")
			response.write  "</option>"
					if rs("child")<>0 then
			set rc=oa.execute("select classid,classname,class_cell,class_show,class_sfdh,class_Row,class_link,class_pic,child,rootid,depth,nextid from classlist where ParentID="&rs("classid")&" and Depth=2 and class_link is null order by rootid,orderid")
do while not rc.eof
response.write "<option value='" & rc("ClassID") & "'"
	
			if trim(rc("ClassID"))=trim(CurrentID) then
				response.write " selected"
			end if
			response.write  ">"
			if rc("NextID")>0 then
							response.write  "│├&nbsp;"
						else
							response.write "│└&nbsp;"
						end if
				response.write  rc("ClassName")
			response.write  "</option>"
			
	rc.movenext 
loop
rc.close
set rc=nothing
			end if
	rs.movenext 
loop
			end if
			
			rsClass.movenext
		loop
	end if
	rsClass.close
	set rsClass=nothing
end sub

'新闻产品添加的时候的下拉菜单
public sub article_Option(CurrentID,RootID)
		dim rsClass,sqlClass,strTemp,tmpDepth,i
	
	if Rootid=0 then
		sqlclass="select * from classlist where class_link is null order by RootID,OrderID"
	elseif RootID<>0 then
			sqlclass="select * from classlist where rootid="&rootid&" and class_link is null and Depth=0 order by RootID,OrderID"
	end if	
	
    set rsClass=oa.execute(sqlclass)
	if rsClass.eof and rsClass.bof then

	else
		do while not rsClass.eof
		
			if rsClass("child")>0 then
response.write "<option value=''"
else
response.write "<option value='" & rsClass("ClassID") & "'"
end if
	
			if trim(rsClass("ClassID"))=trim(CurrentID) then
				 response.write " selected"
			end if
			response.write">"
				response.write rsClass("ClassName")
			response.write "</option>"
			if rsClass("child")<>0 then
			set rf=oa.execute("select classid,classname,class_cell,class_show,class_sfdh,class_Row,class_link,class_pic,child,rootid,depth,nextid from classlist where ParentID="&rsClass("classid")&" and Depth=1 and class_link is null order by rootid,orderid")
do while not rf.eof
if rf("child")>0 then
response.write "<option value=''"
else
response.write "<option value='" & rf("ClassID") & "'"
end if
	
			if trim(rf("ClassID"))=trim(CurrentID) then
				response.write "selected"
			end if
			response.write  ">"
			if rf("NextID")>0 then
							response.write  "├&nbsp;"
						else
							response.write "└&nbsp;"
						end if
				response.write  rf("ClassName")
			response.write  "</option>"
					if rf("child")<>0 then
			set rc=oa.execute("select classid,classname,class_cell,class_show,class_sfdh,class_Row,class_link,class_pic,child,rootid,depth,nextid from classlist where ParentID="&rf("classid")&" and Depth=2 and class_link is null order by rootid,orderid")
do while not rc.eof
response.write "<option value='" & rc("ClassID") & "'"
	
			if trim(rc("ClassID"))=trim(CurrentID) then
				response.write " selected"
			end if
			response.write  ">"
			if rc("NextID")>0 then
							response.write  "│├&nbsp;"
						else
							response.write "│└&nbsp;"
						end if
				response.write  rc("ClassName")
			response.write  "</option>"
			
	rc.movenext 
loop
rc.close
set rc=nothing
			end if
	rf.movenext 
loop
			end if
			
			rsClass.movenext
		loop
	end if
	rsClass.close
	set rsClass=nothing
end sub



'省市联动菜单，需要js文件夹中的getcity.js
Public Function type_city(province, city)
		Dim tmpstr
		tmpstr = "	<select onchange='setcity();' name='province' id='province'>" & vbcrlf
		tmpstr = tmpstr & "		<option value="""">选择省份</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""安徽"">安徽</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""北京"">北京</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""重庆"">重庆</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""福建"">福建</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""甘肃"">甘肃</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""广东"">广东</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""广西"">广西</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""贵州"">贵州</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""海南"">海南</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""河北"">河北</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""黑龙江"">黑龙江</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""河南"">河南</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""香港"">香港</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""湖北"">湖北</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""湖南"">湖南</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""江苏"">江苏</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""江西"">江西</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""吉林"">吉林</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""辽宁"">辽宁</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""澳门"">澳门</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""内蒙古"">内蒙古</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""宁夏"">宁夏</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""青海"">青海</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""山东"">山东</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""上海"">上海</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""山西"">山西</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""陕西"">陕西</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""四川"">四川</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""台湾"">台湾</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""天津"">天津</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""新疆"">新疆</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""西藏"">西藏</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""云南"">云南</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""浙江"">浙江</option>" & vbcrlf
		tmpstr = tmpstr & "		<option value=""海外"">海外</option>" & vbcrlf
		tmpstr = tmpstr & "	</select>" & vbcrlf
		tmpstr = tmpstr & "	<select name=""city"">" & vbcrlf
		tmpstr = tmpstr & "	</select>" & vbcrlf
		tmpstr = tmpstr & "<script src="""&webdir&"js/getcity.js""></script>" & vbcrlf
		tmpstr = tmpstr & "<script>initprovcity('" & province & "','" & city & "');</script>" & vbcrlf
		type_city = tmpstr
	End Function
end class

%>