login.asp

来自「采用ASP。NET做的网上游戏交易平台」· ASP 代码 · 共 131 行

ASP
131
字号
<html>
<head>
<%
if request.QueryString("actionstr")="login" then
dim myuser,mypwd
myuser=request.form("txtusername")
mypwd=request.form("txtpassword")
if myuser="admin" and mypwd="admin" then
session("admin_username")=myuser
Response.Write "<script language=javascript>" &vbCrLf&_
"alert('管理员你好!!!');window.location='admin.asp';" &vbCrLf&_
"</script>"
else
Response.Write "<script language=javascript>" &vbCrLf&_
"alert('对不起,帐号或密码不对!!!');" &vbCrLf&_
"</script>"
end if
end if
%>
<meta http-equiv="Content-Language" content="en-us">
<title>8000游戏交易网---全国最大,最好的游戏交易网站............... </title>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<script language="JavaScript">
function chkdata(){
	if (document.frmlogin.txtusername.value==""){
		alert("请填写帐号");
		document.frmlogin.txtusername.focus();
		return false;
		}
	else if(document.frmlogin.txtpassword.value==""){
		alert("请填写密码");
		frmlogin.txtpassword.focus();
		return false;
		}
	else{
		frmlogin.action="login.asp?actionstr=login";
		frmlogin.submit();
	}
}
</script>
<LINK href="../wgcs.css" rel=stylesheet>
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<div align="center">
	<div align="center">
		
  <table border="0" width="778" cellspacing="0" cellpadding="0" height="15">
    <tr> 
      <td>&nbsp;</td>
    </tr>
  </table>
	</div>
	<table border="0" width="778" cellspacing="0" cellpadding="0" height="34">
		<tr>
			<td height=3 bgcolor="#767676" colspan="2"></td>
			<td height=25 width="645" rowspan="2" >
			 </td>
		</tr>
		<tr>
			<td bgcolor="#666666" width="35" rowspan="2">
			<p align="center">
			<img border="0" src="../images/blackdown.gif" width="20" height="20"></td>
			
    <td bgcolor="#666666" width="98" valign=bottom> <font color="#FFFFFF"><b>管理员登录</b></font></td>
		</tr>
		<tr>
			<td height="4" bgcolor="666666" colspan="2"></td>
		</tr>
		<tr>
			<td height="3" bgcolor="333333" colspan="3"></td>
		</tr>
	</table>
	<table border="1" width="778" cellspacing="0" cellpadding="0" bordercolorlight="#D5D5D5" bordercolordark="#FFFFFF">
		<tr>
			<td height="3" bgcolor="#cccccc"></td>
		</tr>
		<tr>
			<td align="center">
			<form method="POST"  name="frmlogin">
				<table class="outborder" cellSpacing="0" cellPadding="0" width="400" border="0" style="border-width: 0" >
					<tr>
						<td align="right" height="50" style="color: #000; font-size: 14px; font-family: 宋体">
						<p align="left"><b><font color="#A52829">注意事项:抱歉你没有登录,请在此处登录!<br>
						 </font></b></td>
					</tr>
				</table>
				<table class="outborder" cellSpacing="0" cellPadding="0" width="400" border="1" style="border-color:#D6D7D6; border-collapse: collapse" bordercolor="#D6D7D6" >
					<tr>
						<td align="right" height="80" style="color: #000; font-size: 14px; font-family: 宋体">
				<table class="outborder" cellSpacing="0" cellPadding="0" width="400" border="0" style="border-width: 0" height="100%">
					<tr>
						
                  <td align="right" height="30" style="color: #000; font-size: 14px; font-family: 宋体" width="130"> 
                    <strong>管理员帐号:</strong></td>
						<td align="right" height="60" width="1" rowspan="2" bgcolor=#D6D7D6 style="color: #000; font-size: 14px; font-family: 宋体">						 </td>
						<td class="S lh13  " bgColor="#f1f1f1" height="30" width="335"><font color="#ff0000">&nbsp;</font>
						<input size="39" name="txtusername" style="font-size: 12px">
						</td>
					</tr>
					<tr>
						
                  <td align="right" height="30" style="color: #000; font-size: 14px; font-family: 宋体" width="130"> 
                    <strong>管理员密码:</strong></td>
						<td class="S lh13  " bgColor="#f1f1f1" height="30" width="335">
						<font color="#ff0000">&nbsp;</font>
						<input size="39" name="txtpassword" style="font-size: 12px" type="password">
						&nbsp; </td>
					</tr>
					</table>
						</td>
					</tr>
				</table>
				<p>
				
				
				<input type="button" value="马上登录" name="btnlogin" onClick="javascript:chkdata();"></p>
				
				<p></form>
			</td>
		</tr>
	</table>
	<table border="0" width="778" cellspacing="0" cellpadding="0">
		<tr>
			<td height="2">
			<p align="center">
			</td>
		</tr>
	</table>
</body>

</html>

⌨️ 快捷键说明

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