<!--#include file="User_Const.asp"-->
<%
Dim InfoID,Action
InfoID	= Cl.ChkClng(request("InfoID"))
Action	= Lcase(Trim(request("Action")))
if InfoID<=0 then User_ShowErr("<li>参数不足，请指定ID！</li>")
Cl.GetChannelSetting(ChannelID)
If Action="why" then
	WhyNoPass
else
	Repass
end if

Sub Repass()
	Select Case Clng(Cl.Channel_Setting(20))
	Case 1
		SQL = "Select ArticleID,ClassID,Title,Passed,noPass,Editor From Cl_Article where ArticleID=" & InfoID
	Case 2
		SQL = "Select SoftID,ClassID,SoftName,Passed,noPass,Editor From Cl_Soft where SoftID=" & InfoID
	Case 3
		SQL = "Select PhotoID,ClassID,PhotoName,Passed,noPass,Editor From Cl_Photo where PhotoID=" & InfoID
	Case 4
		SQL = "Select MovieID,ClassID,MovieName,Passed,noPass,Editor From Cl_Movie where MovieID=" & InfoID
	Case 5
		SQL = "Select ProductID,ClassID,ProductName,Passed,noPass,Editor From Cl_Product where ProductID=" & InfoID
	Case 6
		SQL = "Select TopicID,ClassID,Title,Passed,noPass,Editor From Cl_Topic where TopicID=" & InfoID
	End Select
	Set Rs = Server.CreateObject("ADODB.Recordset")
	OpenConn : Rs.open SQL,Conn,1,3
	if Rs.bof and Rs.eof then
		User_ShowErr("<li>找不到指定"&Cl.Channel_Setting(2)&"。</li>")
	else
		if Rs(5) <> Cl.User_Info(5) then
			User_ShowErr("<li>提交文章“" & Rs(2) & "”失败。原因：此文章是其他网友发表的，你不能提交其他人的"&Cl.Channel_Setting(2)&"！</li>")
		end if
		if Rs(3)=True or Rs(4)=False then
			User_ShowErr("<li>提交文章“" & Rs(2) & "”失败。原因：此"&Cl.Channel_Setting(2)&"已经被审核通过，你不能再次提交！</li>")
		end if
	end if
	Rs("nopass")=False
	Rs.update
	Rs.Close : set Rs=Nothing
	Cl.OutMsg ""&Cl.Channel_Setting(2)&"已经成功重新提交，按确定返回！",ComeUrl
End Sub

Sub WhyNoPass()
	Dim sModuleName
	Select Case Clng(Cl.Channel_Setting(20))
	Case 1
		SQL = "Select ArticleID,ClassID,Title,Passed,noPass,NoPassNum,nopasstxt,Editor From Cl_Article where ArticleID=" & InfoID
		sModuleName="Article"
	Case 2
		SQL = "Select SoftID,ClassID,SoftName,Passed,noPass,NoPassNum,nopasstxt,Editor From Cl_Soft where SoftID=" & InfoID
		sModuleName="Soft"
	Case 3
		SQL = "Select PhotoID,ClassID,PhotoName,Passed,noPass,NoPassNum,nopasstxt,Editor From Cl_Photo where PhotoID=" & InfoID
		sModuleName="Photo"
	Case 4
		SQL = "Select MovieID,ClassID,MovieName,Passed,noPass,NoPassNum,nopasstxt,Editor From Cl_Movie where MovieID=" & InfoID
		sModuleName="Movie"
	Case 5
		SQL = "Select ProductID,ClassID,ProductName,Passed,noPass,NoPassNum,nopasstxt,Editor From Cl_Product where ProductID=" & InfoID
		sModuleName="Product"
	Case 6
		SQL = "Select TopicID,ClassID,Title,Passed,noPass,NoPassNum,nopasstxt,Editor From Cl_Topic where TopicID=" & InfoID
		sModuleName="Topic"
	End Select
	Set rs= Cl.Execute(SQL)
	if rs.bof and rs.eof then
		User_ShowErr("<li>找不到指定"&Cl.Channel_Setting(2)&"</li>")
	End if
	if Rs(7) <> Cl.User_Info(5) then
		User_ShowErr("<li>提交文章“" & Rs(2) & "”失败。原因：此文章是其他网友发表的，你不能提交其他人的"&Cl.Channel_Setting(2)&"！</li>")
	end if
	if rs(3)=True or rs(4)=False then
		User_ShowErr("<li>"&Cl.Channel_Setting(2)&"已经被审核通过，并未退回。</li>")
	end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>退稿原因</title>
<link rel="stylesheet" type="text/css" href="../Skins/User_Style.Css">
</head>
<body leftmargin="0" topmargin="0">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
  <tr class="title"> 
    <td height="22" align="center"><strong><b>查看退稿原因</b></td>
  </tr>
  <tr align="center"> 
      <td class="tdbg">
          <table width="100%" border="0" cellpadding="2" cellspacing="1">
            <tr class="tdbg"> 
              <td width="150" align="right"><strong>稿件标题：</strong></td>
              <td><input Name=NoPassNum size=60 type=text ReadOnly value="<%=rs(2)%>"></td>
           </tr>
            <tr class="tdbg"> 
              <td width="150" align="right"><strong>退稿次数：</strong></td>
              <td><input Name=NoPassNum size=6 type=text ReadOnly value="<%=rs(5)%>"> 次</td>
           </tr>
            <tr class="tdbg"> 
              <td width="150" align="right"><strong>退稿原因：</strong></td>
              <td><textarea name="nopasstxt" id="nopasstxt" cols="50" rows="10" ReadOnly><%=rs(6)%></textarea>
			</td>
           </tr>
	  </table>
       </td>
  </tr>
  <tr align="center"> 
      <td class="tdbg">
          <input name="Modify" type="button" id="Modify" value=" 修&nbsp;&nbsp;改 " onClick="window.location.href='User_<%=sModuleName%>.Asp?Action=Modify&ChannelID=<%=ChannelID%>&InfoID=<%=InfoID%>'">&nbsp;
		  <input name="Repass" type="button" id="Repass" value=" 重&nbsp;&nbsp;投 " onClick="window.location.href='User_RePass.Asp?ChannelID=<%=ChannelID%>&InfoID=<%=InfoID%>'">&nbsp;
		  <input name="Cancel" type="button" id="Cancel" value=" 取&nbsp;&nbsp;消 " onClick="window.location.href='User_<%=sModuleName%>.Asp?ChannelID=<%=ChannelID%>'">
       </td>
  </tr>
</table>
</body>
</html>
<%
rs.close:set rs=Nothing
End Sub
%>
<%
'===================================================
' CreateLive CMS Version 3.1
'							Powered by Aspoo.CoM
'===================================================
' Mail: aspoo@126.com, Info@aspoo.cn
' Q  Q: 3315263, 596197794
' Msn : aspoo@126.com, Clw866@hotmail.com
' Web : http://www.aspoo.com, http://www.aspoo.net
' Bbs : http://bbs.aspoo.com, http://bbs.aspoo.net
' Copyright (C) 2005 Aspoo.CoM All Rights Reserved.
'===================================================
%>