网(LieHuo.Net)教程 科汛问答系统后台管理存在BUG,后台点击问题列表的“编辑”时,回答者的回答内容不能准确的调用,造成这个BUG的主要原因是文本框(textarea)的NAME值相同,导致FCK不能正确的显示相应的内容。解决办法:打开/admin/ks.asklist.asp文件找到
以下为引用的内容: <textarea style="WIDTH: 600px; DISPLAY: none; HEIGHT: 80px" name="content"><%=server.Htmlencode(Topiclist(5,i))%></textarea> <iframe id="content___Frame" height="150" src="../KS_Editor/FCKeditor/editor/fckeditor.html?InstanceName=content&Toolbar=Basic" frameborder="0" width="98%" scrolling="no"></iframe> |
改成
以下为引用的内容: <textarea style="WIDTH: 600px; DISPLAY: none; HEIGHT: 80px" name="content<%=i%>"><%=server.Htmlencode(Topiclist(5,i))%></textarea> <iframe id="content___Frame" height="150" src="../KS_Editor/FCKeditor/editor/fckeditor.html?InstanceName=content<%=i%>&Toolbar=Basic" frameBorder=0 width="98%" scrolling=no></iframe> |
然后在第18行后加上 ",topici" (不含引号)
然后将 saveAsked 改成如何内容
以下为引用的内容: Sub saveAsked() Dim Rs,SQL,postsid Dim TextContent,satis,LockTopic,strTitle,star postsid=KS.ChkClng(Request("postsid")) topicid=KS.ChkClng(Request("topicid")) topici=KS.ChkClng(Request("i")) If Trim(Request.Form("content"&topici&""))="" Then Call KS.AlertHintScript("内容不能为空!") Exit Sub End If SQL="SELECT TopicID,classid,title,Username,Expired,Closed,PostTable,LockTopic,TopicMode,supplement FROM KS_AskTopic WHERE topicid="&topicid Set Rs = Conn.Execute(SQL) If Rs.BOF And Rs.EOF Then Set Rs = Nothing ErrMsg="错误的系统参数" FoundErr = True Exit Sub End If topicid=Rs("TopicID") strTitle=Rs("title") TopicUseTable=Trim(Rs("PostTable")) TopicMode=Rs("TopicMode") Set Rs = Nothing TextContent=Request.Form("content"&topici&"") LockTopic=KS.ChkClng(Request.Form("LockTopic")) Conn.Execute ("UPDATE ["&TopicUseTable&"] SET content='"&TextContent&"',LockTopic="&LockTopic&" WHERE postsid="&postsid&" And topicid="&topicid) If KS.G("I")="0" Then Conn.Execute ("UPDATE [KS_AskTopic] SET LockTopic="&LockTopic&" WHERE topicid="&topicid) End If If strTitle<>Request.Form("title") and trim(Request.Form("title"))<>"" Then Conn.Execute ("UPDATE ["&TopicUseTable&"] SET topic='"&Trim(Request.Form("title"))&"' WHERE topicid="&topicid) Conn.Execute ("UPDATE [KS_AskTopic] SET title='"&Trim(Request.Form("title"))&"' WHERE topicid="&topicid) Conn.Execute ("UPDATE [KS_AskAnswer] SET title='"&Trim(Request.Form("title"))&"' WHERE topicid="&topicid) End If Call KS.AlertHintScript("恭喜您!编辑/审核问题成功。") End Sub |
以上修改完毕后,问答的后台可以正常显示了。附件内也有修改后的文件,大家覆盖admin/ks.asklist.asp文件就可以解决问题