?? modifymessage.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
'連接系統(tǒng)數(shù)據(jù)庫
set conn = server.createobject ("adodb.connection")
conn.open "ASPData", "sa", "yourpassword"
Warning=false
'用戶單擊了修改此條通知的按鈕
if not isempty(Request.Form("ModifyThisMessage")) then
'校驗修改后的通知的內(nèi)容
if Len(trim(Request.form("MessageContent")))=0 then
TheMessage="通知內(nèi)容不能為空,請重填這條通知"
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>公司內(nèi)部意見箱-提交意見建議</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>公司內(nèi)部辦公信息管理系統(tǒng)</strong></font></div></td>
</tr>
</table>
<table width="800" border="0" bordercolor="#164DA8" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="13"> </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">公司內(nèi)部辦公信息管理系統(tǒng)->內(nèi)部信息交流系統(tǒng)->內(nèi)部通知公共牌->修改通知 [當(dāng)前用戶-
<% response.write Session("Name") %>
] </font></font></td>
</tr>
<tr bgcolor=white >
<td><font size="2"><a href=".././html/home.asp"><font color="#104DAD">返回內(nèi)網(wǎng)主頁</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">返回上一級網(wǎng)頁</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"> </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> </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">此條通知發(fā)送者</font></td>
<td><font size="2">
<% Response.write RSThisMessage("MessageSender") %>
</font></td>
</tr>
<tr>
<td><font size="2">此條通知發(fā)送日期</font></td>
<td><font size="2">
<% Response.write RSThisMessage("MessageSendDate") %>
</font></td>
</tr>
<tr>
<td><font size="2">此條通知有效天數(shù)</font></td>
<td> <font size="2">
<select name=MessageValidTime>
<option value=<% Response.write RSThisMessage("MessageValidTime") %>>  
<% Response.write RSThisMessage("MessageValidTime") %>
天  </option>
<%
ccounter=1
do until ccounter>31
%>
<OPTION VALUE= <% Response.Write ccounter %> >  
<% Response.Write ccounter %>
天  </OPTION>
<%
ccounter=ccounter+1
loop
%>
</select>
</font></td>
</tr>
<tr>
<td><font size="2">請修改此條通知的內(nèi)容</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>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -