<% if B_Right_Click=false and instr(1,getPermission(),",4,")=0 then %> <% end if %> <%=VC_Title %> --查看留言 <% 'response.End() ''''''''开始写登陆日志 ActionDetails="访问留言主页" call addActionLog(ActionDetails) %>
") loop else response.Write("
作者信息 留言信息
<% if Request.Form.Count>0 then '初始化SQL查询条件 sql="select * from B_guestbook " IfStr=" WHERE 1=1 " if trim(request.Form("DT_Add_Time"))<>"0" and trim(request.Form("DT_Add_Time"))<>"" then '搜索日期 'SQL SERVER版位DATEDIFF(day, DT_Add_Time, getdate()) IfStr=IfStr&" and DATEDIFF('d', DT_Add_Time, now()) <= "&request.Form("DT_Add_Time") end if '是否搜索VC_AccountName if trim(Request.Form("VC_AccountName"))<>"" then IfStr=IfStr & " and VC_AccountName like '%"&trim(DelStr(Request.Form("VC_AccountName")))&"%'" end if '是否搜索VC_Name if trim(Request.Form("VC_Name"))<>"" then IfStr=IfStr & " and VC_Name like '%"&trim(DelStr(Request.Form("VC_Name")))&"%'" end if '是否搜索T_content人 if trim(Request.Form("T_content"))<>"" then IfStr=IfStr & " and T_content like '%"&trim(DelStr(Request.Form("T_content")))&"%'" end if '是否搜索VC_title if trim(Request.Form("VC_title"))<>"" then IfStr=IfStr & " and VC_title like '%"&trim(DelStr(Request.Form("VC_title")))&"%'" end if '是否选择排序 if trim(Request.Form("OrderBy"))<>"" then IfStr=IfStr & " order by "&Request.Form("OrderBy") & " " &Request.Form("OrderBy1") else IfStr=IfStr & " order by B_FixTop,DT_Add_Time desc" end if sql=sql & ifstr Session("sqlSearchbook")=sql end if ''''''''这里新添加我发不过的留言查询功能 if lcase(request("mypost"))="yes" and lcase(get_AccountName())<>"guest" then sql="select * from B_guestbook where VC_AccountName="&sqlstr(get_AccountName())&" order by DT_Add_Time desc" Session("sqlSearchbook")=sql end if ''''''''这里新添加返回主页清空session if lcase(request("mypost"))="main" then sql="select * from B_guestbook order by B_FixTop,DT_Add_Time desc" Session("sqlSearchbook")=sql end if '''''''''''''很简单吧~~~~~~~~~~ sql=session("sqlSearchbook") if trim(sql)="" then sql="select * from B_guestbook order by B_FixTop,DT_Add_Time desc" 'response.write "sql="&sql ' response.end ' dim BgColor(1) 'BgColor(0)="#D8E8FF" ' BgColor(1)="#faf5f6" set rsbook=server.createobject("adodb.recordset") rsbook.Open sql,conn,1,1 if not rsbook.eof then '分页显示处理 if I_PageSize=0 then I_PageSize=5 rsbook.pagesize=I_PageSize if Request("page") ="" then Page=1 else if IsNumeric(Request("page")) then '如果传递过来的是数字 Page = clng(Request("page")) else Page=1 end if end if if Page=0 then Page=1 '如果大于总页数,则用最大页码代替 if page> rsbook.PageCount then page=rsbook.PageCount end if '取得当前页的绝对位置 rsbook.AbsolutePage=Cint(page) '开始显示记录 j=1 'j表示本页的记录双量 i=0 ''i表示留言的数量‘当初表示为背景的数组值,i=1或者i=0 ii=0''ii表示所有回复的数量 do until rsbook.eof or j>rsbook.PageSize ' response.Write("
") %>
第<%=rsbook("I_ID")%>条留言
">

留言时的心情> <% if lcase(trim(rsbook("VC_AccountName")))="guest" then response.Write(""&rsbook("VC_AccountName")&"") else '开始判断用户是否被删除 if getUser_ID(rsbook("VC_AccountName"))=0 then response.Write(rsbook("VC_AccountName") & "[已删]") else if instr(1,getPermission(),",5,")<>0 or instr(1,getPermission(),",1,")<>0 or instr(1,getPermission(),",2,")<>0 then %>','',400,500)" alt="察看<%=rsbook("VC_AccountName")%>会员资料"><%=rsbook("VC_AccountName")%> <% else response.write rsbook("VC_AccountName") end if end if end if %>
会员的主页 <%if trim(rsbook("VC_homepage"))<>"" then %>">他的主页<%else response.write ("没有主页") end if %>
会员的email <% if rsbook("B_Email_Serect")=true then if instr(1,getPermission(),",6,")<>0 or (get_AccountName()=rsbook("VC_AccountName") and lcase(get_AccountName())<>"guest")then response.Write("写信给他") else response.write "Email 保密" end if else %>">写信给他 <% end if %>
<% if trim(rsbook("VC_Contact"))<>"0" then %> .gif" width="18" height="18"> <% if ucase(trim(rsbook("VC_Contact")))="QQ" then response.Write trim(rsbook("VC_Contact_Number")) if ucase(trim(rsbook("VC_Contact")))="MSN" then response.Write "MSN No." if ucase(trim(rsbook("VC_Contact")))="ICQ" then response.Write trim(rsbook("VC_Contact_Number")) if ucase(trim(rsbook("VC_Contact")))="YAHOO" then response.Write "Yahoo No." %>
<%end if %>
  发布人的账号 [发布者] :<%=rsbook("VC_Name")%>  发表时间 [发表于] :<%=rsbook("DT_Add_Time")%> 此留言的状态 [状态]:<% if rsbook("B_FixTop")=True or rsbook("I_Lock")=1 or rsbook("I_Lock")=2 or rsbook("I_Lock")=3 or rsbook("B_AdminRead")=True or rsbook("B_Admin_Reply")=True then if (rsbook("B_Admin_Reply")=true or rsbook("B_AdminRead")=true) then response.write " 禁回" else if rsbook("I_Lock")=3 then response.write " 不限回复" end if if rsbook("B_FixTop")=True then response.write " 置顶" if rsbook("I_Lock")=1 or rsbook("I_Lock")=2 then response.write " 锁定" if rsbook("B_AdminRead")=True then response.write " 保密" else response.write "正常" end if %>
