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

📄 displaysmallworkrec.asp

📁 企业办公自动化管理系统 asp+sql server 2005
💻 ASP
字号:
<!--#include file="opendb.asp"-->
<!--#include file="sqlstr.asp"-->

<%
function displaysmallworkrec2(myday,suid,superior)
displaysmallworkrec="<a href='displayworkrec.asp?suid=" & suid & "&superior=" & superior & "&recdate=" & myday & "' onclick='return js_openpage(this.href);'>" & Day(myday) & "号</a>"

if cdate(myday)=cdate(mydate) then
displaysmallworkrec="<a href='displayworkrec.asp?suid=" & suid & "&superior=" & superior & "&recdate=" & myday & "' onclick='return js_openpage(this.href);'><font color=red><b>" & Day(myday) & "号</b></font></a>"
end if
'打开数据库,读出日期为myday,用户名为suid的记录
set conn=opendb()
set rs=server.createobject("adodb.recordset")
sql="select * from a_workrep where suid=" & sqlstr(suid) & " and recdate=" & "'" & myday & "'"
rs.open sql,conn,1
if not rs.eof and not rs.bof then
displaysmallworkrec=displaysmallworkrec & "<table>"

while not rs.eof and not rs.bof
if rs("finished")="yes" then
if rs("imp")="yes" then
titlecolorfront="<font color='#770000'>"
else
titlecolorfront="<font color='#0000ff'>"
end if
titlecolorback="</font>"
else
if rs("imp")="yes" then
titlecolorfront=" <tr><td bgcolor='#FF0000'>"
else
titlecolorfront="<tr><td bgcolor='#0099FF'>"
end if
'titlecolorback="</font>"
end if
displaysmallworkrec=displaysmallworkrec &  titlecolorfront & titlecolorback & "</td></tr>"
rs.movenext
wend
displaysmallworkrec=displaysmallworkrec & "</table>"
end if
end function
%>

<%

'===================================
'测试函数
function displaysmallworkrec(myday,suid,superior)
displaysmallworkrec="<a href='displayworkrec.asp?suid=" & suid & "&superior=" & superior & "&recdate=" & myday & "' onclick='return js_openpage(this.href);'>" & Day(myday) & "号</a>"

'当前日期
if cdate(myday)=cdate(mydate) then
displaysmallworkrec="<a href='displayworkrec.asp?suid=" & suid & "&superior=" & superior & "&recdate=" & myday & "' onclick='return js_openpage(this.href);'><font color=red><b>" & Day(myday) & "号</b></font></a>"
end if
'打开数据库,读出日期为myday,用户名为suid的记录
set conn=opendb()
set rs=server.createobject("adodb.recordset")
sql="select * from a_workrep where suid=" & sqlstr(suid) & " and recdate=" & "'" & myday & "'"
'response.Write(sql)
'response.End()
rs.open sql,conn,1
if not rs.eof and not rs.bof then

while not rs.eof and not rs.bof
	displaysmallworkrectop=displaysmallworkrectop & "<table width='90%' align='center'><tr>"
	if rs("finished")="yes" then
		if rs("imp")="yes" then
		    '重要且完成
			titlecolorfront=titlecolorfront & "<td bgcolor='#9999FF' align='center'>"
		else
			'一般且完成
			titlecolorfront=titlecolorfront & "<td bgcolor='#99CCFF' align='center'>"
		end if
	else
		
		if rs("imp")="yes" then
			'重要且没完成
			titlecolorfront=titlecolorfront & "<td bgcolor='#FF99CC' align='center'>"
		else
			'一般有没完成
			titlecolorfront=titlecolorfront & "<td bgcolor='#FFCCCC' align='center'>"
		end if
	end if
	titlecolorback=titlecolorback & "</td></tr></table>"
	displaysmallworkrectop=displaysmallworkrectop &  titlecolorfront 
	rs.movenext
wend
displaysmallworkrec=displaysmallworkrectop & displaysmallworkrec & titlecolorback
end if
end function
%>


⌨️ 快捷键说明

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