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

📄 class_html.asp

📁 STM32 Keil 下的驱动STM32 Keil 下的驱动
💻 ASP
📖 第 1 页 / 共 4 页
字号:
public function Handlevachtml(ByVal ty)      '假条管理页面HTML ,0代表拟写假条人查看自己拟写过的假条
dim Cnwy_public,Cnwy_user,str1            '1代表拟写假条人的假条回复页面,2代表未审批列表
dim rs,sql,page,i,path,search,sstr,sqlstr                          '3代表审批人自己审批(包括:通过审批和不通过审批)过的假条,4代表未审核假条列表
set Cnwy_public=new CnwyAsp_public         '5代表审核人审核启用的假条,6代表审核人审核作废的假条
set Cnwy_user=new CnwyAsp_user
Cnwy_user.checkmaster(0)
Call Connopen()
search=request.form("ty")
sstr=request.form("str")
if search="" then
 sqlstr=""
elseif search="vacid" then
  if isnumeric(sstr) then
     sqlstr=" and id="&sstr&""
  else
    sqlstr=""
 end if
end if
 page=request.form("cnwy")
if page="" then 
    page=1 
  end if
 if ty=0 then
       Cnwy_user.checkmaster(2)
       sql="select * from CnwyAsp_Vacation where bxadmin='"&request.cookies("user")&"'"&sqlstr&" order by id desc"
	   str1="我编写过的假条"
	   path=request.servervariables("PATH_INFO")&"?action=Myedit.asp"
 elseif ty=1 then
       Cnwy_user.checkmaster(2)
       sql="select * from CnwyAsp_Vacation where bxadmin='"&request.cookies("user")&"' and  back=true"&sqlstr&" order by id desc"
	   str1="我编写假条的回复信息"
	   path=request.servervariables("PATH_INFO")&"?action=reVinfo.asp"
 elseif ty=2 then
       Cnwy_user.checkmaster(3)
       sql="select * from CnwyAsp_Vacation where pass=false and back=false"&sqlstr&" order by id desc"
	   str1="未被审批过的假条"
	   path=request.servervariables("PATH_INFO")&"?action=PassVinfo.asp"
 elseif ty=3 then
      Cnwy_user.checkmaster(3)
      sql="select * from CnwyAsp_Vacation where passadmin='"&request.cookies("user")&"'"&sqlstr&" order by id desc"
	  str1="我审批过的假条"
	  path=request.servervariables("PATH_INFO")&"?action=PassedVinfo.asp"
 elseif ty=4 then
       Cnwy_user.checkmaster(4)
       sql="select * from CnwyAsp_Vacation where pass=true and teststart=false"&sqlstr&" order by id desc"
	   str1="未审核启用的假条"
	   path=request.servervariables("PATH_INFO")&"?action=TestVinfo.asp"
 elseif ty=5 then 
       Cnwy_user.checkmaster(4)
       sql="select * from CnwyAsp_Vacation where testbadmin='"&request.cookies("user")&"' and teststart=true"&sqlstr&" order by id desc"
	   str1="我审核启用的假条"
	   path=request.servervariables("PATH_INFO")&"?action=TestedVinfo.asp"
 elseif ty=6 then
       Cnwy_user.checkmaster(4)
       sql="select * from CnwyAsp_Vacation where testeadmin='"&request.cookies("user")&"' and testover=true"&sqlstr&" order by id desc"
	   str="我审核作废的假条"
	   path=request.servervariables("PATH_INFO")&"?action=TesteVinfo.asp"
  elseif ty=7 then
       Cnwy_user.checkmaster(4)
       sql="select * from CnwyAsp_Vacation where pass=true and teststart=true and testover=false"&sqlstr&" order by id desc"
	   str1="已经审核启用过的假条"
	   path=request.servervariables("PATH_INFO")&"?action=TestVinfo.asp"
 end if
 set rs=server.createobject("adodb.recordset")
 rs.open sql,conn,1,1
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'>")&vbcrlf
   .write("<tr> <td height='20' colspan='6'><div align='center'>欢迎"&request.cookies("user")&"来查看"&str1&"</div></td></tr>")&vbcrlf
   .write("<tr> <td height='20' colspan='6'><table border='0' cellspacing='0' cellpadding='0'><form name='form1' method='post' action='"&path&"'><tr>")
   .write("<td width='76' height='20'><div align='center'>假条查询:</div></td><td width='91'><select name='ty'><option value='vacid'>假条ID</option></select></td>")&vbcrlf
   .write("<td width='137' height='20'><div align='center'><input name='str' type='text' size='15'></div></td><td width='52'><input type='submit' name='Submit' value='查询'></td><td width='162'><div align='center'>当前共有"&rs.recordcount&"条请假信息</div></td></tr></form></table></td></tr>")&vbcrlf      
   .write("<tr><td width='60'><div align='center'>假条编号</div></td><td width='80' height='20'><div align='center'>请假人</div></td><td width='60'><div align='center'>请假类型</div></td><td width='140'><div align='center'>假条提交时间</div></td><td width='130'><div align='center'>假条状态</div></td><td width='67'><div align='center'><a href='Manage.asp?action=vacinfo.asp&id="&rs("id")&"'>查看操作</div></td></tr>")&vbcrlf
   rs.pagesize=Cnwy_public.vacpage
   rs.absolutepage=page
   do  while not rs.eof and i<Cnwy_public.vacpage
     .write("<tr><td height='20'><div align='center'>"&rs("id")&"</div></td><td height='20'><div align='center'>"&rs("qjren")&"</div></td><td height='20'><div align='center'>"&rs("vactype")&"</div></td><td height='20'><div align='center'>"&rs("bxdate")&"</div></td><td height='20'><div  align='center'>"&rs("vaczt")&"</div></td><td height='20'><a href='Manage.asp?action=Vacinfo.asp&id="&rs("id")&"'>[查看操作]</td></tr>")&vbcrlf
      i=i+1
	  rs.movenext
   loop
.write("<tr><td height='20' colspan='6'><div align='center'>") 
Cnwy_public.pagelist path,rs.recordcount,rs.pagecount,page
.write("</div></td></tr></table>")&vbcrlf
end with
else 
 Cnwy_public.massage("暂时没有任何记录")
end if
call connclose()
set Cnwy_public=nothing
set Cnwy_user=nothing
end function
public function vacinfohtml()
dim id,str1,str2,sj,adminre,reason
dim rs,sql,str3,str4,master,handle
set Cnwy_public=new CnwyAsp_public
call connopen()
id=request.querystring("id")
with response
if isnumeric(id) then
 sql="select * from CnwyAsp_Vacation where id="&id
 set rs=conn.execute(sql)
 if not rs.eof and not rs.bof then
   if rs("shaojia")=true then
     sj="是"
	else
	 sj="否"
	end if
	reason=""&rs("reason")&"<br>"
	.write("<table border='1' width='480' align='center' cellpadding='0' cellspacing='0' bordercolor='#C8C8C8'><tr><td height='20' colspan='2'><div align='center'>欢迎查看"&rs("qjren")&"的请假信息</div></td></tr>")&vbcrlf
   str1=array("请 假 人 :","请假人所属机构:","请 假 类 型 :","捎 假 :","捎 假 人 :","请 假 时 间 :","请假时间类型:","请假原因:","假 条 状 态 :","假条编写员:","假条编写时间:")
   str2=array(rs("qjren"),rs("frame"),rs("vactype"),sj,rs("shaojiar"),rs("tlimit"),rs("timetype"),reason,rs("vaczt"),rs("bxadmin"),rs("bxdate"))
   for i=0 to ubound(str2)
   .write("<tr><td width='118' height='20'>"&str1(i)&"</td><td width='343'>"&str2(i)&"</td></tr>")&vbcrlf
    next
   if rs("pass")=true and rs("teststart")=true and rs("testover")=true and  rs("back")=true then
     str3=array("假条审批员:","假条审批时间:","审批员的回复信息:","假条启用审核员:","假条审核启用时间:","假条开始的时间:","假条结束的时间:","假条作废审核员:","假条审核作废时间:","超越假期时间:")
     str4=array(rs("passadmin"),rs("passdate"),rs("npassre"),rs("testbadmin"),rs("testb"),rs("vacstart"),rs("vacover"),rs("testeadmin"),rs("teste"),rs("yjtime")&"分钟")
      master="没有任何操作"
   elseif rs("pass")=true and rs("teststart")=true then
      str3=array("假条审批员:","假条审批时间:","审批员的回复信息:","假条启用审核员:","假条审核启用时间:","假条开始的时间:","假条结束的时间:")
	  str4=array(rs("passadmin"),rs("passdate"),rs("npassre"),rs("testbadmin"),rs("testb"),rs("vacstart"),rs("vacover"))
      master="<a href='Manage.asp?action=Vactesto.asp&id="&rs("id")&"'>[审核作废]</a>"
  elseif rs("pass")=true then
      str3=array("假条审批员:","假条审批时间:","审批员的回复信息:")
	  str4=array(rs("passadmin"),rs("passdate"),rs("npassre"))
	  master="<a href='Manage.asp?action=Vactests.asp&id="&rs("id")&"'>[审核启用]</a>"
   elseif rs("back")=true then
     str3=array("假条审批员:","假条审批时间:","审批员的回复信息:")
	 str4=array(rs("passadmin"),rs("passdate"),rs("npassre"))
	 master="<a href='Manage.asp?action=Vacation.asp&id="&rs("id")&"'>[修改]</a>"
   else
     master="<a href='Manage.asp?action=Vacpass.asp&id="&rs("id")&"'>[通过审批]</a><a href='Manage.asp?action=Nvacpass.asp&id="&rs("id")&"'>[不通过审批]</a>"
   end if
 if isarray(str3) and isarray(str4) then
  for i=0 to ubound(str4)
   .write("<tr><td width='118' height='20'>"&str3(i)&"</td><td >"&str4(i)&"</td></tr>")&vbcrlf
  next
end if
if request.cookies("master")<>"" then
  handle="<a href=javascript:history.go(-1)>[返回上一页]</a>"
else
 master="您没有操作的权限."  
 handle="<a href=javascript:window.close()>[关闭窗口]</a>"
end if
.write("<tr> <td height='20'>相关操作:</td><td height='20'><div align='left'>"&master&"</div></td></tr>")&vbcrlf
.write("<tr><td height='20' colspan='2'><div align='center'>")
.write(handle)
.write("</div></td></tr>")&vbcrlf
.write("</table>")&vbcrlf
else
info="对不起此请假信息已被删除或者不存在."
end if
else
info="大哥您歇歇吧.没有事情找我聊天啊QQ32940696"
end if
if info<>"" then
Cnwy_public.massage(info)
end if
end with
Call connclose()
set Cnwy_public=nothing
end function
public function passhtml(Byval ty)   '0为审批页面,1为不审批页面
dim Cnwy_user,id,path
set Cnwy_user=new CnwyAsp_user
Cnwy_user.checkmaster(0)
Cnwy_user.checkmaster(3)
id=request.QueryString("id")
if ty=0 then
path="Manage.asp?action=vacps.asp&id="&id
elseif ty=1 then
path="Manage.asp?action=vacpn.asp&id="&id
end if
with response
.write("<form name='form1' method='post' action='"&path&"'><table border='1' align='center' cellpadding='0' cellspacing='0' bordercolor='#C8C8C8'>")&vbcrlf
.write("<tr><td width='103' height='20'><div align='center'>管理员审批回复:</div></td><td width='358'><input name='readmin' type='text' size='25' maxlength='25'>*回复字符不能超过25个</td></tr>")&vbcrlf
.write("<tr><td height='20' colspan='2'><div align='center'><input type='submit' name='Submit' value='提交'></div></td></tr>")&vbcrlf
.write("<tr><td height='20' colspan='2'><div align='center'><a href=javascript:history.go(-1)>[返回上一页]</a></div></td></tr></table></form>")&vbcrlf
end with
set Cnwy_user=nothing
end function
public function Announcehtml()
dim  id,sql,rs,title,Announce,user,tm,Cnwy_public,info
set Cnwy_public=NEW CnwyAsp_public
id=request.querystring("id")
if id<>"" and isnumeric(id) then
  call connopen()
  sql="select * from CnwyAsp_Announce where id="&id
  set rs=conn.execute(sql)
   if not rs.eof and  not rs.bof then
     title=rs("title")
	 Announce=rs("Announce")
	 user=rs("user")
	 tm=rs("date")
	 rs.close
	 set rs=nothing
   else
	info="此公告已经被删除或者不存在."
	Cnwy_public.massage(info)
  end if
