有木ASP达人,帮忙看下
本帖最后由 破裤子 于 2012-2-17 16:51 编辑用老Y的程序弄了个站,自带的留言本太不像样子了,网上找了一个bbs样式的,覆盖以前的留言本可以用就是有个问题,有个文章标题的变量<%=Title%>在后面的body区域可以正常显示,但放在<Title>跟</Title>之间就是显示不出来,导致的问题就是每篇帖子在浏览器的标题栏都没有标题,达人帮忙看下是个什么情况,本人小白。
网址如下:http://www.lianshiju.com/Guestbook.asp
代码如下:<!--#include file="Inc/conn.asp"-->
<!--#include file="Inc/Function_Page.asp"-->
<!--#include file="Inc.asp"-->
<!--#include file="Inc/ubb.asp"-->
<%
'====================================================================================================================
'===================================以下变量根据您的系统版本,可做适量更改!=========================================
'--------------------------------------------------------------------------------------------------------------------
xqiba_bbsname ="交流讨论" '留言本名字
xqiba_Ver = 3.0 '系统版本
xqiba_UserGroup1 = UserInfo(LaoyID,0) '管理员验证
xqiba_UserGroup2 = 1 '管理员用户组验证
xqiba_pingbi= "由于该贴违反规定,已被管理员屏蔽!" '屏蔽贴显示的内容,双引号之间的内容可随意更改
xqiba_ws= "此贴还在审核当中,请等待管理员审核!" '屏蔽贴显示的内容,双引号之间的内容可随意更改
xqiba_huiyan= "您所在的用户组无查看此贴权限,请登陆" '会员贴显示的内容,双引号之间的内容可随意更改
xqiba_fengshu= "对不起,您的积分不够,发贴赚够积分再来吧!" '分数贴显示的内容,双引号之间的内容可随意更改
xqiba_pagesize1 = 30 '贴子列表显示数目 注:不可含引号
xqiba_pagesize2 = 10 '贴子内容分页数目 注:不可含引号
'====================================================================================================================
'=========================以下变量,不得更改,只做备用。可能以后升级时会用到!========================
'--------------------------------------------------------------------------------------------------------------------
xqiba_titile = SiteTitle '从系统读取站点名称 注:不得更改
xqiba_moneyname = moneyname '从系统读取金币名称 注:不得更改
xqiba_IsUser = IsUser '从系统读取在线状态 注:不得更改
xqiba_UserName = UserName '从系统读取在线用户名 注:不得更
'--------------------------------------------------------------------------------------------------------------------
xqiba_money1 = money1 '会员发表留言增加积分 注:不得更改
xqiba_money2 = money2 '会员自己删除减少积分 注:不得更改
xqiba_money3 = money3 '管理员删除留言减少积分 注:不得更改
'--------------------------------------------------------------------------------------------------------------------
xqiba_Class1 = "玉器交流区" '栏目1名称 注:可以更改里面的文字也可以增加
xqiba_Class2 = "宝石交流区" '栏目2名称 注:可以更改里面的文字也可以增加
xqiba_Class3 = "贵重金属交流区" '栏目3名称 注:可以更改里面的文字也可以增加
xqiba_Class4 = "聊天灌水区" '栏目4名称 注:可以更改里面的文字也可以增加
xqiba_Class5 = "商家广告区" '栏目5名称 注:可以更改里面的文字也可以增加
'====================================================================================================================
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>珠宝交流区<%=SiteTitle%>|<%=SiteTitle2%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="<%=Sitekeywords%>" />
<meta name="description" content="<%=Sitedescription%>" />
<link href="<%=SitePath%>images/css<%=Css%>.css" ID="skin" type=text/css rel=stylesheet>
<link rel="shortcut icon" href="<%=SitePath%>images/myfav.ico" type="image/x-icon" />
<script type="text/javascript" src="<%=SitePath%>inc/main.asp"></script>
<script charset="utf-8" src="../KindEditor/kindeditor.js"></script>
<script>
KE.show({
id : 'Content',
autoSetDataMode: false,
afterCreate : function(id) {
KE.event.add(KE.$('myform'), 'submit', function() {
KE.sync(id);
});
},
minWidth : 300,minHeight:300,allowUpload:false,
items:[ 'title', 'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold',
'italic', 'underline', 'strikethrough', 'removeformat','|','justifyleft', 'justifycenter', 'justifyright',
'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
'superscript', '|', 'selectall', '-','undo', 'redo', 'cut', 'copy', 'paste',
'plainpaste', 'wordpaste', '|','image','flash', 'media', 'advtable', 'hr', 'emoticons', 'specialchar', 'link', 'unlink', '|','source', 'fullscreen', 'about', 'preview']
});
</script>
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide
function killErrors() {
return true;
}
window.onerror = killErrors;
// -->
</SCRIPT>
</head>
<body>
<div class="mwall">
<%=Head%>
<%=Menu%><div class="mw">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="dh">
您现在的位置:<a href="Index.asp">首页</a> >> <a href="guestbook.asp"><%=xqiba_bbsname%></a> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div style="text-align:left;line-height:160%;margin:5px 0px;padding:5px;border:1px solid #ccc;background:#f7f7f7;">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="48%"><p align="left"><strong><font color="#FF0000">交流区版规:</font></strong><font color="#FF0000"><br />
1、请各位遵守中华人民共和国的各项法律法规。<br />
2、不要有任何非法的言论,不该说的不说。<br />
3、严禁链接任何政治、宗教、迷信、YELLO等违法信息。<br />
4、各位大侠如发现本站有程序或管理漏洞务请帮忙指正。<strong><br />
<span style="font-size: 13px"><fontstyle="color:#ff0000">
总之,只讨论珠宝翡翠相关话题,灌水区也请注意话题是否合适!</font ></span> <br />
</strong></font></p>
</td>
<td width="52%" align="left" valign="middle">
<%Call ShowAD(16)%>
</td>
</tr>
</table></div></td>
</tr>
</table>
<tr>
<td style="padding-bottom:5px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="22%" align="left">
<% if request("id") then %>
<a href="#reply"><img src="Images/xqiba_reply.gif" border="0" /></a>
<%end if%>
<a href="?ac=add"><img src="Images/xqiba_new.gif" border="0" /></a>
</td>
<td width="500" align="left"><div style="float:right;width:470px;text-align:center;">今日发帖:<font color="#FF0000"><%=Mydb("Select Count() From ["&tbname&"_Guestbook] Where datediff('d',Now(),AddTime) = 0",1)(0)%></font> 昨日发帖:<%=Mydb("Select Count() From ["&tbname&"_Guestbook] Where datediff('d',Now(),AddTime) = -1",1)(0)%></div></td>
<td width="19%" align="right"><table width="230" border="0" cellspacing="0" cellpadding="0">
<tr><form id="form1" name="form1" method="get" action="">
<td>
<input type="text" name="KeyWord" id="KeyWord" class="borderall"/>
</td>
<td><input type="submit" name="button" id="button" value="搜索" class="borderall"/></td></form>
</tr>
</table>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30" colspan="5" class="btitle">
<ul class="tabber">
<li><a href="Guestbook.asp">全部</a> ; ; ; ; ; ;<a href="Guestbook.asp?KeyWord=<%=xqiba_Class1%>"><%=xqiba_Class1%></a> ; ; ; ; ; ;<a href="Guestbook.asp?KeyWord=<%=xqiba_Class2%>"><%=xqiba_Class2%></a> ; ; ; ; ; ;<a href="Guestbook.asp?KeyWord=<%=xqiba_Class3%>"><%=xqiba_Class3%></a> ; ; ; ; ; ;<a href="Guestbook.asp?KeyWord=<%=xqiba_Class4%>"><%=xqiba_Class4%></a> ; ; ; ; ; ;<a href="Guestbook.asp?KeyWord=<%=xqiba_Class5%>"><%=xqiba_Class5%></a></li>
</ul>
</td>
</tr>
</table>
<p><% if request("id")="" and request("ac")="" then%>
</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="bbsborder">
<tr> </tr>
<tr>
<td width="40" height="30" align="center">
<div align="center"></div></td>
<td width="120" align="left"> <div align="center"><strong>发布者</strong></div></td>
<td width="100">
<div align="center"><strong>类别</strong></div></td>
<td> <div align="center"><strong>标 ; ; ; ; ; ; ; ; ; ; ; ;题</strong></div></td>
<td width="120">
<div align="center"><strong>最后回复</strong></div></td>
<td width="95"><strong>回复数/点击数</strong></td>
</tr>
<%
Set mypage=new xdownpage
mypage.getconn=conn
Dim KeyWord,stype
KeyWord=CheckStr(request("KeyWord"))
stype=LaoYRequest(request("stype"))
If KeyWord<>"" then
mypage.getsql=server.createobject("adodb.recordset")
If stype=1 or stype="" then
mypage.getsql="select * from "&tbname&"_Guestbook where yn=1 and xqiba_ReID=0 and InStr(1,LCase(Title),LCase('"&keyword&"'),0)<>0 or InStr(1,LCase(xqiba_class),LCase('"&keyword&"'),0)<>0 order by xqiba_Top desc,ReTime desc"
elseIf stype=2 then
mypage.getsql="select * from "&tbname&"_Guestbook where yn=1 and xqiba_ReID=0 and UserName = '"&keyword&"' order by xqiba_Top desc,ReTime desc"
End if
else
mypage.getsql="select * from "&tbname&"_Guestbook where yn=1 and xqiba_ReID=0 order by xqiba_Top desc,ReTime desc"
end if
mypage.pagesize=xqiba_pagesize1
set rs=mypage.getrs()
NoI=0
for i=1 to mypage.pagesize
if not rs.eof then
NoI=NoI+1
set rs1 = server.CreateObject ("adodb.recordset")
sql="select * from "&tbname&"_User where UserName='"& rs("UserName") &"'"
rs1.open sql,conn,1,1
set rs2 = server.CreateObject ("adodb.recordset")
sql="select * from "&tbname&"_User where UserName='"& rs("xqiba_ReUser") &"'"
rs2.open sql,conn,1,1
%>
<tr>
<td width="40" height="40" align="center" class="bb"> <div align="center"><a href="?id=<%= rs("id") %>" target="_blank">
<% if rs("xqiba_Top")=1 then%>
<img src="images/xqiba_topic.gif" border="0" />
<%else%>
<img src="images/xqiba_normal.gif" border="0" /></a>
<%end if%>
</div></td>
<td width="120" align="left" class="bb"> <div align="center"><span>
<%if rs1.EOF and rs1.BOF then %>
<%= iparray(rs("UserName")) %>
<% else %>
<a href="?stype=2&keyword=<%=rs("UserName")%>">
<%response.write left(rs("UserName"),15)%>
</a>
<% end if%>
</span><br />
<span class="date"><%=rs("AddTime")%></span> </div></td>
<td width="100" align="left" valign="middle" class="bb">
<div align="center"><a href="Guestbook.asp?KeyWord=<%=rs("xqiba_class")%>"><%=rs("xqiba_class")%></a> ; ; ;</div></td>
<td align="center" class="bb"> <div align="left"><a href="?id=<%= rs("id") %>">
<% if rs("xqiba_Top")=1 then%>
<b><font color="#8C149A"><%=left(rs("Title"),25)%></font></b>
<%else%>
<% if rs("xqiba_jh")=1 then%>
<b><font color="red"><%=left(rs("Title"),25)%></font></b>
<%else%>
<% if rs("xqiba_hy")=1 or rs("xqiba_fs")>0 then%>
<b><font color="#0D7B00"><%=left(rs("Title"),25)%></font></b>
<%else%>
<% if rs("xqiba_pb")=1 or rs("yn")=0 then%>
<b><font color="#FF99FF"><%=left(rs("Title"),25)%></font></b>
<%else%>
<%=left(rs("Title"),25)%>
<% end if%>
<% end if%>
<% end if%>
<% end if%>
</a>
<%If rs("xqiba_jh")=1 then Response.Write(" <img alt=""精华贴"" src=""images/xqiba_digest.gif"">") end if%>
<%If rs("xqiba_hy")=1 or rs("xqiba_fs")>0 then Response.Write(" <img alt=""会员贴,请登陆查看"" src=""images/xqiba_dl.gif"">") end if%>
<%If rs("xqiba_pb")=1 or rs("yn")=0 then Response.Write(" <img alt=""此帖已被管理员屏蔽或还在审核"" src=""images/xqiba_pb.gif"">") end if%>
</div></td>
<td width="120" class="bb">
<div align="center"><span class="user">
<%if rs2.EOF and rs2.BOF then response.write iparray(rs("xqiba_ReUser")) else response.write left(rs("xqiba_ReUser"),15) end if%>
</span><br />
<span class="date"><%=rs("ReTime")%></span> </div></td>
<td class="bb" width="95"> <%=rs("xqiba_Replies")%> / <font class="black"><%=rs("xqiba_Views")%></font>
</td>
</tr>
<%
rs.movenext
else
exit for
end if
next
%>
</table>
<div id="page">
<ul style="float:left;text-align:left;padding-bottom:10px;">
<%=mypage.showpage()%>
</ul>
</div>
<%end if%>
<% if request("id") then
If request("id")="" then
Call Alert("不正确的ID","guestbook.asp")
end if
set rs3 = server.CreateObject ("adodb.recordset")
sql="select * from "&tbname&"_GuestBook where ID="&request("id")&""
rs3.open sql,conn,1,3
if rs3("xqiba_ReID") > 0 then
Response.write("<script>location.href='Guestbook.asp?id="&rs3("xqiba_ReID")&"';</script>")
else
id=CInt(Trim(request("id")))
end if
Set mypage=new xdownpage
mypage.getconn=conn
mypage.getsql="select * from "&tbname&"_Guestbook where id="&id&" or xqiba_ReID="&id&" and yn=1"&" order by id asc"
mypage.pagesize=xqiba_pagesize2
set rs=mypage.getrs()
if rs.eof and rs.bof then
Call Alert("不正确的ID","guestbook.asp")
end if
set rs2 = server.CreateObject ("adodb.recordset")
sql="select * from "&tbname&"_GuestBook where ID="&id&""
rs2.open sql,conn,1,3
if not(rs2.eof and rs2.bof) then
If not rs2("xqiba_Views")="" Then rs2("xqiba_Views")=rs2("xqiba_Views") else rs2("xqiba_Views")=0end if
rs2("xqiba_Views")=rs2("xqiba_Views")+1
rs2.update
end if
title=rs2("Title")
NoI=0
for i=1 to mypage.pagesize
if not rs.eof then
NoI=NoI+1
set rs1 = server.CreateObject ("adodb.recordset")
sql="select * from "&tbname&"_User where UserName='"& rs("UserName") &"'"
rs1.open sql,conn,1,1
Dim xqiba_page,xqiba_jishu
If request("page")="" Then
xqiba_page=1
ElseIf not(IsNumeric(request("page"))) Then
xqiba_page=1
ElseIf CInt(Trim(request("page")))<1 Then
xqiba_page=1
Else
xqiba_page=CInt(Trim(request("page")))
End If
xqiba_jishu=xqiba_page*mypage.pagesize-mypage.pagesize+NoI
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="bbsborder" style="margin-bottom:10px;" id="table1">
<tr>
<td colspan="2" class="listtime"><span><font color=red><% if xqiba_jishu-1=0 then %>楼主<%else%><%response.write xqiba_jishu %>楼<%end if%></font></span>Time:<font color=red><%=rs("AddTime")%></font></td>
</tr>
<tr>
<% if rs1.EOF and rs1.BOF then %>
<td width="180" height="180" rowspan="3" valign="top">
<div class="author">
<font style="color:"><%=iparray(rs("AddIP"))%></font> </div>
<img src="images/noface.gif" width=100 height=100/>
<div class="userinfo">
<ul>
<li>
<div align="center">游客</div>
</li>
<li>
<div align="center"> ; ; ; ; ; ;<a href="http://www.laoy8.net/Other/IP.asp?IP=<%=iparray(rs("AddIP"))%>" target="_blank"><%=iparray(rs("AddIP"))%></a> </div>
</li>
</ul>
</div> </td>
<% else %>
<td width="180" height="180" rowspan="3" valign="top">
<div class="author">
<span><img src="<%if rs1("sex")<>0 then response.write("images/Male.gif") else response.write("images/Female.gif") end if %>" /></span><font style="color:"><%=rs("UserName")%></font> </div>
<img src="<%If rs1("UserFace")<>"" then Response.Write(""&laoyface(rs1("UserFace"))&"") else Response.Write(""&SitePath&"images/noface.gif") end if%>" width=100 height=100/>
<div class="userinfo">
<ul>
<li style="text-align:center;"> <img src="images/level/<%=rs1("dengjipic")%>" align=absMiddle> </li>
<li>等级:<%=rs1("dengji")%></li>
<li>注册:<%=rs1("RegTime")%></li>
<li><%=xqiba_moneyname%>:<%=rs1("UserMoney")%></li>
<li>IP:<a href="http://www.laoy8.net/Other/IP.asp?IP=<%=iparray(rs("AddIP"))%>" target="_blank"><%=iparray(rs("AddIP"))%></a></li>
<% if xqiba_IsUser=0 then%>
<br>
<span class="style4">更多联系信息请登陆查看</span></br>
<%End if%>
<% if xqiba_IsUser=1 then%>
<li>生日:<%=rs1("Birthday")%></li>
<li>籍贯:<%=rs1("province")%><%=rs1("city")%></li>
<li><strong>Q Q</strong>:<%=rs1("UserQQ")%></li>
<li>邮箱:<a href='mailto:<%=rs1("Email")%>'><%=rs1("Email")%></a></li>
<%End if%>
</ul>
</div> </td>
<% end if %>
<td height="264" class="bbscontent" >
<div class="title">
<a href="Guestbook.asp?KeyWord=<%=rs("xqiba_class")%>"><%=rs("xqiba_class")%></a> ; ; ;<%=rs("Title")%>
<title><%=rs("Title")%>-<%=xqiba_bbsname%>--<%=xqiba_titile%></title>
<p align="right">
<%if rs("xqiba_fs")>0 and rs("xqiba_pb")=0 then%>
<font color="#FF0000">此贴需要<font size="4"><%=rs("xqiba_fs")%><%=xqiba_moneyname%></font>的用户才有查看权限!</font></p>
<%end if%>
<hr /></div>
<div id="bbscontent">
<span>
<%if rs("xqiba_jh")=1 then%>
<div style="position:absolute;z-index:1;"><img src="<%=SitePath%>images/jinghua.gif" border="0" style="filter: alpha(opacity=50); -moz-opacity:0.5"></div><%end if%>
<%if rs("yn")=0 then
response.write ("<br>============================================<br>")& VbCrLf
response.write (""&xqiba_ws&"<br>")& VbCrLf
response.write ("==============================================<br>")& VbCrLf
end if
%>
<%if rs("xqiba_pb")=1 and rs("yn")=1 then%>
<%if rs("xqiba_pb")=1 then
response.write ("<br>=======================================<br>")& VbCrLf
response.write (""&xqiba_pingbi&"<br>")& VbCrLf
response.write ("=======================================<br>")& VbCrLf
end if%><%end if%>
<%if rs("xqiba_fs")>0 and rs("xqiba_pb")=0 and rs("yn")=1 then%>
<%if rs("xqiba_fs")>mymoney then
response.write ("<br>============================================<br>")& VbCrLf
response.write (""&xqiba_fengshu&"<br>")& VbCrLf
response.write ("==============================================<br>")& VbCrLf
else
response.write UBBCode(rs("Content"))
end if%>
<%end if%>
<%if rs("xqiba_hy")=1 and rs("xqiba_fs")=0 and rs("xqiba_pb")=0 and rs("yn")=1 then%>
<%if rs("xqiba_hy")=1 then
If isuser<>1 then
response.write ("<br>=======================================<br>")& VbCrLf
response.write (""&xqiba_huiyan&"<br>")& VbCrLf
response.write ("=======================================<br>")& VbCrLf
else
response.write UBBCode(rs("Content"))
end if
end if%>
<%end if%>
<%if rs("xqiba_pb")=0 and rs("yn")=1 and rs("xqiba_hy")=0 and (rs("xqiba_fs")<mymoney or rs("xqiba_fs")=mymoney or rs("xqiba_fs")>mymoney) then%>
<%if rs("xqiba_fs")=0 then
response.write UBBCode(rs("Content"))
end if%>
<%end if%>
</span> </div> </td>
</tr>
<%if rs("ReContent")<>"" then%>
<tr>
<td colspan="0" style="padding:5px 20px;line-height:20px;font-size:13px;color:#174BAF">
<p align="left"><font color=red>管理员回复:</font><%=rs("ReContent")%><br><font color="#cccccc">(回复时间:<%=rs("ReTime")%>)</font> </td>
</tr>
<%end if%>
<div id="clear"></div>
<tr>
<td class="bbscontent">
<table width="100%"border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="bbscontent"><div id="qm">
<%=rs1("qm")%></div> </td>
</tr>
</table>
<p align="right">
<% if xqiba_IsUser=1 and xqiba_UserGroup1=xqiba_UserGroup2 then%>
[<a href="?ac=admin&what=del&kid=<%=rs("ID")%>&Rid=<%=id%>">删除</a>]
<% if rs("xqiba_pb")=0 then%>
[<a href="?ac=admin&what=pb&kid=<%=rs("ID")%>&Rid=<%=id%>">屏蔽</a>]
<%else%>
[<a href="?ac=admin&what=q_pb&kid=<%=rs("ID")%>&Rid=<%=id%>"><font color="#FF0000">取消屏蔽</font></a>]
<%end if%>
<% if rs("xqiba_hy")=0 then%>
[<a href="?ac=admin&what=hy&kid=<%=rs("ID")%>&Rid=<%=id%>">会员贴</a>]
<%else%>
[<a href="?ac=admin&what=q_hy&kid=<%=rs("ID")%>&Rid=<%=id%>"><font color="#FF0000">取消会员贴</font></a>]
<%end if%>
<% if rs("xqiba_Top")=0 then%>
[<a href="?ac=admin&what=top&kid=<%=rs("ID")%>&Rid=<%=id%>">置顶</a>]
<%else%>
[<a href="?ac=admin&what=q_top&kid=<%=rs("ID")%>&Rid=<%=id%>"><font color="#FF0000">取消置顶</font></a>]
<%end if%>
<% if rs("xqiba_jh")=0 then%>
[<a href="?ac=admin&what=jh&kid=<%=rs("ID")%>&Rid=<%=id%>">精华</a>]
<%else%>
[<a href="?ac=admin&what=q_jh&kid=<%=rs("ID")%>&Rid=<%=id%>"><font color="#FF0000">取消精华</font></a>]
<%end if%>
<% if rs("xqiba_fs")>0 then%>
[<a href="?ac=admin&what=fs&kid=<%=rs("ID")%>&Rid=<%=id%>">清除分数限制</a>]
<%end if%>
[<a href="?ac=admin&what=fs1&kid=<%=rs("ID")%>&Rid=<%=id%>">设置分数限制</a>](一次加5分)
<%end if%>
[<a href="guestbook.asp">回列表</a>] [<a href="#">到顶部</a>]</p>
<font color="#FF0000"><span class="textad">
<%if NoI=1 then Call ShowAD(7) else if NoI=2 then Call ShowAD(8) else if NoI=3 then Call ShowAD(9) end if%>
</span> </font> </td>
</tr>
</table>
<%
rs.movenext
else
exit for
end if
next
%>
<div id="page">
<ul style="float:left;text-align:left;padding-bottom:10px;">
<%=mypage.showpage()%>
</ul>
</div>
<script language=javascript>
function chk()
{
if(document.form.title.value == "" || document.form.title.value.length > 40)
{
alert("不能提交留言,你的留言标题为空或大于40个字符!");
document.form.title.focus();
document.form.title.select();
return false;
}
if(document.form.content.value == "")
{
alert("请填写留言内容!");
document.form.content.focus();
document.form.content.select();
return false;
}
if(document.form.code.value == "")
{
alert("请填写验证码!");
document.form.code.focus();
document.form.code.select();
return false;
}
return true;
}
</script>
<br></br>
<div id="ilist212"><h6 align="center">快速回复</h6>
<div >
<form onSubmit="return chk();" method="post" name="form" action="?Rid=<%=request("id")%>&ac=Repost">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#ffffff" >
<tr>
<td height="30" width="60"><a name="reply"></a></td>
<td align="left"></td>
</tr>
<tr>
<td height="30" align="right">名字:</td>
<td align="left">
<%If xqiba_IsUser=1 then %>
<input type="radio" value="<%=xqiba_UserName%>" checked name="UserName">
<%=xqiba_UserName%>
<%end if%>
<input type="radio" name="UserName" <%If not xqiba_IsUser=1 then %> checked <%end if%> value="<%=Request.ServerVariables("REMOTE_ADDR")%>">
<%=Request.ServerVariables("REMOTE_ADDR")%> </td>
</tr>
<tr>
<td height="30" align="right">主题:</td>
<td align="left"> <input name="title" type="text" id="title" value="RE:<%=title%>" maxlength="40"Readonly style="width:400px;border:1px solid #ccc;">
</td>
</tr>
<tr>
<td height="15" align="right"><span class="red">*</span>内容:</td>
<tdalign="left"> <textarea name="Content" style="width:65%;height:250px;" id="Content"></textarea>
<tr>
<td height="30" align="right">验证码:</td>
<td align="left"> <input name="code" type="text" id="code" size="8" maxlength="5" style="border:1px solid #ccc;"/>
<img src="Inc/code.asp" border="0" alt="看不清楚请点击刷新验证码" style="cursor : pointer;" onClick="this.src='Inc/code.asp'"/>
</td>
</tr>
<tr>
<td height="30" align="right"></td>
<td height="30" align="left"><input type="submit" name="Submit" value=" 发 布 "></td>
</tr>
</table>
</form>
</div>
</div>
<% end if %>
<%if request("ac")="add" then%>
<script language=javascript>
function chk()
{
if(document.form.title.value == "" || document.form.title.value.length > 40)
{
alert("不能提交留言,你的留言标题为空或大于40个字符!");
document.form.title.focus();
document.form.title.select();
return false;
}
if(document.form.xqiba_Class.value == "")
{
alert("请选择类别!");
return false;
}
if(document.form.content.value == "")
{
alert("请填写留言内容!");
document.form.content.focus();
document.form.content.select();
return false;
}
if(document.form.code.value == "")
{
alert("请填写验证码!");
document.form.code.focus();
document.form.code.select();
return false;
}
return true;
}
</script>
<div id="ilist212"><h6 align="center">发表新贴</h6>
<div class="ilist212">
<form onSubmit="return chk();" method="post" name="form" action="?ac=post">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#ffffff">
<tr>
<td width="15%" height="30" class="adgs">大名:</td>
<td colspan="2" align="left">
<%If xqiba_IsUser=1 then %>
<input type="radio" value="<%=xqiba_UserName%>" checked name="UserName">
<%=xqiba_UserName%>
<%end if%>
<input type="radio" name="UserName" <%If not xqiba_IsUser=1 then %> checked <%end if%> value="<%=Request.ServerVariables("REMOTE_ADDR")%>">
<%=Request.ServerVariables("REMOTE_ADDR")%> </td>
</tr>
<tr>
<td height="30" class="adgs"> 主题:</td>
<td height="30" colspan="2" align="left"> <input name="title" type="text" id="title" maxlength="40" style="width:300px;border:1px solid #ccc;" />
</td>
</tr>
<tr>
<td height="30" class="adgs">类别:</td>
<td height="30" colspan="2" align="left"> <select name="xqiba_Class" id="xqiba_Class">
<option value="">请选择类别</option>
<option value="<%=xqiba_Class1%> "><%=xqiba_Class1%> </option>
<option value="<%=xqiba_Class2%> "><%=xqiba_Class2%> </option>
<option value="<%=xqiba_Class3%> "><%=xqiba_Class3%> </option>
<option value="<%=xqiba_Class4%> "><%=xqiba_Class4%> </option>
<option value="<%=xqiba_Class5%> "><%=xqiba_Class5%> </option>
</select> </td>
</tr>
<tr>
<td height="15" class="adgs"><span class="red">*</span>内容:</td>
<td colspan="2"align="left"> <textarea name="Content" style="width:100%;height:350px;" id="Content"></textarea>
</td>
</tr>
<tr>
<td height="36" class="adgs">限制贴:</td>
<td width="10%"align="left" valign="middle"> <input name="xqiba_dl" type="checkbox" id="xqiba_dl" value="1" />
会员主题
</td>
<td width="79%"align="left" valign="middle"><input name="xqiba_fs" type="text" id="xqiba_fs" value="0" size="5" maxlength="2" />
查看分数,最大二位数。<font color="#FF0000">注:两项请选择一项设置即可。</font></td>
</tr>
<tr>
<td height="30" class="adgs">验证码:</td>
<td colspan="2" align="left"> <input name="code" type="text" id="code" size="8" maxlength="5" style="border:1px solid #ccc;"/>
<img src="Inc/code.asp" border="0" alt="看不清楚请点击刷新验证码" style="cursor : pointer;" onClick="this.src='Inc/code.asp'"/>
</td>
</tr>
<tr>
<td height="30" class="adgs"></td>
<td height="30" colspan="2" align="left"><input type="submit" name="Submit" value=" 发 布 "></td>
</tr>
</table>
</form>
</div>
</div>
<p>
<%elseif request("ac")="post" then
dim UserName,Title,Content
UserName = CheckStr(trim(request.form("UserName")))
Title = CheckStr(trim(request.form("Title")))
xqiba_class = CheckStr(trim(request.form("xqiba_class")))
Content = request.form("Content")
mycode = trim(request.form("code"))
if mycode<>Session("getcode") then
Call Alert("请输入正确的认证码!",-1)
end if
if request.form("xqiba_fs")<0 then
Call Alert("设置查看积分数必须大于0,请重新设置!",-1)
end if
If session("postgstime")<>"" then
posttime8=DateDiff("s",session("postgstime"),Now())
if posttime8<yaopostgetime then
posttime9=yaopostgetime-posttime8
Call Alert("请不要连续发表!",-1)
end if
End if
If Not Checkpost(True) Then Call Alert("禁止外部提交!","-1")
set rs = server.CreateObject ("adodb.recordset")
sql="select * from "&tbname&"_Guestbook"
rs.open sql,conn,1,3
if UserName="" or Title="" or Content="" or xqiba_Class="" then
Call Alert("请检查必填项,确认填写整再发表!",-1)
end if
rs.AddNew
rs("UserName") =UserName
rs("Title") =Title
rs("xqiba_class") =xqiba_class
rs("Content") =Left(Content,5000)
rs("AddIP") =Request.ServerVariables("REMOTE_ADDR")
rs("ReTime") =Now()
rs("xqiba_ReUser") =UserName
rs("xqiba_fs") =request.form("xqiba_fs")
If bookoff=1 then
rs("yn") =1
else
rs("yn") =0
end if
if request("xqiba_dl")=1 then
rs("xqiba_hy") =1
else
rs("xqiba_hy") =0
end if
rs.update
set rs2 = server.CreateObject ("adodb.recordset")
sql="select * from "&tbname&"_User where UserName='"&UserName&"'"
rs2.open sql,conn,1,3
if not(rs2.eof and rs2.bof) then
rs2("UserMoney")=rs2("UserMoney")+xqiba_money1
rs2.update
end if
Session("postgstime")=Now()
If bookoff=0 then
Call Alert ("恭喜你,发贴成功,但需要管理员审核后才能显示出来!","Guestbook.asp?id="&rs.Fields("ID"))
else
Call Alert ("恭喜你,发贴成功!","Guestbook.asp?id="&rs.Fields("ID"))
end if
rs.close
Set rs = nothing
elseif request("ac")="Repost" then
id=request("Rid")
UserName = CheckStr(trim(request.form("UserName")))
Title = CheckStr(trim(request.form("Title")))
Content = request.form("Content")
mycode = trim(request.form("code"))
if mycode<>Session("getcode") then
Call Alert("请输入正确的认证码!",-1)
end if
If session("postgstime")<>"" then
posttime8=DateDiff("s",session("postgstime"),Now())
if posttime8<yaopostgetime then
posttime9=yaopostgetime-posttime8
Call Alert("请不要连续发表!",-1)
end if
End if
If Not Checkpost(True) Then Call Alert("禁止外部提交!","-1")
set rs = server.CreateObject ("adodb.recordset")
sql="select * from "&tbname&"_Guestbook"
rs.open sql,conn,1,3
if UserName="" or Title="" or Content="" then
Call Alert("请重新检查必填项目!","-1")
end if
rs.AddNew
rs("UserName") =UserName
rs("Title") =Title
rs("Content") =Left(Content,5000)
rs("AddIP") =Request.ServerVariables("REMOTE_ADDR")
rs("ReTime") =Now()
rs("xqiba_ReID") =id
If bookoff=1 then
rs("yn") =1
else
rs("yn") =0
end if
rs.update
set rs3 = server.CreateObject ("adodb.recordset")
sql="select * from "&tbname&"_GuestBook where ID="&id
rs3.open sql,conn,1,3
rs3("ReTime") =Now()
rs3("xqiba_ReUser") =UserName
If not rs3("xqiba_Replies")="" Then rs3("xqiba_Replies")=rs3("xqiba_Replies") else rs3("xqiba_Replies")=0end if
rs3("xqiba_Replies") =rs3("xqiba_Replies")+1
rs3.update
set rs2 = server.CreateObject ("adodb.recordset")
sql="select * from "&tbname&"_User where UserName='"&UserName&"'"
rs2.open sql,conn,1,3
if not(rs2.eof and rs2.bof) then
rs2("UserMoney")=rs2("UserMoney")+xqiba_money1
rs2.update
end if
Session("postgstime")=Now()
If bookoff=0 then
Call Alert ("恭喜你,回复成功,但需要管理员审核后才能显示出来!","Guestbook.asp?id="&id)
else
Call Alert ("恭喜你,回复成功!","Guestbook.asp?id="&id)
end if
end if
%>
<%
if request("ac")="admin" then
If xqiba_IsUser<>1 then
Response.write("<script>alert('非法访问,这里不是你应该来的!');location.href='Guestbook.asp';</script>")
else
ifxqiba_UserGroup1=xqiba_UserGroup2 then
kid=CInt(Trim(request("Kid")))
Rid=CInt(Trim(request("Rid")))
set rs1 = server.CreateObject ("adodb.recordset")
sql="select * from "&tbname&"_GuestBook where ID="& kid &""
rs1.open sql,conn,1,1
ReID=rs1("xqiba_ReID")
if request("what")="del" then
set rs2 = server.CreateObject ("adodb.recordset")
sql="select * from "&tbname&"_User where UserName='"&rs1("UserName")&"'"
rs2.open sql,conn,1,3
if not(rs2.eof and rs2.bof) then
rs2("UserMoney")=rs2("UserMoney")-xqiba_money3
rs2.update
end if
ifReID <> 0 then
set rs=conn.execute("delete from "&tbname&"_GuestBook where id="&kid)
set rs=conn.execute("update "&tbname&"_GuestBook set xqiba_Replies = xqiba_Replies -1 where ID="&ReID)
Response.write("<script>alert('回复贴删除成功!');location.href='Guestbook.asp?id="&Rid&"';</script>")
else
set rs=conn.execute("delete from "&tbname&"_GuestBook where id="&kid&" or xqiba_ReId="&kid)
Response.write("<script>alert('主题贴删除成功!');location.href='Guestbook.asp';</script>")
end if
elseif request("what")="pb" then
if rs1("xqiba_pb")=0 then
set rs=conn.execute("update "&tbname&"_GuestBook set xqiba_pb =1 where ID="&Kid)
Response.write("<script>alert('屏蔽成功!');location.href='Guestbook.asp?id="&Rid&"';</script>")
else
Response.write("<script>alert('该贴已经屏蔽,无法再次屏蔽!');location.href='Guestbook.asp?id="&Rid&"';</script>")
end if
elseif request("what")="q_pb" then
if rs1("xqiba_pb")=1 then
set rs=conn.execute("update "&tbname&"_GuestBook set xqiba_pb =0 where ID="&Kid)
Response.write("<script>alert('屏蔽取消成功!');location.href='Guestbook.asp?id="&Rid&"';</script>")
else
Response.write("<script>alert('该贴未被屏蔽,无需解除屏蔽!');location.href='Guestbook.asp?id="&Rid&"';</script>")
end if
elseif request("what")="hy" then
if rs1("xqiba_hy")="0" and rs1("xqiba_pb")="0" then
set rs=conn.execute("update "&tbname&"_GuestBook set xqiba_hy =1 where ID="&Kid)
Response.write("<script>alert('会员贴设置成功!');location.href='Guestbook.asp?id="&Rid&"';</script>")
else
Response.write("<script>alert('该贴是屏蔽贴,无法设置为会员贴,请先取消屏蔽!');location.href='Guestbook.asp?id="&Rid&"';</script>")
end if
elseif request("what")="q_hy" then
if rs1("xqiba_hy")=1 then
set rs=conn.execute("update "&tbname&"_GuestBook set xqiba_hy =0 where ID="&Kid)
Response.write("<script>alert('会员贴取消成功!');location.href='Guestbook.asp?id="&Rid&"';</script>")
else
Response.write("<script>alert('该贴不是会员贴,无需取消!');location.href='Guestbook.asp?id="&Rid&"';</script>")
end if
elseif request("what")="top" then
if Reid=0 then
if rs1("xqiba_Top")=0 then
set rs=conn.execute("update "&tbname&"_GuestBook set xqiba_Top =1 where ID="&Kid)
Response.write("<script>alert('置顶成功!');location.href='Guestbook.asp?id="&Rid&"';</script>")
else
Response.write("<script>alert('该贴已被置顶,无法再次置顶!');location.href='Guestbook.asp?id="&Rid&"';</script>")
end if
else
Response.write("<script>alert('该贴不是主题贴,只允许主题贴置顶!');location.href='Guestbook.asp?id="&Rid&"';</script>")
end if
elseif request("what")="q_top" then
if rs1("xqiba_Top")=1 then
set rs=conn.execute("update "&tbname&"_GuestBook set xqiba_Top =0 where ID="&Kid)
Response.write("<script>alert('置顶取消成功!');location.href='Guestbook.asp?id="&Rid&"';</script>")
else
Response.write("<script>alert('该贴未被置顶,无需解除置顶!');location.href='Guestbook.asp?id="&Rid&"';</script>")
end if
elseif request("what")="jh" then
if Reid=0 then
if rs1("xqiba_jh")=0 then
set rs=conn.execute("update "&tbname&"_GuestBook set xqiba_jh =1 where ID="&Kid)
Response.write("<script>alert('设置精华成功!');location.href='Guestbook.asp?id="&Rid&"';</script>")
else
Response.write("<script>alert('该贴已是精华贴,无法再次设置!');location.href='Guestbook.asp?id="&Rid&"';</script>")
end if
else
Response.write("<script>alert('该贴不是主题贴,只允许主题贴设置精华!');location.href='Guestbook.asp?id="&Rid&"';</script>")
end if
elseif request("what")="q_jh" then
if rs1("xqiba_jh")=1 then
set rs=conn.execute("update "&tbname&"_GuestBook set xqiba_jh =0 where ID="&Kid)
Response.write("<script>alert('精华取消成功!');location.href='Guestbook.asp?id="&Rid&"';</script>")
else
Response.write("<script>alert('该贴未被精华,无需解除精华!');location.href='Guestbook.asp?id="&Rid&"';</script>")
end if
elseif request("what")="fs" then
if rs1("xqiba_fs")>0 then
set rs=conn.execute("update "&tbname&"_GuestBook set xqiba_fs =0 where ID="&Kid)
Response.write("<script>alert('清除分数限制成功!');location.href='Guestbook.asp?id="&Rid&"';</script>")
else
Response.write("<script>alert('该贴已经为0分,无法再次清除!');location.href='Guestbook.asp?id="&Rid&"';</script>")
end if
elseif request("what")="fs1" then
if rs1("xqiba_fs")<>0 or rs1("xqiba_fs")=0 then
set rs=conn.execute("update "&tbname&"_GuestBook set xqiba_fs = xqiba_fs +5 where ID="&Kid)
Response.write("<script>alert('设置分数限制成功!');location.href='Guestbook.asp?id="&Rid&"';</script>")
else
Response.write("<script>alert('不知道出什么错了!');location.href='http://www.hainxxw.com';</script>")
end if
else
Response.write("<script>alert('参数不正确,确定后返回!');location.href='Guestbook.asp';</script>")
end if
else
Response.write("<script>alert('非法访问,这里不是你应该来的!');location.href='Guestbook.asp';</script>")
end if
end if
end if
%>
<table width="100%"border="0" cellspacing="0" cellpadding="0">
<tr valign="baseline">
<td width="51%" height="21" align="center">交流区状态:<img src="Images/xqiba_normal.gif" width="24" height="24" />普通贴
<img src="Images/xqiba_topic.gif" width="24" height="24" />置顶贴 <img src="Images/xqiba_digest.gif" width="15" height="15" />精华贴
<img src="Images/xqiba_dl.gif" width="16" height="15" />会员(积分)贴 <img src="Images/xqiba_pb.gif" width="17" height="12" />屏蔽贴</td>
<td width="49%" align="center"></td>
</tr>
</table>
<title><%=xqiba_bbsname%>--<%=xqiba_titile%></title>
<%=Copy%>
</body>
<!-- JiaThis Button BEGIN -->
<script type="text/javascript" src="http://v2.jiathis.com/code_mini/jiathis_r.js?btn=r1.gif" charset="utf-8"></script>
<!-- JiaThis Button END -->
</html> 自己顶上来 我日,再顶 我不明白诶,就41行那里有标题的相关代码。
而且,我去你的网站看了一下,木有问题啊。。。奇怪了。
你的问题是什么啊 我不明白诶,就41行那里有标题的相关代码。
而且,我去你的网站看了一下,木有问题啊。。。奇怪了。
你的问题是什么啊 laycher 发表于 2012-2-18 15:01 static/image/common/back.gif
我不明白诶,就41行那里有标题的相关代码。
而且,我去你的网站看了一下,木有问题啊。。。奇怪了。
你的 ...
问题是帖子读不出来标题,head那里,body可以 破裤子 发表于 2012-2-19 10:30 static/image/common/back.gif
问题是帖子读不出来标题,head那里,body可以
还是不懂。
比如,你这个留言帖子,“聊天灌水区 测试发帖 ”,标题是“珠宝交流区-恋石居|中国玉石网|珠宝,翡翠资讯,碧玺,宝石,和田玉等知识,珠宝商城:”。你想改成什么啊。 看看,路过,我也不会 laycher 发表于 2012-2-19 11:29 static/image/common/back.gif
还是不懂。
比如,你这个留言帖子,“聊天灌水区 测试发帖 ”,标题是“珠宝交流区-恋石居|中国玉石网|珠 ...
把41行改成<title> <% if request("id") then %> <% Set mypage=new xdownpage
mypage.getconn=conn
mypage.getsql="select * from "&tbname&"_Guestbook where id="&id&" or xqiba_ReID="&id&" and yn=1"&" order by id asc"
mypage.pagesize=xqiba_pagesize2
set rs=mypage.getrs() %><%=rs("Title")%><% else %>珠宝交流区<%=SiteTitle%>|<%=SiteTitle2%> <% end if %></title>不知道对不对,我没学过ASP。。。。。
页:
[1]
2