📄 class_html.asp
字号:
<%
'====================================================================
'= CnwyAsp 请假信息管理系统
'= 河南省宝丰县第二高级中学 文 三(2) 班
'= 作者:王铮(Cnwy)QQ32940696
'= Copyright (c) 2005 Cnwy Wang All Rights Reserved.
'=-------------------------------------------------------------------
'= 文件名称:class_html.asp
'= 摘 要:系统页面HTML类文件
'=-------------------------------------------------------------------
'= 开始编写日期:2005年08月26日
'= 编写完成日期:
'= 最后修改日期
'====================================================================
%>
<%
Class CnwyAsp_Html
private sub class_initialize()
end sub
Public Function MbHtml(ByVal ty) '页面的开头和结尾html
dim Cnwy_public
set Cnwy_public=new CnwyAsp_Public
with response
if ty="top" then
.write("<html>")&vbCrlf
.write("<head>")&vbCrlf
.write("<meta http-equiv=Content-Type content=text/html; charset=gb2312>")&vbCrlf
.write("<title>"&Cnwy_public.title&"</title>")&vbCrlf
.write("</head>")&vbCrlf
.write("<link href=Inc/admin.css rel=stylesheet type=text/css>")&vbCrlf
.write("<body>")&vbCrlf
elseif ty="foot" then
.write("</body>")&vbCrlf
.write("</head>")&vbCrlf
.write("</html>")
end if
end with
End Function
public function menuhtml(ByVal ty) '用户登陆管理栏目的HTML
dim headstr,str,footstr,strlist,urllist,arraynm,flag
with response
headstr="<tr><td height='18'><div align='center'><a href='"
str="' target='main'>"
footstr="</a></div></td></tr>"
.write(" <tr><td width='142' height='22'><div align='center' class='style2'>我的管理权限</div></td></tr>")&vbCrlf
.write(headstr&"admin.asp?action=main.asp"&str&"管理首页"&footstr)&vbcrlf
.write(headstr&"user.asp?action=xg.asp"&str&"修改我的资料"&footstr)&vbcrlf
.write(headstr&"user.asp?action=massage.asp"&str&"我的信箱"&footstr)&vbcrlf
if ty=0 then
strlist=array("管理员增加","管理员管理","系统设置","机构管理","值班列表管理","技术公告增加","技术公告管理","数据库操作")
urllist=array("user.asp?action=add.asp","user.asp?action=Manage.asp","Manage.asp?action=system.asp","Manage.asp?action=jg.asp","Manage.asp?action=Mduty.asp","Manage.asp?action=Announce.asp","Manage.asp?action=AnnManage.asp","Database.asp")
flag=true
elseif ty=1 then
if len(request.cookies("master"))=1 then
if instr(request.cookies("master"),"A")<>0 then
strlist=array("编写假条","假条回复信息","我编写的假条")
urllist=array("Manage.asp?action=Vacation.asp","Manage.asp?action=reVinfo.asp","Manage.asp?action=Myedit.asp")
elseif instr(request.cookies("master"),"B")<>0 then
strlist=array("未审批的假条","我审批过的假条")
urllist=array("Manage.asp?action=PassVinfo.asp","Manage.asp?action=PassedVinfo.asp")
elseif instr(request.cookies("master"),"C")<>0 then
strlist=array("请假信息审核","我审核启用的假条","我审核作废的假条")
urllist=array("Manage.asp?action=TestVinfo.asp","Manage.asp?action=TestedVinfo.asp","Manage.asp?action=TesteVinfo.asp")
end if
elseif len(request.cookies("master"))=2 then
if instr(request.cookies("master"),"AB")<>0 then
strlist=array("编写假条","假条回复信息","我编写的假条","未审批的假条","我审批过的假条")
urllist=array("Manage.asp?action=Vacation.asp","Manage.asp?action=reVinfo.asp","Manage.asp?action=Myedit.asp","Manage.asp?action=PassVinfo.asp","Manage.asp?action=PassedVinfo.asp")
elseif instr(request.cookies("master"),"AC")<>0 then
strlist=array("编写假条","假条回复信息","我编写的假条","请假信息启用审核","请假信息作废审核","我审核启用的假条","我审核作废的假条")
urllist=array("Manage.asp?action=Vacation.asp","Manage.asp?action=reVinfo.asp","Manage.asp?action=Myedit.asp","Manage.asp?action=TestVinfo.asp","Manage.asp?action=TstVac.asp","Manage.asp?action=TestedVinfo.asp","Manage.asp?action=TesteVinfo.asp")
elseif instr(request.cookies("master"),"BC")<>0 then
strlist=array("未审批的假条","我审批过的假条","请假信息启用审核","请假信息作废审核","我审核启用的假条","我审核作废的假条")
urllist=array("Manage.asp?action=PassVinfo.asp","Manage.asp?action=PassedVinfo.asp","Manage.asp?action=TestVinfo.asp","Manage.asp?action=TstVac.asp","Manage.asp?action=TestedVinfo.asp","Manage.asp?action=TesteVinfo.asp")
end if
elseif instr(request.cookies("master"),"ABC")<>0 then
strlist=array("编写假条","假条回复信息","我编写的假条","未审批的假条","我审批过的假条","请假信息启用审核","请假信息作废审核","我审核启用的假条","我审核作废的假条")
urllist=array("Manage.asp?action=Vacation.asp","Manage.asp?action=reVinfo.asp","Manage.asp?action=Myedit.asp","Manage.asp?action=PassVinfo.asp","Manage.asp?action=PassedVinfo.asp","Manage.asp?action=TestVinfo.asp","Manage.asp?action=TstVac.asp","Manage.asp?action=TestedVinfo.asp","Manage.asp?action=TesteVinfo.asp")
end if
.write(headstr&"user.asp?action=duty.asp"&str&"值班管理员列表"&footstr)&vbcrlf
flag=true
elseif ty=2 then
.write(headstr&"user.asp?action=duty.asp"&str&"值班管理员列表"&footstr)&vbcrlf
flag=false
end if
if flag=true then
arraynm=ubound(strlist)
for i= 0 to arraynm
.write(headstr&urllist(i)&str&strlist(i)&footstr)&vbcrlf
next
end if
.write(headstr&"user.asp?action=alluser.asp"&str&"所有管理员列表"&footstr)&vbcrlf
.write(headstr&"user.asp?action=online.asp"&str&"在线管理员列表"&footstr)&vbcrlf
.write(headstr&"query.asp"&str&"请假信息查询"&footstr)&vbcrlf
.write(" <tr><td height='18'><div align='center'><strong><a href='user.asp?action=exit.asp' target='_parent'>退出管理系统</a></strong></div></td></tr>")&vbcrlf
End With
end function
'==================================================================================================
'用户操作页面设计由此开始
'开始写做时间:2005年08月26日
'最后修改时间:
'==================================================================================================
public function useraddhtml() '增加用户的界面HTML
dim str,namestr,num
str=array("帐 号:","密 码:","姓 名:","QQ号码:","Email地址:","固定电话","手机号码:")
namestr=array("user","pass","name","qq","email","phone","cell")
num=ubound(namestr)
with response
.write("<form name='form1' method='post' action='user.asp?action=save.asp'>")&vbcrlf
.write("<table width='0' border='1' align='center' cellpadding='0' cellspacing='0' bordercolor='#C8C8C8'>")&vbcrlf
.write("<tr><td colspan='2'><div align='center'>欢迎"&request.Cookies("user")&"来增加管理员</div></td></tr>")&vbcrlf
for i=0 to num
.write("<tr><td width='88'>"&str(i)&"</td><td width='217'><input name='"&namestr(i)&"' type='text' id='"&namestr(i)&"'></td></tr>")&vbcrlf
next
.write("<tr><td>管理员类型:</td><td><input type='radio' name='infotype' value='superadmin' >超级管理员<input type='radio' name='infotype' value='infoadmin' >信息管理员</td></tr>")&vbcrlf
.write("<input type='hidden' name='type' value='2'>")&vbcrlf
.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
end function
Public Function Managehtml() '用户管理页面的HTML
set Cnwy_Public=new CnwyAsp_Public
call connopen()
dim Mrs,sql,lcstr,ltype,typestr,admin,page,i,user
dim Cnwy_Public
i=0
user=request.form("search")
if user<>"" then
Cnwy_Public.checkss=user
user=Cnwy_Public.checkstr
sql="select * from CnwyAsp_admin where user='"&user&"'"
else
sql="select * from CnwyAsp_admin order by id desc "
end if
set Mrs=server.CreateObject("ADODB.Recordset")
Mrs.open sql,conn,1,1
if not Mrs.eof and not Mrs.bof then
Mrs.pagesize=Cnwy_Public.adminpage
page=request.form("cnwy")
if page="" then
page=1
end if
path=request.ServerVariables("PATH_INFO")&"?action=Manage.asp"
with response
.write("<table width='0' border='1' align='center' cellpadding='0' cellspacing='0' bordercolor='#C8C8C8'>")&vbcrlf
.write("<tr><td colspan='5'><div align='center'>欢迎"&request.cookies("user")&"来到管理员管理页面</div></td></tr>")&vbcrlf
.write("<tr><td colspan='5'><table width='248' border='0' cellspacing='0' cellpadding='0'><form name='cnwyASP' method='post' action='"&path&"'>")&VBCRLF
.Write("<tr><td width='82'><div align='center'>管理员搜索:</div></td><td width='114'><input name='search' type='text' size='15' value='输入帐号进行查询'></td> <td width='52'><input type='submit' name='Submit' value='查找'></td></tr></form></table> </tr></td>") &Vbcrlf
.write("<tr><td width='97'><div align='center'>帐号</div></td><td width='93'><div align='center'>当前状态</div></td><td width='89'><div align='center'>管理员类型</div></td><td width='180'><div align='center'>相应操作</div></td></tr>")&Vbcrlf
Mrs.absolutepage=page
do while not Mrs.eof and i<Mrs.pagesize
if Mrs("type")="superadmin" then
typestr=""
admin="超级管理员"
elseif Mrs("type")="infoadmin" then
typestr="<a href='user.asp?action=master.asp&user="&Mrs("user")&"'>权限编辑</a>|"
admin="信息管理员"
end if
if Mrs("zt")=true then
lcstr="正常"
ltype="|<a href=javascript:if(confirm('您真的要锁定"&user&"的状态吗?')){window.location.href('user.asp?action=zt.asp&type=lock&user="&Mrs("user")&"');} >锁定</a>"
elseif Mrs("zt")=false then
lcstr="锁定"
ltype="|<a href=javascript:if(confirm('您真的要解除"&user&"的锁定吗?')){window.location.href('user.asp?action=zt.asp&type=unlock&user="&Mrs("user")&"');} >解锁</a>"
end if
.write("<tr><td><div align='center'>"&Mrs("user")&"</div></td><td><div align='center'>"&lcstr&"</div></td><td><div align='center'>"&admin&"</div> </td><td>"<ype&"|<a href=javascript:if(confirm('您真的要修改"&user&"的资料吗?')){window.location.href('user.asp?action=Mxg.asp&user="&Mrs("user")&"');} >修改</a>|<a href=javascript:if(confirm('您真的要删除"&user&"的资料吗?')){window.location.href('user.asp?action=del.asp&user="&Mrs("user")&"');} >删除</a>|"&typestr&"</td></tr>")
i=i+1
Mrs.movenext
loop
.write("<tr><td colspan='5'><div align='center'>")
Cnwy_Public.pagelist path,Mrs.recordcount,Mrs.pagecount,page
.write("</div></td> </tr></table>")&vbcrlf
Mrs.close
set Mrs=nothing
end with
else
info="暂时没有数据记录."
end if
if info<>"" then
Cnwy_Public.massage(info)
end if
set Cnwy_Public=nothing
call connclose()
End Function
Public Function masterhtml() '用户权限管理的的页面HTML
dim rs,sql,user,str,Minfo,check(2),infotype,Cnwy_user
set Cnwy_user=new CnwyAsp_user
call connopen()
user=trim(request.querystring("user"))
sql="select * from CnwyAsp_admin where user='"&user&"'"
set rs=conn.execute(sql)
str=array("A","B","C")
Minfo=rs("master")
for i=0 to 2
if instr(Minfo,str(i))<>0 then
check(i)="checked"
else
check(i)=" "
end if
next
with response
.write("<form name='cnwyASP' method='post' action='user.asp?action=MasterS.asp&user="&user&"'><table width='0' border='1' align='center' cellpadding='0' cellspacing='0' bordercolor='#C8C8C8'><tr><td colspan='2'>欢迎管理员"&request.cookies("user")&"来修改"&user&"的权限</td></tr>")&vbcrlf
.write("<tr> <td width='79'><div align='center'>帐号</div></td><td width='123'> <div align='center'>管理员类型</div></td></tr>")&vbcrlf
.write("<tr><td><div align='center'>"&user&"</div></td><td><div align='center'>")
Cnwy_user.checktype(rs("type"))
.write("</div></td></tr>")&vbcrlf
.write("<tr><td colspan='2'>管理权限:</td></tr><tr><td colspan='2'><table width='0' border='0' cellspacing='0' cellpadding='0'>")&vbcrlf
.write("<tr><td width='68'><input type='checkbox' name='master' value='A' "&check(0)&" >编写权</td><td width='68'><input type='checkbox' name='master' value='B' "&check(1)&">审批权</td><td width='68'><input type='checkbox' name='master' value='C' "&check(2)&">审核权</td>")
.write("</tr></table></td></tr>") &vbcrlf
.write("<tr><td colspan='2'><div align='center'><table width='0' border='0' cellspacing='0' cellpadding='0'>")&vbcrlf
.write( "<tr><td width='59'><input type='submit' name='Submit' value='修改'></td><td width='61'><div align='center'><input type='reset' name='Submit' value='清除'</div></td></tr></table></div></td></tr></table></form><tr>")&vbcrlf
end with
call connclose()
End Function
Public Function userxghtml(ByVal ty) '用户个人资料修改以及管理员管理员资料修改的HTML
dim user,xgrs,sql,str,namestr,valstr,intype,num,typeinfo,able
dim Cnwy_public
set Cnwy_public=new CnwyAsp_Public
Call ConnOpen()
if ty=0 then
user=request.cookies("user")
elseif ty=1 then
user=trim(request.querystring("user"))
end if
sql="select * from CnwyAsp_admin where user='"&user&"'"
set xgrs=conn.execute(sql)
if not xgrs.eof and not xgrs.bof then
with response
.write("<form name='form1' method='post' action='user.asp?action=save.asp&user="&user&"'>")&vbcrlf
.write("<table width='0' border='1' align='center' cellpadding='0' cellspacing='0' bordercolor='#C8C8C8'>")&vbcrlf
if ty=0 then
.write("<tr><td colspan='2'><div align='center'>欢迎"&user&"来修改个人资料</div></td></tr>")&vbcrlf
str=array("我的密码:","我的姓名:","我的QQ号:","我的Email:","我的固定电话:","我的手机号码:")
namestr=array("pass","name","qq","email","phone","cell")
valstr=array(request.cookies("pass"),request.cookies("name"),xgrs("QQ"),xgrs("email"),xgrs("phone"),xgrs("Cellphone"))
intype=array("password","text","text","text","text","text")
num=ubound(str)
for i=0 to num
.write("<tr><td width='88'>"&str(i)&"</td><td width='217'><input name='"&namestr(i)&"' type='"&intype(i)&"' id='"&namestr(i)&"' value='"&valstr(i)&"'></td></tr>")&vbcrlf
next
.write("<input type='hidden' name='type' value='0'>")
xgrs.close
set xgrs=nothing
elseif ty=1 then
.write("<tr><td colspan='2'><div align='center'>欢迎"&request.Cookies("user")&"来修改"&user&"个人资料</div></td></tr>")&vbcrlf
str=array("帐 号:","密 码:","姓 名:","QQ号码:","Email地址:","固定电话","手机号码:")
namestr=array("user","pass","name","qq","email","phone","cell")
valstr=array(user,xgrs("pass"),xgrs("name"),xgrs("QQ"),xgrs("email"),xgrs("phone"),xgrs("Cellphone"))
intype=array("text","password","text","text","text","text","text")
num=ubound(str)
for i=0 to num
if i=0 then
able="disabled"
else
able=""
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -