📄 default.asp
字号:
<!--#include file="conn.asp" -->
<!--#include file="const.asp"-->
<!--#include file="ubb.asp"-->
<%pageno=request("pageno")%>
<html>
<head>
<title><%=webname%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<%=linkstyle%>}
body{ <%=bodystyle%> }
td { font-size: 9pt}
.font{<%=font%>}
}</style>
<link href="css.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
function go(src,q)
{
var ret;
ret = confirm(q);
if(ret!=false)window.location=src;
}
//-->
</script>
</head>
<body bgcolor="<%=bgcolor%>" text="#000000" leftmargin="0" topmargin="1" onload="window.setTimeout('statusScroll()', 500)">
<script language="JavaScript">
var msg = "<%=webname%>留言板"
var speed = 300;
var msgud = " " + msg;
function statusScroll() {
if (msgud.length <msg.length) msgud += " - " + msg;
msgud = msgud.substring(1, msgud.length);
window.status = msgud.substring(0, msg.length);
window.setTimeout("statusScroll()", speed);
}
</SCRIPT>
<!--#include file="top.asp"-->
<%set rs2=server.createobject("adodb.recordset")
set rs3=server.createobject("adodb.recordset")
const adOpenKeyset=1
const adLockReadOnly=1
const adCmdText=&H0001
sql="select * from [message] order by id desc"
rs.open sql,conn,adOpenKeyset,adLockReadOnly,adCmdText
if not rs.eof then
rs.pagesize=pgsize
if pageno="" then
rs.absolutepage=1
elseif pageno<1 then
response.write "<script>alert('输入的页数怎么可以为负呢?');location='default.asp'</script>"
else
rs.absolutepage=pageno
end if
pageno=rs.absolutepage
lineno=1
Do While NOT rs.EOF and lineno<=rs.pagesize%>
<table width="680" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="<%=tabbgcolor%>">
<tr>
<%sql="select id from [admin] where nickname='"&rs("name")&"'"
set rs3=conn.execute(sql)
if not rs3.eof then%>
<td height="160" width="149" rowspan="3" bgcolor="<%=tdbgcolor%>" align="center" valign="middle">
<%if session("flag")<>"" and session("username")<>"" then%>
<a href="message.asp?id=<%=rs3("id")%>" onFocus="if(this.blur)this.blur()"><span STYLE="position:relative; width:105; height:25; filter:glow(Color=#3366CC,Strength=4); margin-left:2px"><font color="#FFFFFF"><%=rs("name")%></font></span></a><br>
<%else%>
<span STYLE="position:relative; width:105; height:25; filter:glow(Color=#3366CC,Strength=4); margin-left:2px"><font color="#FFFFFF"><%=rs("name")%></font></span><br>
<%end if
if rs("face")<>"" then
if session("flag")<>"" and session("username")<>"" then%>
<a href="message.asp?id=<%=rs3("id")%>" onFocus="if(this.blur)this.blur()"><img src="<%=rs("face")%>" border=0></a>
<%else%>
<img src="<%=rs("face")%>" border=0>
<%end if
end if%>
<%else%>
<td height="160" width="149" rowspan="3" bgcolor="<%=tdbgcolor%>" align="center" valign="middle"><span STYLE="position:relative; width:105; height:25; filter:glow(Color=#3366CC,Strength=4); margin-left:2px"><font color="#FFFFFF"><%=rs("name")%></font></span><br>
<%if rs("face")<>"" then%>
<img src="<%=rs("face")%>" border=0>
<%end if%>
<%end if%>
<br>
<%if rs("sex")=1 then%>
<font color=blue>boy</font>
<%elseif rs("sex")=2 then%>
<span class="red">girl</span>
<%end if%>
<br> <pre style="padding-left:4px;MARGIN-TOP:2px;MARGIN-BOTTOM:2px;MARGIN-LEFT:2px;MARGIN-RIGHT:2px;word-wrap: break-word" class="font" >这是第<%=rs("messid")%>条留言</pre></td>
<td height="20" bgcolor="<%=td1bgcolor%>">
<%if rs("qq")<>"" then%>
<img src="images/oicq.gif" width="16" height="16" align="absbottom" title="QQ"><%=rs("qq")%>
<%end if%>
<%if rs("homepage")<>"" then%>
<a href="<%=rs("homepage")%>" target="_blank" onFocus="if(this.blur)this.blur()"><img src="images/homepage.gif" width="47" height="18" border=0 align="absbottom" title="<%=rs("homepage")%>"></a>
<%end if%>
<%if rs("email")<>"" then%>
<a href="mailto:<%=rs("email")%>" onFocus="if(this.blur)this.blur()"><img src="images/email.gif" width="45" height="18" border=0 align="absbottom" title="mailto:<%=rs("email")%>"></a>
<%end if%>
<%if rs("from")<>"" then%>
<img src="images/dc.gif" width="16" height="16" align="absbottom" title="地址"><%=rs("from")%>
<%end if%>
<%if rs("phone")<>"" then%>
<img src="images/phone1.gif" width="16" height="16" align="absbottom" title="联系电话"><%=rs("phone")%>
<%end if%>
<img src="image/ip1.gif" width="13" height="15" align="absbottom" title="IP"><%=rs("ip")%>
<div align="right"></div></td>
</tr>
<tr>
<td height="86" align="left" valign="top" bgcolor="<%=tdbgcolor%>"><pre style="padding-left:4px;MARGIN-TOP:2px;MARGIN-BOTTOM:2px;MARGIN-LEFT:2px;MARGIN-RIGHT:2px;word-wrap: break-word" class="font" >
<br></pre>
<table width="510" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100%">留言内容:
<%if rs("one")=0 then%>
<br>
<%=ubbcode(rs("content"))%> <br><br>
<%if rs("reply")<>"" then%>
<pre style="padding-left:4px;MARGIN-TOP:2px;MARGIN-BOTTOM:2px;MARGIN-LEFT:2px;MARGIN-RIGHT:2px;word-wrap: break-word" class="font" ><img src="<%=rs("bzface")%>" width="32" height="32"> <%=rs("replyname")%>斑竹回复: <font color=red><%=rs("reply")%></font></pre>
<%end if%>
<%elseif session("flag")<"3" and session("flag")>"0" then%>
<%=ubbcode(rs("content"))%> <br><br>
<%if rs("reply")<>"" then%>
<pre style="padding-left:4px;MARGIN-TOP:2px;MARGIN-BOTTOM:2px;MARGIN-LEFT:2px;MARGIN-RIGHT:2px;word-wrap: break-word" class="font" ><img src="<%=rs("bzface")%>" width="32" height="32"> <%=rs("replyname")%>斑竹回复: <font color=red><%=rs("reply")%></font></pre>
<%end if%>
<%elseif session("username")=rs("name") then%>
<br>
<%=ubbcode(rs("content"))%> <br><br>
<%if rs("reply")<>"" then%>
<pre style="padding-left:4px;MARGIN-TOP:2px;MARGIN-BOTTOM:2px;MARGIN-LEFT:2px;MARGIN-RIGHT:2px;word-wrap: break-word" class="font" ><img src="<%=rs("bzface")%>" width="32" height="32"> <%=rs("replyname")%>斑竹回复: <font color=red><%=rs("reply")%></font></pre>
<%end if%>
<%else%>
<p> 这是给斑竹的<img src="images/message.gif" width="60" height="18" align="absbottom">
<%end if%>
</td>
</tr>
</table>
<%sql="select * from [return] where messid="&rs("id")&" order by id desc"
set rs2=conn.execute(sql)
do while not rs2.eof%>
<br>
<%=rs2("repname")%> 回复:<font color=blue><%=ubbcode(rs2("return"))%> </font>
<%if session("flag")<"3" and session("flag")<>"" or session("username")=rs2("repname") then%>
<a href='javascript:go("returndel.asp?messid=<%=rs("id")%>&id=<%=rs2("id")%>","您确定要删除此回复?")' onFocus="if(this.blur)this.blur()"><img src="images/del.gif" width="9" height="9" border="0" align="absmiddle" title="删除此回复"></a><br>
<%end if%>
<%rs2.movenext
loop
rs2.close%>
</td>
</tr>
<tr>
<td height="20" bgcolor="<%=td1bgcolor%>"><div align="right">
<%if session("username")=rs("name") then%>
<a href="return.asp?messid=<%=rs("messid")%>&action=edit" onFocus="if(this.blur)this.blur()"><img src="images/edit.gif" width="12" height="14" border="0" align="absbottom" title="编辑留言"></a>
<%end if%>
<%if session("flag")>"2" and session("username")<>rs("name") then%>
<a href="return.asp?messid=<%=rs("messid")%>&action=userrep" onFocus="if(this.blur)this.blur()" ><span class="red">回复留言</span></a>  
<%end if%>
<%if session("flag")>"0" and session("flag")<"3" then%>
<a href='javascript:go("msgdel.asp?messid=<%=rs("messid")%>","您确定要删除此留言?")' onFocus="if(this.blur)this.blur()"><img src="images/del.gif" width="9" height="9" border="0" alt="删除" align="absmiddle" title="删除留言"></a> <a href="return.asp?messid=<%=rs("messid")%>&action=return" onFocus="if(this.blur)this.blur()"><span class="red">斑竹回复</span></a>
<%end if%>
</div></td>
</tr>
</table>
<%lineno=lineno+1
rs.MoveNext
Loop
else%>
<table width="680" height="224" border="0" align="center" cellspacing="1" bgcolor="<%=tabbgcolor%>">
<tr>
<td height="95" bgcolor="<%=tdbgcolor%>">
<div align="center">此留言本暂无留言</div></td>
</tr>
</table>
<%end if
pagecount=rs.pagecount%>
<table width="680" border="0" align="center" cellspacing="1" bgcolor="<%=td2bgcolor%>">
<tr> <form name="form1">
<td bgcolor="<%=tdbgcolor%>"> <div align="right">第<%=pageno%>/<%=pagecount%>页 共<%=rs.recordcount%>条留言
<%if pageno>1 then%>
<a href="?pageno=1" onFocus="if(this.blur)this.blur()">首页</a>
<%else%>
首页
<%end if%>
<%if pageno>1 then%>
<a href="?pageno=<%=pageno-1%>" onFocus="if(this.blur)this.blur()">上一页</a>
<%else%>
上一页
<%end if
if pageno<pagecount then%>
<a href="?pageno=<%=pageno+1%>" onFocus="if(this.blur)this.blur()">下一页</a>
<%else%>
下一页
<%end if
if pageno<pagecount then%>
<a href="?pageno=<%=pagecount%>" onFocus="if(this.blur)this.blur()">尾页</a>
<%else%>
尾页
<%end if%>
转到
<input name="pageno" type="text" id="pageno" size="1">
页
<input type="submit" name="Submit" value="go">
</div></form>
</td>
</tr>
<%rs.close
set rs=nothing%>
</table>
<table width="680" border="0" align="center" cellspacing="1" bgcolor="<%=tabbgcolor%>">
<tr>
<td bgcolor="<%=td1bgcolor%>">
<!--#Include file="buttom.asp"-->
</td>
</tr>
</table><br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -