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

📄 showday.asp

📁 1 除掉了 时间 限制 2 除掉了 人数 限制 改为 500人 原为5人 3 发现一点小缺陷 增加人员的时候没有判断 登陆名是否重复! 自己写吧~~~:) 4 又 是一点缺陷
💻 ASP
字号:
<!--#include file="../config.ini"-->
<!--#include file="../commfunction.inc" -->
<html>
<head><title>一天日程显示</title>
<LINK href="../global.css" rel=stylesheet type=text/css>
</head>
<%
if Request.QueryString("date")<>"" then
	DateObj=Request.QueryString("date")	
end if
if Request.QueryString("DateP")<>"" then
	DateObj=Request.QueryString("DateP")	
end if

if DateObj = "" then
session("CurrentTime") =date
DateObj=session("CurrentTime")
end if%>
<BODY BGCOLOR="#FFFFFF" LINK="#000000" VLINK="#000000" ALINK="#99CC00">
<%
dim content1(23)
dim content2(23)
dim flag
flag="(#)"
dim array
dim array1
dim l
dim Special
Special="^^^^^^^^^^^^^^^^^^^^^^^^^"
Set objRS =server.CreateObject("adodb.connection")
objRS.Open connstring
session("WhichPage")="1"

function data_fill1( rsApp )

while not rsApp.EOF
   select case DATEDIFF( "h","0:00",rsApp("ScheduleTime"))
      case 0 
         content2(0)=content2(0) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case 1
         content2(1)=content2(1) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case 2
         content2(2)=content2(2) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") & "'"&flag&  "," & rsApp("id")  & flag
      case 3
         content2(3)=content2(3) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case 4
         content2(4)=content2(4) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case 5
         content2(5)=content2(5) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case 6 
         content2(6)=content2(6) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") & "'"&flag&  "," & rsApp("id")  & flag
      case 7
         content2(7)=content2(7) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case 8
         content2(8)=content2(8) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") & "'"&flag&  "," & rsApp("id")  & flag
      case 9
         content2(9)=content2(9) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case 10
         content2(10)=content2(10) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case 11
         content2(11)=content2(11) & " " & rsApp("ScheduleTime") &  " '"&rsApp("Schedule") & "'"&flag&  "," & rsApp("id")  & flag
      case 12
         content2(12)=content2(12) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case 13
         content2(13)=content2(13) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case 14
         content2(14)=content2(14) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case 15
         content2(15)=content2(15) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case 16 
         content2(16)=content2(16) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case 17
         content2(17)=content2(17) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case 18
         content2(18)=content2(18) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case 19
         content2(19)=content2(19) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") & "'"&flag&  "," & rsApp("id")  & flag
      case 20 
         content2(20)=content2(20) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case 21
         content2(21)=content2(21) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case 22
         content2(22)=content2(22) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      case else
         content2(23)=content2(23) & " " & rsApp("ScheduleTime") & " '"&rsApp("Schedule") &  "'"&flag&  "," & rsApp("id")  & flag
      end select  
      rsApp.movenext 
      
wend  
rsApp.close     
end function

yearobj=Request.QueryString("year")
monthobj=Request.QueryString("month")
dayobj=Request.QueryString("day")

NowYear=YEAR(DATE)
NowMonth=MONTH(DATE)
NowDay=DAY(DATE)
if dateobj="" then
NowTime=FORMATDATETIME(DATE,vbLongDate)
NowDayName=weekday(DATE,vbSunday)
else
NowTime=FORMATDATETIME(dateobj,vbShortDate)
Nowtimes=Year(NowTime)&"-"&Month(NowTime)&"-"&Day(NowTime)
Nowtimee=Year(NowTime)&"-"&Month(NowTime)&"-"&(Day(NowTime)+6)
NowDayName=weekday(DateObj,vbSunnday)
end if
session("CurrentTime")=NowTime
Daytime="00:00:00"

Yesterday=DATEADD("w",-1,NowTime)
Tomorrow=DATEADD("w",1,NowTime)

Timeobj=YEAR(NowTime)&"-"& MONTH(NowTime)&"-"&DAY(NowTime)

