📄 bbs01.asp
字号:
mail=request.Form("E-mail")
qq=request.Form("qq")
Tel=request.Form("Tel")
face=request.Form("face")
portrait=request.Form("portrait")
title=request.Form("title")
content=request.Form("content")
d_time=now
passcode=trim(request.form("passcode"))
if cstr(session("getcode"))<>cstr(passcode) then
'response.Write session("getcode")&"<br><br><br>"
'response.Write request("verifycode")
response.Write "<script LANGUAGE='javascript'>alert('请输入正确的验证码!');window.location.href='bbs.asp?username="&username&"&tel="&tel&"&title="&title&"&content="&content&"&units="&units&"&mail="&mail&"&qq="&qq&"';</script>"
response.end
end if
if qq<>"" then
oconn.execute("insert into BBS(username,units,Email,qq,Tel,face,portrait,title,content,d_time) values('"&username&"','"&units&"','"&mail&"',"&qq&","&Tel&",'"&face&"','"&portrait&"','"&title&"','"&content&"','"&d_time&"')")
else
oconn.execute("insert into BBS(username,units,Email,Tel,face,portrait,title,content,d_time) values('"&username&"','"&units&"','"&mail&"',"&Tel&",'"&face&"','"&portrait&"','"&title&"','"&content&"','"&d_time&"')")
end if
oConn_close
response.write "<script language=javascript>" & chr(13) & "alert('添加成功!');" & "window.location.href='bbs.asp';</script>"
case 2
'bbscheck=request.form("bbscheck")
'response.write bbscheck&"<br>"
If IsEmpty(Session("U_Name")) Or IsEmpty(Session("AdminId")) Then
response.write "<script language=javascript>" & chr(13) & "alert('您尚未登陆,请先登陆!');" & "history.back();</script>"
else
oConn_Start
for each ho in request.form("bbscheck")
oConn.execute("delete from BBS where BBSID="&ho)
'response.write ho&"<br>"
'response.write "<script language=javascript>" & "window.location.href='login.asp?BBSID="&cint(ho)&"&getid=3';
next
response.write "<script language=javascript>" & chr(13) & "alert('修改成功!');" & "window.location.href='bbs.asp';</script>"
oConn_Close
End IF
end select
sub bbslist
oConn_Start
pageno=request.querystring("pageno")
if pageno="" then
pageno=1
end if
set rs=server.createobject("adodb.recordset")
strsql="select * from BBS order by BBSID desc"
rs.open strsql,oconn,1,1
rs.pagesize=10
if not rs.eof then
rs.absolutepage=pageno
else
response.write "<table width='778' border='0' align='center' cellpadding='0' cellspacing='0'><tr><td align='center' height='80' valign='middle'>[暂无记录]</TD></TR></Table>"
'response.end
end if
'do while not rs.eof
'response.write rs("username")
for i=1 to rs.pagesize
if rs.eof then exit for
%>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><TABLE cellSpacing=1 cellPadding=3 width="778" align=center
bgColor=#cccccc border=0>
<TBODY>
<TR>
<TD width=755 bgColor=#efefef colSpan=2 height=0>
<TABLE height=20 cellSpacing=0 cellPadding=0 width="99%"
align=right border=0>
<TBODY>
<TR>
<TD width="55%"><FONT color=#006600> 主题:<%=rs("title")%> </FONT></TD>
<TD width="18%"><div align="center"><img src="../gb/bb01.gif" width="21" height="14"> <a href="mailto:<%=rs("Email")%>"><img src="../gb/email.gif" width="16" height="16" border="0"></a> <img src="../gb/homepage.gif" width="16" height="16"> <img src="../gb/oicq.gif" width="16" height="16"></div></TD>
<TD width="22%"><IMG
src="../images/posttime.gif"
align=absMiddle border=0>:<FONT class="style2"><%=rs("d_time")%></FONT> </TD>
<%If not IsEmpty(Session("U_Name")) Or not IsEmpty(Session("AdminId")) Then%>
<TD width="5%">
<div align="center">
<input name="bbscheck" type="checkbox" id="bbscheck" value="<%=rs("BBSID")%>">
</div> </TD><%end if%>
</TR>
</TBODY>
</TABLE></TD>
<TR>
<TD vAlign=center align=middle width=143
bgColor=#ffffff><TABLE cellSpacing=0 cellPadding=0
width="100%" border=0>
<TBODY>
<TR>
<TD width="100%">
<P align=center><IMG src="face/<%=rs("face")%>"><BR>
</P></TD>
</TR>
<TR>
<TD width="100%">
<P align=center><%=rs("username")%></P></TD>
</TR>
</TBODY>
</TABLE></TD>
<TD vAlign=top width=602 bgColor=#ffffff>
<TABLE cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR>
<TD vAlign=top height=30><IMG src="portrait/<%=rs("portrait")%>" align=absMiddle> <%=rs("content")%> </TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD width=145 bgColor=#efefef height=26>
<P align=center><IMG
src="../images/reply1.gif"
border=0><BR>
<FONT color=#006633>
<%
if isnull(rs("rename")) or rs("rename")="" then
response.write("暂无回复")
else
response.write rs("rename")&"回复"
end if
%>
</FONT></P></TD>
<TD width=604 bgColor=#efefef height=26>
<TABLE cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR>
<TD height=25><FONT color=#006633><%=rs("recontent")%></FONT></TD>
</TR>
<TR>
<TD height=10>
<HR color=#808000 SIZE=1>
</TD>
</TR>
<TR>
<TD height=13>
<TABLE cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR>
<TD width="42%"><FONT
color=#006633>回复时间:<%=rs("red_time")%></FONT></TD>
<TD width="58%">
<P align=right><A
href="#" onclick="javascript:window.open('login.asp?BBSID=<%=rs("BBSID")%>&getid=1','','resizable=no,top=310,left=400,width=480,height=345,scrollbars=yes')" target="_self"><IMG
src="../images/reply.gif"
border=0></A> <A
href="#" onclick="javascript:window.open('login.asp?BBSID=<%=rs("BBSID")%>&getid=2','','resizable=no,top=310,left=400,width=480,height=345,scrollbars=yes')" target="_self"><IMG
src="../images/del.gif"
border=0></A></P></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
<%
'i=i+1
rs.movenext
'loop
next
if rs.pagecount>=1 then
%>
<tr>
<td align="center" height="40" valign="middle">共 <strong><font color="red"><%=rs.pagecount%></font></strong> 页
<%if cint(pageno) >= 2 then%>
<a href="?pageno=<%=cint(pageno)-1%>"><img src="../images/back24.gif" width="12" height="12"></a>
<%else%>
<img src="../images/back24.gif" width="12" height="12">
<%end if%>
[
<%
for i=1 to rs.pagecount
if i > cint(pageno)-5 and i< cint(pageno)+5 then
if i= cint(pageno) then
%>
<font color="red"><strong><%=i%></strong></font>
<%else%>
<a href="?pageno=<%=i%>"><%=i%></a>
<%
end if
end if
next
%>
]
<%if cint(pageno) < rs.pagecount then%>
<a href="?pageno=<%=cint(pageno)+1%>">
<img src="../images/forward24.gif" width="12" height="12"></a>
<%else%>
<img src="../images/forward24.gif" width="12" height="12">
<%end if%>
当前第 <strong><font color="red"><%=pageno%></font></strong> 页</td>
</tr>
</table>
<%
end if
oConn_close
end sub
%>
<div align="center"><%=GetWebTop("1")%>
</div>
<%displaybbsform%>
<form action="?mode=2" method="post" enctype="application/x-www-form-urlencoded" name="form2" target="_self" id="form2">
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><%bbslist%></td>
</tr>
<%If not IsEmpty(Session("U_Name")) Or not IsEmpty(Session("AdminId")) Then%>
<tr>
<td width="52%" height="30">
<div align="right">
<input type="checkbox" name="chkall" value="checkbox" onClick="onclick=CheckAll(this.form)">
全选 </div></td>
<td width="48%">
<input name="imageField" type="image" src="../images/del.gif" width="45" height="16" border="0"></td>
</tr>
<%end if%>
</table>
</form>
<!--#include file="../include/bottom.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -