?? analysis.asp
字號:
<%@ Language=VBScript %>
<%
'判斷用戶是否擁有合法的意見建議號
if isempty(Request.QueryString("SuggestionID")) and isempty(Request.Form("SuggestionID")) then
Response.Redirect "../login.asp"
end if
'連接系統數據庫
set conn = server.createobject ("adodb.connection")
conn.open "ASPData", "sa", "yourpassword"
'如果用戶從電子郵件鏈接到此頁面
if not isempty(Request.QueryString("SuggestionID")) then
CurrentSuggestID = Request.QueryString("SuggestionID")
TheMessage="請在下面進行意見批閱"
else
'如果用戶批閱意見建議
CurrentSuggestID=Request.form("SuggestionID")
'校驗用戶輸入的批閱
if len(trim(Request.Form("Comments")))<>0 then
set RSSuggestion=conn.Execute("select * from SuggestionRecords where SuggestionID=" _
& CurrentSuggestID & " order by SuggestionID")
set RSCommentor=conn.execute("select * from PSLogins where Department='" _
& RSSuggestion("ToDepartment") & "' and Position='主管'")
'判斷用戶是否有權批閱
if Request.form("CommentorName")=RSCommentor("Name") and _
Request.form("CommentorPassword")=RSCommentor("Password") then
conn.Execute "update SuggestionRecords set " _
& "Status = '已處理', " _
& "Comments = '" & Request.Form("Comments") & "'" _
& "where SuggestionID = " & Request.Form("SuggestionID")
TheMessage="您已批閱此條意見建議成功"
else
TheMessage="您無權對這條意見建議進行批閱,請檢查您輸入的姓名和密碼是否正確"
Warning=true
end if
else
TheMessage="意見建議的回復意見內容不能為空"
Warning=true
end if
CurrentSuggestID =Request.Form("SuggestionID")
end if
set RSSuggestion=conn.Execute("select * from SuggestionRecords where SuggestionID=" _
& CurrentSuggestID & " ")
TextofSuggestion = RSSuggestion("SuggestionText")
CurrentStatus = RSSuggestion("Status")
CurrentComments = RSSuggestion("Comments")
%>
<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"> </td>
</tr>
</table>
<br>
<table width=800 border=0 bgcolor=#164DA8 cellspacing=1 cellpadding=2 align=center>
<tr><td colspan=3>
<font color=white>
<P ALIGN="CENTER" size="2"><font size="2">公司內部辦公信息管理系統->內部信息交流系統->意見建議箱->批閱意見建議 [當前用戶-
<% response.write Session("Name") %>
</font>] </font></td></tr>
<tr bgcolor=white >
<td align=left><a href=".././html/home.asp"><font color="#104DAD" size="2">返回內網主頁</font></a></td>
<td align=center>
<% if Warning=false then %>
<font color="#104DAD" ><% response.write TheMessage %></FONT>
<% else %>
<font color=red ><% response.write TheMessage %></FONT>
<% end if %>
</td>
<td align=right><a href=javascript:parent.close();><font color="#104DAD" size="2">退出意見批閱頁面</font></a></td>
</tr></table>
<table width="800" border="0" bordercolor="#164DA8" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="13"> </td>
</tr></table>
<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="Analysis.asp" METHOD=POST>
<INPUT TYPE=HIDDEN NAME="SuggestionID" VALUE = "<% Response.Write CurrentSuggestID %>">
<table width=100% border=1>
<tr>
<td width=30% ><font size="2">意見號</font></td>
<td><% Response.Write RSSuggestion("SuggestionID") %></td></tr>
<tr>
<td><font size="2">意見提交者姓名</font></td>
<td><% Response.Write RSSuggestion("SenderName") %></td></tr>
<tr>
<td><font size="2">意見提往部門</font></td>
<td><% Response.Write RSSuggestion("ToDepartment") %></td></tr>
<tr>
<td><font size="2">意見類型</font></td>
<td><% Response.Write RSSuggestion("SuggestionType") %></td></tr>
<tr>
<td><font size="2">意見內容</font></td>
<td><% Response.Write TextofSuggestion %></td></tr>
<tr>
<td><font size="2">意見狀態</font></td>
<td><% Response.Write CurrentStatus %></td></tr>
<tr>
<td><font size="2">回復意見</font></td>
<td><TEXTAREA NAME="Comments" rows=10 cols=50 ><% Response.Write CurrentComments %></TEXTAREA></td></tr>
<tr>
<td><font size="2">您的姓名</font></td>
<td><Input type=text NAME="CommentorName" Maxlength=50 ></td></tr>
<tr>
<td><font size="2">您的登錄密碼</font></td>
<td><Input type=password NAME="CommentorPassword" Maxlength=50 ></td></tr>
<tr><td colspan=2 align=center>
<input type=submit name=SubmitChanges value="提交意見批閱" style="border: 1px solid #3466BB; background-color: #B6CAEB; color: #3466BB">
</td></tr>
</table>
</form>
</td></tr></table>
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -