日期:2014-05-17  浏览次数:20963 次

为什么验证码就是显示不出来呢
<!--#include   file   =   "include/conn.asp "-->
<!--#include   file   =   "include/md5.asp "-->
<!--#include   file   =   "include/function.asp "-->
<%
      if   IsEmpty(Session( "Passed "))   then
            Session( "Passed ")   =   False
      End   if

    if   Session( "Passed ")   =   False   then
          UserName   =   Trim(Request.form( "UserName "))
          UserPwd   =   Request.form( "password ")

          if   UserName   =   " "   or   password   =   " "   then
                Errmsg   =   "如果您是本站会员,请在此登陆! "
          else
          If   not   IsNumeric(Request.Form( "confirm "))   Then
          Response.Write   " <script> alert( '你输入的验证码为非数字! '); </script> "
                  Response.End
                End   If
                If   (int(Session( "SafeCode "))=int(Request.Form( "confirm ")))   Then
set   rs   =   server.createobject( "adodb.recordset ")
sql   =   "Select   *   from   user   where   UserName   =   ' "&UserName& " ' "
rs.open   sql,conn,1,3
if   rs.EOF   then
Errmsg   =   "用户不存在 "
conn.Close
Set   conn   =   nothing
else
if   md5(UserPwd) <> rs.Fields( "UserPwd ")   then
Errmsg   =   "密码不正确 "
conn.Close
Set   conn   =   nothing
else  
Errmsg   =   " "
Session( "Passed ")   =   True
Session( "UserName ")   =   rs.Fields( "UserName ")
Session( "Id ")   =   rs.Fields( "Id ")
end   if
end   if
  Else
  Errmsg   =   "验证码输入错误! "
  End   If
          end   if
    end   if
    if   Not   Session( "Passed ")   Then
  %>
<html>
<head>
<title> login </title>
<link   href= "css/style.css "   rel= "stylesheet "   type= "text/css "   /> <style   type= "text/css "> </style>
</head>

<body>
<script   language   =   "VBScript ">
function   ChkFields()
      If   document.MyForm.UserName.value   = " "   Then
      window.alert( "请输入用户名! ")
      return   false
      End   If
    &n