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

📄 suggestionbox.asp

📁 本系统采用access+asp开发
💻 ASP
字号:
<%@ Language=VBScript %>
<!--#include file="../conn.asp"-->
<%
'判断用户是否登录
if isempty(Session("ID")) then
Response.Redirect "../login.asp"
end if
'连接系统数据库
'set conn = server.createobject ("adodb.connection")
'conn.open "ASPData", "sa", ""
'如果用户要查看自己提出的意见的处理结果
if not isempty(Request.Form("Review")) then
SqlReview="select * from SuggestionRecords where SenderName='" & Session("Name") _
& "' and Status='已处理' order by Status"
set RSReviewSuggestion=conn.Execute(SqlReview)
ReviewLabel=true
TheMessage="您所提交的意见目前已经处理的结果如下"
'如果用户提交新意见建议
elseif not isempty(Request.Form("OK")) then
CurrentTime = Now()
'将新意见建议插入数据库
SqlString="Insert into SuggestionRecords (SenderName, ToDepartment, " _
& "SuggestionType, SuggestionText, WhenSent, Status) values (" _
& "'" & Session("Name")   & "', " _
& "'" & Request.Form("ToDepartment")   & "', " _
& "'" & Request.Form("SuggestionType")   & "', " _
& "'" & Request.Form("SuggestionText")   & "', " _
& "'" & CurrentTime & "', " _
& "'未处理')"
conn.Execute(SqlString)
'查出刚提交的意见建议的内容
set RSSuggestionID = conn.Execute("select SuggestionID from SuggestionRecords where WhenSent = #" _
& CurrentTime & "#")
'查出要意见建议发往对象的电子邮件地址
set RSEmails = conn.Execute("Select EmailAddress  from UserInfo where Department='" _
& Request.Form("ToDepartment") & "' and Position='主管'")
'构造电子邮件的内容
EmailMessage = "意见建议来自: " & Session("Name") & chr(13)
EmailMessage = EmailMessage & "意见类型: " & Request.Form("SuggestionType") & chr(13)
EmailMessage = EmailMessage & "意见内容: " & Request.Form("SuggestionText") & chr(13)
EmailMessage = EmailMessage & "想要处理这条意见建议,请点击下面的链接: " & chr(13)
EmailMessage = EmailMessage & "http://166.111.56.212/"	
EmailMessage = EmailMessage & "MessageBoard/Analysis.asp?SuggestionID=" _
& RSSuggestionID("SuggestionID") 
'向所有对象发送电子邮件
Do Until RSEmails.EOF
set objMail = CreateObject("CDONTS.NewMail")
objMail.Send Session("EmailAddress"),RSEmails("EmailAddress"), _
"New Suggestion Box Message!",EmailMessage
set objmail = nothing	
RSEmails.MoveNext
loop
TheMessage = "您的意见建议已提交成功,您可以填写新意见建议"
else
TheMessage = "请在下面填写您的建议意见"
end if
set RSDepartments = conn.Execute("select * from Departments where DepartmentName <>'All' " _
& "order by DepartmentName")
set RSTypes = conn.Execute("select * from SuggestionTypes order by SuggestionType")
%>


<HTML>
<HEAD>
<TITLE>公司内部意见箱-提交意见建议</TITLE>
<META NAME="Generator" CONTENT="NetObjects Fusion 2.0.2 for Windows">
</HEAD>
<body>

<table width=800 border=0 bgcolor=#16A84D cellspacing=1 cellpadding=2 align=center>
<tr bgcolor=white><td    valign=center ><img src="../ASPLogo3.jpg" width=796 height=100></td></tr>
</table>
<table width="800" border="0" bordercolor="#16A84D" align="center" cellpadding="0" cellspacing="0">
<tr><td height="13"><img src=".././image/banner2.jpg" width="800" height="12"></td></tr>
</table>
<br>

<table width=800 border=0 bgcolor=#16A84D cellspacing=1 cellpadding=2 align=center>
<tr><td colspan=3>
<font color=white><P ALIGN="CENTER">公司内部办公信息管理系统->内部信息交流系统->意见建议箱&nbsp[当前用户-<% response.write Session("Name") %>]
</font></td></tr>
<tr bgcolor=white >
<td><a href=".././html/home.asp"><font color="#10AD4D">返回内网主页</font></a></td>
<td  align=center> <font color="#10AD4D" ><% response.write TheMessage %></FONT></td>
<td  align=right><a href="Communication.asp"><font color="#10AD4D">返回上一级网页</font></a></td></tr></table> 

<table width="800" border="0" bordercolor="#16A84D" 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"><img src=".././image/banner2.jpg" width="800" height="12"></td></tr></table>
</td></tr> </table>
<br>

<TABLE CELLPADDING=1 CELLSPACING=2 BORDER=1 bordercolor="#16A84D" WIDTH=800 align=center>   
<TR VALIGN="center" ALIGN="center">
<TD WIDTH=35% bgcolor=#B5EFC7>
<img src="../image/MessageBoard1.jpg"></td>
<td>

<Form ACTION="SuggestionBox.asp"  METHOD=POST>
<table width=100% border=1>
<tr height=30>
<td>请选择您要提意见的部门</td><td>
<SELECT NAME="ToDepartment" >
<%
Do Until RSDepartments.EOF
%>	
<OPTION VALUE="<% Response.Write RSDepartments("DepartmentName") %>"><% Response.Write RSDepartments("DepartmentName") %></OPTION>
<%
RSDepartments.MoveNext
Loop
%>
</td></tr>
<td>请选择您要提意见的类型</td><td>
<SELECT NAME="SuggestionType" >
<%
Do Until RSTypes.EOF
%>	
<OPTION VALUE="<% Response.Write RSTypes("SuggestionType") %>"><% Response.Write RSTypes("SuggestionType") %></OPTION>
<%
RSTypes.MoveNext
Loop
%>		
</SELECT>
</td></tr>
<td>请选择您要提意见的内容</td><td>
<TEXTAREA NAME="SuggestionText" ROWS=6 COLS=40 ></TEXTAREA
></td></tr>
<tr><td colspan=2 align=center>
<input type=submit name=OK value="提交我的意见" style="border: 1px solid #34BB66; background-color: #B6EBCA; color: #34BB66">
<input type=reset name=reset value="重设我的意见" style="border: 1px solid #34BB66; background-color: #B6EBCA; color: #34BB66">
<input type=submit name=review value="查看我的意见" style="border: 1px solid #34BB66; background-color: #B6EBCA; color: #34BB66">
</td></tr>
</table>
</Form>

</td></tr></table>

<% if ReviewLabel=true then %>
<table WIDTH=800  border=0 bgcolor=#16A84D cellspacing=1 cellpadding=2 align=center>
        <tr><td colspan=6 height=1 ><font color=white><P ALIGN="left">您提交的意见建议目前处理结果如下</FONT></font></td></tr>
        <tr bgcolor=white >
        <td  align=left>意见号</td>
        <td  align=left>发往部门</td>
        <td  align=left>意见类型</td>
        <td width=30%  align=left> 意见内容</td>
        <td  align=left> 发送日期</FONT></td>
        <td  align=left> 目前状态</FONT></td>
        <td  width=20% align=left> 回复意见</FONT></td>
        </tr>   
        <%
        Do Until RSReviewSuggestion.EOF
        %>
        <TR  bgcolor=white VALIGN="top" ALIGN="left">
        <TD ><font face=arial><% Response.write RSReviewSuggestion("SuggestionID") %></font></TD>
        <TD ><font face=arial><% Response.write RSReviewSuggestion("ToDepartment") %></font></TD>
        <TD ><font face=arial><% Response.write RSReviewSuggestion("SuggestionType") %></font></TD>
        <TD ><font face=arial><% Response.write RSReviewSuggestion("SuggestionText") %></font></TD>
        <TD ><font face=arial><% Response.write RSReviewSuggestion("WhenSent") %></font></TD>
        <TD ><font face=arial><% Response.write RSReviewSuggestion("Status") %></font></TD>
        <TD ><font face=arial><% Response.write RSReviewSuggestion("Comments") %></font></TD>
        </TR>
        <%
        RSReviewSuggestion.MoveNext
        Loop
        %>
</table>
<% end if %>
</body>
</html>

⌨️ 快捷键说明

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