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

📄 lyb.asp

📁 asp开发 asp开发 asp开发 asp开发
💻 ASP
字号:
<HTML><HEAD><TITLE>雪山草堂_联系堂主</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>A:link {
	COLOR: #000000;text-decoration: none
}
A:visited {
	COLOR: #000000;text-decoration: none
}
A:hover {
	COLOR: #FF0033;text-decoration: underline
}
A:active {
	COLOR: #cc0033;text-decoration: none
}
BODY {
	FONT-SIZE: 12px; LINE-HEIGHT: 16px
}
TD {
	FONT-SIZE: 12px; LINE-HEIGHT: 16px
}
INPUT {
	FONT-SIZE: 12px; LINE-HEIGHT: 16px; HEIGHT: 20px
}
.p12x {
	FONT-SIZE: 12px
}
.p14x {
	FONT-SIZE: 14px; LINE-HEIGHT: 26px
}
.p16x {
	FONT-SIZE: 16px; COLOR: #000000; TEXT-DECORATION: underline
}
.p14_line {
	FONT-SIZE: 14px
}
.tex {
	FONT-SIZE: 12px; LINE-HEIGHT: 18px
}
.d14 {
	FONT-SIZE: 12px
}
.d12 {
	FONT-SIZE: 12px
}
.tex {
	FONT-SIZE: 12px; LINE-HEIGHT: 20px
}
.d10 {
	FONT-SIZE: 10px; LINE-HEIGHT: 15px
}
</STYLE>
<Script language="JavaScript">
function hf(cID)
{
window.open("lyb/dohuifu.asp?ID=" + cID,"my","toolbar=no, left=250, top=250, menubar=no, width=300,height=250");
}
</Script>
<BODY text=#000000 bgColor=#eef3e4 leftMargin=0 topMargin=0>
<form name="refreshFrm" action="">
</form>
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center bgColor=#ffffff 
border=0>
  <TBODY>
  <TR>
    <TD class=d12>
      <TABLE cellSpacing=0 cellPadding=0 align=center border=0>
        <TBODY> 
        <TR> 
              <TD rowSpan=2 width="236">&nbsp;</TD>
          <TD rowSpan=2 width="10"> </TD>
        </TR>
        <TR> 
              <TD colSpan=13 width="524">&nbsp;</TD>
        </TR>
        </TBODY> 
      </TABLE>
    </TD></TR>
  <TR>
      <TD>&nbsp;</TD>
    </TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center bgColor=#ffffff 
border=0>
  <TBODY>
    <TR> 
      <TD width=167 height=25>&nbsp;</TD>
      <TD width=593 height=25>&nbsp;</TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center bgColor=#ffffff 
border=0>
  <TBODY>
  <TR>
      <TD>&nbsp;</TD>
  </TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center bgColor=#ffffff 
border=0>
  <TBODY>
  <TR>
    <TD width=8></TD>
    <TD> </TD>
  </TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center bgColor=#ffffff 
border=0>
  <TBODY>
  <TR>
      <TD width=10>&nbsp;</TD>
    <TD vAlign=top colSpan=2>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#999999 
        border=0><TBODY>
        <TR bgColor=#ffffff>
          <TD>

<FORM Action="lyb/handle.asp" Method="POST">
            <TABLE cellSpacing=1 cellPadding=2 width=262 align=center 
            bgColor=#999999 border=0>
              <TBODY>
              <TR bgColor=#ffffff>
              
                <TD> 
                  <p>姓名:</p>
                  </TD>
              
                <TD> 
                  <input TYPE="TEXT" NAME="Name" SIZE="20" VALUE="闲云野鹤"
				  style="width: 203; height: 20">
                  </TD></TR>
              <TR bgColor=#ffffff>
                <TD> 
                  Email:
                  </TD>
                <TD> 
                  <input TYPE="TEXT" NAME="Email" SIZE="40" VALUE="guest@tom.com" 
				  style="width: 201; height: 20">
                  </TD></TR>
              <TR bgColor=#ffffff>
                <TD> 
                  主题:
                  </TD>
                <TD> 
                  <input TYPE="TEXT" NAME="Subject" SIZE="60"  VALUE="问题!" 
				  style="width: 204; height: 20">
                  </TD></TR>
              <TR bgColor=#ffffff>
                <TD colspan="2"> 
                  留言:<br><textarea NAME="Memo" ROWS="6" COLS="31"></textarea>
                  </TD></TR>
              <TR bgColor=#ffffff>
                <TD colspan="2"> <input type="submit" value="提交">
                   
                  </TD></TR></TBODY></TABLE>
</FORM>
                  </TD></TR></TBODY></TABLE></TD>
    <TD vAlign=top align=middle width=490><IMG height=1 
      src="images/hr.gif" width=474><BR>
 <%
    '从主题表中读取数据
	sql = "SELECT * FROM GuestBook ORDER BY 时间 DESC"
	Set conn = Server.CreateObject("ADODB.Connection")
	conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" &_
		Server.MapPath("lyb/lyb.mdb")
	Set rs = Server.CreateObject("ADODB.Recordset")
	rs.Open sql, conn, 3
	'实现分页显示
	rs.PageSize = 3
	'防止出现页码出现小于1或者大于总页数的情况
	Page = CLng(Request("Page"))   ' CLng  不可省略
	If Page < 1 Then Page = 1
	If Page > rs.PageCount Then Page = rs.PageCount
	rs.AbsolutePage = Page
	'循环输出每页的信息
	For iPage = 1 To rs.PageSize
		If rs.eof Then exit For
			cID = rs("ID")
%>
<TABLE cellSpacing=1 cellPadding=1 width="463" border=1>
	<TR>  <TD colSpan=5 width="455"> </TD>	</TR>
	<TR>  <TD vAlign=top align=middle width=1 rowSpan=3> </TD>
	  <TD vAlign=top align=left width="38"><font color="#007799">姓名:</font></TD>
	  <TD vAlign=top align=left width="109"><%=rs("姓名")%></TD>
	  <TD vAlign=top align=left width="29"><font color="#007799">Email:</font></TD>
	  <TD vAlign=top align=left width="254"><%=rs("Email")%></TD>	</TR>
	<TR vAlign=top> 
	  <TD align=left width="77"><font color="#007799">来自IP:</font></TD>
	  <TD align=left width="76">&nbsp;<%=rs("ip")%></TD>
	  <TD align=left width="123"><font color="#007799">&nbsp;</font>
			<font color="#007799">留言时间:</font></TD>
	  <TD align=left width="166"><%=rs("时间")%></TD>
	</TR>
	<TR>  <TD align=left width="100"><font color="#007799">留言主题:</font></TD>
	  <TD align=left colspan="3" width="342"><font color="#FF0000"><%=rs("主题")%></font></TD>
	</TR>
	<TR> <TD vAlign=top align=middle width=1> </TD>
<TD ALIGN=LEFT COLSPAN="4" WIDTH="442"><FONT COLOR="#007799">留言内容:
<A HREF="#"><img src="LYB/hf.gif" width="91" height="26" border="0" 
onclick="hf('<%=cID%>')" ></a></font></TD></TR>
	<TR> 
	  <TD vAlign=top align=middle width=1> </TD>
	  <TD align=left colspan="4" width="442"><font color="#000000"> 
<%
'防止一行信息太长, 大于60个字符的时候,强制换行
mydata = (rs("留言"))
For i = 1 to len(mydata) step 60
	'防止强制换行的时候,将标记"<BR>"拆开
	If mid(mydata, 1, 60) <> "<" or mid(mydata, 1, 60) <> "b" or _
		mid(mydata, 1, 60) <> "r" or mid(mydata, 1, 60) <> ">" then
	mydata1 = mid(mydata, i, 60) & "<br>"
	Response.Write( mydata1)
	End if
Next
%>
</FONT></TD> </TR>
<TR> <TD vAlign=top align=middle></TD>
<TD align=left colspan="4"><font color="#007799">回复内容:
</FONT></TD> </TR>
<%
	'循环从回复表中输出回复信息
	strSQL = "SELECT * FROM hfBook WHERE rID=" & cID & " ORDER BY 时间 DESC" 
	set hfrs = conn.execute(strSQL)
	While Not hfrs.Eof 
%>
<TR> <TD vAlign=top align=middle></TD>
  <TD align=left colspan="4"><font color="#007799">
<%
	strhf = hfrs("回复内容")
	strhf1 = ""
	'在60个字符处,强制换行.
	For i = 1 to len(strhf) step 60
	If mid(strhf, 1, 60) <> "<" or mid(strhf, 1, 60) <> "b" or _
		mid(strhf, 1, 60) <> "r" or mid(strhf, 1, 60) <> ">" then
	strhf1 = strhf1 & mid(strhf, i, 60) & "<br>"
	End If
	Next
	Response.Write(hfrs("用户名") & "---" & "大侠评论:<font color='black'>" &_
		strhf1 &"</font>")
%>
</FONT></TD> </TR>
<%
	hfrs.movenext()
	Wend
%>
<TR> 
 <TD vAlign=top align=middle></TD>
 <TD align=left colspan="4">&nbsp;</TD>
	</TR> </TABLE>
<%     
   rs.MoveNext()     
  Next     
%>     
      <TABLE cellSpacing=1 cellPadding=1 width="96%" border=0>     
        <TR>      
          <TD colSpan=4> </TD>     
        </TR>     
        <TR>      
          <TD vAlign=top align=middle width=100 rowSpan=3> </TD>     
          <TD vAlign=top align=left      
            colSpan=3> </TD>     
        </TR>     
        <TR vAlign=top>      
          <TD align=left width="70%"> </TD>     
          <TD align=left width="30%"> </TD>     
        </TR>     
        <TR>      
          <TD align=left> </TD>     
          <TD align=left> </TD>     
        </TR>     
 
      </TABLE>     
      <IMG height=1 src="images/hr.gif"      
      width=474> </TD></TR></TABLE>     
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center bgColor=#ffffff      
border=0>     
  <TR align=middle>     
    <TD><BR>     
<form Action="lyb.asp" Method="GET" align="right">   
     <%   
   If Page <> 1 Then   
      Response.Write "<A HREF=lyb.asp?Page=1>第一页</A>

⌨️ 快捷键说明

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