欢迎光临爱时尚女性网
 

一个BBS的源代码(五)

2012-7-18 编辑:knwz 来源:爱时尚女性网 阅读次数:1172
  导读:'================================= Case "Modify" '================================ ' 修改文章 Which = Request("Which") WhichID = GetID( Which ) If Left( Which , 1 ) = "E" Then Table = "bbs" Else Table = "bbsreply" WrongMsg = "" If Reque...
'=================================
Case "Modify"
'================================
' 修改文章


Which = Request("Which")
WhichID = GetID( Which )


If Left( Which , 1 ) = "E" Then Table = "bbs" Else Table = "bbsreply"


WrongMsg = ""


If Request("Modify") = "Yes" Then


Userid = Request("Userid")
PassWord = Request("Password")
Title = Trim(Request("Title"))
Content = Rtrim(Request("Content"))


If Title = "" Then WrongMsg = WrongMsg + "
  • 题目不能为空。
  • "
    If Content = "" Then WrongMsg = WrongMsg + "
  • 内容不能为空。
  • "


    If WrongMsg = "" Then
    RecBBS.Open "SELECT [作者] FROM " & Table & " WHERE [序号]=" & WhichID , Con , 1
    If RecBBS.Fields("作者") = Userid Then
    SQL = "SELECT COUNT(*) FROM bbsmember WHERE [账号]='" & SqlStr(Userid) & "' AND [密码]='" & SqlStr(Password) & "'"
    RecMember.Open SQL , Con , 1
    If RecMember.Fields(0) > 0 Then
    SQL = "UPDATE " & Table & " SET [题目]='" & SqlStr(Title) & "',[内容]='" & SqlStr(Content) & "' WHERE [序号]=" & WhichID
    Con.Execute( SQL )
    Else
    WrongMsg = "
  • 密码不正确。
  • "
    End If
    RecMember.Close
    Else
    WrongMsg = "
  • 用户名不正确。
  • "
    End If
    RecBBS.Close
    End If


    End If


    Title = ""
    Content = ""


    SQL = "SELECT [题目],[内容] FROM " & Table & " WHERE [序号]=" & WhichID
    RecBBS.Open SQL , Con , 1


    If Not RecBBS.EOF Then
    Title = RecBBS.Fields("题目")
    Content = RecBBS.Fields("内容")
    End If
    RecBBS.Close
    %>







    <%
    '===============================
    Case "Apply"
    '===============================
    ' 申请账号
    %>







    文章出自:爱时尚女性网www.aspjc.com,尊重版权是美德,转载请保留原地址,感谢合作!

     
     
    链接交换请联系:QQ:790646582 首页链接要求百度快照在一周以内,不符合以上要求的各站,我们将定期把友情连接转入内页,谢谢合作。
    Copyright @ 2012-2015 爱时尚女性网 保留所有权利吉ICP备14005127号-1 服务QQ:175529508 e-mail:zk8312@163.com
    本站部分资源来自网友上传,如果无意之中侵犯了您的版权,请联系本站,本站将在3个工作日内删除。