📄 list.asp
字号:
<!--#include file="../function/connect.asp"-->
<%
gdate=request("gdate")
if gdate="" then
gdate=date()
end if
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../function/cssD.css" rel=stylesheet>
</head>
<body>
<TABLE cellSpacing=1 cellPadding=3 width=100%>
<%
for i=0 to 23
if i>=8 and i<17 then
bgcolor="#F2FBAA"
else
bgcolor="#C6BE35"
end if
%>
<TR onmouseover='changeColor(this);' onmouseout='changeColor(this);' bgColor=<%=bgcolor%>>
<TD width="10%" noWrap ondblclick="openWin('<%=gdate & " " & i%>:00:00');" witdth=150><%=i%>-<%=i+1%>时</TD>
<TD width="90%" noWrap id=t<%=year(gdate)&month(gdate)&day(gdate) & i%> ondblclick="openWin('<%=gdate & " " & i%>:00:00');" witdth=150 >.</TD>
</TR>
<%
next
%>
</TABLE>
</body>
</html>
<script>
function openWin(strdate){
//result = window.showModalDialog("../plains/addplain.asp?strdate="+strdate,"","dialogWidth=500px;dialogHeight=320px;status=0;help=0");
window.open("addact.asp?strdate="+strdate+"&close=1","添加日历","left=200,top=200,Width=550,Height=450")
}
function showAct(strId){
window.open("editact.asp?act_ID="+strId+"&close=1","显示日历","left=100,top=100,Width=550,Height=500")
}
function changeColor(obj)
{
cn=obj.className;
if(cn==""){
obj.className="contentStyle";
}else{
obj.className="";
}
}
</script>
<%
strsql="select * from acts a where datediff('d','" & gdate & "',act_begin_date)=0 "
strsql=strsql & " and (a.act_owner='" & session("loginuser") & "' or a.IsPublic=1) "
'response.write strsql
Set objRs = Server.CreateObject("adodb.recordset")
objRs.Open strsql,objConn,1,1
if not objrs.eof then
%>
<script>
<%
do while not objrs.eof
act_begin_date=objrs.fields("act_begin_date")
%>
if(t<%=year(act_begin_date)%><%=month(act_begin_date)%><%=day(act_begin_date)%><%=hour(act_begin_date)%>.innerHTML==".")
{
t<%=year(act_begin_date)%><%=month(act_begin_date)%><%=day(act_begin_date)%><%=hour(act_begin_date)%>.innerHTML="."+"<a href=javascript:showAct('<%=objrs.fields("act_id")%>')><font color=red>*</font><%=objrs.fields("act_title")%></a>";
}else{
t<%=year(act_begin_date)%><%=month(act_begin_date)%><%=day(act_begin_date)%><%=hour(act_begin_date)%>.innerHTML=t<%=year(act_begin_date)%><%=month(act_begin_date)%><%=day(act_begin_date)%><%=hour(act_begin_date)%>.innerHTML + "<br>" + "<a href=javascript:showAct('<%=objrs.fields("act_id")%>')><font color=red>*</font><%=objrs.fields("act_title")%></a>";
}
<%objrs.movenext
loop%>
</script>
<%
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -