<!--#include file="const.asp"-->
<!--#include file="ubbcode.asp"-->
<%
Admin_header
'=====================================================================
' 软件名称：新云网站管理系统
' 当前版本：NewAsp Content Management System Version 4.0
' 文件名称：admin_list.asp
' 更新日期：2008-09-16
' 官方网站：新云网络(www.NewAsp.net www.NewAsp.cn) QQ：94022511
'=====================================================================
' Copyright 2003-2008 NewAsp.net - All Rights Reserved.
' newasp is a trademark of NewAsp.net
'=====================================================================
%>
<table class="table1" cellspacing="1" cellpadding="3" align="center" border="0">
	<tr>
		<td class="tableline linetitle" width="120" align="left">问吧管理</td>
		<td class="tableline" width="*" align="right"><a href="admin_index.asp?ChannelID=<%=ChannelID%>">管理首页</a>
			 - <a href="admin_setting.asp?ChannelID=<%=ChannelID%>">问吧设置</a>
			 - <a href="admin_list.asp?ChannelID=<%=ChannelID%>">问答列表</a>
			 - <a href="admin_class.asp?ChannelID=<%=ChannelID%>">分类管理</a>
			 - <a href="admin_class.asp?action=add&ChannelID=<%=ChannelID%>">添加分类</a>
		</td>
	</tr>
</table>
<%
Dim maxperpage,totalrec,Pcount,pagelinks,showmode,pagenow,count
Dim m_intOrder,m_strOrder,SQLQuery,SQLField,Topiclist
Dim topicid,classid,topicmode,PostNum,ExpiredTime,CommentNum,HeadTitle,TopicUseTable
Dim Action
Action = LCase(Request("action"))
Select Case Trim(Action)
Case "edit"
	Call editAsked()
Case "save"
	Call saveAsked()
Case "asked"
	Call showAsked()
Case "del"
	Call LoadAskSetup()
	Call delTopic()
Case "delask"
	Call LoadAskSetup()
	Call delAsked()
Case Else
	Call showmain()
End Select
If FoundErr=True Then
	ReturnError(ErrMsg)
End If
Admin_footer
SaveLogInfo(AdminName)
NewAsp.PageEnd
Ask_CloseConn

Sub showmain()
	Dim i,iCount,lCount
	iCount=2:lCount=1
	maxperpage=30
	pagenow=NewAsp.ChkNumeric(Request("page"))
	If pagenow=0 Then pagenow=1
	showmode=NewAsp.ChkNumeric(Request("showmode"))
	m_intOrder=NewAsp.ChkNumeric(Request("order"))
	count=NewAsp.ChkNumeric(Request("count"))
%>
<table id="tablehovered" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr>
	<th width="5%" noWrap="noWrap">选择</th>
	<th width="56%">标题</th>
	<th width="12%" noWrap="noWrap">用户名</th>
	<th width="6%" noWrap="noWrap">状态</th>
	<th width="12%" noWrap="noWrap">日期</th>
	<th width="9%" noWrap="noWrap">管理操作</th>
</tr>
<tr>
	<td class="tablerow1" colspan="6" align="left" id="showNextPage">&nbsp;</td>
</tr>
<form name="selform" id="selform" method="post" action="?ChannelID=<%=ChannelID%>">
<input type="hidden" name="action" value="del">
<%
	Call showTopiclist()
	iCount=2:lCount=2
	If IsArray(Topiclist) Then
		For i=0 To Ubound(Topiclist,2)
			If Not Response.IsClientConnected Then Response.End
			If (i mod 2) = 0 Then
				iCount=2:lCount=1
			Else
				iCount=1:lCount=2
			End If
%>
<tr align="center">
	<td class="tablerow<%=iCount%> hovered"><input type="checkbox" name="topicid" value="<%=Topiclist(0,i)%>"/></td>
	<td class="tablerow<%=iCount%> hovered" align="left">[<a href="<%=AskInstalDir%>showlist.asp?classid=<%=Topiclist(1,i)%>" target="_blank"><%=Topiclist(3,i)%></a>]
	<a href="<%=AskInstalDir%>question.asp?topicid=<%=Topiclist(0,i)%>" target="_blank"><%=Trim(Topiclist(4,i))%></a></td>
	<td class="tablerow<%=iCount%> hovered" noWrap="noWrap"><a href="<%=AskInstalDir%>usertopic.asp?userid=<%=Topiclist(2,i)%>&topicmode=<%=Topiclist(13,i)%>" target="_blank"><%=Topiclist(5,i)%></a></td>
	<td class="tablerow<%=iCount%> hovered" noWrap="noWrap" title="查看评论"><a href="admin_comment.asp?ChannelID=<%=ChannelID%>&topicid=<%=Topiclist(0,i)%>"><img src="../images/icons/icon_0<%=Topiclist(13,i)%>.gif" border="0"/></a></td>
	<td class="tablerow<%=iCount%> hovered" noWrap="noWrap"><%=showDateTime(Topiclist(10,i),"yyyy-MM-dd")%></td>
	<td class="tablerow<%=iCount%> hovered" noWrap="noWrap"><a href="?action=asked&ChannelID=<%=ChannelID%>&topicid=<%=Topiclist(0,i)%>">编辑</a> | <a href="?action=del&ChannelID=<%=ChannelID%>&topicid=<%=Topiclist(0,i)%>" onclick="return confirm('删除后将不能恢复，您确定要删除吗?')">删除</a></td>
</tr>
<%
		Next
	End If
	Topiclist=Null
%>
<tr>
	<td class="tablerow<%=lCount%>" colspan="6"><input class="button" type="button" name="chkall" value="全选" onClick="CheckAll(this.form)"><input class="button" type="button" name="chksel" value="反选" onClick="ContraSel(this.form)">

		<input class="button" type="submit" name="submit_button1" value="批量删除" onclick="return confirm('您确定执行该操作吗?');">
	</td>
</tr>
</form>
<tr>
	<td class="tablerow<%=iCount%>" align="right" colspan="6" id="NextPageText"><div style="float:left;">
	<select onchange="if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}">
		<option value="admin_list.asp?ChannelID=<%=ChannelID%>&showmode=0"<%If showmode=0 Then Response.Write " selected=""selected"""%>>待解决的问题</option>
		<option value="admin_list.asp?ChannelID=<%=ChannelID%>&showmode=1"<%If showmode=1 Then Response.Write " selected=""selected"""%>>已解决的问题</option>
		<option value="admin_list.asp?ChannelID=<%=ChannelID%>&showmode=2"<%If showmode=2 Then Response.Write " selected=""selected"""%>>投票中的问题</option>
		<option value="admin_list.asp?ChannelID=<%=ChannelID%>&showmode=3"<%If showmode=3 Then Response.Write " selected=""selected"""%>>用户分享主题</option>
	</select>
	</div>
	<var class="morePage"><%=showlistpage(pagenow,Pcount,maxperpage,totalrec,pagelinks)%></var></td>
</tr>
</table>
<script type="text/javascript">
document.getElementById("showNextPage").innerHTML = document.getElementById("NextPageText").innerHTML;
</script>
<%
End Sub

Sub showTopiclist()
	Dim Rs,SQL,Cmd
	SQLField="TopicID,classid,userid,classname,title,PostUsername,Expired,Closed,PostTable,DateAndTime,LastPostTime,LockTopic,PostNum,TopicMode,Anonymous,IsTop"
	If count=0 Then
		totalrec=NewAsp.Ask_Execute("SELECT COUNT(*) FROM NC_Ask_Topic WHERE topicmode="&showmode&" "&SQLQuery&"")(0)
	Else
		totalrec=count
	End If
	Set Rs=NewAsp.CreateAXObject("ADODB.Recordset")
	SQL="SELECT "& SQLField &" FROM [NC_Ask_Topic]  WHERE topicmode="&showmode&" "&SQLQuery&" ORDER BY LastPostTime DESC"
	Rs.Open SQL,Ask_Conn,1,1
	If pagenow >1 Then
		Rs.Move (pagenow-1) * maxperpage
	End If
	If Not (Rs.BOF And Rs.EOF) Then
		Topiclist=Rs.GetRows(maxperpage)
	Else
		Topiclist=Null
	End If
	Rs.close()
	Set Rs=Nothing

	Pcount = CLng(totalrec / maxperpage)
	If Pcount < totalrec / maxperpage Then Pcount = Pcount + 1
	If pagenow>Pcount Then pagenow=1
	pagelinks="admin_list.asp?channelid="& ChannelID &"&showmode="&Request("showmode")&"&order="&Request("order")&"&count="&totalrec&"&"
End Sub

Sub showAsked()
	Dim Rs,SQL,XMLDom,Node,i
	Dim PostUserTitle,DelAction
	topicid=NewAsp.ChkNumeric(Request("topicid"))
	SQL="SELECT TopicID,classid,userid,classname,title,PostUsername,Expired,Closed,PostTable,DateAndTime,LastPostTime,ExpiredTime,LockTopic,Reward,Hits,PostNum,CommentNum,TopicMode,Broadcast,Anonymous,supplement FROM NC_Ask_Topic WHERE topicid="&topicid
	Set Rs = NewAsp.Ask_Execute(SQL)
	If Rs.BOF And Rs.EOF Then
		Set Rs = Nothing
		ErrMsg="错误的系统参数"
		FoundErr = True
		Exit Sub
	End If
	Set XMLDom = NewAsp.RecordsetToxml(Rs,"topic","xml")
	Set Rs = Nothing
	Set Node = XMLDom.documentElement.selectSingleNode("topic")
	If Not Node Is Nothing Then
		topicid = CLng(Node.selectSingleNode("@topicid").text)
		classid = CLng(Node.selectSingleNode("@classid").text)
		topicmode = CLng(Node.selectSingleNode("@topicmode").text)
		PostNum = CLng(Node.selectSingleNode("@postnum").text)
		ExpiredTime = CDate(Node.selectSingleNode("@expiredtime").text)
		CommentNum = CLng(Node.selectSingleNode("@commentnum").text)
		HeadTitle = Trim(Node.selectSingleNode("@title").text)
		TopicUseTable = Trim(Node.selectSingleNode("@posttable").text)
	End If
	Set Node = Nothing
	Set XMLDom = Nothing
%>
<table id="tablehovered" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr>
	<th>问题：<%=HeadTitle%></th>
</tr>
<%
	Call showAskedlist()
	If IsArray(Topiclist) Then
		For i=0 To Ubound(Topiclist,2)
			If Not Response.IsClientConnected Then Response.End
			If CLng(Topiclist(13,i))=0 Then
				PostUserTitle="提问者："
				DelAction="del"
			Else
				PostUserTitle="回复者："
				DelAction="delask"
			End If
%>
<tr>
	<td class="tablerow1"><span style="float:right;"><a href="?action=edit&postsid=<%=Topiclist(0,i)%>&topicid=<%=Topiclist(2,i)%>&ChannelID=<%=ChannelID%>">编辑</a> | <a href="?action=<%=DelAction%>&postsid=<%=Topiclist(0,i)%>&topicid=<%=Topiclist(2,i)%>&ChannelID=<%=ChannelID%>" onclick="return confirm('删除后将不能恢复，您确定要删除吗?')">删除</a></span>
		<%=PostUserTitle%><a href="<%=AskInstalDir%>usertopic.asp?userid=<%=Topiclist(3,i)%>&topicmode=<%=topicmode%>" target="_blank"><%=Topiclist(4,i)%></a></td>
</tr>
<tr>
	<td class="tablerow2"><%=UBBCode(Topiclist(6,i))%>&nbsp;</td>
</tr>
<%
		Next
	End If
	Topiclist=Null
%>
<tr>
	<td class="tablerow1" align="right" id="NextPageText">
	<var class="morePage"><%=showlistpage(pagenow,Pcount,maxperpage,totalrec,pagelinks)%></var></td>
</tr>
<%
End Sub

