
<%
dim conn,connstr,startime,sundxdb,rs,useragent
startime=timer()
useragent = trim(lcase(request.servervariables("http_user_agent")))
if instr(useragent,"teleport") > 0 or instr(useragent,"webzip") > 0 or instr(useragent,"flashget")>0 or instr(useragent,"offline")>0 then
	response.write "请不要采用teleport/webzip/flashget/offline等工具来浏览商城！"
	response.end
end if

function saferequest(paraname,paratype)
       dim paravalue
       paravalue=request(paraname)
       if paratype=1 then
              if not isnumeric(paravalue) then
                     response.write "<center>参数" & paraname & "必须为数字型，请正确操作！</center>"
                     response.end
              end if
       else
              paravalue=replace(paravalue,"'","''")
       end if
       saferequest=paravalue
end function


function formatsql(strchar)
if strchar="" then
formatsql=""
else
formatsql=replace(replace(replace(replace(replace(replace(replace(replace(strchar,"'","’"),"*","×"),"?","？"),"(","（"),")","）"),"<","〈"),".","。"),";","；")
end if
end function 

sundxdb="../admin/#sundxShop#.mdb"
connstr="provider=microsoft.jet.oledb.4.0;data source=" & server.mappath(""&sundxdb&"")
on error resume next
	set conn = server.createobject("adodb.connection")
	conn.open connstr
	if err then
		err.clear
		set conn = nothing
		response.write "数据库连接出错，请检查conn.asp中的数据库指向。"'
		response.end
	end if
	
dim strtitle,lngdiscount,strusername,lnguserid,lnggrpid,lngdeposit,rsvip,struseremail
lngdiscount = 1
lnguserid = 0
lngdeposit = 0
strusername = "非注册用户"
strtitle = "非注册用户"
if request.cookies("sundxshop")("username")<>"" then 
set rsvip=server.createobject("adodb.recordset")
rsvip.open "select dv_user.grpid,dv_user.userid,dv_user.score,dv_user.useremail,dv_user.deposit,dv_user.username,sundxgrp.grpname,sundxgrp.stars from dv_user inner join sundxgrp on dv_user.grpid = sundxgrp.grpid where username='"&request.cookies("sundxshop")("username")&"' ",conn,1,1
strtitle = rsvip("grpname")
lngdiscount = rsvip("stars")
lnggrpid = clng(rsvip("grpid"))
strusername = rsvip("username")
lnguserid = clng(rsvip("userid"))
lngscore = clng(rsvip("score"))
lngdeposit = rsvip("deposit")
struseremail = rsvip("useremail")
rsvip.close
set rsvip=nothing 
end if
%>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<link href="include/css.css" rel="stylesheet" type="text/css">
