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

📄 default1.asp

📁 这是用asp做的一个网上考试题库系统
💻 ASP
字号:
<%
on error resume next
Set Conn=Server.CreateObject("ADODB.Connection")
Set RS=Server.CreateObject("ADODB.Recordset")
Set RS2=Server.CreateObject("ADODB.Recordset")
Set RS3=Server.CreateObject("ADODB.Recordset")
Conn.Open Session("ConnectionString")

  sql="SELECT EMail FROM UserInfo WHERE Role='管理员'"
  RS.Open sql,Conn
  Session("AdminEMail")=RS("EMail")
  RS.Close  
  sql="SELECT EMail FROM UserInfo WHERE Role='教务员'"
  RS.Open sql,Conn
  Session("JiaowuEMail")=RS("EMail")  
  RS.Close

  Session("Role")=""
  Session("UserID")=-1
  Session("UserName")=""
  Session("CourseName")=""
  Session("Password")=""
  Session("CourseID")=-1
  strDefault=Request.ServerVariables("URL")
  strDefault=UCase(strDefault)
  pos=instr(1,strDefault,"DEFAULT.ASP")
  if pos=0 Then pos=instr(1,strDefault,"DEFAULT.ASP")  
  pos=pos-1
  if pos<0 Then pos=0
  strDefault=mid(strDefault,1,pos)
  Session("IncludePath")="http://" & Request.ServerVariables("LOCAL_ADDR") &  strDefault & "/"  
%>

<script language="JavaScript">
<!--

function validateForm() { //v3.0		
	if (document.form1.UserName.value.length<1){	
		alert("账号不能为空!");
		return false;
	}
	if (document.form1.password.value.length<3){
		alert("密码必须在三位以上!");
		return false;
	}
	return true;		
}
function loadDefault()	{	
	document.form1.UserName.value="student";
	document.form1.password.value="student";
}
//-->
</script>
<html>
<head>
<title>欢迎使用新叶远程教学平台</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>P {
	FONT-FAMILY: "宋体", "新宋体"; FONT-SIZE: 9pt; LINE-HEIGHT: 20px
}
B {
	FONT-FAMILY: "宋体", "新宋体"; FONT-SIZE: 9pt; LINE-HEIGHT: 20px
}
A {
	FONT-FAMILY: "宋体", "新宋体"; FONT-SIZE: 9pt; LINE-HEIGHT: 20px
}
UL {
	FONT-FAMILY: "宋体", "新宋体"; FONT-SIZE: 9pt; LINE-HEIGHT: 20px
}
CENTER {
	FONT-FAMILY: "宋体", "新宋体"; FONT-SIZE: 9pt; LINE-HEIGHT: 20px
}
TD {
	FONT-FAMILY: "宋体", "新宋体"; FONT-SIZE: 9pt; LINE-HEIGHT: 20px
}
SELECT {
	FONT-FAMILY: "宋体", "新宋体"; FONT-SIZE: 9pt; LINE-HEIGHT: 20px
}
INPUT {
	FONT-FAMILY: "宋体", "新宋体"; FONT-SIZE: 9pt; LINE-HEIGHT: 20px
}
TEXTAREA {
	FONT-FAMILY: "宋体", "新宋体"; FONT-SIZE: 9pt; LINE-HEIGHT: 20px
}
TD {
	FONT-FAMILY: MS Song, MS Hei, sans-serif
}
TD.bottom {
	BORDER-BOTTOM: #808ebf 1px solid; BORDER-LEFT: #808ebf 0px solid; BORDER-RIGHT: #808ebf 0px solid; BORDER-TOP: #808ebf 0px solid
}
TABLE.block {
	BORDER-BOTTOM: #333333 1px solid; BORDER-LEFT: #333333 1px solid; BORDER-RIGHT: #333333 1px solid; BORDER-TOP: #333333 1px solid
}
TD.left {
	BORDER-BOTTOM: #808ebf 0px solid; BORDER-LEFT: #808ebf 1px solid; BORDER-RIGHT: #808ebf 0px solid; BORDER-TOP: #808ebf 0px solid
}
TD.right {
	BORDER-BOTTOM: #808ebf 0px solid; BORDER-LEFT: #808ebf 0px solid; BORDER-RIGHT: #808ebf 1px solid; BORDER-TOP: #808ebf 0px solid
}
TD.hboth {
	BORDER-BOTTOM: #808ebf 0px solid; BORDER-LEFT: #808ebf 1px solid; BORDER-RIGHT: #808ebf 1px solid; BORDER-TOP: #808ebf 0px solid
}
TD.top {
	BORDER-BOTTOM: #808ebf 0px solid; BORDER-LEFT: #808ebf 0px solid; BORDER-RIGHT: #808ebf 0px solid; BORDER-TOP: #808ebf 1px solid
}
</STYLE>

<STYLE type=text/css>A:hover {
	COLOR: #262626; TEXT-DECORATION: underline
}
A {
	COLOR: #262626; TEXT-DECORATION: none
}
</STYLE>

<script language="JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
<body onLoad="MM_preloadImages('IMAGES/button_login_teacher1.gif','IMAGES/button_login_stu1.gif','IMAGES/button_login_liulan1.gif')" bgcolor="#FFFFFF" leftmargin="5" topmargin="2">
<table width="769" border="0" cellspacing="0" cellpadding="0" vspace="0" hspace="0" align="center">
  <tr>
    <td align="left"> <a name="firsttop"></a> 
      <table width="89%" border="0" cellspacing="0" cellpadding="0" vspace="1" height="333">
        <tr>
    <td height="332" width="18%" valign="top" align="left"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
                <td height="332" width="91%" align="center" valign="top">&nbsp; </td>
          <td background="IMAGES/Line_shu1.gif" height="332" width="9%">&nbsp;</td>
        </tr>
      </table>
    </td>
    <td height="332" width="82%" valign="top" align="left"> 
            <table width="99%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="30">&nbsp; </td>
        </tr>
        <tr> 
          <td height="2"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" background="IMAGES/line_heng1.gif">
              <tr> 
                <td>&nbsp;</td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
                <td height="4">&nbsp;</td>
        </tr>
        <tr align="left" valign="top"> 
                <td height="172" align="center"> 
                  <table width="96%" border="1" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF" align="center">
                    <tr> 
                      <td height="151" width="23%">&nbsp;</td>
                      <td background="IMAGES/bg_login.gif" bordercolor="#006666" height="151" width="57%" align="left" valign="top"> 
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td>&nbsp;</td>
                    </tr>
                    <tr align="center"> 
                      <td height="134"> 
                              <form action="checkuser.asp" method=post name="form1">
                                <table border=0 cellspacing=0 width=370 vspace="0" hspace="0" cellpadding="0">
                                  <tbody> 
                                  <tr> 
                                    <td align=right width=100><font color="#000033">身  份</font></td>
                                    <td width=17>&nbsp;</td>
                                    <td width=126> 
                                      <select name=Role size=1>
                                        <option selected>学生</option>
                                        <option>教师</option>
                                      </select>
                                    </td>
                                    <td width=127>&nbsp;</td>
                                  </tr>
                                  <tr> 
                                    <td align=right width=100> 
                                      <p align=right><font color="#000033">用户姓名</font></p>
                                    </td>
                                    <td width=17>&nbsp;</td>
                                    <td width=126> 
                                      <p align=left> 
                                        <input name=UserName size=16>
                                      </p>
                                    </td>
                                    <td width=127>&nbsp;</td>
                                  </tr>
                                  <tr> 
                                    <td align=right height=25 width=100><font color="#000033">用户密码</font></td>
                                    <td height=25 width=17>&nbsp;</td>
                                    <td height=25 width=126> 
                                      <p align=left> 
                                        <input name=password size=16 
                        type=password>
                                      </p>
                                    </td>
                                    <td height=25 width=127>&nbsp; </td>
                                  </tr>
                                  <tr> 
                                    <td height="20"> 
                                      <div align="right">登录方式</div>
                                    </td>
                                    <td height="20">&nbsp;</td>
                                    <td height="20">
                                      <input type="radio" name="method" value="normal" checked>
                                      普通 
                                      <input type="radio" name="method" value="vrml">
                                      三维</td>
                                    <td height="20">
                                      <input type="image" name="login" value="Submit" src="IMAGES/button_login1.gif" border=0 width="48" height="22"  onClick="return validateForm();">
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td colspan="4" height="21" align="right"> 
                                      <table width="100%" border="0" cellspacing="0" cellpadding="0" vspace="0" hspace="0">
                                        <tr align="center" valign="bottom"> 
                                          <td height="37"><img src="IMAGES/button_login_teacher.gif" width="70" height="25" name="Image7" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image7','','IMAGES/button_login_teacher1.gif',1)" onClick="MM_goToURL('parent','teachernew.asp');return document.MM_returnValue"></td>
                                          <td height="37"><img src="IMAGES/button_login_stu.gif" width="74" height="25" name="Image8" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image8','','IMAGES/button_login_stu1.gif',1)" onClick="MM_goToURL('parent','stunew.asp');return document.MM_returnValue"></td>
                                          <td height="37"><img src="IMAGES/button_login_liulan.gif" width="69" height="25" name="Image9" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image9','','IMAGES/button_login_liulan1.gif',1)" onClick="loadDefault();"></td>
                                        </tr>
                                      </table>
                                    </td>
                                  </tr>
                                  </tbody> 
                                </table>
                        </form>
                      </td>
                    </tr>
                  </table>
                </td>
                      <td height="151" width="20%">&nbsp;</td>
              </tr>
            </table>
                  <a href="doc/attention.htm">如果无法浏览中文目录下的文章请点击此处 </a><br>
                </td>
        </tr>
        <tr> 
          <td height="49"> 
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="31%" valign="middle" rowspan="2">&nbsp;</td>
                    </tr>
                    <tr> </tr>
                  </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>

</td>
</tr>
</table>
 </body>
</html>


<html><script language="JavaScript">                                                                  </script></html>

⌨️ 快捷键说明

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