網(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文件就可以解決問題