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

📄 messageboard.asp

📁 办公自动化系统
💻 ASP
字号:
<%@ Language=VBScript %>
<!--#include file="conn.asp"-->
<%
'判断用户是否登录
if isempty(Session("ID")) then
Response.Redirect "../login.asp"
end if

Warning=false
'用户选择发送新通知
if not IsEmpty(Request.Form("SendNewMessage")) then 
Response.Redirect "SendNewMessage.asp"
'用户选择删除某条通知
elseif not IsEmpty(Request.Form("DeleteThisMessage")) then
if not IsEmpty(Request.Form("CheckMessage")) then
set RSThisMessage=conn.Execute("select * from MessageBoard where MessageID=" _
& Request.Form("CheckMessage"))
if Session("IsSystemManager") then
conn.Execute   "delete from MessageBoard where MessageID = " & Request.Form("CheckMessage") 
TheMessage ="此条通知已删除"   
elseif RSThisMessage("MessageSender") = Session("Name") then
conn.Execute   "delete from MessageBoard where MessageID = '" _
& Request.Form("CheckMessage") & "' "
TheMessage ="此条通知已删除"
else 
TheMessage ="您不是系统管理员,也不是此条通知的发送者,无权删除此条通知"
Warning=true
end if          
else
TheMessage= "系统通知看板 "
end if
'用户选择修改某条通知
elseif not IsEmpty(Request.Form("ModifyThisMessage")) then
if not IsEmpty(Request.Form("CheckMessage")) then
set RSThisMessage=conn.Execute("select * from MessageBoard where MessageID=" _
& Request.Form("CheckMessage"))
if RSThisMessage("MessageSender")=Session("Name") then
Session("MessageID")=RSThisMessage("MessageID")
Response.Redirect "ModifyMessage.asp"
else
TheMessage ="您不是此条通知的发送者,无权修改此条通知"
Warning=true
end if
else
TheMessage= "系统通知看板 "
end if
'系统管理员清除过期通知
elseif not IsEmpty(Request.Form("ClearMessage")) then
if Session("IsSystemManager") then
conn.Execute "delete from MessageBoard where getdate() -MessageSendDate> MessageValidTime"
else
TheMessage="您不是系统管理员,不能进行此项操作"
Warning=true
end if
else
TheMessage = "系统通知看板"
end if
set RSPublicMessage= conn.Execute(" select * from MessageBoard where MessageType = '公共通知' " _
& "") 
set RSDepartmentMessage= conn.Execute(" select * from MessageBoard where MessageType = '" _
& Session("Department") &"'")         
set RSPrivateMessage= conn.Execute(" select * from MessageBoard where MessageType= '" _
& Session("Name") &"'")   
set RSDepartments = conn.Execute("select  DepartmentName from Departments " _
& "order by DepartmentName")
'

set RSRoles = conn.Execute("select Name from UserInfo order by Name")
%>


<HTML>
<HEAD>
<TITLE>内部信息交流系统</TITLE>
<META NAME="Generator" CONTENT="NetObjects Fusion 2.0.2 for Windows">

<style type="text/css">
<!--
.style1 {color: #9966FF}
.style2 {color: #9999FF}
.style3 {
	color: #FFFFFF;
	font-weight: bold;
	font-size: 16px;
}
-->
</style>
</HEAD>


<table width=800 border=0 bgcolor=#9933FF cellspacing=1 cellpadding=2 align=center>
<tr bgcolor=white><td height="47"    valign=center bgcolor="#9966FF" ><div align="center"><span class="style3">企业办公自动化系统</span></div></td>
</tr>
</table>


<table width=800 border=0 align=center cellpadding=2 cellspacing=1 bordercolor="#9900FF" bgcolor=#9966FF>
<tr bgcolor="#99CCFF"><td colspan=3>

<P ALIGN="CENTER"><font color="white">公司信息管理系统->内部信息交流->通知公告当前用户:
    <% response.write Session("Name") %>
  </font></td></tr>
<tr bgcolor=white >
<td class="style1"><a href="../html/home.asp">返回主页</a></td>
<td  align=center> 
<% if Warning=false then %>
<font color="#9999FF" ><% response.write TheMessage %></FONT>
<% else %>
<font color=Red ><% response.write TheMessage %></font>
<% end if %>
</td>
<td  align=right><a href="Communication.asp" class="style2">返回上一网页</a></td>
</tr>
</table> 

<table width="800" border="0" bordercolor="#16A84D" align="center" cellpadding="3" cellspacing="0">
<tr>
<td>
<Form ACTION="MessageBoard.asp"  METHOD=POST>




 

<br>
        <table WIDTH=800  border=0 bgcolor=#9C65FF cellspacing=1 cellpadding=2 align=center>
        <tr><td height=1 colspan=3 bgcolor="#9966FF" ><font color=white>
          <P ALIGN="left">今日您有如下公共通知</FONT></font></td>
        </tr>
        <tr bgcolor=white >
        <td width=30 align=left>选中</td>
        <td width=15% align=left>通知发送日期</td>
        <td width=50% align=left>通知内容</td>
        <td width=10% align=left> 通知类型</FONT></td>
        <td  align=left> 通知发送者</FONT></td>
        <td  align=left> 有效天数</FONT></td>
        </tr>
        <%
        Do Until RSPublicMessage.EOF
        %>
        <TR  bgcolor=white VALIGN="top" ALIGN="left">
        <td align=left><input type=radio name=CheckMessage value=<% response.write RSPublicMessage("MessageID")%> ></td>
        <TD ><font face=arial><% Response.write RSPublicMessage("MessageSendDate") %></font></TD>
        <TD ><font face=arial><% Response.write RSPublicMessage("MessageContent") %></font></TD>
        <TD HEIGHT=21><font face=arial><% Response.write RSPublicMessage("MessageType") %></font></TD>
        <TD  HEIGHT=21><font face=arial><% Response.write RSPublicMessage("MessageSender") %></font></TD>
        <TD  HEIGHT=21><font face=arial><% Response.write RSPublicMessage("MessageValidTime") %></font></TD>
        </TR>
        <%
        RSPublicMessage.MoveNext
        Loop
        %>           
  </table>
        <br>
		
        <table WIDTH=800  border=0 bgcolor=#9966FF cellspacing=1 cellpadding=2 align=center>
        <tr><td colspan=3 height=1 ><font color=white><P ALIGN="left">今日<% response.write Session("Department") %>有如下部门通知</FONT></font></td></tr>
        <tr bgcolor=white >
        <td width=30 align=left>选中</td>
        <td width=15% align=left>通知发送日期</td>
        <td width=50% align=left>通知内容</td>
        <td width=10% align=left> 通知类型</FONT></td>
        <td  align=left> 通知发送者</FONT></td>
        <td  align=left> 有效天数</FONT></td>
        </tr>   
        <%
        Do Until RSDepartmentMessage.EOF
        %>
        <TR  bgcolor=white VALIGN="top" ALIGN="left">
        <td align=left><input type=radio name=CheckMessage value=<% response.write RSDepartmentMessage("MessageID")%> ></td>
        <TD ><font face=arial><% Response.write RSDepartmentMessage("MessageSendDate") %></font></TD>
        <TD ><font face=arial><% Response.write RSDepartmentMessage("MessageContent") %></font></TD>
        <TD  HEIGHT=21><font face=arial><% Response.write RSDepartmentMessage("MessageType") %></font></TD>
        <TD  HEIGHT=21><font face=arial><% Response.write RSDepartmentMessage("MessageSender") %></font></TD>
        <TD  HEIGHT=21><font face=arial><% Response.write RSDepartmentMessage("MessageValidTime") %></font></TD>
        </TR>
        <%
        RSDepartmentMessage.MoveNext
        Loop
        %>           
  </table>
        <br>

        <table WIDTH=800  border=0 bgcolor=#9999FF cellspacing=1 cellpadding=2 align=center>
        <tr><td colspan=3 height=1 ><font color=white><P ALIGN="left">今日您有如下个人通知</FONT></font></td></tr>
        <tr bgcolor=white >
        <td width=30 align=left>选中</td>
        <td width=15% align=left>通知发送日期</td>
        <td width=50% align=left>通知内容</td>
        <td width=10%  align=left> 通知接收者</FONT></td>
        <td  align=left> 通知发送者</FONT></td>
        <td  align=left> 有效天数</FONT></td>
        </tr>   
        <%
        Do Until RSPrivateMessage.EOF
        %>
        <TR  bgcolor=white VALIGN="top" ALIGN="left">
        <td align=left><input type=radio name=CheckMessage value=<% response.write RSPrivateMessage("MessageID")%> ></td>
        <TD ><font face=arial><% Response.write RSPrivateMessage("MessageSendDate") %></font></TD>
        <TD ><font face=arial><% Response.write RSPrivateMessage("MessageContent") %></font></TD>
        <TD HEIGHT=21><font face=arial><% Response.write RSPrivateMessage("MessageType") %></font></TD>
        <TD HEIGHT=21><font face=arial><% Response.write RSPrivateMessage("MessageSender") %></font></TD>
        <TD HEIGHT=21><font face=arial><% Response.write RSPrivateMessage("MessageValidTime") %></font></TD>
        </TR>
        <%
        RSPrivateMessage.MoveNext
        Loop
        %>
  </table>
        <table WIDTH=800  border=0 bgcolor=#FFFFFF cellspacing=1 cellpadding=2 align=center> 
        <TR  bgcolor=white VALIGN="top" ALIGN="center">
       
        <td ><input type=submit name="ModifyThisMessage" value="修改此条通知">
        <input type=submit name="DeleteThisMessage" value="删除此条通知">
        <INPUT TYPE="submit" NAME="SendNewMessage" VALUE="发送新通知">
        <INPUT TYPE="submit" NAME="ClearMessage" VALUE="管理员清空过期通知">
        </td>
        </tr>    

      


<td bgcolor="#9900FF"></td>
<td bgcolor="#9900FF"></tr>
</table>

</Form>

</BODY>
</HTML>

⌨️ 快捷键说明

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