📄 class_html.asp
字号:
end if
.write("<tr><td width='88'>"&str(i)&"</td><td width='217'><input name='"&namestr(i)&"' type='"&intype(i)&"' id='"&namestr(i)&"' value='"&valstr(i)&"' "&able&"></td></tr>")&vbcrlf
next
if xgrs("type")="superadmin" then
typeinfo=array("checked"," ")
elseif xgrs("type")="infoadmin" then
typeinfo=array(" ","checked")
end if
.write("<tr><td>管理员类型:</td><td><input type='radio' name='infotype' value='superadmin' "&typeinfo(0)&">超级管理员<input type='radio' name='infotype' value='infoadmin' "&typeinfo(1)&">信息管理员</td></tr>")&vbcrlf
.write("<input type='hidden' name='type' value='1'>")
xgrs.close
set xgrs=nothing
end if
.write("<tr><td colspan='2'><div align='center'><table width='168' border='0' cellspacing='0' cellpadding='0'><tr>")&vbcrlf
.write("<td width='88'><input type='submit' name='Submit' value='修改'></td>")&vbcrlf
.write("<td width='80'><div align='right'><input type='reset' name='Submit1' value='重置'></div></td>")&vbCrlf
.write("</tr></table></div></td></tr></table></form>")&vbCrlf
end with
else
Cnwy_public.errinfo("大哥你玩什么?不要乱动啊~?")
end if
set Cnwy_Public=nothing
Call ConnClose()
End Function
Public Function userhtml(ByVal ty) '所有用户列表和在线用户列表页面的HTML
dim user,path,i,str1,str2,str3,str4,str5
dim rs,sql,Cnwy_Public,Cnwy_user
set Cnwy_Public= new CnwyAsp_Public
set Cnwy_user=new CnwyAsp_user
Call ConnOpen()
if ty="online" then 'ty的值为online则是在线用户列表页面的HTML,
str1="online=true and" 'ty的值为ALLUSER则是所有用户列表页面的HTML
str2="where online=true"
str3="查看当前在线"
str4="当前在线管理员:"
str5="当前在线使用的IP"
path=request.servervariables("PATH_INFO")&"?action=online.asp"
info="您查找的用户没有在线或者此用户不存在."
elseif ty="alluser" then
str1=""
str2=""
str3="所有"
str4="本站管理员共有:"
str5="上次登陆使用的IP"
path=request.servervariables("PATH_INFO")&"?action=alluser.asp"
info="您查找的用户用户不存在."
end if
i=0
user=request.form("search")
if user<>"" then
Cnwy_Public.checkss=user
user=Cnwy_Public.checkstr
sql="select * from CnwyAsp_admin where "&str1&" user='"&user&"' "
else
sql="select * from CnwyAsp_admin "&str2&" order by id desc "
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof and not rs.bof then
rs.pagesize=Cnwy_public.online
page=request.form("cnwy")
if page="" then
page=1
end if
with response
.write("<table width='0' border='1' align='center' cellpadding='0' cellspacing='0' bordercolor='#C8C8C8'>")&vbcrlf
.write("<tr><td colspan='4' ><div align='center'>欢迎"&request.cookies("user")&"来查看"&str3&"管理员列表</div></td></tr>")&vbcrlf
.write("<tr><td colspan='4'><table width='448' border='0' cellspacing='0' cellpadding='0'><form name='cnwyASP' method='post' action='"&path&"'><tr>")
.write("<td width='82'><div align='center'>管理员搜索:</div></td><td width='80'><input name='search' type='text' size='15' value='输入帐号进行查询'></td><td width='52'><input type='submit' name='Submit' value='查找'></td><td width='150'>"&str4&rs.recordcount&"人</td></tr></form></table></td></tr>")&vbcrlf
.write("<tr><td width='104' ><div align='center'>管理员帐号</div></td><td width='103' ><div align='center'>管理员类型</div></td><td width='130' ><div align='center'>"&str5&"</div></td><td width='122' ><div align='center'>相应的操作</div></td></tr>")&vbcrlf
rs.absolutepage=page
do while not rs.eof and i < rs.pagesize
.write("<tr><td ><div align='center'>"&rs("user")&"</div></td><td ><div align='center'>")
Cnwy_user.checktype(rs("type"))
.write("</div></td><td ><div align='center'>"&rs("ip")&"</div></td><td >|<a href='user.asp?action=usermassage.asp&id="&rs("id")&"'>查看资料</a>|<a href='user.asp?action=Wmassage.asp&user="&rs("user")&"'>发送信息</a>|</td></tr>")&vbcrlf
i=i+1
rs.movenext
loop
.write("<tr><td colspan='4'> <div align='center'>")
Cnwy_Public.pagelist path,rs.recordcount,rs.pagecount,page
.write("</div></td></tr></table>")
end with
else
Cnwy_Public.massage(info)
end if
rs.close
set rs=nothing
set Cnwy_public=nothing
set Cnwy_user=nothing
Call ConnClose()
End Function
public function usermassage()
dim id,info,zt,typeinfo
dim rs,sql,Cnwy_public,Cnwy_user
set Cnwy_public=new CnwyAsp_public
set Cnwy_user=new CnwyAsp_user
Call ConnOpen()
id=request.querystring("id")
if isnumeric(id) then
id=clng(id)
sql="select * from CnwyAsp_admin where id="&id
set rs=conn.execute(sql)
if not rs.eof and not rs.bof then
with response
.write("<table width='0' border='1' align='center' cellpadding='0' cellspacing='0' bordercolor='#C8C8C8'><tr><td height='20' colspan='2'><div align='center'>欢迎查看管理员"&rs("user")&"的资料</div></td></tr>")&vbcrlf
.write("<tr><td width='78' height='20'><div align='center'>帐 号:</div></td><td width='188'>"&rs("user")&"</td></tr>")&vbcrlf
.write("<tr><td height='20'><div align='center'>真实姓名:</div></td><td>"&rs("name")&" </td></tr>")&vbcrlf
.write("<tr><td height='20'><div align='center'>QQ 号 码:</div></td><td>"&rs("qq")&" </td></tr>")&vbcrlf
.write("<tr><td height='20'><div align='center'>E-Mail:</div></td><td> "&rs("email")&"</td></tr>")&vbcrlf
.write("<tr><td height='20'><div align='center'>固定电话:</div></td><td>"&rs("phone")&"</td></tr>")&vbcrlf
.write("<tr><td height='20'><div align='center'>手机号码:</div></td><td>"&rs("cellphone")&"</td></tr>")&vbcrlf
.write("<tr><td height='20'><div align='center'>登陆次数:</div></td><td>"&rs("login")&"</td></tr>")&vbcrlf
if rs("zt")=true then
if rs("online")=true then
zt="在线"
else
zt="下线"
end if
else
zt="帐号被锁定"
end if
.write("<tr><td height='20'><div align='center'>当前状态:</div></td><td>当前此用户"&zt&"</td></tr>")&vbcrlf
.write("<tr><td height='20'><div align='center'>管理员类型:</div></td><td>")
Cnwy_user.checktype(rs("type"))
.write("</td></tr>")&vbcrlf
.write("<tr><td height='20'><div align='center'>管理权限:</div></td><td> ")
Cnwy_user.chkmaster rs("type"),rs("master")
.write("</td></tr>")&vbcrlf
.write("<tr><td height='20'>上次登陆IP:</td><td>"&rs("ip")&"</td></tr>")&vbcrlf
.write("<tr><td height='20' colspan='2'><table width='0' border='0' align='center' cellpadding='0' cellspacing='0'>")&vbcrlf
.write("<tr><td width='89' height='20'><div align='right'><a href=javascript:history.go(-1);>[返回上一页]</div></td><td width='107'><div align='right'><a href='user.asp?action=Wmassage.asp&user="&rs("user")&"'>[发送信息给他]</a></div></td></tr></table></td></tr></table>")&vbcrlf
end with
else
info="对不起没有此用户不存在."
end if
else
info="大哥你干什么?SQL注入吗?"
end if
if info<>"" then
Cnwy_Public.errinfo(info)
end if
rs.close
set rs=nothing
set Cnwy_Public=nothing
set Cnwy_user=nothing
Call ConnClose()
end function
public function massage(ByVal ty) '信箱页面设计,0为收件箱,1为发件箱
dim rs,sql,Cnwy_Public,Cnwy_user
dim user,str,str1,path,page,info,i,who,img
set Cnwy_Public=new CnwyAsp_Public
set Cnwy_user=new CnwyAsp_user
i=0
user=request.cookies("user")
page=request.form("cnwy")
Cnwy_user.usermaildx=user
call connopen()
if Cnwy_public.maildx=<Cnwy_user.Mdx then
response.write("<script language='javascript'>")
response.write("alert('您的信箱空间已经满了.请赶快清理');")
response.write("</script>")
end if
if page="" then
page=1
end if
set rs=server.createobject("adodb.recordset")
if ty=0 then
sql="select * from CnwyAsp_massage where to='"&user&"' order by id desc"
str="收到"
str1="发送人"
path=request.servervariables("PATH_INFO")&"?action=massage.asp"
elseif ty=1 then
sql="select * from CnwyAsp_massage where sender='"&user&"' order by id desc"
str="发送"
str1="收件人"
path=request.servervariables("PATH_INFO")&"?action=Smassage.asp"
end if
rs.open sql,conn,1,1
with response
.write("<SCRIPT language=JavaScript src=inc/js.js></SCRIPT>")&vbcrlf
.write("<form name='form' method='post' action='user.asp?action=Msdel.asp'><table width='0' border='1' align='center' cellpadding='0' cellspacing='0' bordercolor='#C8C8C8'>")&vbcrlf
.write("<tr><td colspan='4' ><div align='center'>欢迎"&user&"来查看自己"&str&"的信件</div></td></tr>")&vbcrlf
.write("<tr><td colspan='4' ><table width='0' border='0' align='center' cellpadding='0' cellspacing='0'>")&vbcrlf
.write("<tr><td width='50'><a href='user.asp?action=massage.asp'><img src='images/inbox.gif' width='40' height='40' border='0'></a></td><td width='50'><a href='user.asp?action=Smassage.asp'><img src='images/M_outbox.gif' width='40' height='40' border='0'></a></td><td width='50'><a href='user.asp?action=Wmassage.asp'><img src='images/write.gif' width='40' height='40' border='0'></a></td></tr>")
.write("</table></td></tr>")&vbcrlf
.write("<tr><td colspan='4' > <table width='645' border='0' cellpadding='0' cellspacing='0'><tr><td width='124'>信箱空间使用状况:</td><td width='339'><img src='images/maildx.gif' width='"&int(formatnumber(Cnwy_user.Mdx/cnwy_public.maildx)*300)&"' height='10' alt='已使用"&int(formatnumber(Cnwy_user.Mdx/cnwy_public.maildx)*100)&"%'></td>")
.write("<td width='182'>每人的信箱大小为:"&Cnwy_public.maildx/1024&"KB</td></tr></table></td></tr>")
.write("<tr><td width='380' height='20' ><div align='center'>主题</div></td><td width='90' ><div align='center'>"&str1&"</div></td><td width='140' ><div align='center'>发送日期</div></td><td width='85' ><div align='center'>大小</div></td></tr>")&vbcrlf
if not rs.eof and not rs.bof then
if ty=0 then
who=rs("sender")
elseif ty=1 then
who=rs("to")
end if
rs.pagesize=Cnwy_public.mailpage
rs.absolutepage=page
do while not rs.eof and i<rs.pagesize
if rs("look")=false then
img="<img src='images/news.gif' width='21' height='14'>"
else
img="<img src='images/olds.gif' width='21' height='14'>"
end if
.write("<tr><td height='25'><table width='0' border='0' cellspacing='0' cellpadding='0'><tr><td width='20' height='17' ><input type='checkbox' name='checked' value='"&rs("id")&"'></td><td width='21'>"&img&"</td><td width='357' valign='bottom'><a href='user.asp?action=Readmassage.asp&id="&rs("id")&"'>"&rs("title")&" </td></tr></table></td>")
.write("<td ><div align='center'>"&who&"</div></td><td ><div align='center'>"&rs("date")&"</div></td><td><div align='right'>"&rs("dx")&"Byte<div> </td></tr>")&vbcrlf
i=i+1
rs.movenext
loop
else
.write("<tr> <td colspan='4' >对不起,暂时没有任何数据!</td></tr>")
end if
.write("<tr> <td colspan='4' ><table width='0' border='0' cellspacing='0' cellpadding='0' align='center' >")&vbcrlf
.write("<tr><td width='181'><table width='0' border='0' align='center' cellpadding='0' cellspacing='0'>")&vbcrlf
.write("<tr><td width='66'><input type='button' onclick='CheckAll(this.form)' name='chkall' value=全选></td><td width='65'><input onclick='CheckOthers(this.form)' type='button' name='chkOthers' value='反选'></td>")&vbcrlf
.write("<td width='70'><input type='submit' name='Submit' value='彻底删除'></table></td></form><td width='520'><div align='right'> ")
Cnwy_Public.pagelist path,rs.recordcount,rs.pagecount,page
.write("</div></tr></td></table></td></tr></table></td></tr></table>")&vbcrlf
end with
set Cnwy_Public=nothing
set Cnwy_user=nothing
rs.close
set rs=nothing
call connclose()
end function
Public Function Msaddhtml() '撰写信息及回复信息的页面设置
dim user,id,rs,sql,title,content
dim fso,fli,Cnwy_public
set Cnwy_public=new CnwyAsp_public
user=trim(request.querystring("user"))
id=trim(request.querystring("id"))
if id<>"" then
if isnumeric(id) then
call connopen()
sql="select * from CnwyAsp_Massage where id="&id
set rs=conn.execute(sql)
if not rs.eof and not rs.bof then
user=rs("sender")
title="RE:"&rs("title")
content="-----------在"&rs("date")&" 您来信中写道:---------"&"<br>"
set fso=server.createobject("scripting.filesystemobject")
set fli=fso.opentextfile(server.mappath(rs("content")),1)
content=content&fli.readall
content=content&"<br>"
fli.close
rs.close
set fso=nothing
set rs=nothing
content=content&"--------------------------------------"&"<br>"&vbcrlf
else
info="对不起这封信件已经被删除,您无法进行这样的操作."
end if
else
info="大哥你歇歇吧.请问你累不累啊?不累请加QQ32940696"
end if
end if
with response
.write("<form name='cnwy' method='post' action='user.asp?action=Mssave.asp'>")&vbcrlf
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -