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

📄 guestbooklist.asp

📁 漂亮的欧美旅游模板
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="db_conn.asp"-->
<!--#include file="my_libs/my_request.asp"-->
<!--#include file="my_libs/my_lib.asp"-->
<!--#include file="wbTextBox/ubb.asp"-->
<!--#include file="my_libs/comm.asp"-->
<!--#include file="my_libs/pages.asp"-->
<%
dim arrlist(4),sqls,ip,flag,keyword
if Request.form("method")="add" then
arrlist(0)=my_request("ssort_gadder",0)
arrlist(1)=my_request("ssort_gemail",0)
arrlist(2)=my_request("ssort_gurl",0)
arrlist(3)=Request.form("body")
arrlist(4)=my_request("ssort_gtel",0)
response.write keyword
ip=Request.ServerVariables("REMOTE_ADDR")
if arrlist(0)="" or arrlist(3)="" then
call wnourl("信息没有填写完整")
else
sqls="insert into ssort_guestbook (zm_gadder,zm_gemail,zm_gurl,zm_gbody,zm_gaddtime,zm_gip,zm_gtel) values ('"&arrlist(0)&"','"&arrlist(1)&"','"&arrlist(2)&"','"&arrlist(3)&"','"&now()&"','"&ip&"','"&arrlist(4)&"')"
conn.execute (sqls)
response.redirect "guestbooklist.asp"
end if
end if
flag=cint(my_request("flag",1))
keyword=my_request("keyword",0)
%>
<script language=javascript>
function addface(str){
	WBTB_Composition.document.body.innerHTML+=str;
	//WBTB_Composition.richtext.focus;
}

function opennew(url,hh,ww){
properties  = "width=" + ww;
properties += ",height=" + hh;
properties += ",scrollbars=0,toolbar=0,location=0";
properties += ",directories=0,status=0,menubar=0";
properties += ",resizable=0,left=200,top=100";
window.open (url,null,properties);
}
</script>
<style type="text/css">
<!--
.cick {
	cursor: hand;
}
-->
</style>
<%call head("用户留言_"&arrlist_s(0))
call top()
%>
<div align="center">
	<table border="0" width="760" id="table1" cellpadding="4" class=istable>
		<tr class=smallblack>
			<td height="28">当前位置: <a href="../">网站首页</a> &gt;&gt;
			<a href="index.asp">线路预定</a> &gt;&gt; 留言列表</td>
		</tr>
	</table>
</div>
<div align="center">
	<table border="0" width="760" id="table2" cellpadding="4" class=istable>
		<tr class=smallblack>
			<td>注意:1、欢迎大家在此留下意见。2、请勿在此发布与本站无关的话题及违法的内容。</td>
		</tr>
	</table>
</div>


<div align="center">
		 <table border="0" width="760" id="table5" cellpadding="4" class=istable bordercolor="#808080">
		  <tr>
			<td class="toptd" height="28">&nbsp;<img border="0" src="images/ArrorWhite.gif" width="11" height="9"> 请 您 留 言 :</td>
		  </tr>
		</table>
	   </div>
<div align="center">
	<table border="1" width="760" id="table6" cellpadding="4" class=istable bordercolor="#D7D7D7">
     <form action="guestbooklist.asp" method="post" name="test">
	      <input type="hidden" name="method" value="add">
	<tr>
			<td>
			<table border="0" width="750" id="table54" cellpadding="2" class=istable>
				<tr class=smallblack>
					<td width="496">姓名:<input size="30" name="ssort_gadder" maxlength="50">&nbsp; 主页:<input size="30" value="http://" name="ssort_gurl" maxlength="50"></td>
					<td width="246" rowspan="4" valign="top">
					<table border="0" width="100%" id="table1" cellspacing="1" cellpadding="4">
		<tr class=smallblack>
			<td align="center" colspan=8>发帖心情:</td>
			<tr>
		<%
		dim s
		for s=1 to 48%>
			<td width="30" align="center"><img src="faceimg/<%=s%>.gif" alt="[ssort<%=s%>]" width="19" height="19" onclick="addface('[ssort<%=s%>]')" class=cick></td>
			<%
			if s mod 8=0 then
			response.write "</tr>"
			end if
			next
			%>
	</table>
 </td>
				</tr>
				<tr class=smallblack>
					<td width="496">Email:<input type="text" name="ssort_gemail" size="30" maxlength="50">&nbsp; 电话:<input size="30" name="ssort_gtel"></td>
				</tr>
				<tr>
					<td width="496"><!--#include file="form_add.asp"--></td>
				</tr>
				<tr>
					<td width="496">
<font-size:12px>

					<p align="center">
					<input type="submit" value="提 交" name="B2">
					<input type="reset" value="重 填" name="B1"></td>
				</tr>
			</table>
			</td>
		</tr>
	  </form>
	</table>
</div>
<table border="0" width="100%" id="table8" cellpadding="0" class=istable height="8">
	<tr>
		<td></td>
	</tr>
</table>
<div align="center">
	<table border="0" width="760" id="table51" cellpadding="4" class=istable height="30">
		<tr>
			<td class=toptd>&nbsp;<img border="0" src="images/ArrorWhite.gif" width="11" height="9">&nbsp;留 言 列 表 :</td>
		</tr>
	</table>
	<table border="1" width="760" id="table52" cellpadding="4" class=istable height="35" bordercolor="#D7D7D7">
	<form action=guestbooklist.asp method=post>
		<tr>
			<td align=center class=smallblack>
			<img border="0" src="images/gb-search.gif" width="24" height="24">留 言 搜 索:<select size="1" name="flag">
			<option value="1">内容</option>
			<option value="2" selected>姓名</option>
			<option value="3">email</option>
			</select><input type=text size="25" name="keyword" title="输入关键字">
			<input type="submit" value="给我搜" name="submit1"> 
			<a href="guestBookList.asp">显示全部留言</a></td>
		</tr></form>
	</table>
	<table border="0" width="100%" id="table53" cellpadding="0" class=istable>
		<tr>
			<td> </td>
		</tr>
	</table>
</div>
<%
dim sql,rs,arrlists(8),p,ii
select case flag
case 1
sql="select gid,zm_gadder,zm_gemail,zm_gurl,zm_gbody,zm_gaddtime,zm_gip,zm_hf,zm_hftime from ssort_guestbook where zm_gbody like '%"&keyword&"%' order by zm_gaddtime desc"
case 2
sql="select gid,zm_gadder,zm_gemail,zm_gurl,zm_gbody,zm_gaddtime,zm_gip,zm_hf,zm_hftime from ssort_guestbook where zm_gadder like '%"&keyword&"%' order by zm_gaddtime desc"
case 3
sql="select gid,zm_gadder,zm_gemail,zm_gurl,zm_gbody,zm_gaddtime,zm_gip,zm_hf,zm_hftime from ssort_guestbook where zm_gemail like '%"&keyword&"%' order by zm_gaddtime desc"
case else
sql="select gid,zm_gadder,zm_gemail,zm_gurl,zm_gbody,zm_gaddtime,zm_gip,zm_hf,zm_hftime from ssort_guestbook order by zm_gaddtime desc"
end select
set rs=server.CreateObject("adodb.recordset")
	rs.open sql,conn,1,1
	if (rs.eof and rs.bof) then
	response.write "<tr align=center>"
    response.write "<td class=12px width=760 colspan=6 align=center><p align=center class=smallblack><font color=#FF0000>没有相关记录</font></p></td>"
    response.write "</tr>"
    else
    rs.PageSize =12 '每页记录条数
			iCount=rs.RecordCount '记录总数
			iPageSize=rs.PageSize
    		maxpage=rs.PageCount 
    		page=request("page")
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if

end if
						  ii=1
						  while not rs.eof and ii<=rs.pagesize
for p=0 to 8
arrlists(p)=rs(p)
next

%>
<div align="center">
	<table border="1" width="760" id="table9" cellpadding="4" class=istable bordercolor="#C0C0C0">
		<tr>
			<td class="toptd" width="526"><%=arrlists(2)%>&nbsp;在&nbsp;<%=arrlists(5)%>&nbsp;说:</td>
			<td class="toptd" width="231" align="right">
			<p align="right">
			<a href="mailto:<%=arrlists(2)%>">
		<img border="0" src="images/email.gif" width="42" height="16"></a>&nbsp;
			<a target="_blank" href="<%=arrlists(3)%>">
		<img border="0" src="images/homepage.gif" width="42" height="16"></a>&nbsp;
       </td>
		</tr>
		<tr width="760" class=smallblack>
			<td colspan="2" width="760" style="word-break:break-all" >
			<p style="MARGIN: 10px 10px 5px 15px; LINE-HEIGHT: 140%" align="left">
			<%=face(Ubbcode(arrlists(4)))%> </p>
			<p style="MARGIN: 10px 10px 5px 15px; LINE-HEIGHT: 140%" align="left">
			<font color="orange">■ 版主回复-<%=arrlists(8)%>:</font><br>
			<font class="fonts">&nbsp;&nbsp;&nbsp;<%=arrlists(7)%></font> </td>
		</tr>
	</table>
</div>
<%
rs.movenext
ii=ii+1
wend
%>

<div align="center">
<table border="0" width="760" id="table50" cellpadding="4" class=istable cellspacing="2">
	<tr>
		<td><%call PageControl(iCount,maxpage,page,"border=0 align=left","<p align=left>")%></td>
	</tr>
<%rs.close
set rs=nothing
%>
</table>

</div>
<%call htmlend()%>

⌨️ 快捷键说明

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