📄 default1.asp
字号:
<%@language=vbscript codepage=936 %>
<!--#INCLUDE file="config.asp"-->
<!--#INCLUDE FILE="background.asp"-->
<!--#INCLUDE FILE="ubbcode.asp"-->
<script language=javascript>
function exit(id)
{
if(!confirm('确认删除这个主题?将连同回复一起删除'))
return;
url ="default1.asp?del=ok&id="+id
window.location.href =url
}
function exit1(id1,id)
{
if(!confirm('确认删除这条回复?'))
return;
url ="default1.asp?del=ok&type1=ok&id="+id1+"&id1="+id
window.location.href =url
}
</script>
<%session("list")=1%>
<%
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
rs.open "Select * From option1",Conn,3,3
show=rs("show")
if session("showmodal")="" then
if rs("modal")=1 then response.Redirect("default.asp")
session("showmodal")="1"
end if
del=no
type1=no
del=request("del")
type1=request("type1")
if del="ok" and ((session("admin")=1) or (session("admin")=2)) then
if (session("admin")<>1) and (session("admin")<>2) then response.Redirect "default.asp"
if type1="ok" then
dsql="delete From reply where id1="&request("id")
conn.execute(dsql)
rs.close
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
else
rs.close
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)
end if
set rs=nothing
set rs1=nothing
response.Redirect "default1.asp"
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 (session("admin")<>1) or (session("admin")<>2) then response.Redirect "default.asp"
if type1="ok" then
dsql="update reply set mark=1 where id1="&request("id1")
conn.execute(dsql)
else
rs.close
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 "default1.asp"
end if
text=request("text")
option1=request("option")
if option1="" then option1=0
if session("admin")="" then session("admin")=false
if request("jinghua")="1" then jinghua=" and jinghua=true" else jinghua=""
rs1.open "Select * From option1",Conn,3,3
webname=rs1("webname")
homepage=rs1("weblink")
reply=rs1("adminreply")
if rs1("show") and ((session("admin")<>1) and (session("admin")<>2)) then mark="(mark=true) and "
select case option1
case 1
SQL="Select * From guest where "&mark&"subject like '%"&text&"%'"&jinghua&" order by top1,lastdate desc"
case 2
SQL="Select * From guest where "&mark&"content like '%"&text&"%'"&jinghua&" order by top1,lastdate desc"
case else
sql="SELECT * FROM guest where "&mark&"1=1"&jinghua&" ORDER BY top1,lastdate DESC"
end select
rs.close
rs.open sql,conn,3,3
if not rs.bof then
dim maxperpage,url,PageNo
url="default1.asp?text="&text&"&option="&option1&"&jinghua="&request("jinghua")
rs.pagesize=rs1("row1")
maxperpage=rs.pagesize
rs1.close
PageNo=REQUEST("PageNo")
if PageNo="" or PageNo=0 then PageNo=1
RS.AbsolutePage=PageNo
TSum=rs.pagecount
RowCount=rs.PageSize
PageNo=PageNo+1
PageNo=PageNo-1
if CINT(PageNo)>1 then
if CINT(PageNo)>CINT(TSum) then
response.Write("对不起没有您想要的页数")
Response.End
end if
end if
if PageNo<0 then
response.Write("没有这一页!")
Response.End
End if
end if
%>
<link href="1.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%if rs11("lytitle")="" then%><title>桃源多功能留言板</title><%else%><title><%=rs11("lytitle")%></title><%end if%>
<TABLE class=page cellSpacing=0 cellPadding=0 width=760 align=center border=0>
<TBODY>
<TR>
<TD>
<div align="center">
<!--#INCLUDE FILE="top.asp"-->
</div>
<tbody>
<tr>
<td>
<table border=0 width=100% align=center>
<td width="26%" align=left> <font color=#000000>留言数:</font><font color=#000000><%=rs.RECORDCOUNT%></font>
总页数:<font color=#000000><%=TSum%></font>
第<%=PageNo%>页 </td>
<td width="74%" align=right>
<!--#INCLUDE FILE="link.asp"--></span> </td>
</table>
</tr>
<tr><td><HR SIZE=1 WIDTH=100% NOSHADE COLOR=#C0C0C0></td></tr>
<tr>
<td align=left><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="65%"><strong></strong><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="default.asp">讨论区方式查看</a> 配色:
<select name="skin" id="skin" onChange="javascript:location.href='default1.asp?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>
<option value="6" <%if skin=6 then response.write("selected")%>>橘子红了</option>
</select>
<div align="center"></div></td>
<td width="13%"><MARQUEE height=16 scrollAmount=2 scrollDelay=10 align="middle">
<%=rs11("lygg")%>
</MARQUEE></td>
<td width="22%"> <div align="right">
<%
if TSum>1 Then
If PageNo=TSum or PageNo<>1 Then
PrwePage=PageNo-1
Response.Write "<A HREF=default1.asp?Pageno=1"&"&text="&text&"&option="&option1&"&jinghua="&jinghua
Response.Write ">第一页</A> "
Response.Write "<A HREF=default1.asp?Pageno="&PrwePage&"&text="&text&"&option="&option1&"&jinghua="&jinghua
Response.Write ">上一页</A> "
End If
If pageno=1 or TSum>PageNo Then
NextPage=PageNo+1
Response.Write "<A HREF=default1.asp?PageNo="&NextPage&"&text="&text&"&option="&option1&"&jinghua="&jinghua
Response.Write ">下一页</A> "
Response.Write "<A HREF=default1.asp?Pageno="&rs.PageCount&"&text="&text&"&option="&option1&"&jinghua="&jinghua
Response.Write ">最末页</A> "
End If
End If
%>
</div></td>
</tr>
</table>
<td></tr>
<tr>
<td> <div align="right"> </div>
<table width="100%" cellpadding="5" cellspacing="1" align="center" class="tablebg<%=skin%>b">
<tr class="tablebg<%=skin%>a">
<td width="17%"><div align="left">作者信息</div></td>
<td width="83%" height="17">留言信息</td>
</tr>
</table>
<%
if PageNo=1 then i=rs.RECORDCOUNT else i=rs.RECORDCOUNT-(10*(PageNo-1))
bool=false
bg=1
%>
<%
if not rs11("regshow") and session("useridname")="" then
response.write "<br><font color=red><b>您尚未登录,不能查看留言内容!</b></font>"
else
DO WHILE NOT rs.EOF AND RowCount>0%>
<table width="100%" border="0" align=center cellpadding="0" cellspacing="5" <%if bg mod 2=0 then%>class="tablebg<%=skin%>e"<%else%>class="tablebg<%=skin%>f"<%end if%>>
<tr>
<td width="17%" rowspan="5" align=center valign="top" class="tablebg<%=skin%>h">
<table width="100%" border="0" align="center" >
<tr>
<td width="90">
<div align="right"><font color=#0066CC><b>
<%if rs("username")<>"" then%>
<%=rs("username")%>
<%else%>
无名氏
<%end if%>
</b></font>
</div></td>
<td width="40%">
<%
Set rs2=server.createobject("ADODB.RECORDSET")
sql2="SELECT * FROM register where username='"&rs("username")&"'"
rs2.open sql2,conn,3,3
if not rs2.eof then
if rs2("level1")="管理员" then%>
<font color=#000000><img src="images/gly.gif" alt="管理员" width="16" height="16"></font>
<%end if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -