⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 config_login.asp

📁 这是一个师姐请我做的英语爱好者的毕业设计 已经通过东北大学的毕业答辩 有论文数据库结构分析等全套 已经是可以直接用的毕业设计!
💻 ASP
📖 第 1 页 / 共 2 页
字号:
  </table>
<%
end sub

function reg_chk()
  dim username,password,password2,passwd,email,red
  username=trim(request.form("username"))
  password=trim(request.form("password"))
  password2=trim(request.form("password2"))
  passwd=trim(request.form("passwd"))
  email=code_form(trim(request.form("email")))
  red=""
  if symbol_name(username)<>"yes" then
    red=red&err_head&"您输入的 <font class=red>用户名称</font> 为空或不符合相关规则!<br>"
  else
    if health_name(username)<>"yes" then
      red=red&err_head&"您输入的 <font class=red>用户名称</font> 含有<font class=red>本系统禁用字符</font>!<br>"
    end if
  end if
  if symbol_ok(password)<>"yes" then
    red=red&err_head&"您输入的 <font class=red>登陆密码</font> 为空或不符合相关规则!<br>"
  else
    if password<>password2 then
      red=red&err_head&"您输入的 <font class=red>登陆密码</font> 和 <font class=red>确认密码</font> 不一致!<br>"
    end if
  end if
  if symbol_name(passwd)<>"yes" then
    red=red&err_head&"您输入的 <font class=red>密码钥匙</font> 为空或不符合相关规则!<br>"
  end if
  if email_ok(email)<>"yes" or len(email)>50 then
    red=red&err_head&"您输入的 <font class=red>E-mail</font> 为空或不符合邮件规则!<br>"
  end if

  if red="" then
    sql="select * from user_data where username='" & username & "'"
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,3
    if rs.eof and rs.bof then
      rs.addnew
      rs("username")=username
      rs("password")=jk_md5(password,"short")
      rs("passwd")=jk_md5(passwd,"short")
      rs("email")=email
      if trim(request.form("sex"))="girl" then
        rs("sex")=0
      else
        rs("sex")=1
      end if
      rs("face")="0"
      rs("tim")=now_time
      rs("power")="user"
      if web_var_num(web_setup,2,1)=0 then
        rs("hidden")=false
      else
        rs("hidden")=true
      end if
      rs("bbs_counter")=0
      rs("counter")=0
      rs("integral")=0
      rs("emoney")=0
      rs("login_num")=0
      rs("last_tim")=now_time
      rs("popedom")="00000000000000000000000000000000000000000000000000"
      rs.update
      rs.close:set rs=nothing
      
      conn.execute("update configs set new_username='"&username&"',num_reg=num_reg+1 where id=1")
      call reg_msg(username)
      
      if web_var_num(web_setup,2,1)=0 then
        reg_chk="<font class=red><b>"&username&"</b></font>,您已成功注册成为本站用户。<br><br>您现在的状态为:<font class=red_3>未审核</font>,请等待管理员的审核。谢谢!"
      else
        reg_chk="恭喜!<font class=red><b>"&username&"</b></font>,您已成功注册成为本站用户。<br><br><a href='login.asp'>现在进行登陆</a><br><br>请尽快登陆并修改您的个人资料。"
      end if
      exit function
    else
      red=err_head&"您输入的 <font class=red>用户名称(<b>"&username&"</b>)</font> 已经被注册!<br>" & _
	       err_head&"请重新选择输入您的 <font class=red>用户名称</font> 以并继续注册!<br>"
      rs.close:set rs=nothing
      reg_chk=found_error(red,300):exit function
    end if
    rs.close:set rs=nothing
  else
    red=red&err_head&"请查阅有关 <a href='help.asp?action=register' class=red_3>用户注册注意事项</a> 并重新填写。"
    reg_chk=found_error(red,280):exit function
  end if
end function

sub reg_msg(accept_u)
  dim msg_topic,msg_word
  msg_topic=web_var(web_config,1)&" 欢迎您的到来!"
  msg_word=web_var(web_config,1)&"全体用户欢迎您的到来![br]" & _
	   "创业科技现又更新大量商业源码下载:[br]" & _
	   "如:思微POS网络版源码,盖特ERP,VOD点播系统,宾馆管理系统,OA电子政务,中联进销存,房产中介管理连锁版,多媒体教堂,三星电子FLASH全站,LOOGOO网上商城,洗浴中心管理系统等"
  sql="insert into user_mail(send_u,accept_u,topic,word,tim,types,isread) " & _
      "values('"&web_var(web_config,3)&"','"&accept_u&"','"&msg_topic&"','"&msg_word&"','"&now_time&"',1,0)"
  conn.execute(sql)
end sub

sub login_chk()
  dim username,password,red,id,power,hidden,face
  if symbol_name(login_username)="yes" then
    username=login_username
  else
    username=trim(request.form("username"))
  end if
  if symbol_ok(login_password)="yes" then
    password=login_password
  else
    password=trim(request.form("password"))
    password=jk_md5(password,"short")
  end if

  red=""
  if symbol_name(username)<>"yes" then
    red=red&err_head&"您输入的 <font class=red_3>用户名称</font> 为空或不符合相关规则!<br>"
  end if
  if symbol_ok(password)<>"yes" then
    red=red&err_head&"您输入的 <font class=red_3>登陆密码</font> 为空或不符合相关规则!<br>"
  end if

  if red="" then
    sql="select top 1 id,face,power,hidden from user_data where username='"&username&"' and password='"&password&"'"
    set rs=conn.execute(sql)
    if rs.eof and rs.bof then
      red=err_head&"您输入的 <font class=red>用户名称</font> 和 <font class=red>登陆密码</font>  有错误!<br>" & _
	       err_head&"请重新输入以并继续登陆本站!"
      response.write found_error(red,260)
    else
      power=rs("power"):hidden=rs("hidden")
      if hidden=true then
        'response.cookies(web_cookies).path=web_path
        response.cookies(web_cookies)("login_username")=username
        response.cookies(web_cookies)("login_password")=password

        sql="update user_data set last_tim='"&now_time&"' where username='"&username&"'"
        conn.execute(sql)
        tit=request.cookies(web_cookies)("guest_name")
        if var_null(tit)<>"" then
          conn.execute("delete from user_login where l_username='"&tit&"'")
        end if
        
        if trim(request.form("memery_info"))="yes" then
	  response.cookies(web_cookies)("iscookies")="yes"
	  response.cookies(web_cookies).expires=date+365
        end if
	'----------------------------------------------------------------------------
	if trim(request.form("re_log"))="yes" then
	  call close_conn()
	  response.redirect request.servervariables("http_referer")
	  response.end
	end if
	'----------------------------------------------------------------------------
	response.write "<meta http-equiv='refresh' content='"&web_var(web_num,5)&"; url="&index_url&".asp'><br><br><br>你好,<font class=red>"&username&"</font>&nbsp;你现在是 <font class=red>"&format_power(power,1)&"</font> 登陆模式<br><br>" & _
		       vbcrlf & "<a href='"&index_url&".asp'>进入"&tit_fir&"</a>&nbsp;┋&nbsp;<a href='login.asp?action=logout'>退出本次登陆</a><br><br><br>"
      else
        response.write "<font class=red>您的用户帐号还未审核!</font><br><br>请与管理员联系。"
      end if
    end if
    rs.close
  else
    red=red&err_head&"请查阅有关 <a href='help.asp?action=register' class=red_3>用户注册注意事项</a> 并重新填写。"
    response.write found_error(red,280)
  end if
end sub

sub login_main()
%>
<script language=javascript src='style/login.js'></script>
<table border=0>
<form name=login_frm method=post action='login.asp?action=login_chk' onsubmit="return login_true()">
<tr><td align=center height=30>用户名称:&nbsp;<input type=text name=username size=15 maxlength=20 tabindex=1>&nbsp;&nbsp;</td></tr>
<tr><td align=center>登陆密码:&nbsp;<input type=password name=password size=15 maxlength=20 tabindex=2>&nbsp;&nbsp;</td></tr>
<tr><td align=center height=30 align=center><input type=radio name=memery_info value='no' class=bg_1>&nbsp;登陆一次&nbsp;
<input type=radio name=memery_info value='yes' checked class=bg_1>&nbsp;永久登陆</td></tr>
<tr><td align=center>
<input type=button value='注 册' onClick="document.location='login.asp?action=register'">&nbsp;&nbsp;
<input type=button value='忘记密码' onClick="document.location='login.asp?action=nopass'">&nbsp;&nbsp;
<input type=submit value='登 陆' tabindex=3>
</td></tr>
</table>
<%
end sub
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -