📄 author_log.asp
字号:
<!--#include file="../inc/md5.asp"--><%
Select Case request.querystring("info")
Case "log"
Call log()
Case "in"
Call loin()
Case "out"
Call loout()
Case "login"
Call login()
Case "loging"
Call loging()
end select
Sub log()%>
<table width="100%" border="0" align="center" cellspacing="1" cellpadding="4" bgcolor="#CCCCCC">
<tr bgcolor="#588fc7">
<td colspan="4" height="34" class="head"><font color="#FFFFFF">驻站作家登陆</font></td>
</tr>
<tr>
<td bgcolor="#F7F7F7" align="center">
<form action="author_log.asp?info=login" method="post" name="form1">
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="2" bgcolor="#FFFFFF">
<tr bgcolor="#F7F7F7">
<td width="40%" height="34" align="right" valign="middle" bgcolor="#F7F7F7">
<b>登陆名称:</b><br>
</td>
<td width="60%">
<input name="author_Username" type="text" id="author_Username" size="20" class="form" maxlength="16"></td>
</tr>
<tr bgcolor="#F7F7F7">
<td height="36" align="right" valign="middle" bgcolor="#F7F7F7">
<strong>登陆密码:</strong><br>
</td>
<td>
<input name="author_password" type="password" class="form" id="author_password" size="20" maxlength="23">
</td>
</tr>
<tr align="center" valign="bottom" bgcolor="#F7F7F7">
<td height="34" colspan="2">
<input type="submit" class="button" value="确认提交">
<input type="reset" class="button" value="清除重写">
<input onclick="javascript:location.href='Author.Asp?info=reg'" type="button" class="button" value="作家申请">
</td>
</tr>
</table>
</form>
<input onclick="javascript:location.href='index.asp'" type="button" class="button" value="返回首页"><br>
<br>
</td>
</tr>
</table>
<%end sub
Sub loin()%>
<table width="100%" border="0" align="center" cellspacing="1" cellpadding="4" bgcolor="#CCCCCC">
<tr bgcolor="#588fc7">
<td colspan="4" height="34" class="head"><font color="#FFFFFF">驻站作家登陆</font></td>
</tr>
<tr>
<td bgcolor="#F7F7F7" align="center">
<form action="author_log.asp?info=loging" method="post" name="form">
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="2" bgcolor="#FFFFFF">
<tr bgcolor="#F7F7F7">
<td width="40%" height="34" align="right" valign="middle" bgcolor="#F7F7F7">
<b>登陆名称:</b><br>
</td>
<td width="60%">
<input name="author_Username" type="text" id="author_Username" size="20" class="form" maxlength="16"></td>
</tr>
<tr bgcolor="#F7F7F7">
<td height="36" align="right" valign="middle" bgcolor="#F7F7F7">
<strong>登陆密码:</strong><br>
</td>
<td>
<input name="author_password" type="password" class="form" id="author_password" size="20" maxlength="23">
</td>
</tr>
<tr align="center" valign="bottom" bgcolor="#F7F7F7">
<td height="34" colspan="2">
<input type="submit" class="button" value="确认提交">
<input type="reset" class="button" value="清除重写">
<input onclick="javascript:location.href='Author_reg.Asp?info=reg'" type="button" class="button" value="作家申请">
</td>
</tr>
</table>
</form>
<input onclick="javascript:location.href='index.asp'" type="button" class="button" value="返回首页"><br>
<br>
</td>
</tr>
</table>
<%end sub
Sub loout()
session("author_ID")=""
session.contents("author_name")=""
response.redirect("index.asp")
end sub
Sub login()
author_UserName=replace(trim(Request.Form("author_Username")),"'","")
author_Password=replace(trim(Request.Form("author_Password")),"'","")
If author_UserName="" or author_Password="" Then
Response.Write ("<script>alert(' 作家登陆失败!\n\n 请输入登陆名和密码。');history.back();</script>")
Response.end
End If
If author_UserName=author_Password Then
Response.Write ("<script>alert(' 作家登陆失败!\n\n 登陆名和密码相同不能登陆。');history.back();</script>")
Response.end
End If
set rs=server.createobject("adodb.recordset")
sql="select author_ID,author_Name,author_password,author_addpost,author_lock from author where author_username='"&author_UserName&"'"
rs.open sql,conn,1,1
if rs.eof then
Response.Write ("<script>alert(' 作家登陆失败!\n\n 登陆名不存在。');history.back();</script>")
Response.end
else
if rs("author_password")<>Md5(author_Password) then
rs.close
set rs=nothing
Response.Write ("<script>alert(' 会员登陆失败!\n\n 密码输入错误。');history.back();</script>")
Response.end
end if
if rs("author_addpost")=0 then
Response.Write ("<script>alert(' 操作错误! \n\n 您的驻站申请未尚通过,如果您对您的帐户有异议请联系站长! ');history.back();</script>")
Response.End
End If
if rs("author_lock")=1 then
Response.Write ("<script>alert(' 操作错误! \n\n 您的帐户已被锁定,如果您对您的帐户有异议请联系站长! ');history.back();</script>")
Response.End
End If
if IsSqlDataBase = 1 then
conn.execute ("update author set author_logDate=getdate(),author_logins=author_logins+1 where author_username='"&author_UserName&"'")
else
conn.execute ("update author set author_logDate=NOW(),author_logins=author_logins+1 where author_username='"&author_UserName&"'")
end if
session("author_ID")=rs("author_ID")
session("author_Name")=rs("author_Name")
session.timeout=50
end if
response.redirect("author_index.asp")
'response.redirect(request.servervariables("HTTP_REFERER"))
rs.close
set rs=nothing
end sub
Sub loging()
author_UserName=replace(trim(Request.Form("author_Username")),"'","")
author_Password=replace(trim(Request.Form("author_Password")),"'","")
If author_UserName="" or author_Password="" Then
Response.Write ("<script>alert(' 作家登陆失败!\n\n 请输入登陆名和密码。');history.back();</script>")
Response.end
End If
If author_UserName=author_Password Then
Response.Write ("<script>alert(' 作家登陆失败!\n\n 登陆名和密码相同不能登陆。');history.back();</script>")
Response.end
End If
set rs=server.createobject("adodb.recordset")
sql="select author_ID,author_Name,author_password,author_addpost,author_lock from author where author_username='"&author_UserName&"'"
rs.open sql,conn,1,1
if rs.eof then
Response.Write ("<script>alert(' 作家登陆失败!\n\n 登陆名不存在。');history.back();</script>")
Response.end
else
if rs("author_password")<>Md5(author_Password) then
rs.close
set rs=nothing
Response.Write ("<script>alert(' 会员登陆失败!\n\n 密码输入错误。');history.back();</script>")
Response.end
end if
if rs("author_addpost")=0 then
Response.Write ("<script>alert(' 操作错误! \n\n 您的驻站申请未尚通过,如果您对您的帐户有异议请联系站长! ');history.back();</script>")
Response.End
End If
if rs("author_lock")=1 then
Response.Write ("<script>alert(' 操作错误! \n\n 您的帐户已被锁定,如果您对您的帐户有异议请联系站长! ');history.back();</script>")
Response.End
End If
if IsSqlDataBase = 1 then
conn.execute ("update author set author_logDate=getdate(),author_logins=author_logins+1 where author_username='"&author_UserName&"'")
else
conn.execute ("update author set author_logDate=NOW(),author_logins=author_logins+1 where author_username='"&author_UserName&"'")
end if
session("author_ID")=rs("author_ID")
session("author_Name")=rs("author_Name")
session.timeout=50
end if
response.redirect("author_index.asp")
rs.close
set rs=nothing
end sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -