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

📄 index.asp

📁 在线教育
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/conn.asp" -->
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString <> "" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername = CStr(Request.Form("student_id"))
If MM_valUsername <> "" Then
  Dim MM_fldUserAuthorization
  Dim MM_redirectLoginSuccess
  Dim MM_redirectLoginFailed
  Dim MM_loginSQL
  Dim MM_rsUser
  Dim MM_rsUser_cmd
  
  MM_fldUserAuthorization = ""
  MM_redirectLoginSuccess = "index1.asp"
  MM_redirectLoginFailed = "index.asp"

  MM_loginSQL = "SELECT userid, UserPassword"
  If MM_fldUserAuthorization <> "" Then MM_loginSQL = MM_loginSQL & "," & MM_fldUserAuthorization
  MM_loginSQL = MM_loginSQL & " FROM username WHERE userid = ? AND UserPassword = ?"
  Set MM_rsUser_cmd = Server.CreateObject ("ADODB.Command")
  MM_rsUser_cmd.ActiveConnection = MM_conn_STRING
  MM_rsUser_cmd.CommandText = MM_loginSQL
  MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param1", 200, 1, 50, MM_valUsername) ' adVarChar
  MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param2", 200, 1, 20, Request.Form("student_pass")) ' adVarChar
  MM_rsUser_cmd.Prepared = true
  Set MM_rsUser = MM_rsUser_cmd.Execute

  If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then 
    ' username and password match - this is a valid user
    Session("MM_Username") = MM_valUsername
    If (MM_fldUserAuthorization <> "") Then
      Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
    Else
      Session("MM_UserAuthorization") = ""
    End If
    if CStr(Request.QueryString("accessdenied")) <> "" And false Then
      MM_redirectLoginSuccess = Request.QueryString("accessdenied")
    End If
    MM_rsUser.Close
    Response.Redirect(MM_redirectLoginSuccess)
  End If
  MM_rsUser.Close
  Response.Redirect(MM_redirectLoginFailed)
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>教学辅助系统首页</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">
td img {display: block;}body {
	margin-top: 0px;
}
.style7 {font-size:12px}
.style6 {font-family: 黑头;font-size:16px}
</style>
<script language=javascript>
<!--
function Check()
{
	if(document.form1.student_id.value=="")
	{
		alert("请输入用户名!");
		document.form1.student_id.focus();
		return false;
	}
	if(document.form1.student_pass.value == "")
	{
		alert("请输入密码!");
		document.form1.student_pass.focus();
		return false;
	}
}
-->
</script>
<!--Fireworks 8 Dreamweaver 8 target.  Created Sun Apr 27 10:07:09 GMT+0800 2008-->
</head>
<body bgcolor="#ffffff">
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<!-- fwtable fwsrc="top2.png" fwbase="index.gif" fwstyle="Dreamweaver" fwdocid = "1235984691" fwnested="0" -->
  <tr>
   <td><img src="images/spacer.gif" width="760" height="1" border="0" alt="" /></td>
   <td><img src="images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
  </tr>

  <tr>
   <td><img name="index_r1_c1" src="images/index_r1_c1.gif" width="760" height="100" border="0" id="index_r1_c1" alt="" /></td>
   <td><img src="images/spacer.gif" width="1" height="100" border="0" alt="" /></td>
  </tr>
  <tr>
   <td background="images/index_r2_c1.gif"><table width="65%" align="center">
     <tr>
       <td class="style6"><div align="center">学生登陆</div></td>
       <td class="style6">&nbsp;</td>
     </tr>
     <tr>
       <td colspan="2"><table height="110" cellspacing="2" cellpadding="2" width="75%" align="center" 
      border="0">
         <form ACTION="<%=MM_LoginAction%>" method="POST" name="form1" id="form1" onsubmit="return Check()">
           <tr>
             <td width="23%" class="style7">帐号:</td>
             <td width="77%"><input type="text" name="student_id" size="20" /></td>
           </tr>
           <tr>
             <td class="style7">密码:</td>
             <td><input type="password" name="student_pass" size="20" /></td>
           </tr>
           <tr>
             <td></td>
             <td><input type="submit" value="登 陆" name="Submit2" />
                 <input type="reset" value="重 来" name="Submit3" />             </td>
           </tr>
         </form>
       </table></td>
       </tr>
     <tr>
       <td><div align="center"><a href="admin/login.asp">管理员登陆</a></div></td>
       <td>&nbsp;</td>
     </tr>
   </table></td>
   <td><img src="images/spacer.gif" width="1" height="261" border="0" alt="" /></td>
  </tr>
  <tr>
   <td><img name="index_r3_c1" src="images/index_r3_c1.gif" width="760" height="39" border="0" id="index_r3_c1" alt="" /></td>
   <td><img src="images/spacer.gif" width="1" height="39" border="0" alt="" /></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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