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

📄 modifymessage.asp

📁 企业内部办公管理信息系统 (一个用ASP开发的基于B/S方式的毕业设计)
💻 ASP
字号:
<%@ Language=VBScript %>
<%
'判断用户是否登录和是否具有要修改的通知的ID号
if isempty(Session("ID")) or ISEmpty(Session("MessageID")) then
Response.Redirect "../login.asp"
end if
if ISEmpty(Session("MessageID")) then
Response.Redirect "MessageBoard.asp"
end if
'连接系统数据库
set conn = server.createobject ("adodb.connection")
conn.open "ASPData", "sa", "yourpassword"
Warning=false
'用户单击了修改此条通知的按钮
if not isempty(Request.Form("ModifyThisMessage")) then
'校验修改后的通知的内容
if Len(trim(Request.form("MessageContent")))=0 then
TheMessage="通知内容不能为空,请重填这条通知"
Warning=true
else
conn.execute " update Messageboard set MessageContent='" _
& Request.Form("Messagecontent") & "', " _
& " MessageSendDate='" & Date & "', " _
& " MessageSendTime='" & Time & "', " _
& " MessageValidTime=" & Request.form("MessageValidTime") _
& " Where MessageID=" & Session("MessageID") 
TheMessage = "通知修改成功"
Warning=false
end if
else
TheMessage = "请在下面修改这条通知"
Warning=false
end if
set RSThisMessage=conn.execute("select * from MessageBoard where MessageID=" _
& Session("MessageID"))
%>


<HTML>
<HEAD>
<TITLE>公司内部意见箱-提交意见建议</TITLE>
<META NAME="Generator" CONTENT="NetObjects Fusion 2.0.2 for Windows">
</HEAD>
<body>
<table width=800 border=0 align=center cellpadding=2 cellspacing=1 bordercolor="#996633" bgcolor=#164DA8>
  <tr bgcolor=white> 
    <td    valign=center bgcolor="#0066CC" > <div align="center"><font color="#CCCCCC" size="7" face="华文隶书"><strong>公司内部办公信息管理系统</strong></font></div></td>
  </tr>
</table>
<table width="800" border="0" bordercolor="#164DA8" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="13">&nbsp;</td>
  </tr>
</table>
<font size="2"><br>
</font>
<table width=800 border=0 bgcolor=#164DA8 cellspacing=1 cellpadding=2 align=center>
  <tr>
    <td colspan=3> <font color=white>
      <P ALIGN="CENTER"><font size="2">公司内部办公信息管理系统->内部信息交流系统->内部通知公共牌->修改通知&nbsp[当前用户-
        <% response.write Session("Name") %>
        ] </font></font></td>
  </tr>
  <tr bgcolor=white > 
    <td><font size="2"><a href=".././html/home.asp"><font color="#104DAD">返回内网主页</font></a></font></td>
    <td  align=center> <font size="2">
      <% if Warning=true then %>
      <font color=red>
      <% response.write TheMessage %>
      </FONT></font> <font size="2">
      <% else %>
      <font color="#104DAD" >
      <% response.write TheMessage %>
      </FONT></font> <font size="2">
      <% end if %>
      </font></td>
    <td  align=right><font size="2"><a href="MessageBoard.asp"><font color="#104DAD">返回上一级网页</font></a></font></td>
  </tr>
</table>
<table width="800" border="0" bordercolor="#164DA8" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="10" colspan="4" valign="top" bgcolor="#FFFFFF"> <table width="100%" border="0" height="13" cellspacing="0" cellpadding="0" mm_noconvert="TRUE">
        <tr> 
          <td height="13">&nbsp;</td>
        </tr>
      </table></td>
  </tr>
</table>
<font size="2"><br>
</font>
<TABLE CELLPADDING=1 CELLSPACING=2 BORDER=1 bordercolor="#164DA8" WIDTH=800 align=center>
  <TR VALIGN="center" ALIGN="center"> 
    <TD WIDTH=35% bgcolor=#B5C7EF>&nbsp; </td>
    <td> <FORM ACTION="ModifyMessage.asp"  METHOD=POST>
        <table width=100% border=1>
          <tr>
            <td><font size="2">此条通知ID</font></td>
            <td><font size="2">
              <% Response.write RSThisMessage("MessageID") %>
              </font></td>
          </tr>
          <tr>
            <td><font size="2">此条通知接受者</font></td>
            <td><font size="2">
              <% Response.write RSThisMessage("MessageType") %>
              </font></td>
          </tr>
          <tr>
            <td><font size="2">此条通知发送者</font></td>
            <td><font size="2">
              <% Response.write RSThisMessage("MessageSender") %>
              </font></td>
          </tr>
          <tr>
            <td><font size="2">此条通知发送日期</font></td>
            <td><font size="2">
              <% Response.write RSThisMessage("MessageSendDate") %>
              </font></td>
          </tr>
          <tr>
            <td><font size="2">此条通知有效天数</font></td>
            <td> <font size="2">
              <select name=MessageValidTime>
                <option value=<% Response.write RSThisMessage("MessageValidTime") %>>&nbsp&nbsp
                <% Response.write RSThisMessage("MessageValidTime") %>
                天&nbsp&nbsp</option>
                <%
ccounter=1
do until ccounter>31
%>
                <OPTION VALUE= <% Response.Write ccounter %> >&nbsp&nbsp
                <% Response.Write ccounter %>
                天&nbsp&nbsp</OPTION>
                <%
ccounter=ccounter+1
loop
%>
              </select>
              </font></td>
          </tr>
          <tr> 
            <td><font size="2">请修改此条通知的内容</font></td>
            <td> <font size="2">
              <TEXTAREA NAME="MessageContent" ROWS=6 COLS=40 ><% response.write RSThisMessage("MessageContent") %></TEXTAREA>
              </font></td>
          </tr>
          <tr>
            <td colspan=2 align=center> <font size="2">
              <input type=submit name=ModifyThisMessage value="修改此条通知" style="border: 1px solid #3466BB; background-color: #B6CAEB; color: #3466BB">
              </font></td>
          </tr>
        </table>
      </form></td>
  </tr>
</table>


</body>
</html>

⌨️ 快捷键说明

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