else
  user=request.cookies("user")
  tm=now()
end if
with response
.write("<form name='form1' method='post' action='Manage.asp?action=Annaction.asp&id="&id&"'><table width='0' border='1' align='center' cellpadding='0' cellspacing='0' bordercolor='#C8C8C8'>")&vbcrlf
.write("<tr><td height='20' colspan='2'><div align='center'>欢迎"&request.cookies("user")&"来发布公告</div></td></tr>")&vbcrlf
.write("<tr><td width='97' height='24'><div align='center'>公告主题:</div></td><td width='255'><table width='255' border='0' cellpadding='0' cellspacing='0'>")&vbcrlf
.write(" <tr><td width='140' height='20'><input name='title' type='text' size='20' value='"&title&"'></td><td width='144'>*不能超过25个字</td></tr></table></td></tr>")&vbcrlf
.write("<tr><td height='20'><div align='center'>发 布 人:</div></td><td height='20'>"&user&"</td></tr>")&vbcrlf
.write("<tr><td height='20'><div align='center'>发布日期:</div></td><td height='20'>"&tm&"</td></tr>")&vbcrlf
.write("<tr><td height='20'><div align='center'>公告内容:</div></td><td height='20'><textarea name='Announce' cols='40' rows='10'>"&Announce&"</textarea></td></tr>")&vbcrlf
.write("<tr><td height='20' colspan='2'><div align='center'><input type='submit' name='Submit' value='增加' ></div></td></tr></table></form>")&vbcrlf
end with
set Cnwy_public=nothing
call connclose()
end function
public function AnnManageHtml()
dim rs,sql,Cnwy_public,page,i,path
call connopen()
set Cnwy_public=new CnwyAsp_public
path=request.ServerVariables("PATH_INFO")&"?action=Annmanage.asp"
page=request.form("cnwy")
i=0
if page="" then
page=1 
end if
sql="select * from Cnwyasp_Announce order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof and not rs.bof then
rs.movefirst
rs.pagesize=20
rs.absolutepage=page
with response
.write("<table width='470' border='1' align='center' cellpadding='0' cellspacing='0' bordercolor='#C8C8C8'>")&vbcrlf
.write("<tr><td colspan='4'><div align='center'>公告管理</div></td></tr>")&vbcrlf
.write("<tr><td width='220' height='20'><div align='center'><span class='style1'>公告题目</span></div></td>")&vbcrlf
.write("<td width='148'><div align='center'>发布时间</div></td><td width='94'><div align='center'>相关操作</div></td>")&vbcrlf
do while not rs.eof and i<rs.pagesize
.write("<tr><td height='20'><a href='Manage.asp?action=Announce.asp&id="&rs("id")&"'>"&rs("title")&"</a></td><td height='20'><div align='center'>"&rs("date")&"</div></td><td height='20'><div align='center'><a href='Manage.asp?action=Announce.asp&id="&rs("id")&"'>[修改]</a><a href='Manage.asp?action=Anndel.asp&id="&rs("id")&"'>[删除]</a></div></td></tr>")&vbcrlf
i=i+1
rs.movenext
loop
.write("<tr><td height='20' colspan='4'>") 
Cnwy_public.pagelist path,rs.recordcount,rs.pagecount,page
.write("</td></tr></table>")&vbcrlf
end with
else
Cnwy_public.massage("暂时没有任何数据.")
end if
set Cnwy_public=nothing
call connclose()
 end function
end class
%>

⌨️ 快捷键说明

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