<% ''''开始判断是否是保密留言 if rsbook("B_AdminRead")=true and not (instr(1,getPermission(),",6,")<>0 or (get_AccountName()=rsbook("VC_AccountName") and lcase(get_AccountName())<>"guest")) then response.write "

  ->您目前没有权限查看此留言的内容和其所有回复.

  ->发布者设置为保密.如果不能查看,请登陆后再试!
" else %>
    留言标题:<%=rsbook("VC_Title")%>

   留言内容:<%=ubbcode((rsbook("T_Content")))%> <% if trim(rsbook("Dt_UpDate_Time"))<>"" then response.write "
---更新于"&rsbook("Dt_UpDate_Time")&"
"%> <% sql="select * from B_Reply where I_I_ID= "& rsbook("I_ID") set rsReply=server.createobject("adodb.recordset") rsReply.Open sql,conn,1,1 if not rsReply.eof then %>
<% do until rsReply.eof %>
 回复人的账号 <% if lcase(trim(rsReply("VC_AccountName")))="guest" then response.Write(""&rsReply("VC_AccountName")&"") else'开始判断用户是否被删除 if getUser_ID(rsReply("VC_AccountName"))=0 then response.Write(rsReply("VC_AccountName") & "[已删]") else if instr(1,getPermission(),",5,")<>0 or instr(1,getPermission(),",1,")<>0 or instr(1,getPermission(),",2,")<>0 then %>','',400,500)" alt="察看<%=rsReply("VC_AccountName")%>会员资料"><%=rsReply("VC_AccountName")%> <% else response.write rsReply("VC_AccountName") end if end if end if %>  于 <%=rsReply("DT_Add_Time")%> 回复   回复人/公司名字:<%=rsReply("VC_Name")%>  
  
  回复内容:<%=ubbcode(rsReply("VC_Content"))%><% if trim(rsReply("Dt_UpDate_Time"))<>"" then response.write "
---更新于"&rsReply("Dt_UpDate_Time")&"
"%>
<% if instr(1,getPermission(),",6,")<>0 or instr(1,getPermission(),",1,")<>0 then %>
 删除此回复" onClick="{if(confirm('注意!此操作是不可恢复的。\n确定要删除该回复吗?')){return true;}return false;}"> 删除 <%if ( instr(1,getPermission(),0 or get_AccountName()=rsbook("VC_AccountName")) and lcase(get_AccountName())<>"guest" then response.Write(rsReply("VC_ip"))%>"> 记录 " alt="加入批量删除留言的列表里" onClick="javascript:checknoI_I_ID(this)" > 批删 <% end if %> <% if (( instr(1,getPermission(),",6,")<>0 or get_AccountName()=rsReply("VC_AccountName")) and lcase(get_AccountName())<>"guest") or instr(1,getPermission(),",1,")<>0 then '如果 编辑回复权限 %>  修改此回复 <% if rsbook("I_Lock")=1 and instr(1,getPermission(),",6,")=0 then response.Write "锁定修改" else %>" > 修改 <%end if end if %>

<% ii=ii+1 '回复数+1 rsReply.movenext loop rsreply.close '关闭记录及 end if %> <%'结束判断三否是保密留言 end if %>
 <%if ( instr(1,getPermission(),0 or (get_AccountName()=rsbook("VC_AccountName") and lcase(get_AccountName())<>"guest")) then response.Write(rsbook("VC_ip")) else response.Write("IP已经记录,你没有权限察看!") end if%>" > 记录 发布新的留言 <% ''''''''开始判断是否开放游客留言 if B_Check=true or lcase(get_AccountName())<>"guest" then%> <%else response.Write("") end if %> 新留言 <% if lcase(trim(rsbook("VC_AccountName")))<>"guest" then %> 发端消息给他','短消息',500,400)" > PM <% end if %> 回复此留言 <% if (rsbook("B_Admin_Reply")=true or rsbook("B_AdminRead")=true) and not (instr(1,getPermission(),",6,")<>0 or instr(1,getPermission(),",2,")<>0 or (get_AccountName()=rsbook("VC_AccountName") and lcase(get_AccountName())<>"guest")) then response.write "无权限回复" else if (rsbook("I_Lock")=1 or rsbook("I_Lock")=2) and instr(1,getPermission(),",6,")=0 then response.Write "回复锁定" else ''''''''开始判断是否开放游客回复 if B_Check=true or lcase(get_AccountName())<>"guest" then%> " > <%else response.Write("") end if %> 回复 <% end if end if %> <% if instr(1,getPermission(),",6,")<>0 or instr(1,getPermission(),",1,")<>0 then '如果 删除留言权限 %> 删除此留言 " onClick="{if(confirm('注意!此操作是不可恢复的。\n确定要删除该留言以及所有属于此留言的回复吗?')){return true;}return false;}"> 删除 提升此留言 " onClick="{if(confirm('确定要将该留言的位置提升到顶端吗?')){return true;}return false;}"> 提升 将留言置顶 <% if rsbook("B_FixTop")=false then %> " onClick="{if(confirm('确定要将该留言置顶吗?')){return true;}return false;}"> 置顶 <% else%> " onClick="{if(confirm('确定要将该留言解除置顶吗?')){return true;}return false;}"> 取消置顶 <%end if %> 锁定此留言 <% if rsbook("I_Lock")=0 or rsbook("I_Lock")=3 then %> " onClick="{if(confirm('注意!锁定此留言后,其他人将无法回复!发布人也无法再编辑!\n确定要将该留言锁定吗?')){return true;}return false;}"> 锁定 <%else%> " onClick="{if(confirm(' 确定要将该留言解除锁定吗?')){return true;}return false;}"> 解锁 <%end if end if %> <% if ((instr(1,getPermission(),",6,")<>0 or get_AccountName()=rsbook("VC_AccountName")) and lcase(get_AccountName())<>"guest") or instr(1,getPermission(),",1,")<>0 then '如果 编辑留言权限 %> 修改此留言 <% if rsbook("I_Lock")=1 and instr(1,getPermission(),",6,")=0 then response.Write "修改锁定" else %> " > 修改 <% end if end if %> <% if instr(1,getPermission(),",6,")<>0 or instr(1,getPermission(),",1,")<>0 then %> " alt="加入批量删除留言的列表里" onClick="javascript:checknoI_ID(this)" > 批删 <% end if %> 润满广告 <%'VC_Subject ' sql="select top 1 * from A_Advert order by newid()" 'SQL Sever 版本 Randomize sql="select top 1 * from A_Advert order by Rnd(I_ID)" 'Access版本SQL语句 set rsid=server.CreateObject("adodb.recordset") rsid.open sql,conn,1,1 if rsid("B_URL")=true then response.Write "[推荐]:" & rsId("VC_Subject") & "" if rsid("B_URL")=false then %>','广告',550,400)" alt="察看广告资料">[推荐]:<%= rsid("VC_Subject") %>. <% end if rsid.close %>

<% j=j+1 i=1-i rsbook.movenext ' response.Write("

  抱歉没有找到符合条件的留言

  如果需要留言请点这里


") end if %> <% if instr(1,getPermission(),",6,")<>0 OR instr(1,getPermission(),",1,")<>0 then %>
  留言全选/不选-> onClick="javascript:checkall_I_ID(<%=rsbook.recordcount%>)">   onClick=frmsubmit_liuyan(<%=rsbook.recordcount%>)>
     回复全选/不选-> onClick="javascript:checkall_I_I_ID(<%=ii%>)"> onClick=frmsubmit_huifu(<%=ii%>)>
<% end if %>
  帐号 公司名 主题 内容 留言日期 排序  
  第 <%=Page%> 页 / 总 <%=rsbook.PageCount%> 页 / 共有 <%=rsbook.recordcount%> 条 / 每页 <%=rsbook.pagesize%> 条 > > =rsbook.pagecount then response.Write(" disabled") %>> =rsbook.pagecount then response.Write(" disabled") %>> 页  

<%rsbook.close%>