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

📄 begin.asp

📁 商会 商会 商会 商会 商会 商会 商会 商会 商会 商会 商会 商会 商会
💻 ASP
字号:

<%
mybz=0
set rsb1 = Server.CreateObject("ADODB.Recordset")
set rsb2 = Server.CreateObject("ADODB.Recordset")
if Session("userno")="" then
	c_usercode=Request.Cookies("usercode")
	c_userpass=Request.Cookies("userpass")
	c_loginflag=Request.Cookies("loginflag")
  if c_usercode<>"" then	
	sql="select userno,userpass,flag,state,logintime,logincount,ipaddress from userinfo where usercode='"+c_usercode+"' and state='1'"
	rsb1.Open sql,cn,1,3
	if rsb1.EOF then
	else
		oldpass=Lcase(trim(rsb1(1)))
		if oldpass=c_userpass then
			mybz=1
			rsb1("logintime")=now()
			rsb1("logincount")=rsb1("logincount")+1
			rsb1("ipaddress")=Request.ServerVariables("Remote_HOST")
			rsb1.Update

			Session("userno")=rsb1(0)
			Session("usercode")=c_usercode
			Session("userflag")=c_loginflag
			userno=rsb1(0)

			cn.Execute "delete from user_login where userno="&userno&" or keyno="&Session.SessionID

			if databaseflag="access" then
				sql="Insert into user_login values ("&Session.SessionID&","&userno&",'"+c_usercode+"',now(),now(),'"+classcode+"','"+loginflag+"','"+Request.ServerVariables("Remote_HOST")+"')"
			else
				sql="Insert into user_login values ("&Session.SessionID&","&userno&",'"+c_usercode+"',getdate(),getdate(),'"+classcode+"','"+loginflag+"','"+Request.ServerVariables("Remote_HOST")+"')"
			end if
			cn.Execute sql				

		end if	
	end if
	rsb1.Close
  end if
end if
if mybz=0 then
	sql="select * from user_login where keyno="&Session.SessionID
	rsb2.Open sql,cn,1,3
	if not rsb2.EOF then
		rsb2("updatetime")=now()
		rsb2("classcode")=classcode
	else
		rsb2.Addnew
		rsb2("keyno")=Session.SessionID
		rsb2("userno")=0
		rsb2("logintime")=now()
		rsb2("updatetime")=now()
		rsb2("loginflag")="0"
		rsb2("ipaddress")=Request.ServerVariables("Remote_HOST")
		rsb2("classcode")=classcode
	end if
	rsb2.Update
	rsb2.Close
end if
%>
<html>
<head>
<title><%=forumtitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="font.css" type="text/css">

<style type=text/css>

div.quote{margin:5px 20px;border:1px solid #CCCCCC;padding:5px;background:#F3F3F3 ;line-height : normal ;
}
div.HtmlCode{margin:5px 20px;border:1px solid #CCCCCC;padding:5px; background:#FDFDDF ;
font-size:14px;font-family:Tahoma;font-style : oblique;line-height : normal ;font-weight:bold;
}
</style>


</head>

<body bgcolor="#EFFAF4"  text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="60" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="60" background="images/top_bg.jpg"><a href="../default.asp"><img src="images/logo.jpg" width="273" height="60" border="0"></a></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="#0f9405" height="2"></td>
  </tr>
  <tr>
    <td height="1"></td>
  </tr>
<%if Session("userno")<>"" then%>
  <tr>
    <td height="26" bgcolor="#FFEEEE">&nbsp;&nbsp;
	<b><%=Session("usercode")%></b> <a href="user_login.asp" class=a01>重登录</a> | 
	<a href="logout.asp" class=a01>注销</a> |  
	<a href="user_center.asp" class=a01>我的主页</a> | 
	<a href="forum.asp" class=a01>论坛</a> | 
    <a href="../default.asp" class=a01>网站首页</a> |   </td>
  </tr>
<%else%>
  <tr>
    <td height="26">&nbsp;&nbsp;
	<a href="user_login.asp" class=a01>登录</a> |  
	<a href="register.asp" class=a01>注册</a> |  
	<a href="forum.asp" class=a01>论坛</a> | 
    <a href="../default.asp" class=a01>网站首页</a> | 
   </td>
  </tr>
<%end if%>
  <tr>
    <td bgcolor="#CDDCF2" height="1"></td>
  </tr>
</table>

⌨️ 快捷键说明

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