⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 replybbs.asp

📁 功能非常强大的一款办公自动化软件原代码,其中的文档签收功能特别实用.不相信下下来看下.
💻 ASP
字号:
<!--#include file="check.asp"-->
<!--#INCLUDE FILE="connect.asp" --> 
<!--#INCLUDE FILE="encode.asp" --> 
<html>
<head>
<title>办公自动化(OA)</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%if Request.ServerVariables("Request_Method")="POST"  then 
ipaddress=request.servervariables("remote_addr")
replytime=CDate(now())
title=request("title")
bbsname=request("name")
bbs=request("text")
bbs=encode(bbs)
id=request("id")
id=CINT(id)
set rs=server.createobject("adodb.recordset")
sql="select reply from bbs where id="&id
rs.open sql,conn,1,3
rs("reply")=rs("reply")+1
rs.update
rs.close

sql="insert into reply(title,bbs,replytime,name,uid,ipaddress,bbsid) values('"& title &"','"&bbs&"','"&replytime&"','"&bbsname&"','"&session("uid")&"','"&ipaddress&"',"&id&")"
conn.execute(sql)
end if
%>
<%set rs=server.createobject("adodb.recordset")
bbsid=CLng(request("id"))
sql="select readnum from bbs where id="&request("id")
rs.open sql,conn,1,3
if rs.eof then
response.write("该内容已经被被删除!")
response.end
end if
rs("readnum")=rs("readnum")+1
rs.update
rs.close
set rs=nothing
%>
<script language="JavaScript">
function checkform() {
if (form.name.value=="") {
 alert("留下你的大名吧!")
 form.name.focus()
 return false
}
if (form.title.value=="") {
 alert("你的帖子要有标题才行呀!")
 form.title.focus()
 return false
}
if (document.form.text.value.length>790) {
alert("输入的内容不能超过790字")
return false;
}
if (!confirm("您确定要发表文章吗?"))
 {return false;}
 else
 {
  return true;}
}

</script>

<link rel="stylesheet" href="apply.css" type="text/css">
</head>

<body oncontextmenu="return false" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<%set rs=server.createobject("adodb.recordset")
sql="select * from bbs where id="&CLng(request("id"))
rs.open sql,conn,1,1

%>
   <form name="form" method="post" action="">
  <table width="100%" border="0" cellspacing="0" cellpadding="0" style="BORDER-bottom: #6f8ac9 1px solid;BORDER-top: #6f8ac9 1px solid;BORDER-left: #6f8ac9 1px solid;BORDER-RIGHT: #6f8ac9 1px solid;">
    <tr> 
      <td valign="top" align="center" bgcolor="F3F6FA"> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0" height="23" bgcolor="#A1B9EF">
          <tr> 
            <td> <a href="#" onClick="javascript:history.go(-1)" class="wlink">返 回</a></td>
            <td width="57">&nbsp;</td>
          </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="F3F6FA">
          <tr> 
            <td height="25" width="30" bgcolor="E7ECF7" valign="middle">&nbsp; </td>
            <td height="25" width="18" bgcolor="E7ECF7" align="center" valign="middle"><img src="images/lock.gif"></td>
            <td height="25" bgcolor="E7ECF7" class="10blue">主 题:<%=rs("title")%> 
              <%title=rs("title")%>
            </td>
            <td height="25" width="8" bgcolor="E7ECF7" valign="middle"><img src="images/attachment.gif"></td>
            <td height="25" width="210" bgcolor="E7ECF7" class="10blue" align="left"><%=rs("name")%> 
               <%=rs("bbstime")%></td>
          </tr>
          <tr> 
            <td colspan="5" background="images/dotlineb.gif"></td>
          </tr>
		   <tr> 
            <td colspan="5" height="10"><img src="images/spacer.gif" width="10" height="10"></td>
          </tr>
          <tr align="center" bgcolor="F3F6FA" valign="middle"> 
            <td height="30" colspan="5"> 
              <table width="90%" border="0" cellspacing="0" cellpadding="0" height="100%">
                <tr> 
                  <td valign="middle"> 
                    <%temp=rs("bbs")
				  response.write temp
				
				  %>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
		  <tr> 
            <td colspan="5" height="10"><img src="images/spacer.gif" width="10" height="10"></td>
          </tr>
		      <tr> 
            <td colspan="5" background="images/dotlineb.gif"></td>
          </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <% rs.close
					  set rs=nothing
					  set rs=server.createobject("adodb.recordset")
sql="select * from reply where bbsid="&CLng(request("id"))&" order by id desc"
rs.open sql,conn,1,1
while not rs.eof
					  %>
          <tr bgcolor="E7ECF7"> 
            <td height="24" width="3%" align="right">&nbsp;</td>
            <td height="24" width="22" align="center"><img src="images/manager.gif" width="20" height="20"></td>
            <td height="24" class="10blue" bgcolor="E7ECF7"><%=rs("title")%></td>
            <td height="24" width="8" class="10blue"><img src="images/attachment.gif"></td>
            <td height="24" width="210" class="10blue" align="left"> <%=rs("name")%>  
              <%=rs("replytime")%></td>
          </tr>
          <tr> 
            <td colspan="5" background="images/dotlineb.gif"></td>
          </tr>
		  <tr bgcolor="ffffff"> 
            <td colspan="5" height="10"><img src="images/spacer.gif" width="10" height="10"></td>
          </tr>
          <tr bgcolor="ffffff" valign="middle" align="center"> 
            <td height="30" colspan="5"> 
              <table width="90%" border="0" cellspacing="0" cellpadding="0" height="100%">
                <tr> 
                  <td valign="middle"> 
                    <%temp=rs("bbs")
				  response.write temp
				
				  %>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
          <tr bgcolor="ffffff"> 
            <td colspan="5" height="10"><img src="images/spacer.gif" width="10" height="10"></td>
          </tr>
          <tr> 
            <td colspan="5" background="images/dotlineb.gif"></td>
          </tr>
          <%
					  rs.movenext
					  wend 
		  %>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" height="23" bgcolor="E7ECF7">
          <tr> 
            <td width="30">&nbsp;</td>
            <td width="22"><img src="images/locktop.gif"></td>
            <td class="10blue">快速回复:</td>
          </tr>
          <tr> 
            <td colspan="3" background="images/dotlineb.gif"></td>
          </tr>
        </table>
        <table width="90%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td height="30" width="12%" class=10blue align="center"> 姓 名:</td>
            <td height="30" width="88%"> 
              <input title="点击输入您的大名" type="text" name="name" maxlength="25" size="25" value="<%=session("username")%>" class="noinput">
            </td>
          </tr>
          <tr> 
            <td height="30" width="12%" class=10blue align="center"> 主 题:</td>
            <td height="30" width="88%"> 
              <input title="点击输入主题"  type="text" name="title" size="62" maxlength="25" value="回复:“<%=title%>”" class="noinput">
              <input type="hidden" name="id" value="<%=CLng(request("id"))%>">
            </td>
          </tr>
          <tr> 
            <td width="12%" class=10blue align="center"> 内 容:</td>
            <td valign="middle" width="88%" > 
              <textarea title="点击输入内容" name="text" wrap="VIRTUAL" cols="60" rows="5"  TabIndex=2 height="100%"></textarea>
            </td>
          </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" height="35" bgcolor="F3F6FA">
          <tr> 
            <td width="66%"> 
              <div align="center"> 
                <input type="image" name="send" value=" 发 送 " onClick="return checkform();return false;" src="images/addbbs.gif" alt="发表文章">&nbsp;&nbsp;
                <input type="image" name="find22" onClick="document.location='bbs.asp';return false;" src="images/fanhuigif.gif" alt="返回">
              </div>
            </td>
            <td width="34%">&nbsp;</td>
          </tr>
        </table>
      </td>
        </tr>
      </table>
     </form>

<!--#INCLUDE FILE="close.asp" --> 
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -