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

📄 top.asp

📁 该软件是帮助大学生更好的生活
💻 ASP
字号:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<% if ChannelID<>0 then %>
<LINK href="inc/mt_style.css" type=text/css rel=stylesheet>
<link href="css.css" rel="stylesheet" type="text/css">
<SCRIPT language=javascript src="inc/mt_dropdownC.js"></SCRIPT>
<%end if%>
<div id=menuDiv style='Z-INDEX: 1000; VISIBILITY: hidden; WIDTH: 1px; POSITION: absolute; HEIGHT: 1px; BACKGROUND-COLOR: #9cc5f8'></div>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<noscript><iframe src=*.html></iframe></noscript>
<BODY>
<!-- <script language="JavaScript">   *****************弹出窗口最大化****************
self.moveTo(-4,-4)
self.resizeTo(screen.availWidth,screen.availHeight)
</script> -->
<table width="778" height="120" border="0" align="center" cellpadding="0" cellspacing="0" background="pic/flash.jpg">
  <tr valign="top">
    <td colspan="3"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td align="right"><img src="images/menu_bg6.gif"></td>
        <td width="1%" align="right"><%show_channel()%></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td width="76%" valign="middle">&nbsp;</td>
    <td width="22%"><% call UserLogin() %></td>
    <td width="2%">&nbsp;</td>
  </tr>
</table>

<TABLE width="778" border=0 align="center" cellPadding=0 cellSpacing=0>
  <TBODY>
    <TR>
      <TD width="100%" height="44" background="images/menu_bg.gif" class=topmenu><% if ChannelID<>0 then
	  'call ShowRootClass_menu()  '--动力菜单,在首页好象有问题...
	  call show_super_menu()   '-贫龙的菜单
	  end if
	  %></TD>
    </TR>
  </TBODY>
</TABLE>

<!--================================================
   '过程名:UserLogin
   '作  用:用户登录表单
   '参  数:无
==================================================-->
<script language=javascript>
	function CheckForm()
	{
		if(document.UserLogin.UserName.value=="")
		{
			alert("请输入用户名!");
			document.UserLogin.UserName.focus();
			return false;
		}
		if(document.UserLogin.Password.value == "")
		{
			alert("请输入密码!");
			document.UserLogin.Password.focus();
			return false;
		}
	}
	function openScript(url, width, height)
	{
		var Win = window.open(url,"UserControlPad",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=yes,status=yes' );
	}
</script>
<%
sub UserLogin()
	dim strLogin
	if CheckUserLogined()=False then
    	strLogin="<table border='0' cellspacing='0' cellpadding='0'>" & vbcrlf
		strLogin=strLogin & "<form action='User_ChkLogin.asp' method='post' name='UserLogin' onSubmit='return CheckForm();'>" & vbcrlf
        strLogin=strLogin & "<tr><td colspan='2' height='10'></td></tr><tr><td width='68' style='color:#99cc99' align='right'>UserName:</td><td><input name='UserName' type='text' id='UserName' class='input2''></td></tr>" & vbcrlf
        strLogin=strLogin & "<tr><td height='25' style='color:#99cc99' align='right'>PassWord:</td><td><input name='Password' type='password' id='Password' class='input2'></td></tr>" & vbcrlf
		strLogin=strLogin & "<tr><td colspan='2' height='2'></td></tr><tr><td></td><td><input type='image' name='Login' id='Login' value='登录 ' onfocus='this.blur()' alt=点击登陆 src='images/butn_login.gif'>&nbsp;<a href='User_Reg.asp' onfocus='this.blur()'><img src='images/butn_reg.gif' border='0'></a>" & vbcrlf
        strLogin=strLogin & "</td></tr></form></table>" & vbcrlf
		response.write strLogin

	Else 
		response.write "<font class='toptxt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;欢迎光临:<font color=#f9f9f9><b>" & UserName & "</b></font>"
		response.write "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您的身份:"
		if UserLevel=999 then
			response.write "普通用户"
		elseif UserLevel=99 then
			response.write "收费用户"
		elseif UserLevel=9 then
			response.write "VIP用户"
		end if
		response.write "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='shop_bag.asp' target='_blank'>查看我的购物车</a>&nbsp;<img src='images/mall.gif'>" & vbcrlf
		response.write "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=""javascript:openScript('User_ControlPad.asp?Action=ArticleAdd')"">添加信息</a>" & vbcrlf
		response.write "<a href='Userlist.asp'>|</a>&nbsp;&nbsp;<a href='User_Logout.asp'>注销登录</a></font>" & vbcrlf
	end if
%>
<script language=javascript>
	function openScript(url)
	{
		var Win = window.open(url,"UserControlPad");
	}
	function openScript2(url, width, height)
	{
		var Win = window.open(url,"UserControlPad",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=yes,status=yes' );
	}
</script>
<% end sub %>

<%
'**************************************************
'函数名:CheckUserLogined
'作  用:检查用户是否登录
'参  数:无
'返回值:True ----已经登录
'        False ---没有登录
'**************************************************
function CheckUserLogined()
	dim Logined,Password,rsLogin,sqlLogin
	Logined=True
	UserName=Request.Cookies("luyeweb")("UserName")
	Password=Request.Cookies("luyeweb")("Password")
	UserLevel=Request.Cookies("luyeweb")("UserLevel")
	if UserName="" then
		Logined=False
	end if
	if Password="" then
		Logined=False
	end if
	if UserLevel="" then
		Logined=False
		UserLevel=9999
	end if
	if Logined=True then
		username=replace(trim(username),"'","")
		password=replace(trim(password),"'","")
		UserLevel=Cint(trim(UserLevel))
		set rsLogin=server.createobject("adodb.recordset")
		sqlLogin="select * from " & db_User_Table & " where " & db_User_LockUser & "=False and " & db_User_Name & "='" & username & "' and " & db_User_Password & "='" & password &"'"
		rsLogin.open sqlLogin,Conn_User,1,1
		if rsLogin.bof and rsLogin.eof then
			Logined=False
		else
			if password<>rsLogin(db_User_Password) or UserLevel<rsLogin(db_User_UserLevel) then
				Logined=False
			end if
			UserName=rsLogin(db_User_Name)
			UserLevel=rsLogin(db_User_UserLevel)
			ChargeType=rsLogin(db_User_ChargeType)
			UserPoint=rsLogin(db_User_UserPoint)
		  	if rsLogin(db_User_Valid_Unit)=1 then
				ValidDays=rsLogin(db_User_Valid_Num)
		  	elseif rsLogin(db_User_Valid_Unit)=2 then
				ValidDays=rsLogin(db_User_Valid_Num)*30
		  	elseif rsLogin(db_User_Valid_Unit)=3 then
				ValidDays=rsLogin(db_User_Valid_Num)*365
		  	end if
		  	ValidDays=ValidDays-DateDiff("D",rsLogin(db_User_BeginDate),now())
		end if
		rsLogin.close
		set rsLogin=nothing
	end if
	CheckUserLogined=Logined
end function
 %>

⌨️ 快捷键说明

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