PJblog首页实现登陆框
作者:Darph 日期:2009-01-07
网上看了看,找到了这个教程,能实现首页登陆,现在我作了简单的个性修改,跟大家分享一下,建议改前先备份文件。效果看本站!http://www.lmwebs.cn
打开 common/library.asp文件,
**********************************************
用户面板
'**********************************************
在这个范围贴上下面的代码
'**********************************************
输出日记统计信息
'**********************************************
引用内容function userPanel()
userPanel=""
if memName<>Empty then userPanel=userPanel&" <b>"&memName&"</b>,欢迎你!<br/>你的权限: "&stat_title&"<br/><br/>"
if stat_Admin=true then userPanel=userPanel+"<a href=""control.asp"" class=""sideA"" accesskey=""3"">系統管理</a>"
if stat_AddAll=true or stat_Add=true then userPanel=userPanel+"<a href=""blogpost.asp"" class=""sideA"" accesskey=""N"">发表日记</a>"
if (stat_AddAll=true or stat_Add=true) and (stat_EditAll or stat_Edit) then
if isEmpty(session(CookieName&"_draft_"&memName)) then
session(CookieName&"_draft_"&memName)=conn.execute("select count(log_ID) from blog_Content where log_Author='"&memName&"' and log_IsDraft=true")(0)
SQLQueryNums=SQLQueryNums+1
end if
if session(CookieName&"_draft_"&memName)>0 then
userPanel=userPanel+"<a href=""default.asp?display=draft"" class=""sideA"" accesskey=""D""><strong>编辑草稿 ["&session(CookieName&"_draft_"&memName)&"]</strong></a>"
else
userPanel=userPanel+"<a href=""default.asp?display=draft"" class=""sideA"" accesskey=""D"">编辑草稿</a>"
end if
end if
if memName<>Empty then
userPanel=userPanel&"<form name=""checkUser"" action=""login.asp"" method=""post"">
<input name=""action"" type=""hidden"" value=""login""/><label><b>用户名︰</b>
<input name=""username"" type=""text"" size=""12"" class=""userpass"" maxlength=""24""/></label><br/><label><B>密 码︰</B>
<input name=""password"" type=""password"" size=""12"" class=""userpass""/></label><br/><label>
<input name=""KeepLogin"" type=""checkbox"" value=""1""/>记住我的登陆信息</label><br/>
<input type=""submit"" value=""登 陆"" class=""userbutton""/>
<input type=""button"" value=""注 册"" class=""userbutton"" onclick=""location.href='register.asp'""/></form>"
end if
end function
这样话,会产生首页中调用没有验证码,然后找到common/checkUser.asp 去掉以下这两段:
第一段代码:
程序代码
IF validate="" Then
ReInfo(0)="错误信息"
ReInfo(1)="<b>请输入登录验证码</b><br/><a href=""javascript:history.go(-1);"">请返回重新输入</a>"
ReInfo(2)="WarningIcon"
login=ReInfo
logout(false)
exit function
end if
第二段代码:
程序代码
IF cstr(lcase(Session("GetCode")))<>cstr(lcase(validate)) then
ReInfo(0)="错误信息"
ReInfo(1)="<b>验证码有误,请返回重新输入</b><br/><a href=""javascript:history.go(-1);"">请返回重新输入</a>"
ReInfo(2)="ErrorIcon"
login=ReInfo
logout(false)
exit function
end if
去掉它的验证,就行了!
效果看本站!
评论: 0 | 引用: 0 | 查看次数: -
发表评论
上一篇
下一篇
















文章来自:
Tags: