⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usersetup.asp

📁 本程序蓝本为6kbbs 默认前台管理员的帐号是:woodcoal
💻 ASP
📖 第 1 页 / 共 2 页
字号:
canreg=false
mes=tl=""&"·本论坛不允许使用外部头像。<br>"
end if


if canreg=false then
tl=""
mes="<b>对不起!你不能成功地修改资料,可能存在以下问题。</b><br>"&mes&"·<a href='javascript:history.go(-1)'><img border=0 src=pic/re.gif align=absmiddle> 返回重新填写。</a>"
elseif canreg=true then
userinfo=email&"|"&home&"|"&burn&"|"&qq&"|"&sex&"|"&toupic&"|"&gxqm&"|"&session(prefix&"regtime")&"|"&diyname&"|"&qqshow
conn.execute("update [user] set userinfo='"&userinfo&"',question='"&question&"',answer='"&answer&"' where userid="&lguserid&"")
tl=1
mes="你的资料修改成功。"
end if
call sendinfo(tl,mes)
%>
<%case"mypwd"%><form method="POST" action="usersetup.asp?action=editpwd"><%=ttop%>
<table bordercolor="<%=c1%>" align="center" border="1" bgcolor="<%=c2%>"cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>">
  <tr>
    <td class=td1 width="90%" bgcolor="<%=c1%>" background="<%=tbg%>" height="28" colspan="2">&nbsp; <img src="pic/gl.gif" border="0"><font color="<%=c3%>"> 修改密码</font></td>
          <tr>
        <td width="40%">
        <p style="line-height: 120%; margin: 4"><b>旧密码确认</b>:<br>
        请输入旧密码进入确认</td>
        <td width="51%"> <input type="password" name="oldpwd" size="30"></td>
      </tr>
      <tr>
        <td>
        <p style="line-height: 120%; margin: 4">
<b>新密码(最多16位)</b>:<br>请不要使用任何类似 '*'、' ' 或 HTML 字符</td>
        <td> <input type="password" name="newpwd" size="30"></td>
      </tr>
      <tr>
        <td>
        <p style="line-height: 120%; margin: 4"><b>重复密码(最多16位)</b>:<br>请再输一遍确认</td>
        <td> <input type="password" name="repwd" size="30"></td>
      </tr>
      <tr>
        <td colspan="2" height="40" align="center">
        <input class=submit type=submit value="   立 即 修 改   " name=Submit>&nbsp;&nbsp; 
        <input class=submit type=reset value="   重 新 填 写   " name=Submit2></td>
      </tr>
    </td>
  </tr>
</table><%=tbottom%></form>
<%case"editpwd"
dim oldpwd,newpwd,repwd,canedit
oldpwd=Replace(Request.Form("oldpwd"),"'","''")
newpwd=Replace(Request.Form("newpwd"),"'","''")
repwd=Replace(Request.Form("repwd"),"'","''")

canedit=true

if newpwd="" or repwd="" then
canedit=false
mes="·请填写完整必填的资料。<br>"
else
mes=""

if len(newpwd)>16 then canedit=false : mes=mes&"·你填写的新密码长度超过了16。<br>"
if passc(newpwd)=false then canedit=false:mes=mes&"·你的新密码含有非法字符。<br>"
sickpass=split("123$$1234$$12345$$123456$$1234567$$12345678$$aaa$$111","$$")
for i=0 to ubound(sickpass) 
if len(newpwd)<3 or newpwd=sickpass(i) then
canedit=false
mes=mes&"·你的新密码属于弱口令,请更换密码。<br>"
exit for
end if
next
if repwd<>newpwd then canedit=false : mes=mes&"·你两次输入的密码不一样。<br>"

end if

if canedit=false then
tl=""
mes="<b>对不起!你不能成功修改你的密码,可能存在以下问题。</b><br>"&mes&"·<a href='javascript:history.go(-1)'><img border=0 src=pic/re.gif align=absmiddle> 返回重新填写。</a>"
elseif canedit=true then
newpwd=md5(newpwd)
conn.execute("update [user] set [password]='"&newpwd&"' where userid="&lguserid&"")

Response.Cookies(prefix)("lgpwd")=newpwd
if lgcook>0 then
Response.Cookies(prefix).Expires=date+lgcook
end if

tl=1
mes="你的密码修改成功。"

end if
call sendinfo(tl,mes)
%>
<%case"display"
dim indexinfo,gonggao,lm,online
indexinfo=checknum(request.Cookies(prefix&"1")("indexinfo"))
gonggao=checknum(request.Cookies(prefix&"1")("gonggao"))
lm=checknum(request.Cookies(prefix&"1")("lm"))
online=checknum(request.Cookies(prefix&"1")("online"))
userinfo=checknum(request.Cookies(prefix&"1")("userinfo"))

%><form method="POST" action="cookies.asp?action=display">
<%=ttop%>
<table bordercolor="<%=c1%>" align=center border="1" bgcolor="<%=c2%>" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>">
  <tr>
    <td class=td1 width="100%" bgcolor="<%=c1%>" background="<%=tbg%>" height="28">&nbsp; <img src="pic/gl.gif" border="0"> 
    <font color="<%=c3%>">论坛显示设置</font></td>
  </tr>
  <tr>
    <td width="100%">
    <table border="1" bordercolor="<%=c1%>" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" bgcolor="<%=c2%>">
      <tr>
        <td width="70%">
        <p style="line-height: 150%; margin: 5"><b>论坛首页信息:</b><br>比如新会员、会员数、主题数、总帖数、今日帖数、最高日帖、首页公告。</td>
        <td width="30%"> <input type="radio" value="1" name="indexinfo" <%if indexinfo=1 or indexinfo="" then%>checked<%end if%>>显 示 <input type="radio" name="indexinfo" value="2" <%if indexinfo=2 then%>checked<%end if%>>隐 藏</td>
      </tr>
            <tr>
        <td>
        <p style="line-height: 150%; margin: 5"><b>分论坛公告:</b><br>也许你从来都不看分论坛的公告。如果这样,可以隐藏该项。</td>
        <td> <input type="radio" value="1" name="gonggao" <%if gonggao=1 or gonggao="" then%>checked<%end if%>>显 示 
        <input type="radio" name="gonggao" value="2" <%if gonggao=2 then%>checked<%end if%>>隐 藏</td>
      </tr>
      <tr>
        <td>
        <p style="line-height: 150%; margin: 5"><b>论坛在线统计:</b><br>论坛统计当前在线人数以及列表。</td>
        <td> <input type="radio" value="1" name="online" <%if online=1 or online="" then%>checked<%end if%>>显 示 
        <input type="radio" name="online" value="2" <%if online=2 then%>checked<%end if%>>隐 藏</td>
      </tr>
      <tr>
        <td>
        <p style="line-height: 150%; margin: 5"><b>论坛联盟:</b><br>首页下部的论坛联盟。如果你觉得没有用处,可以把该项隐藏掉。</td>
        <td> <input type="radio" value="1" name="lm" <%if lm=1 or lm="" then%>checked<%end if%>>显 示 
        <input type="radio" name="lm" value="2" <%if lm=2 then%>checked<%end if%>>隐 藏</td>
      </tr>
      <tr>
        <td>
        <p style="line-height: 150%; margin: 5"><b>帖子中用户信息:</b><br>在浏览帖子中显示的作者的信息,比如用户头像、积分、等级……<br>隐藏该项可以获得非常快的帖子显示速度。</td>
        <td> <input type="radio" value="1" name="userinfo" <%if userinfo=1 or userinfo="" then%>checked<%end if%>>显 示 
        <input type="radio" name="userinfo" value="2" <%if userinfo=2 then%>checked<%end if%>>隐 藏</td>
      </tr>

      <tr>
        <td colspan="2" height="40" align="center">
        <input type="submit" value="     确  认  修  改     " name="B1"></td>
      </tr>
    </table>
    </td>
  </tr>
</table>
<%=tbottom%></form>

<%case"administrator"%>
<%=ttop%>
<table align="center" border="1" bordercolor="<%=c1%>"  cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>" bgcolor="<%=c2%>">
  <tr>
 <td class=td1 width="100%" bgcolor="<%=c1%>" background="<%=tbg%>" height="28" colspan="2">&nbsp;<img src="pic/gl.gif" border="0"> 版主评定</td>
  </tr><tr><td valign=middle height=100><CENTER>
<TABLE cellSpacing=1 cellPadding=1 width=97% align=center border=0>
<TR align=middle>
<TD height=23><b>用户名</b></TD>
<TD height=23><b>担任职务</b></TD>
<TD height=23><b>总贴数目</b></TD>
<TD height=23><b>失踪天数</b></TD>
<TD height=23><b>最后登陆</b></TD>
<TD height=23><b>评价</b></TD>
<%
dim pagesetup,TotalPage,pagecount,myvar,upsent,comeon
set rs=server.createobject("adodb.recordset")
sql="select * from [user] where grade >=14"
rs.Open sql,Conn,1

pagesetup=10 '设定每页的显示数量
rs.pagesize=pagesetup
TotalPage=rs.pagecount  '总页数
PageCount = cint(Request.QueryString("ToPage"))
if PageCount <1 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
if TotalPage>0 then rs.absolutepage=PageCount '跳转到指定页数
i=0
Do While Not RS.EOF and i<pagesetup
i=i+1


if datediff("d",rs("lasttime"),date())<=3 then
myvar="<font color=blue>工作十分负责!值得学习.</font>"
elseif datediff("d",rs("lasttime"),date())>=30 then
myvar="<font color=red>30</font> 日未登陆,将被取消资格!</font>"
elseif datediff("d",rs("lasttime"),date())>=15 then
myvar="超过 <font color=red>15</font> 天没有登陆,警告!"
elseif datediff("d",rs("lasttime"),date())>=7 then
myvar="注意,您已经 <font color=red>7</font> 天以上没有登陆了"
elseif datediff("d",rs("lasttime"),date())<=7 then
myvar="好象已有点松散,但 <font color=red>7</font> 天内还有登陆"

end if
upsent=datediff("d",rs("lasttime"),date())
if upsent=0 then
upsent="<font color=blue>我很勤快的.</font>"
end if

%>
<TR align=middle class=a4>
<TD height=50 align=center><p align="left"><img src="pic/tl.gif" border="0"> <a href=userinfo.asp?usid=<%=rs("userid")%>><%=rs("name")%></a> </td>
<TD height=50 align=center><%gradename(rs("grade"))%></TD>
<TD height=50 align=center> <%=rs("alltopicnum")%>贴</TD>
<TD height=50 align=center><%=upsent%></TD>
<TD height=50 align=center><%=rs("lasttime")%></TD>
<TD height=50 align=center><%=myvar%><br><%=comeon%></TD>




<%
RS.MoveNext
loop
RS.Close

%></table><center>

[
<script>
document.write("页码:");
PageCount=<%=TotalPage%> //总页数
topage=<%=PageCount%>   //当前停留页
for (var i=1; i <= PageCount; i++) {
if (i <= topage+3 && i >= topage-3 || i==1 || i==PageCount){
if (i > topage+4 || i < topage-2 && i!=1 && i!=2 ){document.write(" ... ");}
if (topage==i){document.write(" "+ i +" ");}
else{
document.write("<a href=?topage="+i+"&action=administrator>"+ i +"</a> ");
}
}
}
</script>

]<br>
<%response.write"</center></td></tr></table>"%><%=tbottom%><%end select
call down%>

⌨️ 快捷键说明

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