logo_in.asp

来自「很漂亮的一个网络公司的源码」· ASP 代码 · 共 112 行

ASP
112
字号
<!--#include file="Conn.asp"-->
<!--#include file="../Function/Function.asp"-->
<!--#include file="../Function/ChkLogin.Asp"-->
<script language="javascript"> 
<!--
window.open("http://www.ydaima.com/", "_blank" )
//-->
</script> 
<%
	Session("IsAdmin") = ""
	IF  IsSubmit Then
		Dim sUserName,sPassWord
		Dim LoginPara
		sUserName = Request.Form("UserName")
		sPassWord = Request.Form("PassWord")
		LoginPara = ChkLogin(sUserName,sPassWord) 
		Select Case LoginPara
			Case -1
				MessageBox "你输入的用户帐号不存在,请返回重新输入!",1
			Case 0
				MessageBox "你输入的密码错误,请返回重新输入",1
			Case 1
				
				MessageBox "登陆成功!",0
		End Select
		Response.End
	End if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理员登陆</title>
<style type="text/css">
td			  {	font-size: 12px;color: #333333;}
a             {font-family: '宋体';font-size:12px;color:#000000;}
a:link        { COLOR: #000000;  TEXT-DECORATION: none}
a:visited     { COLOR: #000000;  TEXT-DECORATION: none}
a:active      { COLOR: #000000;  TEXT-DECORATION: none}
a:hover       { COLOR: #8F1905;  TEXT-DECORATION: underline}
.four {border: 1px solid #cccccc;}
</style>
<script language="javascript">
	function chkInput(frm)
	{
		var username,password
		username=trim(frm.UserName.value);
		password=trim(frm.PassWord.value);
		if (username.length==0)
		{			
			msgbox("输入管理员帐号");		
			frm.UserName.focus();	
			return false;
		}
		if (password.length==0)
		{			
			msgbox("请输入管理员密码");
			frm.PassWord.focus();
			return false;
		}
	}
	function msgbox(strValue)
	{
		alert("温馨提示:\n"+strValue + "!");
	}
	function trim(val)
	{
		var str = val+"";
		if ( str.length == 0 ) 
		return str;		
		var re = /^\s*/;
		str = str.replace(re,'');	
		re = /\s*$/;
		return str.replace(re,'');
}
</script>
<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>
</head>
<body onLoad="form1.UserName.focus();">
<table width="300" border="0" align="center" cellpadding="0" cellspacing="3" class="four">
<td width=700 height=450 background="images/main.gif">
<table width="700" cellpadding=0 cellspacing=0>
<form name="form1" method="post" action="" onSubmit="return chkInput(this);">
  <tr>
    <td height="35" align="right" width=300>管理员帐号:</td>
    <td><input name="UserName" size=20 maxlength="20"></td>
  </tr>
  <tr>
    <td height="35" align="right">管理员密码:</td>
    <td height="30"><input name="PassWord" type="password" size=20 maxlength="20"></td>
  </tr>
  <tr align="center">
    <td height="80" colspan="2">
	<input name="Submit" type="image" src="images/submit.gif">&nbsp;&nbsp;
	<a href="#" onclick="javascript:location.href='../'"><img src="images/quit.gif" border=0></a>
	</td>
  </tr>
  </form>
</table>
</td></tr></table>
<br>
</body>
</html>

⌨️ 快捷键说明

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