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

📄 postanswer.asp

📁 网易论坛 发表新贴子
💻 ASP
字号:
<!--#include file="opendb.asp"-->
<%
  
  ID=request.Form("id") 
  title=trim(request.Form("title"))
  content=trim(request.Form("content"))
  
  username=session("UserName")
  
  answertime=date()+time()
 
  StrSql = "INSERT INTO  Forum (Title,Content,LastAnswerTime,Username,AnswerID) Values ('"
  StrSql = StrSql &  title & "', '"
  StrSql = StrSql &  content & "', '"
  StrSql = StrSql & answertime & "', '"
  StrSql = StrSql & username & "', '"
  StrSql = StrSql &  ID & "' ) "
 
  my_conn.Execute StrSql
%>
<%
  strSQL = "Select * from Forum Where ID=" & ID 
  
  rst.CursorType=3
  
  rst.open strSQL
  
  count1=rst("AnswerCount")+1
  
  strSQL="Update Forum set AnswerCount="& "'"&count1&"'" & "where ID=" & ID
  
  my_conn.Execute strSQL
%>
<!--#include file="closedb.asp"-->
  <script language=vbscript>
     msgbox "你回复的帖子已发表",48,"发表成功" 
     window.location="index.asp" 
  </script>  

⌨️ 快捷键说明

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