Sub showAskedlist()
	Dim Rs,SQL
	maxperpage=10
	SQLField="postsid,classid,TopicID,userid,UserName,topic,content,addText,PostTime,DoneTime,star,satis,LockTopic,PostsMode,VoteNum,Plus,Minus,PostIP,Report"
	If count=0 Then
		totalrec=NewAsp.Ask_Execute("SELECT COUNT(*) FROM ["&TopicUseTable&"] WHERE topicid="&topicid&" "&SQLQuery&"")(0)
	Else
		totalrec=count
	End If
	Set Rs=NewAsp.CreateAXObject("ADODB.Recordset")
	SQL="SELECT "& SQLField &" FROM ["&TopicUseTable&"]  WHERE topicid="&topicid&" "&SQLQuery&" ORDER BY postsid ASC"
	Rs.Open SQL,Ask_Conn,1,1
	If pagenow >1 Then
		Rs.Move (pagenow-1) * maxperpage
	End If
	If Not (Rs.BOF And Rs.EOF) Then
		Topiclist=Rs.GetRows(maxperpage)
	Else
		Topiclist=Null
	End If
	Rs.close()
	Set Rs=Nothing

	Pcount = CLng(totalrec / maxperpage)
	If Pcount < totalrec / maxperpage Then Pcount = Pcount + 1
	If pagenow>Pcount Then pagenow=1
	pagelinks="admin_list.asp?action=asked&channelid="& ChannelID &"&topicid="&topicid&"&count="&totalrec&"&"
End Sub

Sub editAsked()
	Dim Rs,SQL,postsid
	Dim XMLDom,Node
	postsid=NewAsp.ChkNumeric(Request("postsid"))
	topicid=NewAsp.ChkNumeric(Request("topicid"))
	SQL="SELECT TopicID,classid,userid,classname,title,PostUsername,Expired,Closed,PostTable,DateAndTime,LastPostTime,ExpiredTime,LockTopic,Reward,Hits,PostNum,CommentNum,TopicMode,Broadcast,Anonymous,supplement FROM NC_Ask_Topic WHERE topicid="&topicid
	Set Rs = NewAsp.Ask_Execute(SQL)
	If Rs.BOF And Rs.EOF Then
		Set Rs = Nothing
		ErrMsg="错误的系统参数"
		FoundErr = True
		Exit Sub
	End If
	Set XMLDom = NewAsp.RecordsetToxml(Rs,"topic","xml")
	Set Rs = Nothing
	Set Node = XMLDom.documentElement.selectSingleNode("topic")
	If Not Node Is Nothing Then
		topicid = CLng(Node.selectSingleNode("@topicid").text)
		classid = CLng(Node.selectSingleNode("@classid").text)
		topicmode = CLng(Node.selectSingleNode("@topicmode").text)
		PostNum = CLng(Node.selectSingleNode("@postnum").text)
		ExpiredTime = CDate(Node.selectSingleNode("@expiredtime").text)
		CommentNum = CLng(Node.selectSingleNode("@commentnum").text)
		HeadTitle = Trim(Node.selectSingleNode("@title").text)
		TopicUseTable = Trim(Node.selectSingleNode("@posttable").text)
	End If
	Set Node = Nothing
	Set XMLDom = Nothing
	SQL="SELECT * FROM ["&TopicUseTable&"] WHERE postsid="&postsid&" And topicid="&topicid
	Set Rs = NewAsp.Ask_Execute(SQL)
	If Rs.BOF And Rs.EOF Then
		Set Rs = Nothing
		ErrMsg="错误的系统参数"
		FoundErr = True
		Exit Sub
	End If
%>
<form action="?action=save" method="post" name="askedform">
<input type="hidden" name="postsid" value="<%=postsid%>" />
<input type="hidden" name="topicid" value="<%=topicid%>" />
<input type="hidden" name="ChannelID" value="<%=ChannelID%>" />
<table class="tableborder" cellspacing="1" cellpadding="3" align="center" border="0">
<tr>
	<th colspan="2">编辑/审核问题</th>
</tr>
<tr>
	<td class="tablerow1" width="20%" align="right"><b>标题</b></td>
	<td class="tablerow1" width="80%"><input name="title" value="<%=Server.HTMLEncode(HeadTitle)%>" type="text" size="80" /></td>
</tr>
<tr>
	<td class="tablerow2" align="right"><b>内容</b><br/>支持HTML代码</td>
	<td class="tablerow2"><textarea name="content" id="content" rows="15" cols="80"><%=Server.HTMLEncode(Rs("content"))%></textarea><br/>
	<a href="javascript:admin_Size(-15,'content')"><img src="../images/minus.gif" unselectable="on" border="0"></a>
	<a href="javascript:admin_Size(15,'content')"><img src="../images/plus.gif" unselectable="on" border="0"></a></td>
</tr>
<tr>
	<td class="tablerow1" align="right"><b>审核</b></td>
	<td class="tablerow1"><input type="radio" name="LockTopic" value="0"<%If Rs("LockTopic") = 0 Then Response.Write " checked=""checked"""%> /> 确定审核&nbsp;&nbsp;
		<input type="radio" name="LockTopic" value="1"<%If Rs("LockTopic") = 1 Then Response.Write " checked=""checked"""%> /> 取消审核</td>
</tr>
<tr>
	<td class="tablerow2">&nbsp;</td>
	<td class="tablerow2"><input class="button" type="button" onclick="javascript:history.go(-1)" name="button2" value="返回上一页" />
	<input class="button" type="submit" name="submit_button" value="保存编辑" /></td>
</tr>
</table>
</form>
<%
End Sub

Sub saveAsked()
	Dim Rs,SQL,postsid
	Dim TextContent,satis,LockTopic,strTitle,star
	postsid=NewAsp.ChkNumeric(Request("postsid"))
	topicid=NewAsp.ChkNumeric(Request("topicid"))
	If Trim(Request.Form("title"))="" Then
		ErrMsg="<li>标题不能为空</li>"
		FoundErr = True
		Exit Sub
	End If
	SQL="SELECT TopicID,classid,title,PostUsername,Expired,Closed,PostTable,LockTopic,TopicMode,supplement FROM NC_Ask_Topic WHERE topicid="&topicid
	Set Rs = NewAsp.Ask_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")
	'satis=NewAsp.ChkNumeric(Request.Form("satis"))
	'star=NewAsp.ChkNumeric(Request.Form("star"))
	'If star=0 Or star>5 Then star=3
	LockTopic=NewAsp.ChkNumeric(Request.Form("LockTopic"))
	NewAsp.Ask_Execute ("UPDATE ["&TopicUseTable&"] SET content='"&NewAsp.CheckStr(TextContent)&"',LockTopic="&LockTopic&" WHERE postsid="&postsid&" And topicid="&topicid)
	If strTitle<>Request.Form("title") Then
		NewAsp.Ask_Execute ("UPDATE ["&TopicUseTable&"] SET topic='"&NewAsp.CheckStr(Trim(Request.Form("title")))&"' WHERE topicid="&topicid)
		NewAsp.Ask_Execute ("UPDATE [NC_Ask_Topic] SET title='"&NewAsp.CheckStr(Trim(Request.Form("title")))&"' WHERE topicid="&topicid)
		NewAsp.Ask_Execute ("UPDATE [NC_Ask_Answer] SET title='"&NewAsp.CheckStr(Trim(Request.Form("title")))&"' WHERE topicid="&topicid)
	End If
	Succeed("<li>恭喜您！编辑/审核问题成功。</li>")
End Sub

Sub delTopic()
	Dim Rs,SQL,i,SQLArry
	Dim TopicIDlist,userid
	Dim MinusPoints,MinusExperience
	TopicIDlist=NewAsp.CheckIDlist(Request("topicid"))
	SQL="SELECT TopicID,userid,PostTable,TopicMode FROM NC_Ask_Topic WHERE topicid in("&TopicIDlist&")"
	Set Rs = NewAsp.Ask_Execute(SQL)
	If Rs.BOF And Rs.EOF Then
		Set Rs=Nothing
		ErrMsg="<li>错误的系统参数</li><li>此数据可能已经被删除</li>"
		FoundErr=True
		Exit Sub
	End If
	SQLArry=Rs.GetRows(-1)
	Set Rs=Nothing

	If IsArray(SQLArry) Then
		For i=0 To Ubound(SQLArry,2)
			topicid=CLng(SQLArry(0,i))
			userid=CLng(SQLArry(1,i))
			TopicUseTable=Trim(SQLArry(2,i))
			TopicMode=CLng(SQLArry(3,i))
			Select Case TopicMode
				Case 1
					MinusPoints=CLng(Point_Setting(22))
					MinusExperience=CLng(Point_Setting(23))
				Case 2
					MinusPoints=CLng(Point_Setting(28))
					MinusExperience=CLng(Point_Setting(29))
				Case 3
					MinusPoints=CLng(Point_Setting(30))
					MinusExperience=CLng(Point_Setting(31))
				Case Else
					MinusPoints=CLng(Point_Setting(20))
					MinusExperience=CLng(Point_Setting(21))
			End Select
			NewAsp.Ask_Execute ("UPDATE NC_Ask_Users SET Points=Points-"&MinusPoints&",Experience=Experience-"&MinusExperience&",delnum=delnum+1 WHERE userid="&userid)
			NewAsp.Ask_Execute("DELETE FROM NC_Ask_Topic WHERE topicid="&topicid)
			NewAsp.Ask_Execute("DELETE FROM NC_Ask_Answer WHERE topicid="&topicid)
			NewAsp.Ask_Execute("DELETE FROM NC_Ask_Comment WHERE topicid="&topicid)
			NewAsp.Ask_Execute("DELETE FROM "&TopicUseTable&" WHERE topicid="&topicid)
		Next
		SQLArry=Null
	End If
	Succeed("<li>恭喜您！数据删除成功。</li>")
