📄 myweb_login.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/md5.asp"-->
<%dim webname,weburl,webkeywords,webdescription,webemail,webuse,webclose,userreg,userpass,commentclose,agreement,copyright
set webrs=server.createobject("adodb.recordset")
sql="select webname,weburl,webkeywords,webdescription,webemail,webuse,webclose,userreg,userpass,commentclose,agreement,copyright from [myweb_const] "
webrs.open sql,conn,1,1
webname=webrs("webname")
weburl=webrs("weburl")
webkeywords=webrs("webkeywords")
webdescription=webrs("webdescription")
webemail=webrs("webemail")
webuse=webrs("webuse")
webclose=webrs("webclose")
userreg=webrs("userreg")
userpass=webrs("userpass")
commentclose=webrs("commentclose")
agreement=webrs("agreement")
copyright=webrs("copyright")
webrs.close
%>
<%
response.Write "<head>"& vbcrlf
response.Write "<title>"&webname&""&weburl&"</title>"& vbcrlf
response.Write "<meta name='keywords' content='"&webkeywords&"'>"& vbcrlf
response.Write "<meta name='description'content='"&webdescription&"'>"& vbcrlf
response.Write "</head>"& vbcrlf
%>
<style type="text/css">
<!--
body {
background-image: url(admin/bg.gif);
margin: 0px;
background-repeat: repeat-x;
}
table,td{
font-family:"宋体";
font-size:12px;
}
.inputtext{
border-left:1px solid balck;
border-right:1px solid balck;
border-top:1px solid balck;
border-bottom:1px solid balck;
}
.loginbg {
font-size: 12px;
width: 59px;
height: 26px;
background-image: url(admin/login_bg.gif);
border: none;
padding-top: 3px;
color:white;
-->
</style>
</head>
<body>
<SCRIPT language="javascript">
<!--
function checkerr(string)
{
var i=0;
for (i=0; i<string.length; i++)
{
if((string.charAt(i) < '0' || string.charAt(i) > '9') && (string.charAt(i) < 'a' || string.charAt(i) > 'z')&& (string.charAt(i)!='-'))
{
return 1;
}
}
return 0;//pass
}
function del_space(s)
{
for(i=0;i<s.length;++i)
{
if(s.charAt(i)!=" ")
break;
}
for(j=s.length-1;j>=0;--j)
{
if(s.charAt(j)!=" ")
break;
}
return s.substring(i,++j);
}
function Submit()
{
name = del_space(document.login.name.value);
if (name.length == 0)
{
alert("请输入用户名!");
return false;
}
if (document.login.pwd.value == 0)
{
alert("请输入密码!");
return false;
}
if (document.login.code.value == 0)
{
alert("请输入验证码!");
return false;
}
return true;
}
//-->
</SCRIPT>
<form method=post action=myweb_login.asp name=login onSubmit="return Submit()">
<table width="100%" height="98" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="50%" align="center" height="34" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="admin/admin_02.gif" width="291" height="34"></td>
</tr>
</table>
<table width="100%" height="30" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="50%" height="261" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><table width="457" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3"><img src="admin/admin_05.gif" width="457" height="40" border="0" usemap="#Map"></td>
</tr>
<tr>
<td width="142" rowspan="3"><img src="admin/admin_07.gif" width="142" height="221"></td>
<td width="240" valign="top"><img src="admin/admin_08.gif" width="240" height="42"></td>
<td width="75" rowspan="3"><img src="admin/admin_09.gif" width="75" height="221"></td>
</tr>
<tr>
<td height="107" valign="top" background="admin/admin_10.gif">
<table width="75%" align="center" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="24%" height="30">用 户:</td>
<td width="76%" height="30"><input type="text" name="name" size="20" id=name maxlength=50 style="border: 1px solid #000000"></td>
</tr>
<tr>
<td height="25">密 码:</td>
<td height="25"><input type="password" name="pwd" size="20" id=pwd maxlength=50 style="border: 1px solid #000000">
<tr>
<td height="25">验证码:</td>
<td height="25"><input type="text" name="code" size="12" id=text maxlength=50 style="border: 1px solid #000000"> <img src='inc/mywebcode.asp'></</td>
</tr>
<tr>
<td height="25" colspan="2"><p align="center"><input type="submit" value="登 陆" class="loginbg"> <input type="reset" value="取 消" class="loginbg"></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="bottom"><img src="admin/admin_11.gif" width="240" height="72"></td>
</tr>
</table></td>
</tr>
</table>
<input type="hidden" name="action" value="check">
</form>
<%if request("action")="check" then
dim name,pwd,code
dim GetCode,valicode
Code=trim(request.form("Code"))
GetCode=trim(request("Code"))
valicode=trim(session("Code"))
name=trim(request.form("name"))
pwd=trim(request.form("pwd"))
if not isnumeric(Code) then
response.write"<script>alert(""验证码格式错误!"");location.href=""javascript:history.go(-1)"";</script>"
response.end
end if
if name<>"" and instr(name,chr(39))>0 or instr(name,chr(34))>0 then
response.write"<script>alert(""用户名非法!"");location.href=""javascript:history.go(-1)"";</script>"
response.end
end if
if GetCode<>valicode then
response.write"<script>alert(""验证码错误!"");location.href=""javascript:history.go(-1)"";</script>"
response.end
end if
set rs=conn.execute("select * from myweb_admin where myweb_name='"&name&"' and myweb_pwd='"&md5(pwd)&"'")
if rs.eof then
response.write"<script>alert(""用户名或者密码错误!"");location.href=""javascript:history.go(-1)"";</script>"
else
session("admin_name")=name
session("admin_type")=rs("myweb_type")
response.redirect"myweb_index.asp"
rs.close
end if
end if
%>
<map name="Map"><area shape="rect" coords="348, 1, 436, 39" href="default.asp">
</map></body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -