
 <% on error resume next
			  module=trim(SafeRequest("module"))
			   if module<>""  then
			  
			   %>
          <tr> 
            <td ><b>域名查询结果</b></td>
          </tr>
          <tr> 
            <td class=datagroup> 
              <table width="450" border="0" cellspacing="0" cellpadding="0" align=center>
                <tr> 
                  <td height=25>说明：请选中需要注册的域名，然后点击"注册"按钮进入下一步<br>
                    <br>
                  </td>
                </tr>
                <%
select case module
case 	"dme"					
    searchdomain=trim(SafeRequest("searchedDomainName"))
	If   searchdomain= "" Then
	   call errorpage(-2,"对不起，请填写您的域名!")
	elseif trim(SafeRequest("suffix"))="" then  
	   call errorpage(-2,"对不起，请选择域名后缀!")	
    end if	   
		'检查域名是否包含违法字符及是否符合规范
		Dim Bcheck,j,z
        Bcheck=true
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''检查域名格式        
        Z=0
        For J = 1 To Len(searchdomain)
			If Instr("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-", Mid(searchdomain,j,1)) > 0 Then
				If Mid(searchdomain,j,1)="." Then
					Z=z+1  'z为"."的个数
				End If
            Else
				call errorpage(-2,"您的域名不符合规范！")
			End If
		Next
        searchdomain=lcase(searchdomain)
		Varintlen=len(searchdomain)
		Strsearch=mid(searchdomain,1,1)

		If (strsearch="-") Then
			call errorpage(-2,"您的域名不符合规范！")
		End If
		If (len(SafeRequest("suffix")) <= 0) Then
			call errorpage(-2,"您没有选择根域名.")
		End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''查询字符串
		Strtemp=""
		Strcontent="entryclass:whois"+Vend
		Strcontent=Strcontent+"entrytype:dme"+Vend
		Strcontent =Strcontent+ "domainname"+Vend+"check"+Vend+"entityname:domains"+Vend
		Strtemp=SafeRequest("suffix")+","
		Intloop=0
		Dim Strdomains(40)

		Do While Instr(strtemp,",")>0
			Intpos=instr(strtemp,",")
			Strdomains(intloop) = Rtrim(searchdomain)+mid(strtemp,1,intpos-1)
			Strcontent = Strcontent+"domainname:" + Strdomains(intloop) + Vend
			Strtemp=mid(strtemp,intpos+2) '去掉逗号与空格
			Intloop=intloop+1
		Loop

		Strcontent= Strcontent+"."+ Vend

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''执行查询并返回结果 

		strreturn = hzsocket( Strcontent )
		Strcmp=mid(strreturn,1,4)
		If(strcmp<>"200 ") Then
			call errorpage(-2,"查询失败, 错误代码: "+ Vbcrlf+"<br>" + Strreturn)
		 Else
		''''''''''''
		response.write "<form action='dme_frm.asp' method=post><tr><td>"
											For I = 0 To Intloop-1
				Strresult=mid(strreturn,instr(strreturn, Strdomains(i)&":" ) +1)
				Strresult = Mid(strresult,len(strdomains(i)) + 1,15)
				thedomain=strdomains(i)&"____________________________"
				thedomain=replace(left(thedomain,30),"_","&nbsp;")
				
				If Instr(strresult,"notavailable")>0 Then
					response.write "<input type='radio' name='okdomain' value='"&strdomains(i)&"' disabled=1>&nbsp;&nbsp;"&thedomain&" （不可注册）<br>"
				  Else
					If Instr(strresult,"available")>0 Then
					response.write "<input type='radio' name='okdomain' value='"&strdomains(i)&"' >&nbsp;&nbsp;"&thedomain&" <font color=#ff0000>（可以注册）</font><br>"
					  Else
					response.write "<input type='radio' name='okdomain' value='"&strdomains(i)&"'  disabled=1>&nbsp;&nbsp;"&thedomain&" （查询失败）<br>"
					End If
				End If
			Next

		'''''''''''''
		   
			
			response.write"<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='submit' name='Submit' value=' 注 册 ' class=btxx><input type='reset' name='Submit' value=' 重 选 ' class=btxx><input type='button' name='Subsmit' onclick=""javascript:history.go(-1);"" value=' 重 查 ' class=btxx><br><br>"
		response.write "<input type='hidden' name='pstrotprd'  value="&SafeRequest("pstrotprd")&" ><input type='hidden' name='pstrotnme'  value='"&SafeRequest("pstrotnme")&"' ><input type='hidden' name='pstcolumn' value='"&SafeRequest("pstcolumn")&"' >"
			response.write "</td></tr></form>"

		end if
case "dmc"
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    searchdomain=trim(SafeRequest("searchedDomainName"))
if searchdomain="" then
call errorpage(-2,"对不起，请填写您的域名！")
elseif trim(SafeRequest("suffix"))="" then  
	   call errorpage(-2,"对不起，请选择域名后缀!")	
elseif instr(searchdomain,".")>0 or instr(searchdomain,",")>0   then
call errorpage(-2,"对不起，域名包含非法字符！")
end if


''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''查询字符串
		Strtemp=""
		Strcontent="entryclass:whois"+Vend
		Strcontent=Strcontent+"entrytype:dmc"+Vend
		Strtemp=SafeRequest("suffix")+","
		Intloop=0
		Dim strdmc(10)

		Do While Instr(strtemp,",")>0
			Intpos=instr(strtemp,",")
			strdmc(intloop) = Rtrim(searchdomain)+mid(strtemp,1,intpos-1)
			Strcontent = Strcontent+"domainname:" + strdmc(intloop) + Vend
			Strtemp=mid(strtemp,intpos+2) '去掉逗号与空格
			Intloop=intloop+1
		Loop

		Strcontent= Strcontent+"."+ Vend

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''执行查询并返回结果 
		strreturn = hzsocket( Strcontent )

		Strcmp=mid(strreturn,1,4)

If(strcmp<>"200 ") Then
			call errorpage(-2,"查询失败, 错误代码: "+ Vbcrlf+"<br>" + Strreturn)
		 Else
		''''''''''''
    response.write "<form action='dmc_frm.asp' method=post><tr><td>"
											For I = 0 To Intloop-1
				Strresult=mid(strreturn,instr(strreturn, strdmc(i)&":" ) +1)
				Strresult = Mid(strresult,len(strdmc(i)) + 1,15)
				thedomain=strdmc(i)&"____________________________"
				thedomain=replace(left(thedomain,30),"_","&nbsp;")
				
				If Instr(strresult,"notavailable")>0 Then
					response.write "<input type='radio' name='okdomain' value='"&strdmc(i)&"' disabled=1>&nbsp;&nbsp;"&thedomain&" （不可注册）<br>"
				  Else
					If Instr(strresult,"available")>0 Then
					response.write "<input type='radio' name='okdomain' value='"&strdmc(i)&"' >&nbsp;&nbsp;"&thedomain&" <font color=#ff0000>（可以注册）</font><br>"
					  Else
					response.write "<input type='radio' name='okdomain' value='"&strdmc(i)&"'  disabled=1>&nbsp;&nbsp;"&thedomain&" （查询失败）<br>"
					End If
				End If
			Next

		'''''''''''''
		   
			
			response.write"<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='submit' name='Submit' value=' 注 册 ' class=btxx><input type='reset' name='Submit' value=' 重 选 ' class=btxx><input type='button' name='Subsmit' onclick=""javascript:history.go(-1);"" value=' 重 查 ' class=btxx><br><br>"
		response.write "<input type='hidden' name='pstrotprd'  value="&SafeRequest("pstrotprd")&" ><input type='hidden' name='pstrotnme'  value='"&SafeRequest("pstrotnme")&"' ><input type='hidden' name='pstcolumn' value='"&SafeRequest("pstcolumn")&"' >"
			response.write "</td></tr></form>"

		end if

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''		
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "dmt"

domainname=trim(SafeRequest("searchedDomainName"))
if  domainname="" then
call errorpage(-2,"对不起，请填写您的通用网址！")
end if
		Strcontent="entryclass:whois"+Vend
		Strcontent=Strcontent+"entrytype:dmt"+Vend
		Strcontent=Strcontent+"domainname:"+domainname+Vend
		Strcontent=Strcontent+"."+Vend
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''执行查询并返回结果 
		strreturn = hzsocket( Strcontent )
		Strcmp=mid(strreturn,1,4)
		If(strcmp="") Then
			call errorpage(-2,"查询失败, 错误代码: "+ Vbcrlf+"<br>" + Strreturn)
		else
		response.write "<form action='dmt_frm.asp' method=post><tr><td>"
				
				Strresult=mid(strreturn,instr(strreturn, domainname&":" ) +1)
				Strresult = Mid(strresult,len(domainname) + 1,15)
				thedomain=domainname&"____________________________"
				thedomain=replace(left(thedomain,30),"_","&nbsp;")
				if Strcmp="211 " then '已被注册 
				   ifcando=" disabled=1 "
				   ifcandonme="已被注册"
				elseif strcmp="210 " then '未被注册 
				   ifcando=" "
				   ifcandonme="未被注册"
				else
				   ifcando=" disabled=1 "
				   ifcandonme="查询失败"
				end if
				   rntype = getval(strreturn, "rntype")
				   
   If rntype = "" Then
      call errorpage(-2,"10001 对不起，系统错误！")
   End If

rntype = Trim(LCase(rntype))

If rntype = "prohibit" Then
   dmttpenme="禁止注册"
   ifcando=" disabled=1 "
ElseIf rntype = "limit" Then
   dmttpenme="限制注册"
   ifcando=" disabled=1 "
ElseIf rntype = "normal" Then
   prc_tmes = 1
   dmt_tpe = 1
   dmttpenme="普通通用网址"
ElseIf rntype = "zhungeneral" Then
   prc_tmes = 5
   dmt_tpe = 2
   dmttpenme="准通用词"
ElseIf rntype = "normalgeneral" Then
   prc_tmes = 10
   dmt_tpe = 3
   dmttpenme="普通通用词"
ElseIf rntype = "goldgeneral" Then
   prc_tmes = 10
   dmt_tpe = 4
   dmttpenme="白金通用词"
Else
      call errorpage(-2,"10001 对不起，系统错误！")
End If 
			response.write "<input type='radio' name='okdomain' value='"&domainname&"' "&ifcando&">&nbsp;&nbsp;"&thedomain&" （"&dmttpenme&"）&nbsp;（"&ifcandonme&"）<br><input type=hidden name=prc_tmes value="&prc_tmes&"><input type=hidden name=dmttpenme value="&dmttpenme&">"
	         
			response.write"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='submit' name='Submit' value=' 注 册 ' class=btxx><input type='reset' name='Submit' value=' 重 选 ' class=btxx><input type='button' name='Subsmit' onclick=""javascript:history.go(-1);"" value=' 重新查询 ' class=btxx>"
		response.write "<input type='hidden' name='pstrotprd'  value="&SafeRequest("pstrotprd")&" ><input type='hidden' name='pstrotnme'  value='"&SafeRequest("pstrotnme")&"' ><input type='hidden' name='pstcolumn' value='"&SafeRequest("pstcolumn")&"' >"
			response.write "<br><br></td></tr></form>"
	end if	
end select		
%>
              </table>
            </td>
          </tr>
          <% end if %>