你可以参考我的登陆页面。 我的登陆成功后跳转到main.asp的。修改下就是你的了,呵呵!
<%'option explicit%>
<%
'强制浏览器重新访问服务器下载页面,而不是从缓存读取页面
Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
%>
<!--#include file="inc/SF_Sqlindex.asp"-->
<!--#include file="conn.asp" -->
<!--#include file="inc/md5.asp" -->
<HTML>
<HEAD>
<TITLE>后台登陆</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT language=JavaScript type=text/JavaScript>
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();
function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
if (object != "[object]"){
setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
return;
}
clearTimeout(nereidFadeTimers[object.sourceIndex]);
diff = destOp-object.filters.alpha.opacity;
direction = 1;
if (object.filters.alpha.opacity > destOp){
direction = -1;
}
delta=Math.min(direction*diff,delta);
object.filters.alpha.opacity+=direction*delta;
if (object.filters.alpha.opacity != destOp){
nereidFadeObjects[object.sourceIndex]=object;
nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
}
}
</SCRIPT>
<STYLE>
body {font-family: "宋体";font-size: 12px;text-decoration: none;}
td {font-size: 12px;color: #666666;text-decoration: none;line-height: 18px;font-family: "宋体";}
.
S1{
font-family: "宋体";
font-weight: bold;
color: #ff0000;
font-size:16px;
text-decoration: none}
.style1 {
color: #ff0000;
font-weight: bold;
}
</STYLE>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle">
<table width="646" height="425" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3">
<img src="images/login_01.gif" width="646" height="114" alt="后台登陆"></td>
</tr>
<tr>
<td>
<img src="images/login_02.gif" width="88" height="311" alt=""></td>
<td width="476" height="311" valign="top" background="images/login_03.gif"><br>
<FORM ACTION="index.asp?action=login" METHOD="post" name="loginform">
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="87" height="30" align="right">登录名:</td>
<td valign="middle"><input type="text" name="username" tabindex="1" alt="请在此输入登录名"></td>
</tr>
<tr>
<td height="30" align="righ
t">密 码:</td>
<td><INPUT name="pwd" type="password" tabindex="2" alt="请在此输入密码"></td>
</tr>
<tr>
<td height="30" align="right">验证码:</td>
<td height="30"><input type=text name="verifycode" maxLength=6 size="6" tabindex="3" class="textbox" alt="请在此输入验证码,看不清楚请点击图片刷新">
<font color=red> <-请输入验证码</font> <IMG src="inc/verifycode.asp?n=<%=Timer%>" onClick="this.src=this.src;" align="absmiddle" alt="看不清楚,点击图片刷新"></td>
</tr>
<tr>
<td height="50" colspan="2" align="center">右边是登陆按钮图片<input onMouseOver=nereidFade(this,100,10,5) onMouseOut=nereidFade(this,50,10,5) src="images/dl.gif" type="image" tabindex="5" name="enter" border="0" onClick="return checkform()">
</td>
</tr>
<tr>
javascript登录注册界面<td colspan="2"></td>
</tr>
</table>
</form><hr size=1 color='#efefef' width='80%' align='left'> <div align="center"><br>
<span class="style1">欢迎使用本系统</span></div></td>
<td>
<img src="images/login_04.gif" width="82" height="311" alt=""></td>
</tr>
</table>
</td></tr></table>
<script language=javascript>
<!--
adystatechange()
{ var app=navigator.appName;
var verstr=navigator.appVersion;
if(app.indexOf('Netscape') != -1) {
alert('友情提示:\n 您使用的是Netscape浏览器,可能会导致无法使用后台的部分功能。建议您使用 IE6.0 或以上版本。');
} else if(app.indexOf('Microsoft') != -1) {
if (verstr.indexOf('MSIE 3.0')!=-1 || verstr.indexOf('MSIE 4.0') != -1 || verstr.indexOf('MSIE 5.0') != -1 || verstr.indexOf('MSIE 5.1') != -1)
alert('友情提示:\n 您的浏览器版本太低,可能会导致无法使用后台的部分功能。建议您使用 IE6.0 或以上版本。');
}
document.loginform.username.focus();
}
function checkform() {
if(loginform.username.value == '') {
alert('请输入管理账号!');
loginform.username.focus();
return false;
}
if(loginform.pwd.value == '') {
alert('请输入密码!');
loginform.pwd.focus();
return false;
}
if (loginform.verifycode.value == '') {
alert ('请输入验证码!');
loginform.verifycode.focus();
return false;
}
}
//-->
</script>
</html>
<%
else
nowusername=request.form("username")
nowpwd=request.form("pwd")
if Trim(Request.Form("Verifycode"))<>Trim(Session("Verifycode")) then
%>
<script language=javascript>
alert('您输入的后台管理认证码不对,请重新输入!')
(-1)
</script>
<%
end if
sql="select * from login where (username='"&nowusername&"' and pwd='"&md5(nowpwd)&"') or (bianhao='"&nowusername&"' and pwd='"&md5(n
owpwd)&"')"
set ute(sql)
f then
%>
<script language=javascript>
alert('登录名称或密码错误!')
(-1)
</script>
<%
end if
%>
<%
session("username")=rs("username")
session("id")=rs("id")
end if
%>
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论