asp 查詢資料代碼

來源:互聯網
上載者:User


<%if request("id")="" then
response.Write "<script>alert('對不起!你輸入了非法字元');location.href='../';</Script>"
response.end
end if
id=request("id")
set rs=server.CreateObject("adodb.recordset")
rs.open "select web_open from tgy where username='"&id&"'",conn,1,1
if rs.eof then
response.Write "<script>alert('對不起!該網站不存在!');location.href='../';</Script>"
response.end
end if
 if rs("web_open")=0 then
response.Write "<script>alert('對不起!該網站處於關閉狀態!');location.href='../';</Script>"
response.end
end if
rs.close
%>
<%set user_rs=server.CreateObject("adodb.recordset")
 user_rs.open "select * from tgy where username='"&id&"'",conn,1,3
 member_get=user_rs("member_get")
 webname=user_rs("web")
 pm=user_rs("pm")
 qq=user_rs("qq")
 email=user_rs("email")
 name1=user_rs("name")
 province=user_rs("province")
 city=user_rs("city")
 visit=user_rs("visit")
 vip=user_rs("vip")
 adddate=user_rs("adddate")
 vip_url=user_rs("weburl")
 if  request.Cookies("id")=""  then
 user_rs("visit")=user_rs("visit")+1
 if user_rs("jifen1")="" or isnull(user_rs("jifen1")) then
 user_rs("jifen1")=0.1
 else
 user_rs("jifen1")=user_rs("jifen1")+0.1
 end if
 visit=user_rs("visit")
 end if
 user_rs.update
 response.Cookies("ip")=request.ServerVariables("REMOTE_ADDR")
 response.Cookies("id")=id
 if user_rs("vip")=1 and  user_rs("vipdate")>=date() then
 if user_rs("weburl")="" or isnull(user_rs("weburl")) then
 response.redirect "/cd4/?id="&id&""
 else
 response.redirect "/"&user_rs("weburl")&"/?id="&id&""
 end if
 end if
 response.Cookies("tgy_url")="/cd/index.asp?id="&id&""
 user_rs.close
 set user_rs=nothing

 %>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.