'sql = "select * from Event where "
'sql = sql + "((Private='1') or (Private='0' and  Creator='"
'sql = sql + Session("LoginName")
'sql = sql & "'))"
'sql = sql +"and ((Repeat ='0'and EventDate='"&Timeobj&"') or (Repeat = '1' and "
'sql = sql +"((Frequency='0')or (Frequency='1') or "
'sql = sql + " (Frequency='2' and Round(DATEDIFF(dd,EventDate,'"&Timeobj&"')/7.0,0)= DATEDIFF(dd,EventDate,'"&Timeobj&"')/7.0)"
'sql = sql +" or (Frequency= '3' and DATEPART(dd,EventDate)='"&day(Timeobj)&"')"
'sql = sql + " or (Frequency ='4' and DATEPART(dd,EventDate)='"&day(Timeobj)&"'and DATEPART(mm,EventDate)='"&month(Timeobj)&"'))))"
'Set rs = getRS(sql, strConn)
'data_fill(rs)


sql = "SELECT * FROM schedule where scheduledate ='"&DateObj&"'  and (AssignedTo ='"&Session("loginid")&"' or creator='"&Session("loginid")&"')"
'sql = "SELECT * FROM schedule where ScheduleDate = '"&Timeobj&"'"
'sql = sql +"and Private = '1'"
Set rs1 = objRS.Execute(sql)

data_fill1(rs1)

'sql = "SELECT * FROM schedule where scheduledate ='"&request("date")&"'"
'sql = sql + Session("LoginName")
'sql = sql + "')"
'sql = sql +"and EventDate = '"&Timeobj&"'"
'sql = sql + "and Private='0'"
'Set rs1 = objRS.Execute(sql)

'data_fill1(rs1)

%>
 <table width="100%" border="0" cellspacing="0" cellpadding="1" align="center">
  <tr bgcolor="#C6C3C6"> 
    <td> 
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
        <tr> 
          <td bgcolor="#FFFFFF"> 
            <table cellspacing=0 cellpadding=0 width="100%" border=0>
              <tbody> 
              <tr bgcolor="#4A699C">
                  <td height="18" align=center valign="middle">
                    <A href="ShowDay.asp?DateP=<%=Yesterday%>" ><IMG border=0 height=11 src="images/left4.gif" width=11></A> 
      <font color=white><%=DateObj%></font> <A href="ShowDay.asp?DateP=<%=Tomorrow%>" ><IMG border=0 height=11 src="images/right4.gif" width=11></A></td>
    <td align=right><A href=""></A></td>
              </tr>
              </tbody> 
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td height="5"></td>
  </tr>
</table>
<table border=0 cellpadding=0 cellspacing=1 width=100% bgcolor=#C6C3C6>
  <%for i=1 to 24 %>  
    <TR>
       <td  bgcolor="F3F3F3" align=right noWrap width=25><%=HOUR(DayTime)%>:<%=MINUTE(DayTime)%></td>
    <TD bgcolor="#FFFFFF">&nbsp;    
         <%if content1(i-1)<>"" then
           
               array=content1(i-1)
               l=instr(array,flag)%>
               
     <%
               while(l<>0)
               array1=left(array,l-1)
               array=right(array,len(array)-l-2)
               l=instr(array,flag)
               array2=left(array,l-1)%>
      <a href="javascript:opensubwin3('scheduleview.asp?id=<%=right(array2,Len(array2)-instr(array2,",")) %>','日程','resizable=yes,scrollbars=yes,toolbar=no,location=no,status=no,menubar=no,width=500,height=300,top=100,left=150');"><%=array1%></A> 
      <A HREF="" ><IMG SRC="del.gif" ALIGN=top WIDTH=12 HEIGHT=12 BORDER=0 ALT="Delete"> 
      </A> 
      <% array=right(array,len(array)-l-2)
            l=instr(array,flag)
            wend
           end if%>
      <% if  content2(i-1)<>"" then 
	           array=content2(i-1)
               l=instr(array,flag)
               while(l<>0)
               array1=left(array,l-1)
               array=right(array,len(array)-l-2)
               l=instr(array,flag)
               array2=left(array,l-1)%>
      <a href="javascript:opensubwin3('scheduleview.asp?id=<%=right(array2,Len(array2)-instr(array2,",")) %>','日程','resizable=yes,scrollbars=yes,toolbar=no,location=no,status=no,menubar=no,width=500,height=300,top=100,left=150');"><%=array1%></A> 
      <% array=right(array,len(array)-l-2)
            l=instr(array,flag)
             wend
             end if %>
      </td>
       
        </TR>
  <%DayTime=DATEADD("h",1,Daytime)
   next %>
  </table>
</BODY></HTML>
  

⌨️ 快捷键说明

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