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

📄 bbs_edit.asp

📁 该资料包含大量网络开发的案例和源代码
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="../include/datatransfer.asp"-->
<!--#include file="../include/functionjs.asp"-->
<!--#include file="../include/functionvb.asp" -->
<!--#include file="../include/dbconn.inc" -->
<!--#include file="../include/refresh.asp"-->
<!--#include file="../include/header.asp" -->
<link href="../include/main.css" rel="stylesheet" type="text/css">
<%
if Userid=empty then
	response.Redirect("../common/showerr.asp?ErrType=1")
end if
%>
<%
  dim EditID,EditType
  EditId=clng(request("editid"))
  EditType=request("edittype")
  
  if EditType=1 then 
	  strSQL="select * from bbs_topic where topic_id="& editid 
  else 
	  strSQL="select * from bbs_reply where reply_id="& editid   	
  end if
  
  set objRS=objconn.execute(strsql) 
  if clng(userid)<>objrs("user_id") then 	response.Redirect("../common/showerr.asp?ErrType=2")
%>
<table width="710" border="1" cellpadding="2" cellspacing="0" align="center"  class="tablestyle" bordercolor="#FFFFFF">
  <tr>
    <td bordercolor="#4C4C4C" background="../resource/images/bbs/bg.gif" class="tablehead"><img src="../resource/images/bbs/li.gif" width="9" height="9"><a href="../blog/main.asp">56Blog</a>→<a href="bbs_main.asp">论坛</a>→编辑帖子</td>
  </tr>
</table>
<form name="newtopic" method="post" action="bbs_edit_add.asp?BoardID=<%=boardid%>&EditID=<%=editid%>&EditType=<%=EditType%>"onSubmit="return checkin(this)">
  <table width="710" border="1" cellpadding="2" cellspacing="0" bordercolor="#FFFFFF" align="center"class="tablestyle">
    <tr bordercolor="#4C4C4C">
      <td align="center"  background="../resource/images/bbs/bg.gif" class="tablehead">编辑帖子</td>
    </tr>
    <tr>
      <td bordercolor="#4C4C4C">
        <table width="100%"  border="0" cellspacing="2" cellpadding="2">
          <tr>
            <td width="11%">用户名:</td>
            <td width="89%"><input name="username" type="text" value="<%=username%>" size="40"disabled></td>
          </tr>
          <tr>
            <td>标题:</td>
            <td><input name="title" type="text" value=<%=objrs("title")%> size="40" ></td>
          </tr>
          <tr>
            <td>表情:</td>
            <td>
                <%
				for i=1 to 10 %>
                <input type="radio" name="emimage" value="<%=i%>" <%if objrs("emimage")=cstr(i) then response.Write("checked=1")%>>
                <img src="../resource/images/emimage/<%=i%>.gif" width="30" height="30">
                <%next%>
                <br>
                <%for i=11 to 20 %>
                <input type="radio" name="emimage" value="<%=i%>" <%if objrs("emimage")=cstr(i) then response.Write("checked=1")%>>
                <img src="../resource/images/emimage/<%=i%>.gif" width="30" height="30">
                <%next%></td>
          </tr>
          <tr>
            <td>帖子内容:</td>
            <td><TEXTAREA name="content" rows=15 wrap=VIRTUAL cols=80 ><%=objrs("content")%></textarea></td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td bordercolor="#4C4C4C" background="../resource/images/bj2.gif" align="center"><input type="submit" name="Submit" class="input"value="发表">
          <input type="reset" name="reset" class="input"value="取消"></td>
    </tr>
  </table>
</form>

<script language="vbscript">
Function checkin(myform)
checkin=true
if (trim(myform.title.value)="") then
  msgbox ("请填写标题!") 
  checkin= false
  exit function
end if

if (trim(myform.content.value)="") then
  msgbox ("请填写帖子内容!") 
  checkin= false
  exit function
end if
end Function
</script>


<!--#include file="../include/endconn.inc" -->
<!--#include file="../include/footer.asp" -->

⌨️ 快捷键说明

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