最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

如何最大限度地實(shí)現(xiàn)安全登錄功能?

 更新時(shí)間:2006年11月16日 00:00:00   作者:  

<
if not IsEmpty(Session(
"cust—id")) and Len(Session("cust—id"))>0 then

' 用戶(hù)登錄后指向主頁(yè).
 Response.Redirect("navigation/dashbrd.asp")

 ' 在此添入真正的主頁(yè)URL.

end if

bLogin = False
  

' 設(shè)置標(biāo)志.
bError = False
if IsEmpty(Request(
"uid")) or Len(Request("uid")) = 0 or IsEmpty(Request("pwd")) or Len(Request("pwd")) = 0 then  

' 檢查空字符.
  bLogin = True
else

 

----------------------------------------------------------------------------------------------------------------
' 檢驗(yàn)數(shù)據(jù)庫(kù)保存密碼表中是否有該用戶(hù).
"select from customer WHERE cust—id=′ " request("uid") "′ and ′cust—pwd=′" request(″pwd″) ""
' 連接數(shù)據(jù)庫(kù),其中request(″uid″)request(″pwd″) 為本頁(yè)html中表單中的用戶(hù)名和密碼的text.

  gbFound = False
----------------------------------------------------------------------------------------------------------------

  if not rsCust.BOF and not rsCust.EOF then
    gbFound = True
  end if

  if gbFound then
    Session("cust—id") = rsCust.Fields("cust—id")
    ' session變量中記錄有用的信息.此項(xiàng)為數(shù)據(jù)庫(kù)中用戶(hù)名.
    Session("cust—pwd") = rsCust.Fields("cust—pwd")

' 此項(xiàng)為數(shù)據(jù)庫(kù)中用戶(hù)密碼.
    Session("power") = rsCust.Fields("power")

        ' 此項(xiàng)為數(shù)據(jù)庫(kù)中用戶(hù)權(quán)限,可選.

    ' rsCust.ActiveConnection.Execute ("update customer set cust—login = ′ " Now "′ where cust_id = " Session("cust—id") "")

' 更新最后登錄時(shí)間,可選.

    Response.Redirect("navigation/dashbrd.asp")

        ' 真正主頁(yè)URL.
  Else
    ′UID and password not found
    bError = True bLogin = True
  end if

  rsCust.Close
   ' 關(guān)閉記錄.
   mycn—login.Close
  set mycn—login=Nothing
 end if
>

 

----------------------------------------------------------------------------------------------------------------

' 登錄頁(yè)面.

<form name="login" action="default.asp" method="post" target="—top">

' html中加入FORM,并設(shè)為自發(fā)送頁(yè).action后面要接本頁(yè)的URL,這樣,即使用戶(hù)登錄錯(cuò)誤,在本頁(yè)即可獲得提示,而無(wú)須再返回前一頁(yè)登錄.

input name="uid" size="10"maxlength="10" style="HEIGHT: 21px; WIDTH: 101px">

<input name="pwd"type="password" size="10" maxlength="10">

[1]

相關(guān)文章

最新評(píng)論

旺苍县| 木兰县| 田林县| 绥芬河市| 山阴县| 永年县| 兴安盟| 龙陵县| 琼中| 普宁市| 南宁市| 抚顺县| 延庆县| 玛纳斯县| 衡水市| 启东市| 洪泽县| 金溪县| 和静县| 万载县| 通化县| 清新县| 永定县| 平原县| 阜南县| 杭锦旗| 怀来县| 兴城市| 陇川县| 东阿县| 靖江市| 申扎县| 商水县| 堆龙德庆县| 彭水| 江源县| 保德县| 彰化县| 额尔古纳市| 依安县| 沙田区|