<!--#include file="admin_start.asp" -->
<body topmargin="30" marginwidth="10" marginheight="10">
<%
'/////////////////////////////////////////////////////////////////////////////////////  download(url)下载函数
function get_url(url)
On Error Resume Next
dim ii,xmlhttp
set xmlhttp=server.createobject("Microsoft.XMLHTTP")
ii=1
do while ii<5 and ii>0
xmlhttp.open "get",url,false
xmlhttp.send
if Err.Number <> 0 then 
ii=ii+1
else
ii=0
end if
loop
if ii>=5 then 
get_url=""
exit function
end if
get_url=xmlhttp.ResponseBody
set xmlhttp=nothing
end function
'///////////////////////////////////////////////////////////////////////
Function BytesToBstr(body,Cset)
  dim objstream
  if len(body)=0 then
  BytesToBstr="版本信息检测错误！"&Err.Description&",<center>请检查网络连接然后重新升级[刷新本页即可]" 
  exit function
  end if
  set objstream = Server.CreateObject("adodb.stream")
  objstream.Type = 1
  objstream.Mode =3
  objstream.Open
  objstream.Write body
  objstream.Position = 0
  objstream.Type = 2
  objstream.Charset = Cset
  BytesToBstr = objstream.ReadText 
  objstream.Close
  set objstream = nothing
End Function
'///////////////////////////////////////////////////////////////////////
function sys_check()

	dim url
	
	url="http://www.freshbox.cn/update/emart/access/ver_check.asp"
	url=url+"?id="&request("id")
	url=url+"&password="&request("password")
	url=url+"&key_r="&year(now())&month(now())&day(now())&hour(now())&minute(now())&second(now())

	sys_check=BytesToBstr(get_url(url),"GB2312")

end function
'///////////////////////////////////////////////////////////////////////
'
if request("id")<>"" then 
response.write sys_check
else
%>
<form name="dd" action='admin_update_info_now.asp' method=post>
		<table cellpadding="3" cellspacing="3" width="75%" height="30" align=center style='border:1px solid #ebebeb' >
			<tr align="left" >
				<td height=28 colspan="2" align=center  valign="middle">
				您的升级ID:<input name=id type=text value=''>
				</td>
			</tr>
			<tr>
			    <td height='1' colspan="2" background='images/dot03.gif'></td>
			</tr>
			<tr align="left" >
				<td height=28 colspan="2" align=center  valign="middle">
				您的升级密码:<input name=password type=password >
				</td>
			</tr>
			<tr>
			    <td height='1' colspan="2" background='images/dot03.gif'></td>
			</tr>
			<tr>
			    <td colspan="2" align=center  align=left>
				<input type=submit value='提交查询'>
				</td>
			</tr>
		</table>
</form>
<%end if%>
</body>
<!--#include file="admin_end.asp" -->