📄 show.asp
字号:
<%@language=vbscript codepage=936 %>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="background.asp"-->
<!--#INCLUDE FILE="ubblabel.asp"-->
<!--#INCLUDE FILE="ubbcode.asp"-->
<script language=javascript>
function exit(id)
{
if(!confirm('确认删除个主题?将连同回复一起删除'))
return;
url ="show.asp?del=ok&id="+id
window.location.href =url
}
function exit1(id1,id)
{
if(!confirm('确认删除这条回复?'))
return;
url ="show.asp?del=ok&type1=ok&id="+id1+"&id1="+id
window.location.href =url
}
function guestpreview()
{
document.preview.content.value=document.form.Content.value;
var popupWin = window.open('GuestPreview.asp', 'GuestPreview', 'scrollbars=yes,width=620,height=230');
document.preview.submit()
}
</script>
<%
Set rs=Server.CreateObject("ADODB.RecordSet")
Set rs1=Server.CreateObject("ADODB.RecordSet")
session("useridname")=Request.cookies("ly")("useridname")
session("useridpassword")=Request.cookies("ly")("useridpassword")
if session("useridname")<>"" then
rs.open "select level1 from register where username='"&session("useridname")&"'",conn,1,1
if not rs.eof then
if rs("level1")="管理员" then session("admin")=1
if rs("level1")="版主" then session("admin")=2
if rs("level1")<>"版主" and rs("level1")<>"管理员" then session("admin")=0
else
session("admin")=0
end if
rs.close
end if
if not rs11("regshow") and session("useridname")="" then response.Redirect "error.asp?info=您尚未登录,不能查看讨论内容!"
webname=rs11("webname")
homepage=rs11("weblink")
show=rs11("show")
del=no
type1=no
del=request("del")
type1=request("type1")
if del="ok" and ((session("admin")=1) or (session("admin")=2)) then
if type1="ok" then
dsql="delete From reply where id1="&request("id")
conn.execute(dsql)
rs.open "Select * from guest where ID = " & request("ID1"),conn,2,3
rs("hf")=rs("hf")-1
rs1.open "Select * from reply where id="&rs("id")&" order by id1 desc",conn,1,1
if rs1.eof then
rs("lastname")="——"
rs("lastdate")=rs("lydate")
else
rs("lastname")=rs1("replyname")
rs("lastdate")=rs1("replydate")
end if
rs.update
rs1.close
response.Redirect "show.asp?id="&request("id1")
else
rs.open "Select * from guest where ID = " & request("ID"),conn,2,3
dsql="delete from reply where id="&request("id")
conn.execute(dsql)
dsql="delete From guest where id="&request("id")
conn.execute(dsql)
response.Redirect "default.asp"
end if
set rs=nothing
set rs1=nothing
end if
sh=no
type1=no
sh=request("sh")
type1=request("type1")
if sh="ok" and ((session("admin")=1) or (session("admin")=2)) then
if type1="ok" then
dsql="update reply set mark=1 where id1="&request("id1")
conn.execute(dsql)
else
rs.open "Select * from guest where ID = " & request("ID"),conn,2,3
dsql="update guest set mark=1 where id="&request("id")
conn.execute(dsql)
if request("all")="1" then
dsql="update reply set mark=1 where id="&request("id")
conn.execute(dsql)
end if
end if
set rs=nothing
set rs1=nothing
response.Redirect "show.asp?id="&request("id")
end if
if (request("act")<>"") and ((session("admin")=1) or (session("admin")=2)) then
select case request("act")
case 0
rs.open "Select count(*) as hfcount from reply where ID = " & request("ID"),conn,1,1
dsql="update guest set hf="&rs("hfcount")&" where id="&request("id")
conn.execute(dsql)
rs.close
rs.open "Select * from guest where ID = " & request("ID"),conn,3,3
rs1.open "Select * from reply where id="&request("id")&" order by id1 desc",conn,1,1
if rs1.eof then
rs("lastname")="——"
rs("lastdate")=rs("lydate")
else
rs("lastname")=rs1("replyname")
rs("lastdate")=rs1("replydate")
end if
rs.update
rs.close
rs1.close
case 1
dsql="update guest set top1=1 where id="&request("id")
conn.execute(dsql)
case 2
dsql="update guest set top1=0 where id="&request("id")
conn.execute(dsql)
case 3
dsql="update guest set jinghua=1 where id="&request("id")
conn.execute(dsql)
case 4
dsql="update guest set jinghua=0 where id="&request("id")
conn.execute(dsql)
case 5
dsql="update guest set lock=1 where id="&request("id")
conn.execute(dsql)
case 6
dsql="update guest set lock=0 where id="&request("id")
conn.execute(dsql)
case 7
dsql="update guest set lastdate='"&now&"' where id="&request("id")
conn.execute(dsql)
end select
end if
ID1=request("id")
up1="no"
next1="no"
up1=request("up")
next1=request("next")
if up1="ok" then
rs.open "Select * from guest where ID < " & ID1,conn,3,3
if rs.recordcount=0 then
rs.close
rs.open "select * from guest where ID="&ID1,conn,3,3
end if
rs.movelast
rs1.open "Select * from reply where ID = " & rs("id")&" order by replydate",conn,3,3
end if
if next1="ok" then
rs.open "Select * from guest where ID > " & ID1,conn,3,3
if rs.recordcount=0 then
rs.close
rs.open "select * from guest where ID="&ID1,conn,3,3
end if
rs1.open "Select * from reply where ID = " & rs("id")&" order by replydate",conn,3,3
end if
if (up1<>"ok") and (next1<>"ok") then
rs.open "Select * from guest where ID = " & ID1,conn,3,3
rs1.open "Select * from reply where ID = " & ID1&" order by replydate",conn,3,3
end if
if (not rs("mark")) and show and ((session("admin")<>1) and (session("admin")<>2)) then response.Redirect("error.asp?info=本讨论为未审核,不能查看!")
rs("yd")=rs("yd")+1
rs.update
Set rs4=server.createobject("ADODB.RECORDSET")
rs4.open "Select * From option1" ,Conn,3,3
if rs1.recordcount<>0 then
dim maxperpage,url,PageNo
url="show.asp?id="&id1
rs1.pagesize=10
PageNo=REQUEST("PageNo")
maxperpage=rs.pagesize
if PageNo="" or PageNo=0 then PageNo=1
rs1.AbsolutePage=PageNo
TSum=rs1.pagecount
RowCount=rs1.PageSize
PageNo=PageNo+1
PageNo=PageNo-1
else
PageNo=1
TSum=1
end if
%>
<SCRIPT language=javascript>
function save_onclick()
{
var strTemp = document.form.UserName.value;
if (strTemp.length == 0 )
{
alert("请输入用户名!");
document.form.UserName.focus();
return false;
}
var strTemp = document.form.Content.value;
if (strTemp.length == 0 )
{
alert("请填写讨论内容!");
document.form.Content.focus();
return false;
}
return true;
}
</SCRIPT>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>显示回复讨论</title>
<link href="1.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<body onkeydown="if(event.keyCode==13 && event.ctrlKey) if(save_onclick())document.form.submit()">
<TABLE class=page cellSpacing=0 cellPadding=0 width=760 align=center border=0>
<TBODY>
<TR>
<TD>
<div align="center">
<!--#INCLUDE FILE="top.asp"-->
</div>
<tr>
<td class="tablebg<%=skin%>a">
<table border=0 width=760 align=center>
<tr>
<td width="3%" align=left><font color="#FF0000"> <img src="images/back.gif" width="17" height="17"></font></td>
<td width="15%" align=left><a href="<%if session("list")=0 then%>default.asp<%else%>default1.asp<%end if%>">回讨论列表</a></td>
<td width="82%" align=right>
<!--#INCLUDE FILE="link.asp"--> </td>
</table>
</tr>
<tr><td>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="58%"><font color="#FF0000"> <img src="images/home.gif" width="16" height="16"><a href="<%=homepage%>"><%=webname%>首页</a>
<img src="images/style.gif" align=absmiddle></font><a href="default1.asp">讨论板方式查看</a>
配色:
<select name="skin" id="skin" onChange="javascript:location.href='show.asp?id='+document.all.id.value+'&skin='+document.all.skin.value">
<option value="1" selected>蓝天白云</option>
<option value="2" <%if skin=2 then response.write("selected")%>>水晶紫色</option>
<option value="3" <%if skin=3 then response.write("selected")%>>秋意盎然</option>
<option value="4" <%if skin=4 then response.write("selected")%>>绿野仙踪</option>
<option value="5" <%if skin=5 then response.write("selected")%>>浓浓绿意</option>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -