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

📄 gbook.asp

📁 漂亮公司企业网站自助建站系统 .asp.rar
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<html><head><title><%=webname%>--意见反馈</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<!--#include file="webtop.asp"-->
<TABLE width=772 height="169" border=0 align=center cellPadding=0 cellSpacing=0>
  <TBODY>
    <TR>
      <td width="1" background="image/bgbg.gif"></td>
      <TD class=b vAlign=top width=179>
	  <table width="178"  border="0" cellspacing="0" cellpadding="0">
<TR>
	      <TD  vAlign=top class=b><!--#include file="info_class2.asp"--><!--#include file="gouwucheinfo.asp"--></TD>
        </TR>  
 
<TR>
                <TD class=b><!--#include file="searc.asp"--></TD>
          </TR>
			  <TR>
                <TD  vAlign=top class=b><!--#include file="info_vote.asp" --></TD>
			  </TR>
      </table>      
      <td width="1" background="image/bgbg.gif"></TD>
      <TD class=b vAlign=top align=left width=590><table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="image/book.gif" width="590" height="34"></td>
        </tr>
      </table>
        <table width="590" border=0 cellspacing=0 cellpadding=0 align=center bgcolor="#FFFFFF" class="grayline">
          <tr>
            <td align=center height=50> <a href=book_write.asp><img border=0 src=images/write.gif title="我要写留言"></a> 
              &nbsp;&nbsp;&nbsp;&nbsp; <a href=gbook.asp><img border=0 src=images/read.gif title="留言本首页"></a> 
            </td>
          </tr>
          <tr>
            <td> 
              <%
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from Feedback where online='1' "
keywords=request("keywords")
if keywords<>"" then sql=sql+ " and Comments like '%"&keywords&"%' "
sql=sql + "order by top desc,Postdate desc"
rs.open sql,conn,1
if not (rs.eof and rs.bof) then			'如果有留言时,就显示留言。此行的if与倒数第6行的end if相对应

if pages=0 or pages="" then pages=5		'每页留言条数
rs.pageSize = pages	'每页记录数
allPages = rs.pageCount	'总页数
page = Request("page")	'从浏览器取得当前页
'if是基本的出错处理

If not isNumeric(page) then page=1

if isEmpty(page) or Cint(page) < 1 then
page = 1
elseif Cint(page) >= allPages then
page = allPages 
end if
rs.AbsolutePage = page			'转到某页头部
	Do While Not rs.eof and pages>0
	UserName=rs("UserName")		'用户名
	pic=rs("pic")			'头像
	face=rs("face")			'表情
	Comments=rs("Comments")		'内容
	bad1=split(bad,"/")		'过滤脏话
	for t=0 to ubound(bad1)
	Comments=replace(Comments,bad1(t),"***")
	next
	Replay=rs("Replay")		'回复
	Usermail=rs("Usermail")		'邮件
	url=rs("url")			'主页
	I=I+1				'序号
	temp=RS.RecordCount-(page-1)*rs.pageSize-I+1
	%>
              <table cellSpacing="1" cellPadding="3" width="590" align="center" bgColor="#000000" border="0" style="word-break:break-all">
                <tr> 
                  <td vAlign="top" width="25%" bgColor="#f7f7f7" rowSpan="2" align=center> 
                    <table border=0 width=85%>
                      <tr>
                        <td align=center><img src=images/face/pic<%=pic%>.gif border=0></td>
                      </tr>
                      <tr>
                        <td>姓名:<%=UserName%><br>
                          来自:<%=left(rs("ip"),(len(rs("ip"))-2))+"**"%><br>
                          邮件:<a href=mailto:<%=Usermail%>><img src=images/mail.gif border=0 alt="<%=Usermail%>"></a>&nbsp主页:<a href="<%=URL%>" target='_blank'><img src=images/home.gif border=0 alt="<%=URL%>"></a><br>
                        </td>
                      </tr>
                    </table></td>
                  <td width="75%" height="20" bgColor="#ffffff">
                    <%if rs("top")<>"1" then response.write "[NO."&temp&"]"%>
                    <img border=0 src=images/face/face<%=face%>.gif> 发表于:<%=cstr(rs("Postdate"))%></td>
                </tr>
                <tr> 
                  <td vAlign="top" bgColor="#ebebeb" width='75%' height=100 onMouseOver="bgColor='#FFffff'" onMouseOut="bgColor='#ebebeb'"> 
                    <%
	'是否屏蔽留言内容中的html字符
	if html=0 then
	response.write replace(server.htmlencode(Comments),vbCRLF,"<BR>")
	else
	response.write replace(Comments,vbCRLF,"<BR>")
	end if
	%>
                    <br>
                    <br> 
                    <%if rs("Replay")<>"" then%>
                    <table cellSpacing="1" cellPadding="3" width="90%" align="center" bgColor="darkgray" border="0">
                      <tr>
                        <td vAlign="top" bgColor="#f7f7f7"> <font color=<%=huifucolor%>>管理员回复 :<br>
                          <%=Replay%></font> </td>
                      </tr>
                    </table>
                    <br> 
                    <%end if%>
                  </td>
                </tr>
              </table>
              <table cellSpacing="0" cellPadding="0" width="590" align="center" bgColor="#FFFFFF" border="0">
                <TR>
                  <TD height=8> </TD>
                </TR>
              </TABLE>
              <%
pages = pages - 1
rs.movenext
if rs.eof then exit do
loop

response.write "<table border=0 width=590 align=center><tr><td><form action='gbook.asp' method='post'>总计留言"&RS.RecordCount&"条 "
if page = 1 then
response.write "<font color=darkgray>首页 前页</font>"
else
response.write "<a href=gbook.asp?page=1>首页</a> <a href=gbook.asp?keywords="&keywords&"&page="&page-1&">前页</a>"
end if
if page = allpages then
response.write "<font color=darkgray> 下页 末页</font>"
else
response.write " <a href=gbook.asp?keywords="&keywords&"&page="&page+1&">下页</a> <a href=gbook.asp?keywords="&keywords&"&page="&allpages&">末页</a>"
end if
response.write " 第"&page&"页 共"&allpages&"页 &nbsp; 转到第 "
response.write "<select name='page'>"
for i=1 to allpages
response.write "<option value="&i&">"&i&"</option>"
next
response.write "</select> 页 <input type=submit name=go value='Go'><input type=hidden name=keywords value='"&keywords&"'></form></td><td align=right>"
response.write "<form action='gbook.asp' method='post'><input title='想查找什么内容' type=text name=keywords value='"&keywords&"' size=10 maxlength=20><input type=submit value='搜索' title='给我搜'></form></td></tr></table>"


else
response.write "<table cellSpacing=0 cellPadding=0 width=680 align=center bgColor=#FFFFFF border=0><TR><TD height=120 align=center>"
if keywords="" then response.write "暂时没有留言" else response.write "抱歉,没有找到您要查到的内容<br><br><a href='javascript:history.go(-1)'>返回上一页</a>" end if
response.write "</TD></TR></TABLE>"
end if
%>
            </td>
          </tr>
        </table> </TD>
      <td width="1" background="image/bgbg.gif"></td>
    </TR>
  </TBODY>
</TABLE>
<!--#include file="webfoot.asp"-->
</body>
</html>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}

function checkfk()
{
   if(checkspace(document.fkinfo.fksubject.value)) {
	document.fkinfo.fksubject.focus();
    alert("您没有填写主题!");
	return false;
  }
   if(checkspace(document.fkinfo.fkusername.value)) {
	document.fkinfo.fkusername.focus();
    alert("请填写您的姓名!");
	return false;
  }
   if(checkspace(document.fkinfo.fklaizi.value)) {
	document.fkinfo.fklaizi.focus();
    alert("请填写您来自哪里!");
	return false;
  }
     if(checkspace(document.fkinfo.fkcontent.value)) {
	document.fkinfo.fkcontent.focus();
    alert("请填写反馈信息内容!");
	return false;
  }
  
  if(document.fkinfo.fkemail.value.length!=0)
  {
    if (document.fkinfo.fkemail.value.charAt(0)=="." ||        
         document.fkinfo.fkemail.value.charAt(0)=="@"||       
         document.fkinfo.fkemail.value.indexOf('@', 0) == -1 || 
         document.fkinfo.fkemail.value.indexOf('.', 0) == -1 || 
         document.fkinfo.fkemail.value.lastIndexOf("@")==document.fkinfo.fkemail.value.length-1 || 
         document.fkinfo.fkemail.value.lastIndexOf(".")==document.fkinfo.fkemail.value.length-1)
     {
      alert("Email地址格式不正确!");
      document.fkinfo.fkemail.focus();
      return false;
      }
   }
 else
  {
   alert("Email不能为空!");
   document.fkinfo.fkemail.focus();
   return false;
   }

}
//-->
</script> 

⌨️ 快捷键说明

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