khbook.asp

来自「实现一个用JSP、Servlet技术实现的小型物流网站系统。实现功能如下:管理员」· ASP 代码 · 共 151 行

ASP
151
字号
<%@ codepage ="936" %>
<%
if session("globalecmaster")="" or session("masterflag")="" then
response.write "<script language='javascript'>"
response.write"parent.location.href='../login.asp';</SCRIPT>" 
response.end
end if
 
 
 
'权限限制^^^^^^^^^^^^^^^^^^^^
 dim ishavegant
 ishavegant=false
 in_str=split(session("masterflag"),",")
 for each ins in in_str
 if trim(ins)="02" then 
 ishavegant=true
 end if
 next 
 if ishavegant=false then
 response.redirect "../err.asp"
 response.end
 end if
 '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%>
<% data_path="../../" 'ACC连接数据库路径,对SQL无效 %>
<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/safe.asp"-->
<HTML><HEAD><TITLE>意见与建议</TITLE>
<META content=zh-cn http-equiv=Content-Language>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<LINK href="../css/style.css" rel=stylesheet type=text/css>
<script language="javascript">
function istruede()
{
var i=confirm("你确定要删除吗?");
if(i)
{
return true ;

}
else
{

return false;
}

}

</script>
</HEAD>
<BODY>
<table width="98%" border="0" cellspacing="0" cellpadding="0"  align=center class="tableBorder">
<tr> 
<th class="tableHeaderText" colspan=2 height=25>网站意见管理</th>
</tr>
<tr>
<td class="forumRowHighlight" colspan=2>
<p><B>注意</B>:<BR><font color=blue>①回复时,回复信息系统将自动的发邮件到用户的邮箱! 操作时请完整填写表单信息。</font><BR>
<font color=red>②如果此条信息<B>不想前台显示</B>,则在此设置,默认是不在前台显示的。</font><br>
<font color=red>③已经回复的信息再点回复即是修改已经回复的信息。</font></td>
</tr>
<tr>
<td width="12%" height=25 class="forumRowHighlight">
<B>管理操作选项</B></td>
<td width="88%" class=forumRowHighlight><a href="khbook.asp?hf=1">已回复意见</a> | <a href="khbook.asp?hf=0">未回复意见</a> | <a href="khbook.asp?pass=1">允许前台显示意见</a> | <a href="khbook.asp?pass=0">不允许前台显示意见</a> | [<a href="javascript:location.reload()">刷新页面</a>]</td>
</tr>
</table>
<br>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="tableBorder">
	<tr>
		<th class="tableHeaderText" height=25>意见与建议管理</th>
	
              <tr> 
                <td> 
<%
if replace_text(request("pass"))<>"" then
 pass=replace_text(request("pass"))
 end if

if replace_text(request("hf"))<>"" then
 hf=replace_text(request("hf"))
 end if

sql="select * from Yixiang_GuestBook"
if pass<>"" then sql=sql&" where pass="&pass&""
if hf<>"" then sql=sql&" where hf="&request("hf")&""
sql=sql&" order by ID desc"

Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1
msg_per_page=10 '定义每页显示记录条数
%>
<!--#include file="../../inc/headpage.asp"--> 
<%
if rs.eof then
response.write"<br><br><div align=center>暂无数据信息</div><br><br>"
else
do while not rs.eof and rowcount > 0
%>
                  <table width="100%" border="0" cellspacing="1" cellpadding="3" align="center" style="word-wrap: break-word; word-break: break-all;">
        <tr> 
                      <td width="5%" height="30" valign="top" class=forumRowHighlight><img src="../../image/guestbkq.gif" width="18" height="18" hspace="4"></td>
                      <td width="65%" valign="top" class=forumRowHighlight> <font color="#CC3300"> 
                        <% =rs("content") %> (Email:<a href="mailto:<% =rs("useremail")%>"><% =rs("useremail")%></a>)
                        </font></td>
					
                      <td width="12%" valign="top" align="center" class=forumRowHighlight>
			            
			            <%if rs("pass")="1" then%>
                        <a href="pass.asp?id=<%=rs("id")%>"><font color="#FF0000">已允许前台显示</font></a>
                        <%else%>
                        <a href="pass1.asp?id=<%=rs("id")%>"><font color="#FF0000">不允许前台显示</font></a>
            <%end if%>            </td>
          <td width="5%" valign="top" class=forumRowHighlight><a href="javascript:win=window.open('hfbook.asp?id=<%=rs("id")%>','contact','width=500,height=300,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no');win.focus();">回复</a>
 		  </td>
           <td width="9%" valign="top" class=forumRowHighlight><a href="del.asp?id=<%=rs("id")%>" onClick="return istruede();">删除</a></td>
                    </tr>
                    <tr> 
                      <td width="5%" valign="top" class="forumRow"><img src="../../image/guestbka.gif" width="18" height="18" hspace="4"></td>
                      <td colspan="4" valign="top" class="forumRow"> <font color="#333333"> 
                        <% =rs("recontent") %>
                        </font></td>
					</tr>
                  </table>
                  <hr>
                  <% 
  rowcount=rowcount-1
  rs.movenext
  loop
  end if
%>
                  
                  

<table width="100%" border="0" cellspacing="2" cellpadding="2" align="center">
                    <tr> 
                      <td width="6%" valign="top" align="center" class=forumrowHighLight>
                        <b><%=listPages("khbook.asp?pass="&pass&"&hf="&request("hf")&"")%></b>
                      </td>
                    </tr>
                    
                  </table>

                </td>
              </tr>
</table>
</BODY>
</HTML>
<br>
<!--#include file="../copy.asp"-->

⌨️ 快捷键说明

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