End Sub

Sub delAsked()
	Dim Rs,SQL,postsid
	Dim SQLArry,userid,PostNum
	Dim MinusPoints,MinusExperience
	Dim satis,PostsMode
	postsid=NewAsp.ChkNumeric(Request("postsid"))
	topicid=NewAsp.ChkNumeric(Request("topicid"))
	SQL="SELECT TopicID,userid,PostTable,TopicMode,PostNum FROM NC_Ask_Topic WHERE topicid="&topicid
	Set Rs = NewAsp.Ask_Execute(SQL)
	If Rs.BOF And Rs.EOF Then
		Set Rs=Nothing
		ErrMsg="<li>错误的系统参数</li><li>此数据可能已经被删除</li>"
		FoundErr=True
		Exit Sub
	End If
	SQLArry=Rs.GetRows(1)
	Set Rs=Nothing
	If IsArray(SQLArry) Then
		topicid=CLng(SQLArry(0,0))
		userid=CLng(SQLArry(1,0))
		TopicUseTable=Trim(SQLArry(2,0))
		TopicMode=CLng(SQLArry(3,0))
		PostNum=CLng(SQLArry(4,0))
	Else
		ErrMsg="<li>错误的系统参数</li><li>此数据可能已经被删除</li>"
		FoundErr=True
		Exit Sub
	End If
	SQLArry=Null
	If PostNum>0 Then
		SQL="SELECT postsid,userid,satis,PostsMode FROM "&TopicUseTable&" WHERE postsid="&postsid
		Set Rs = NewAsp.Ask_Execute(SQL)
		If Rs.BOF And Rs.EOF Then
			Set Rs=Nothing
			ErrMsg="<li>错误的系统参数</li><li>此数据可能已经被删除</li>"
			FoundErr=True
			Exit Sub
		End If
		SQLArry=Rs.GetRows(1)
		Set Rs=Nothing
		If IsArray(SQLArry) Then
			postsid=CLng(SQLArry(0,0))
			userid=CLng(SQLArry(1,0))
			satis=CLng(SQLArry(2,0))
			PostsMode=CLng(SQLArry(3,0))
			If satis=0 Then
				MinusPoints=CLng(Point_Setting(24))
				MinusExperience=CLng(Point_Setting(25))
			Else
				MinusPoints=CLng(Point_Setting(26))
				MinusExperience=CLng(Point_Setting(27))
			End If
			If PostsMode>0 Then
				NewAsp.Ask_Execute("DELETE FROM NC_Ask_Answer WHERE topicid="&topicid&" And userid="&userid&" And AnswerNum<2")
				NewAsp.Ask_Execute("DELETE FROM "&TopicUseTable&" WHERE postsid="&postsid)
				NewAsp.Ask_Execute ("UPDATE NC_Ask_Users SET Points=Points-"&MinusPoints&",Experience=Experience-"&MinusExperience&",delnum=delnum+1 WHERE userid="&userid)
				NewAsp.Ask_Execute ("UPDATE NC_Ask_Answer SET AnswerNum=AnswerNum-1 WHERE topicid="&topicid&" And userid="&userid)
			End If
		End If
		SQLArry=Null
	End If
	Succeed("<li>恭喜您！数据删除成功。"&TopicUseTable&"</li>")
End Sub

%>