<!--#include file="User_Const.asp"-->
<%
if ChannelID=0 then User_ShowErr("参数错误！")
if Not Cl.TrueChannelPurview_U(5,ChannelID) then User_ShowErr("<li>您无此操作权限！</li>")
const MaxPerPage=20
dim ManageType,Action
dim keyword,strField
dim rsList,sPath
dim ClassID,Passed,SpecialID,SpecialName
dim tClass,ClassName,RootID,ParentID,Depth,ParentPath,Child,arrChildID
dim SoftID,SoftName,SoftVersion,SoftType,SoftLanguage
dim CopyrightType,OperatingSystem,Author,AuthorEmail,AuthorHomepage
dim DemoUrl,RegUrl,SoftPicUrl,SoftIntro,OnTop,Hot,Elite,Stars,UpdateTime,Hits,DayHits,WeekHits,MonthHits
dim SoftLevel,SoftPoint,SoftMoney,DecompressPassword,SoftSize,SizeUnit,DownloadUrls
dim sMaxLimit,sAddPoint,sAddIsChk,NowCreate,UploadFiles,UseServer,FileAddress,Editor
dim BackPoint,BackPointRate,BackMoney,BackMoneyRate,IsTruePurview,IsTruePurview_P
'=============================================
Cl.GetChannelSetting(ChannelID)
Action		= Trim(request("Action"))
Select Case Action
Case "Add"
	AddMain
Case "Modify"
	ModifyMain
Case "SaveAdd", "SaveModify"
	DoSaveRecord
Case "Show"
	ShowInfoMain
Case Else
	ManageMain
End Select

Footer

Sub ManageMain()
	ManageType	= Trim(request("ManageType"))
	ClassID		= Cl.ChkClng(request("ClassID"))
	SpecialID	= Cl.ChkClng(request("SpecialID"))
	'=============
	OnTop		= Cl.ChkCBool(request("OnTop"))
	Hot			= Cl.ChkCBool(request("Hot"))
	Elite		= Cl.ChkCBool(request("Elite"))
	'=============
	keyword		= Trim(request("keyword"))
	'Property	= Trim(request("Property"))
	strField	= Trim(request("Field"))
	Passed		= Trim(request("Passed"))
	CurrentPage	= Cl.ChkClng(request("page"))
	if keyword="" then keyword="关键字"
	FileName	= "User_Soft.Asp?ChannelID="&ChannelID&"&Action="&Action&""
	if ManageType="MyInfo" then
		FileName=FileName & "&ManageType=" & ManageType
	'else
	'	if Not Cl.TrueChannelPurview_U(3,ChannelID) then User_ShowErr("<li>您无此操作权限！</li>")
	end if
	'======================1
	strFileName	= FileName & "&ClassID=" & ClassID & "&SpecialID=" & SpecialID & "&Field=" & strField & "&keyword=" & keyword
	'======================1
	if Passed="" then
		Passed="All"
		Select Case Action
		Case "Check"
			Passed=FalseType
		Case "Make"
			Passed=TrueType
		Case ""
			if ManageType<>"MyInfo" then Passed=TrueType
		End Select
	end if
	if ClassID>0 then
		set tClass=Cl.Execute("select ClassName,RootID,ParentID,Depth,ParentPath,Child,arrChildID From Cl_Class where ChannelID="&ChannelID&" and ClassID=" & ClassID)
		if tClass.bof and tClass.eof then
			tClass.Close :Set tClass=Nothing
			User_ShowErr("<br /><li>找不到指定的栏目</li>")
		else
			ClassName=tClass(0):RootID=tClass(1):ParentID=tClass(2)
			Depth=tClass(3):ParentPath=tClass(4):Child=tClass(5):arrChildID=tClass(6)
			tClass.Close :Set tClass=Nothing
			If Cint(Cl.User_Purview(0)) > 1 and ManageType<>"MyInfo" then
				Dim sTr,sTPurview
				sTPurview=False
				sTr=Split(ParentPath & "," & ClassID,",")
				if Action="Check" then
					if Cl.TrueChannelPurview_U(2,ChannelID) then
						sTPurview=True
					else
						for i=1 to Ubound(sTr)
							sTPurview=Cl.TrueClassPurview_U(2,ChannelID,sTr(i))
							if sTPurview=True then Exit For
						Next
					end if
				Else
					if Cl.TrueChannelPurview_U(1,ChannelID) then
						sTPurview=True
					else
						for i=1 to Ubound(sTr)
							sTPurview=Cl.TrueClassPurview_U(1,ChannelID,sTr(i))
							if sTPurview=True then Exit For
						Next
					end if
				End if
				If sTPurview=False then User_ShowErr("<br /><li>找不到指定的栏目或您无此操作权限</li>")
			End if
			if ParentID>0 then
				dim sqlPath,rsPath
				sqlPath="select ClassID,ClassName From Cl_Class where ChannelID="&ChannelID&" and ClassID in (" & ParentPath & ") order by Depth"
				set rsPath=Cl.Execute(sqlPath)
				if Not rsPath.eof then
					sqlPath=rsPath.GetRows(-1)
					for i=0 to Ubound(sqlPath,2)
						sPath = sPath & "<a href=""" & FileName & "&ClassID=" & sqlPath(0,i) & """><font color=#0000ff>" & sqlPath(1,i) & "</font></a>&nbsp;&gt;&gt;&nbsp;"
					Next
					sqlPath=Empty
				End if
				rsPath.Close:Set rsPath=Nothing
			end if
			sPath = sPath & "<a href=""" & FileName & "&ClassID=" & ClassID & """><font color=#0000ff>" & ClassName & "</font></a>"
		end if
	end if
%>
<html>
<head>
<title>软件管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../Skins/User_Style.Css">
<script language="JavaScript" src="../Inc/Js/admin.js"></script>
<script language="JavaScript" type="text/javascript">
function unselectall()
{
    if(document.myform.chkAll.checked){
	document.myform.chkAll.checked = document.myform.chkAll.checked&0;
    } 	
}

function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.Name != "chkAll"&&e.disabled==false)
       e.checked = form.chkAll.checked;
    }
  }
function ConfirmDel()
{
	switch(document.myform.Action.value){
	case "Del":
		if(confirm("确定要删除选中的<%=Cl.Channel_Setting(2)%>吗？本操作将把选中的<%=Cl.Channel_Setting(2)%>移到回收站中。必要时您可从回收站中恢复！"))
		    return true;
		else
			return false;
	case "MoveMore":
		document.myform.action="User_InfoMove.asp";
		return true;
	case "MoveToSpecial":
		document.myform.action="User_InfoMove.asp";
		if(confirm("确定要将选中的<%=Cl.Channel_Setting(2)%>移动到指定的专题吗？"))
		    return true;
		else
			return false;
	case "SetPassed":
		document.myform.action="User_Property.asp";
		return true;
	case "CancelPassed":
		document.myform.action="User_Property.asp";
		return true;
	case "DelFromSpecial":
		document.myform.action="User_InfoDel.asp";
		if(confirm("确定要选中的<%=Cl.Channel_Setting(2)%>的专题吗？"))
		    return true;
		else
			return false;
	case "ConfirmDel":
		document.myform.action="User_InfoDel.asp";
		if(confirm("确定要将选中的<%=Cl.Channel_Setting(2)%>彻底删除吗？本操作将不可恢复！"))
		    return true;
		else
			return false;
	case "ClearRecyclebin":
		document.myform.action="User_InfoDel.asp";
		if(confirm("确定要清空回收站吗？本操作将不可恢复！"))
		    return true;
		else
			return false;
	case "Restore":
		document.myform.action="User_InfoDel.asp";
		if(confirm("确定要还原选中的<%=Cl.Channel_Setting(2)%>吗？"))
		    return true;
		else
			return false;
	case "RestoreAll":
		document.myform.action="User_InfoDel.asp";
		if(confirm("确定要还原所有<%=Cl.Channel_Setting(2)%>吗？"))
		    return true;
		else
			return false;
	case "CreateSoft":
		document.myform.action="User_Create_Soft.asp";
		if(confirm("确定要生成选中<%=Cl.Channel_Setting(2)%>吗？"))
		    return true;
		else
			return false;
	case "CreateSoftAll":
		document.myform.action="User_Create_Soft.asp";
		if(confirm("确定要生成所有<%=Cl.Channel_Setting(2)%>吗？此操作可能将消耗服务器资源很大！"))
		    return true;
		else
			return false;
	case "DelSoftHTML":
		document.myform.action="User_Create_Soft.asp";
		if(confirm("确定要生成选中<%=Cl.Channel_Setting(2)%>的HTML文件吗？"))
		    return true;
		else
			return false;
	case "DelSoftHTMLAll":
		document.myform.action="User_Create_Soft.asp";
		if(confirm("确定要删除所有<%=Cl.Channel_Setting(2)%>的HTML文件吗？"))
		    return true;
		else
			return false;
	default:
		return false;
	}
	return true;
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
  <tr class="title"> 
    <td height="22" colspan="2"  align="center"><strong><%=Cl.Channel_Setting(2)%>管理</strong></td>
  </tr>
  <tr class="tdbg"> 
    <td width="70" height="30" ><strong>管理导航：</strong></td>
    <td><a href="User_Soft.Asp?ChannelID=<%=ChannelID%>"><%=Cl.Channel_Setting(2)%>管理首页</a>&nbsp;|&nbsp;<a href="User_Soft.Asp?Action=Add&ChannelID=<%=ChannelID%>">添加<%=Cl.Channel_Setting(2)%></a>&nbsp;|&nbsp;<a href="User_Soft.Asp?ChannelID=<%=ChannelID%>&Action=Check">审核<%=Cl.Channel_Setting(2)%></a>&nbsp;|&nbsp;<a href="User_Comment.asp?ChannelID=<%=ChannelID%>" target=main><%=Cl.Channel_Setting(2)%>评论管理</a>&nbsp;|&nbsp;<a href="User_Soft.Asp?ChannelID=<%=ChannelID%>&Action=Special" target=main>专题管理</a>&nbsp;|&nbsp;<a href="User_Soft.Asp?ChannelID=<%=ChannelID%>&Action=RecycleBin" target=main>回收站管理</a>
	</td>
  </tr>
<form name="FormProperty" method="Post" action="<%=strFileName%>">
  <tr class="tdbg"> 
    <td width="70" height="30"><strong><%=Cl.Channel_Setting(2)%>选项：</strong></td>
    <td>
	<a href="<%=strFileName%>&Passed=All"><%
	if Passed<>FalseType and Passed<>TrueType then
	%><font color=red><b>所有<%=Cl.Channel_Setting(2)%></b></font><%
	else
	%>所有<%=Cl.Channel_Setting(2)%><%
	end if%></a>&nbsp;|&nbsp;<a href="<%=strFileName%>&Passed=<%=FalseType%>"><%
	if Passed=FalseType then
	%><font color=red><b>未审核<%=Cl.Channel_Setting(2)%></b></font><%
	else
	%>未审核<%=Cl.Channel_Setting(2)%><%
	end if
	%></a>&nbsp;|&nbsp;<a href="<%=strFileName%>&Passed=<%=TrueType%>"><%
	if Passed=TrueType then
	%><font color=red><b>已审核<%=Cl.Channel_Setting(2)%></b></font><%
	else
	%>已审核<%=Cl.Channel_Setting(2)%><%
	end if%></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<input name="OnTop" type="checkbox" onclick="submit()" value="True" <%if OnTop then%>checked<%end if%>>
	固顶<%=Cl.Channel_Setting(2)%>&nbsp;&nbsp;&nbsp;&nbsp;
	<input name="Elite" type="checkbox" onclick="submit()" value="True" <%if Elite then%>checked<%end if%>>
	推荐<%=Cl.Channel_Setting(2)%>&nbsp;&nbsp;&nbsp;&nbsp;
	<input name="Hot" type="checkbox" onclick="submit()" value="True" <%if Hot then%>checked<%end if%>>
	热门<%=Cl.Channel_Setting(2)%>
	</td>
  </tr>
  </form>
  <tr class="tdbg">
    <td width="70"><strong>高级搜索：</strong></td>
    <td>
	<table border=0 cellpadding=0 cellspacing=0>
	<form method="Post" name="SearchForm" action="<%=FileName%>">
	<tr><td height=28 align="center">
		<select name="Field" size="1" ID="Field">
		<option value="ID"><%=Cl.Channel_Setting(2)%>ID</option>
		<option value="Title" selected><%=Cl.Channel_Setting(2)%>名称</option>
		<option value="Keyword">关 键 字</option>
		<option value="Intro"><%=Cl.Channel_Setting(2)%>简介</option>
		<option value="Author"><%=Cl.Channel_Setting(2)%>作者</option>
		<option value="Editor">添加用户</option>
		<option value="Censor">审核用户</option>
		<option value="Point"><%=Cl.Channel_Setting(2)%><%=Cl.Web_Setting(28)%></option>
		</select>&nbsp;
		<select name="ClassID" ID="ClassID">
		<option value="">所有栏目</option>
		<%=ShowClass_Option(ChannelID,0,2,3)%>
		</select>&nbsp;
		<select name="SpecialID" ID="SpecialID">
		<%=ShowSpecial_Option(ChannelID,0,1)%>
		</select>&nbsp;
		<select name="Passed" ID="Passed">
		<option value="All">资料选项</option>
		<option value="<%=FalseType%>">未审<%=Cl.Channel_Setting(2)%></option>
		<option value="<%=TrueType%>">已审<%=Cl.Channel_Setting(2)%></option>
		</select>&nbsp;
		<input name="OnTop" type="checkbox" value="True" <%if OnTop then%>checked<%end if%>>顶&nbsp;<input name="Elite" type="checkbox" value="True" <%if Elite then%>checked<%end if%>>荐&nbsp;<input name="Hot" type="checkbox" value="True" <%if Hot then%>checked<%end if%>>热&nbsp;
		<input type="text" name="keyword"  size="20" value="<%=keyword%>" maxlength="50" onFocus="this.select();">&nbsp;
		<input type="submit" name="Submit"  value=" 搜索 "></td>
	</tr>
	</form></table>
    </td>
  </tr>
<%if Action="Special" then%>
  <tr class="tdbg"> 
    <td width="70" height="30"><strong>专题选项：</strong></td>
    <td>
	<%if SpecialID=0 then
	%>
	<a href="<%=FileName%>&SpecialID=0&Passed=<%=Passed%>"><font color=red><b>所有专题</b></font></a><%
	else
	%>
	<a href="<%=FileName%>&SpecialID=0&Passed=<%=Passed%>">所有专题</a><%
	end if
	%>&nbsp;|&nbsp;<%=ShowRootSpecial(ChannelID,SpecialID)%>
	</td>
  </tr>
<%else%>
  <tr class="tdbg"> 
    <td width="70" height="30"><strong>栏目选项：</strong></td>
    <td>
	<%if ClassID=0 then%>
	<a href="<%=FileName%>&ClassID=0&Passed=<%=Passed%>"><font color=red><b>所有栏目</b></font></a><%
	else
	%>
	<a href="<%=FileName%>&ClassID=0&Passed=<%=Passed%>">所有栏目</a><%
	end if
	%>&nbsp;|&nbsp;<%=ShowRootClass(ChannelID,RootID)%>
	</td>
  </tr>
<%
end if
if ParentID>0 or Child>0 then
%>
  <tr class="tdbg">
    <td width="70" height="30"><strong>子 栏 目：</strong></td>
    <td><%=sPath%><%=ShowManageChild(ChannelID,ClassID)%></td>
  </tr>
<%
end if
%>
</table>
<script language="JavaScript" type="text/javascript">
CheckSel('Field','<%=strField%>');
CheckSel('ClassID','<%=ClassID%>');
CheckSel('SpecialID','<%=SpecialID%>');
CheckSel('Passed','<%=Passed%>');
</script>
<%
	sql="select S.SoftID,S.ClassID,C.ClassName,S.SoftName,S.SoftVersion,S.Author,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.SoftSize,S.OnTop,S.Hot,S.Elite,S.Passed,S.Stars,S.SoftLevel,S.SoftPoint,S.IsHtml,S.HtmlFileUrl,NoPass,Censor,CensorTime from Cl_Soft S Inner Join Cl_Class C On S.ClassID=C.ClassID where S.ChannelID="&ChannelID&" "
	Select Case Action
	Case "RecycleBin"
		sql=sql & " and (S.NoPass=True or S.Deleted=True)"
	Case "NoPass"
		sql=sql & " and S.NoPass=True and S.Deleted=False"
	Case else
		sql=sql & " and S.NoPass=False and S.Deleted=False"
	end Select
	if Passed<>"All" then sql=sql & " and S.Passed=" & Passed
	if ClassID>0 then
		if Child>0 then
			sql=sql & " and S.ClassID in (" & arrChildID & ")"
		else
			sql=sql & " and S.ClassID=" & ClassID
		end if
	elseif Not Cl.TrueChannelPurview_U(2,ChannelID) and ManageType<>"MyInfo" then
		dim arrIDStr,TempID
		arrIDStr=","
		if Action="Check" then
			if Cl.User_Info(39)<>"" then
				TempID = Split(Cl.User_Info(39),",")
				for i=0 to ubound(TempID)
					set tClass=Cl.Execute("select arrChildID From Cl_Class where ChannelID="&ChannelID&" and ClassID=" & Cl.ChkClng(TempID(i)))
					if Not (tClass.bof and tClass.eof) then
						arrIDStr=arrIDStr & "," & tClass(0)
					End if
					tClass.Close : Set tClass=Nothing
				Next
			end if
			if Cl.User_Info(38)<>"" then
				TempID = Split(Cl.User_Info(38),",")
				for i=0 to ubound(TempID)
					set tClass=Cl.Execute("select arrChildID From Cl_Class where ChannelID="&ChannelID&" and ClassID=" & Cl.ChkClng(TempID(i)))
					if Not (tClass.bof and tClass.eof) then
						arrIDStr=arrIDStr & "," & tClass(0)
					End if
					tClass.Close : Set tClass=Nothing
				Next
			End if
		else
			if Cl.User_Info(39)<>"" then
				TempID = Split(Cl.User_Info(39),",")
				for i=0 to ubound(TempID)
					set tClass=Cl.Execute("select arrChildID From Cl_Class where ChannelID="&ChannelID&" and ClassID=" & Cl.ChkClng(TempID(i)))
					if Not (tClass.bof and tClass.eof) then
						arrIDStr=arrIDStr & "," & tClass(0)
					End if
					tClass.Close : Set tClass=Nothing
				Next
			end if
		end if
		TempID=Empty
		if arrIDStr="," then
			sql=sql & " and S.ClassID=0"
		else
			sql=sql & " and S.ClassID in (" & Replace(arrIDStr,",,","") & ")"
		end if
	end if
	if Action="Special" then
		if SpecialID>0 then
			sql=sql & " and S.SpecialID Like '%," & SpecialID & ",%'"
		else
			sql=sql & " and S.SpecialID<>'0'"
		end if
	end if
	if ManageType="MyInfo" then
		sql=sql & " and S.Editor='" & Cl.User_Info(5) & "' "
	else
		if keyword<>"" and keyword<>"关键字" then
			keyword = Cl.ReplaceBadChar(keyword&"")
			select case strField
			case "ID"
				sql=sql & " and S.SoftID = "&Cl.ChkClng(keyword)&" "
			case "Title"
				sql=sql & " and S.SoftName like '%" & keyword & "%' "
			case "Keyword"
				sql=sql & " and S.Keyword like '%" & keyword & "%' "
			case "Intro"
				sql=sql & " and S.SoftIntro like '%" & keyword & "%' "
			case "Author"
				sql=sql & " and S.Author like '%" & keyword & "%' "
			case "Editor"
				sql=sql & " and S.Editor='" & keyword & "' "
			case "Censor"
				sql=sql & " and S.Censor='" & keyword & "' "
			case "Point"
				sql=sql & " and S.SoftPoint <= "&Cl.ChkClng(keyword)&" "
			case else
				sql=sql & " and S.SoftName like '%" & keyword & "%' "
			end select
		end if
	end if
	'==================
	If OnTop then sql=sql & " and S.Ontop=True "
	If Elite then sql=sql & " and S.Elite=True "
	If Hot then sql=sql & " and S.Hot=True "
	'===================
	sql=sql & " order by S.UpdateTime desc,S.SoftID desc"
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="22" align="right">
	<select name='JumpClass' id="JumpClass" onchange="if(this.options[this.selectedIndex].value!=''){location='<%=FileName & "&ClassID="%>'+this.options[this.selectedIndex].value;}">
      <option value='' selected>跳转栏目至…</option>
	  <%=ShowClass_Option(ChannelID,0,2,1)%>
	</select>
    &nbsp;</td>
  </tr>
</table>
<%
	Set rsList= Server.CreateObject("ADODB.Recordset")
	OpenConn : rsList.open sql,Conn,1,1
	if rsList.eof and rsList.bof then
		TotalPut=0
		if Child=0 then
			response.write "<p align='center'><br />没有任何"&Cl.Channel_Setting(2)&"！</p>"
		else
			response.write "<p align='center'><br />此栏目下没有任何"&Cl.Channel_Setting(2)&"！</p>"
		end if
		rsList.close:set rsList=Nothing 
	else
		TotalPut=rsList.recordcount
		if (TotalPut mod MaxPerPage)=0 then
			TotalPages = TotalPut \ MaxPerPage
		else
			TotalPages = TotalPut \ MaxPerPage + 1
		end if
		if CurrentPage > TotalPages then CurrentPage=TotalPages
		if CurrentPage < 1 then CurrentPage=1
		rsList.move (CurrentPage-1)*MaxPerPage
		SQL=rsList.GetRows(MaxPerPage)
		rsList.close:set rsList=Nothing
%>
	<table class="border" border="0" cellspacing="1" cellpadding="0" align="center">
		<form name="myform" method="get" action="User_InfoDel.asp" onsubmit="return ConfirmDel();">
          <tr class="title" height="22"> 
            <td height="22" width="30" align="center"><strong>选中</strong></td>
            <td width="40" align="center"  height="22"><strong>ID</strong></td>
            <td align="center" ><strong>名称及版本</strong></td>
            <td width="80" align="center"><strong><%=Cl.Channel_Setting(2)%>添加</strong></td>
            <td width="80" align="center"><strong><%=Cl.Channel_Setting(2)%>审核</strong></td>
            <td width="60" align="center"><strong>下载次数</strong></td>
            <td width="80" align="center"><strong><%=Cl.Channel_Setting(2)%>属性</strong></td>
            <td width="150" align="center"><strong>操作</strong></td>
          </tr>
          <%for i=0 to Ubound(SQL,2)%>
          <tr class="tdbg" onMouseOut="this.className='tdbg'" onMouseOver="this.className='tdbg2'"> 
            <td width="30" align="center"><input name="InfoID" type="checkbox" onclick="unselectall()" id="InfoID" value="<%=SQL(0,i)%>"></td>
            <td width="40" align="center"><%=SQL(0,i)%></td>
            <td> <%
			if SQL(1,i)<>ClassID then
				response.write "<a href='"&FileName&"&ClassID=" & SQL(1,i) & "'><font color='#0000FF'>[" &SQL(2,i)& "]</font></a>&nbsp;"
			end if
			response.write "<a href='User_Soft.Asp?Action=Modify&ChannelID="&ChannelID&"&SoftID=" & SQL(0,i) & "'"
			response.write " title='" & Cl.Channel_Setting(2) & "名称：" & SQL(3,i) & vbcrlf & Cl.Channel_Setting(2) & "版本：" & SQL(4,i) & vbcrlf & Cl.Channel_Setting(2)&"作者：" & SQL(5,i) & vbcrlf & "更新时间：" & SQL(7,i) & vbcrlf
			response.write "下载次数：" & SQL(9,i) & vbcrlf & "关 键 字：" & SQL(6,i) & vbcrlf & "推荐等级：" & String(SQL(15,i),"★") &  vbcrlf & "下载等级：" & Cl.GetUserGroupName(SQL(16,i)) & vbcrlf & "下载"&Cl.Web_Setting(28)&"：" & SQL(17,i) & vbcrlf & Cl.Channel_Setting(2)&"大小：" & Cl.GetSize(SQL(16,i),"k")
			response.write "'>" & SQL(3,i) & "&nbsp;&nbsp;" & SQL(4,i) & "</a>"
			%></td>
            <td width="80" align="center"><a href="<%=FileName%>&Passed=All&Field=Editor&Keyword=<%=SQL(8,i)%>"><%=SQL(8,i)%></a><br />(<font color=#0000ff><%=formatdatetime(SQL(7,i),2)%></font>)</td>
            <td width="80" align="center"><%
			if SQL(14,i)=True then
				response.write "<a href='"&FileName&"&Passed=All&Field=Censor&Keyword="&SQL(21,i)&"'>" & SQL(21,i) & "</a><br />(<font color=#0000ff>" & SQL(22,i) & "</font>)"
			else
				if SQL(20,i)=False then
				response.write "<a href='User_Property.asp?ChannelID="&ChannelID&"&Action=SetPassed&InfoID=" & SQL(0,i) & "' title='点击审核通过'><font color=""#ff0033"">审核通过</font></a>&nbsp;<a href='User_NoPass.asp?ChannelID="&ChannelID&"&InfoID=" & SQL(0,i) & "'>退回</a>"
				else
				response.write "<font color=""#ff0033"">已退回</font>("&SQL(21,i)&")"
				end if
			end if%></td>
            <td width="60" align="center"><%=SQL(9,i)%></td>
            <td width="80" align="center"><%
			if SQL(11,i)=True then
				response.Write "<font color=blue>顶</font> "
			else
				response.write "&nbsp;&nbsp;&nbsp;"
			end if
			if SQL(12,i)=True then
				response.write "<font color=red>热</font> "
			else
				response.write "&nbsp;&nbsp;&nbsp;"
			end if
			if SQL(13,i)=True then
				response.write "<font color=green>荐</font> "
			else
				response.write "&nbsp;&nbsp;&nbsp;"
			end if
			if SQL(18,i)=True then
				response.write "<font color=blue>H</font>"
			else
				response.write "&nbsp;&nbsp;"
			end if
			%> </td>
            <td width="150" align="lift"> &nbsp;<% Call ManegeOption %></td>
          </tr>
          <%
	Next
%>
  <tr class=tdbg>
    <td height="30" colspan=2><input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">选中所有</td>
    <td colspan=6><% Call ManegeOptionBottom() %></td>
  </tr>
</form>
</table>
<%
		'==================
		Response.write Cl.ShowPage(strFileName & "&OnTop="&OnTop&"&Hot="&Hot&"&Elite="&Elite&"&Passed="&Passed,TotalPut,MaxPerPage,Cl.Channel_Setting(3),Cl.Channel_Setting(2))
		'==================
	end if
%>
<br />
<br /><b>说明：</b><br />&nbsp;&nbsp;&nbsp;&nbsp;
属性中的各项含义：<font color=blue>顶</font>---固顶，<font color=red>热</font>---热门，<font color=green>荐</font>---推荐，<font color=blue>图</font>---图片，<font color=blue>H</font>---已生成HTML文件
<br /><br />
<%
SQL=Empty
End Sub

Sub ManegeOption()
	Select Case Action
	Case "Check"
	  	If SQL(14,i)=False Then
        	response.write "<a href='User_Property.asp?ChannelID="&ChannelID&"&Action=SetPassed&InfoID=" & SQL(0,i) & "'>通过审核</a>"
			response.write "&nbsp;<a href='User_NoPass.asp?ChannelID="&ChannelID&"&InfoID=" & SQL(0,i) & "'>退回</a>"
		Else
	        response.write "<a href='User_Property.asp?ChannelID="&ChannelID&"&Action=CancelPassed&InfoID=" & SQL(0,i) & "'>取消通过</a>"
      	End If
		response.write "&nbsp;&nbsp;<a href='User_Soft.Asp?Action=Modify&ChannelID="&ChannelID&"&SoftID=" & SQL(0,i) &"'>修改</a>"
		response.write "&nbsp;<a href='User_Property.asp?ChannelID="&ChannelID&"&Action=deleted&InfoID=" & SQL(0,i) & "'>删除</a>"
	Case "RecycleBin"
		response.write "<a href=""User_InfoDel.asp?ChannelID="&ChannelID&"&Action=ConfirmDel&InfoID="&SQL(0,i)&""" onclick=""return confirm('确定要彻底删除此"&Cl.Channel_Setting(2)&"吗？本操作将不可恢复！');"">彻底删除</a> &nbsp;&nbsp; <a href=""User_InfoDel.asp?ChannelID="&ChannelID&"&Action=Restore&InfoID="&SQL(0,i)&""">还原</a>"
	'Case "Special"

	Case "Make"
		if SQL(14,i)=True then
			response.write "<a href='User_Create_Soft.asp?ChannelID="&ChannelID&"&Action=CreateSoft&InfoID=" & SQL(0,i) & "'>生成</a>&nbsp;"
		else
			response.write "生成&nbsp; "
		end if
		if SQL(18,i)=True then	
			response.write "<a href='User_Create_Soft.asp?ChannelID="&ChannelID&"&Action=DelSoftHTML&InfoID=" & SQL(0,i) & "'>删除HTML</a>&nbsp;"
			response.write "<a href='" & Cl.WebDir & SQL(18,i) & "' target='_blank'>浏览HTML</a>&nbsp;"
		end if
	Case Else
       	response.write "<a href='User_Soft.Asp?Action=Modify&ChannelID="&ChannelID&"&SoftID=" & SQL(0,i) &"'>改</a>&nbsp;"
        response.write "<a href='User_InfoDel.asp?ChannelID="&ChannelID&"&InfoID=" & SQL(0,i) & "&Action=Del' onclick='return ConfirmDel();'>删</a>&nbsp;"
		response.write "<a href='User_InfoMove.asp?ChannelID="&ChannelID&"&InfoID=" & SQL(0,i) & "'>移</a>&nbsp;"
		if SQL(11,i)=False then	
			response.write "<a href='User_Property.asp?ChannelID="&ChannelID&"&InfoID=" & SQL(0,i) & "&Action=SetOnTop'>固顶</a>&nbsp;"
		else
			response.write "<a href='User_Property.asp?ChannelID="&ChannelID&"&InfoID=" & SQL(0,i) & "&Action=CancelOnTop'>解固</a>&nbsp;"
		end if
        if SQL(13,i)=False then	
			response.write "<a href='User_Property.asp?ChannelID="&ChannelID&"&InfoID=" & SQL(0,i) & "&Action=SetElite'>设为推荐</a>"
		else
			response.write "<a href='User_Property.asp?ChannelID="&ChannelID&"&InfoID=" & SQL(0,i) & "&Action=CancelElite'>取消推荐</a>"
		end if
	End Select
End Sub

Sub ManegeOptionBottom()
	Response.write "<input name=""ChannelID"" type=""hidden"" id=""ChannelID"" value="""&ChannelID&""">"
	Response.write "<input name=""Action"" type=""hidden"" id=""Action"" value=""Del"">"
	Select Case Action
	Case "Check"
		if Passed=FalseType then
			Response.write "<input name=""submit"" type=""submit"" value=""审核选定的"&Cl.Channel_Setting(2)&""" onClick=""document.myform.Action.value='SetPassed'"">"
			Response.write "&nbsp;&nbsp;<input name=""submit"" type=""submit"" value=""删除选定的"&Cl.Channel_Setting(2)&""" onClick=""document.myform.Action.value='Del'"">"
		else
			Response.write "<input name=""submit"" type=""submit"" value=""取消审核选定的"&Cl.Channel_Setting(2)&""" onClick=""document.myform.Action.value='CancelPassed'"">"
			Response.write "&nbsp;&nbsp;<input name=""submit"" type=""submit"" value=""删除选定的"&Cl.Channel_Setting(2)&""" onClick=""document.myform.Action.value='Del'"">"
		end if
	Case "RecycleBin"
		Response.write "<input name=""submit1"" type=""submit"" id=""submit1"" onClick=""document.myform.Action.value='ConfirmDel'"" value=""彻底删除选定的"&Cl.Channel_Setting(2)&""">"
		Response.write "<input type=""submit"" name=""Submit2"" value=""清空回收站""  onClick=""document.myform.Action.value='ClearRecyclebin'"">"
		Response.write "&nbsp;&nbsp;&nbsp;&nbsp;<input name=""Submit3"" type=""submit"" id=""Submit3""  onClick=""document.myform.Action.value='Restore'"" value=""还原选定的"&Cl.Channel_Setting(2)&""">"
		Response.write "<input name=""Submit4"" type=""submit"" id=""Submit4"" onClick=""document.myform.Action.value='RestoreAll'"" value=""还原所有"&Cl.Channel_Setting(2)&""">"
	Case "Special"
		Response.write "<input name=""submit"" type=""submit"" value=""将选定的"&Cl.Channel_Setting(2)&"从所属专题中删除"" onClick=""document.myform.Action.value='DelFromSpecial'"">"
		Response.write "&nbsp;&nbsp;&nbsp;&nbsp; <input type=""submit"" name=""Submit"" value=""将选定的"&Cl.Channel_Setting(2)&"移动到"" onClick=""document.myform.Action.value='MoveToSpecial'"">"
		Response.write "<select name=""SpecialID"">"&ShowSpecial_Option(ChannelID,SpecialID,1)&"</select>"
	Case "Make"
		'Response.write "<br />"
		Response.write "<input name=""submit1"" type=""submit"" id=""submit1"" onClick=""document.myform.Action.value='CreateSoft'"" value=""生成选定"&Cl.Channel_Setting(2)&""">"
		Response.write "<input name=""Submit4"" type=""submit"" id=""Submit4"" onClick=""document.myform.Action.value='DelSoftHTML'"" value=""删除选定"&Cl.Channel_Setting(2)&"HTML"">"
		Response.write "&nbsp;&nbsp;&nbsp;&nbsp;<input name=""Submit3"" type=""submit"" id=""Submit3""  onClick=""document.myform.Action.value='CreateSoftAll'"" value=""生成所有"&Cl.Channel_Setting(2)&""">"
		Response.write "<input name=""Submit4"" type=""submit"" id=""Submit4"" onClick=""document.myform.Action.value='DelSoftHTMLAll'"" value=""删除所有"&Cl.Channel_Setting(2)&"HTML"">"
	Case Else
		Response.write "<input name=""submit"" type=""submit"" value=""删除选定"&Cl.Channel_Setting(2)&""" onClick=""document.myform.Action.Value='Del'"">"
		'if Clng(Cl.User_Purview(0))=1 or Clng(Cl.User_Purview(2))=1 then
			Response.write "&nbsp;&nbsp; <input type=""submit"" name=""Submit"" value=""批量移动到栏目..."" onClick=""document.myform.Action.value='MoveMore'"">"
			Response.write "&nbsp;&nbsp; <input type=""submit"" name=""Submit"" value=""移动到专题："" onClick=""document.myform.Action.value='MoveToSpecial'"">"
			Response.write "<select name=""SpecialID"">"&ShowSpecial_Option(ChannelID,SpecialID,1)&"</select>"
		'end if
	End Select
End Sub

Sub AddMain()
	Dim strCusTom
	Dim sSoftType,sSoftLanguage,sCopyrightType,sOperatingSystem,sAuthor,sKeyword
	Dim sSoftTypeV,sSoftLanguageV,sCopyrightTypeV,sOperatingSystemV,sAuthorV,sKeywordV
	strCusTom		= Split(Cl.Channel_Setting(21),"@@@")
	sSoftType		= Split(strCusTom(0),"$")
	sSoftLanguage	= Split(strCusTom(1),"$")
	sCopyrightType	= Split(strCusTom(2),"$")
	sOperatingSystem= Split(strCusTom(3),"$")
	sAuthor			= Split(strCusTom(4),"$")
	sKeyword		= Split(strCusTom(5),"$")
	sSoftTypeV		= Split(Cl.GotTopic(strCusTom(0),60),"$")
	sSoftLanguageV	= Split(Cl.GotTopic(strCusTom(1),60),"$")
	sCopyrightTypeV	= Split(Cl.GotTopic(strCusTom(2),60),"$")
	sOperatingSystemV=Split(Cl.GotTopic(strCusTom(3),60),"$")
	sAuthorV		= Split(Cl.GotTopic(strCusTom(4),60),"$")
	sKeywordV		= Split(Cl.GotTopic(strCusTom(5),60),"$")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加<%=Cl.Channel_Setting(2)%></title>
<link rel="stylesheet" type="text/css" href="../Skins/User_Style.Css">
<script src="../Inc/Js/Admin.js" type="text/javascript"></script>
<script language = "JavaScript">
function CheckForm()
{
  document.myform.SoftIntro.value=editor.Editor.document.body.innerHTML;
  if (document.myform.ClassID.value=="0")
  {
    alert("<%=Cl.Channel_Setting(2)%>所属栏目为外部栏目或您无此栏目添加权限！");
	document.myform.ClassID.focus();
	return false;
  }
  if (document.myform.SoftName.value=="")
  {
    alert("<%=Cl.Channel_Setting(2)%>名称不能为空！");
	document.myform.SoftName.focus();
	return false;
  }
  if (document.myform.Author.value=="")
  {
    alert("<%=Cl.Channel_Setting(2)%>开发商不能为空！");
	document.myform.Author.focus();
	return false;
  }
  if (document.myform.OperatingSystem.value=="")
  {
    alert("系统平台不能为空！");
	document.myform.OperatingSystem.focus();
	return false;
  }
  if (document.myform.Keyword.value=="")
  {
    alert("关键字不能为空！");
	document.myform.Keyword.focus();
	return false;
  }
  if (document.myform.SoftIntro.value=="")
  {
    alert("<%=Cl.Channel_Setting(2)%>简介不能为空！");
	document.myform.SoftIntro.focus();
	return false;
  }
  if (document.myform.UseServer.checked==true)
  {
	  if(document.myform.FileAddress.value=="")
	  {
		alert("<%=Cl.Channel_Setting(2)%>文件地址不能为空！");
		document.myform.FileAddress.focus();
		return false;
	  }
  }
  else
  {
	if(document.myform.DownloadUrl.length==0)
	{
	alert("<%=Cl.Channel_Setting(2)%>下载地址不能为空！");
	document.myform.DownloadUrl.focus();
	return false;
	}
	for(var i=0;i<document.myform.DownloadUrl.length;i++){
      if (document.myform.DownloadUrls.value=="") document.myform.DownloadUrls.value=document.myform.DownloadUrl.options[i].value;
      else document.myform.DownloadUrls.value+="@@@"+document.myform.DownloadUrl.options[i].value;
	}
  }
  for(var i=0;i<document.myform.TempUploadFiles.length;i++){
      if (document.myform.UploadFiles.value=="") document.myform.UploadFiles.value=document.myform.TempUploadFiles.options[i].value;
      else document.myform.UploadFiles.value+="@@@"+document.myform.TempUploadFiles.options[i].value;
  }
  return true;
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form method="POST" name="myform" onSubmit="return CheckForm();" action="User_Soft.asp" target="_self">
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
    <tr class="title">
      <td height="22" align="center"><b>添加<%=Cl.Channel_Setting(2)%></b></td>
    </tr>
    <tr align="center">
      <td>
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>所属栏目：</strong></td>
            <td colspan="3"> 
			<select name="ClassID">
			<option value="0" selected>请选择<%=Cl.Channel_Setting(2)%>栏目</option>
               <%=ShowClass_Option(ChannelID,ClassID,0,4)%>
            </select>&nbsp;&nbsp;
			<font color="#FF0000"><strong>注意：</strong></font><font color="#0000FF">不能指定为外部栏目</font>
            </td>
          </tr>
          <tr class="tdbg">
            <td width="100" align="right"><strong>所属专题：</strong></td>
            <td colspan="3">
			<select name="SpecialID" id="SpecialID" multiple style="height:90px;width:200px;">
			<%=ShowSpecial_Option(ChannelID,0,1)%>
			</select>&nbsp;&nbsp
			  <font color="#FF0000"><strong>说明：</strong></font><font color="#0000FF">按“Shift”“Ctrl”可多选</font>
			</td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong><%=Cl.Channel_Setting(2)%>名称：</strong></td>
            <td colspan="3"><input name="SoftName" type="text" id="SoftName" value="" size="80" maxlength="250"> <font color="#FF0000">*</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"></td>
            <td colspan="3"><strong>版本：</strong><input name="SoftVersion" type="text" id="SoftVersion" size="30" maxlength="100">&nbsp;<input name="Check" type="button" id="Check" value="检测名称" onClick="CheckTitle('SoftName','<%=ChannelID%>');"></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong><%=Cl.Channel_Setting(2)%>类别：</strong></td>
            <td colspan="3"><input name="SoftType" type="text" id="SoftType" size="80" maxlength="80" value="<%if ubound(sSoftTypeV)>-1 then response.write sSoftTypeV(0)%>"> <font color="#FF0000"> *</font><br />
			<font color="#808080">类别选择：</font><font color=#0000FF><%for i=0 to Ubound(sSoftTypeV)
			Response.write "<a href=""javascript:ToValue('','SoftType','"&sSoftTypeV(i)&"')"">"&sSoftType(i)&"</a>"
			if i<Ubound(sSoftType) then Response.write "/"
			next%></font>&nbsp;&nbsp;<font color=#66666>more...</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong><%=Cl.Channel_Setting(2)%>语言：</strong></td>
            <td colspan="3"><input name="SoftLanguage" type="text" id="SoftLanguage" value="<%if ubound(sSoftLanguageV)>-1 then response.write sSoftLanguageV(0)%>" size="80" maxlength="80"> <font color="#FF0000"> *</font><br />
			<font color="#808080">语言选择：</font><font color="#0000FF"><%for i=0 to Ubound(sSoftLanguageV)
			Response.write "<a href=""javascript:ToValue('','SoftLanguage','"&sSoftLanguageV(i)&"')"">"&sSoftLanguage(i)&"</a>"
			if i<Ubound(sSoftLanguageV) then Response.write "/"
			next%></font>&nbsp;&nbsp;<font color=#66666>more...</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>授权形式：</strong></td>
            <td colspan="3"><input name="CopyrightType" type="text" id="CopyrightType" value="<%if ubound(sCopyrightTypeV)>-1 then response.write sCopyrightTypeV(0)%>" size="80" maxlength="80"> <font color="#FF0000"> *</font><br />
			<font color="#808080">授权形式：</font><font color="#0000FF"><%for i=0 to Ubound(sCopyrightTypeV)
			Response.write "<a href=""javascript:ToValue('','CopyrightType','"&sCopyrightTypeV(i)&"')"">"&sCopyrightType(i)&"</a>"
			if i<Ubound(sCopyrightTypeV) then Response.write "/"
			next%></font>&nbsp;&nbsp;<font color=#66666>more...</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong><%=Cl.Channel_Setting(2)%>平台：</strong></td>
            <td colspan="3"><input name="OperatingSystem" type="text" id="OperatingSystem" value="<%dim ii :ii=ubound(sOperatingSystemV): if ii>3 then ii=3 :if ii>-1 then response.write sOperatingSystemV(0): if ii>0 then:for i=1 to ii :response.write "/"&sOperatingSystemV(i) :next : end if%>" size="80" maxlength="100"> <font color="#FF0000">*</font><br />
			<font color="#808080">平台选择：</font><font color="#0000FF"><%for i=0 to Ubound(sOperatingSystemV)
			Response.write "<a href=""javascript:ToValue('add','OperatingSystem','/"&sOperatingSystemV(i)&"')"">"&sOperatingSystem(i)&"</a>"
			if i<Ubound(sOperatingSystemV) then Response.write "/"
			next%></font>&nbsp;&nbsp;<font color=#66666>more...</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>开 发 商：</strong></td>
            <td colspan="3"><input name="Author" type="text" id="Author" size="30" maxlength="100" value="<%if ubound(sAuthorV)>-1 then response.write sAuthorV(0)%>"> <font color="#FF0000">*</font>&nbsp;&nbsp;&nbsp;信&nbsp;箱：<input name="AuthorEmail" type="text" id="AuthorEmail" size="36" maxlength="100"><br />
			<font color="#808080">开 发 商：</font><font color="#0000FF"><%for i=0 to Ubound(sAuthorV)
			Response.write "<a href=""javascript:ToValue('','Author','"&sAuthorV(i)&"')"">"&sAuthor(i)&"</a>"
			if i<Ubound(sAuthorV) then Response.write "/"
			next%></font>&nbsp;&nbsp;<font color=#66666>more...</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>相关链接：</strong></td>
            <td colspan="3">&nbsp;开发商主页：<input name="AuthorHomepage" type="text" id="CopyFrom2" value="http://" size="67" maxlength="100"><br />&nbsp;演示&nbsp;&nbsp;地址：<input name="DemoUrl" type="text" id="DemoUrl" value="http://" size="67" maxlength="200">
		   </td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>关 键 字：</strong></td>
            <td colspan="3"><input name="Keyword" type="text"
           id="Keyword" size="80" maxlength="255" Value="<%if ubound(sKeywordV)>-1 then response.write sKeywordV(0)%>"> <font color="#FF0000">*</font><br />
			<font color="#808080">关 键 字：</font><font color="#0000FF"><%for i=0 to Ubound(sKeywordV)
			Response.write "<a href=""javascript:ToValue('add','Keyword','|"&sKeywordV(i)&"')"">"&sKeyword(i)&"</a>"
			if i<Ubound(sKeywordV) then Response.write "/"
			next%></font>&nbsp;&nbsp;<font color=#66666>more...</font><br /> 
              <font color="#0000FF">用来查找相关<%=Cl.Channel_Setting(2)%>，可输入多个关键字，中间用<font color="#FF0000">“|”</font>隔开。不能出现&quot;&quot;'*?,.()等字符。</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong><%=Cl.Channel_Setting(2)%>图片：</strong></td>
            <td colspan="3"><input name="SoftPicUrl" type="text" id="SoftPicUrl" size="80" maxlength="200" onclick="doPreview('SoftPicUrl','<%=Cl.WebDir%>','<%=Cl.UploadDir%>')"><br />
			<iframe style="top:2px" ID="UpFile" src="../User/Upload.asp?ID=<%=ChannelID%>&Type=0&Obj=SoftPicUrl&TObj=TempUploadFiles" frameborder=0 scrolling=no width="530" height="25"></iframe>
			</td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>服 务 器：</strong></td>
            <td colspan="3">
				 <input type="checkbox" name="UseServer" ID="UseServer" value="yes" onclick="chkUseServer();"> 启用服务器</td>
          </tr>
          <tr class="tdbg" ID="UseServerM" style="display:none"> 
            <td width="100" align="right"><strong>文件地址：</strong></td>
            <td colspan="3">
				<input name="FileAddress" type="text" id="FileAddress" size="55"> <font color="#FF0000">*</font>
				<font color="#888888">下载地址 = 服务器地址+文件地址</font>
				<br />
				<iframe style="top:2px" ID="UpFile" src="../User/Upload.asp?ID=<%=ChannelID%>&Type=3&Obj=FileAddress&Obj2=SoftSize&TObj=TempUploadFiles" frameborder=0 scrolling=no width="530" height="25"></iframe><br /><font color="#888888">如果<%=Cl.Channel_Setting(2)%>比较大（5M以上），建议使用ASPUpLoad上传组件。</font>
				</td>
          </tr>
          <tr class="tdbg" ID="NoUseServerM">
            <td width="100" align="right"><strong>下载地址：</strong></td>
            <td colspan="3">
				<input type="hidden" name="DownloadUrls" value="">
				<select name="DownloadUrl" style="width:95%;height:150" size="2" ondblclick="ModifyUrl('下载地址','DownloadUrl');"></select> <font color="#FF0000">*</font><br />
				<input type="button" name="addurl" value="添加下载地址" onclick="AddUrl('下载地址','DownloadUrl');">
				<input type="button" name="addurl" value="修改当前地址" onclick="ModifyUrl('下载地址','DownloadUrl');">
				<input type="button" name="addurl" value="删除当前地址" onclick="DelUrl('下载地址','DownloadUrl');">
				<input type="button" name="upurl" value="↑" onclick="UpUrl('下载地址','DownloadUrl');">
				<input type="button" name="downurl" value="↓" onclick="DownUrl('下载地址','DownloadUrl');"><br />
				<iframe style="top:2px" ID="UpFile" src="../User/Upload.asp?ID=<%=ChannelID%>&Type=3&Obj=DownLoadUrl&Obj2=SoftSize&TObj=TempUploadFiles" frameborder=0 scrolling=no width="530" height="25"></iframe><br /><font color="#888888">如果<%=Cl.Channel_Setting(2)%>比较大（5M以上），建议使用ASPUpLoad上传组件。</font>
				</td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>已 上 传：</strong></td>
            <td><select name="TempUploadFiles" style="width:500;height:132" size="2" onclick="doPreview('TempUploadFiles','<%=Cl.WebDir%>','<%=Cl.UploadDir%>')"></select><br />
				<input type="button" name="SetDefaultPic" value="设为首页图片" onclick="SetPicUrl('TempUploadFiles','SoftPicUrl');">
				<input type="button" name="InsEditor" value="插入编辑器" onclick="InsertEditor('TempUploadFiles','<%=Cl.WebDir%>','<%=Cl.UploadDir%>');">
				<input type="hidden" name="UploadFiles" value="">
			</td>
            <td width=180>
				<fieldset style="height:100%">
				<legend>预览</legend>
				<table border=0 cellpadding=0 cellspacing=1 width="180" height="150" valign=top>
				<tr><td align=center valign=middle id=tdPreview height="100%">

				</td></tr>
				</table>
				</fieldset>
			</td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong><%=Cl.Channel_Setting(2)%>大小：</strong></td>
            <td colspan="3"><strong><input name="SoftSize" type="text" id="SoftSize" size="20" maxlength="18"><input name="SizeUnit" type="radio" id="SizeUnit" value="k" checked>KB&nbsp;<input name="SizeUnit" type="radio" id="SizeUnit" value="m">MB&nbsp;<input name="SizeUnit" type="radio" id="SizeUnit" value="g">GB</strong> <font color="#FF0000">*</font>&nbsp;&nbsp;&nbsp;&nbsp;<strong>解压密码：</strong> 
              <input name="DecompressPassword" type="text" id="DecompressPassword" size="38" maxlength="100"></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right" valign="middle"><strong><%=Cl.Channel_Setting(2)%>简介：</strong><br />
              支持各种UBB代码</td>
            <td colspan="3"><textarea name="SoftIntro" style="display:none"></textarea> 
			<IFRAME ID="editor" src="../Editor/Editor.asp?id=SoftIntro&style=other&cid=<%=ChannelID%>&TObj=TempUploadFiles" frameborder="0" scrolling="no" width="95%" height="350"></IFRAME>
            </td>
          </tr>
		  <%if Cl.TrueChannelPurview_U(2,ChannelID) then%>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong><%=Cl.Channel_Setting(2)%>属性：</strong></td>
            <td colspan="3"> <input name="OnTop" type="checkbox" id="OnTop" value="yes">
              固顶<%=Cl.Channel_Setting(2)%>&nbsp;&nbsp;&nbsp; <input name="Hot" type="checkbox" id="Hot" value="yes" onclick="javascript:document.myform.Hits.value=<%=Clng(Cl.Web_Setting(14))%>">
              热门<%=Cl.Channel_Setting(2)%>&nbsp;&nbsp;&nbsp; <input name="Elite" type=checkbox id="Elite" value="yes">
              推荐<%=Cl.Channel_Setting(2)%>&nbsp;&nbsp;&nbsp; <strong>评分等级：</strong> <select name="Stars" id="Stars">
                <option value="5">★★★★★</option>
                <option value="4">★★★★</option>
                <option value="3" selected>★★★</option>
                <option value="2">★★</option>
                <option value="1">★</option>
                <option value="0">无</option>
              </select> <font color="#FF0000">*</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>下载次数：</strong></td>
            <td colspan="3">本日： 
              <input name="DayHits" type="text" id="DayHits" value="0" size="10" maxlength="10"> 
              &nbsp;&nbsp;&nbsp;&nbsp;本周： 
              <input name="WeekHits" type="text" id="WeekHits" value="0" size="10" maxlength="10"> 
              &nbsp;&nbsp;&nbsp;&nbsp;本月： 
              <input name="MonthHits" type="text" id="MonthHits" value="0" size="10" maxlength="10"> 
              &nbsp;&nbsp;&nbsp;&nbsp;总计： 
              <input name="Hits" type="text" id="Hits" value="0" size="10" maxlength="10"></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>下载等级：</strong></td>
            <td colspan="3">
			<input name="SoftLevel" type="hidden" id="SoftLevel" value="5">
			<input name="SoftLevelView" type="text" id="SoftLevelView" value="<%=Cl.GetUserGroupName(5)%>" size="80" onclick="SelectUserGroup('SoftLevel');" Readonly Disabled>&nbsp;<input type="checkbox" name="GetClassPurview" value="yes" checked onclick="document.myform.SoftLevelView.disabled=this.checked">继承栏目权限<br /><font color="#0000FF">只有具有相应权限的人才能下载此<%=Cl.Channel_Setting(2)%>。</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>下载<%=Cl.Web_Setting(28)%>：</strong></td>
            <td colspan="3"><input name="SoftPoint" type="text" id="SoftPoint" value="0" size="8" maxlength="5"> <%=Cl.Web_Setting(29)%>
              &nbsp;&nbsp;&nbsp; <font color="#0000FF">如果大于0，则用户下载此<%=Cl.Channel_Setting(2)%>时将消耗相应<%=Cl.Web_Setting(28)%>。（对游客无效）</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>下载<%=Cl.Web_Setting(26)%>：</strong></td>
            <td colspan="3"><input name="SoftMoney" type="text" id="SoftMoney" value="0" size="8" maxlength="5"> <%=Cl.Web_Setting(27)%>
              &nbsp;&nbsp;&nbsp; <font color="#0000FF">如果大于0，则用户下载此<%=Cl.Channel_Setting(2)%>时将消耗相应<%=Cl.Web_Setting(26)%>。（对游客无效）</font></td>
          </tr>
          <tr class="tdbg">
            <td width="100" align="right"><strong>回扣设置：</strong></td>
            <td colspan="2">
			<%=Cl.Web_Setting(28)%>：<input name="BackPoint" type="text" id="BackPoint" value="0" size="5" maxlength="3" style="text-align: right;">&nbsp;<%=Cl.Web_Setting(29)%>＋<%=Cl.Web_Setting(28)%>的<input name="BackPointRate" type="text" id="BackPointRate" value="0" size="5" maxlength="2" style="text-align: right;">%<br />
			<%=Cl.Web_Setting(26)%>：<input name="BackMoney" type="text" id="BackMoney" value="0" size="5" maxlength="3" style="text-align: right;">&nbsp;<%=Cl.Web_Setting(27)%>＋<%=Cl.Web_Setting(26)%>的<input name="BackMoneyRate" type="text" id="BackMoneyRate" value="0" size="5" maxlength="2" style="text-align: right;">%<br /><font color="#0000FF">即当用户游览或下载此内容时，给予一定的回扣给添加者！</font>
			</td>
		  </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>录入时间：</strong></td>
            <td colspan="3"><input name="UpdateTime" type="text" id="UpdateTime" value="<%=now()%>" maxlength="50">
              时间格式为“年-月-日 时:分:秒”，如：<font color="#0000FF">2003-5-12 12:32:47</font></td>
          </tr>
		  <%end if%>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>立即发布：</strong></td>
            <td colspan="3"><input name="Passed" type="checkbox" id="Passed" value="yes" checked>
              是<font color="#0000FF">（如果选中的话将直接发布，否则审核后才能发布。）</font>&nbsp;&nbsp;<input name="NowCreate" type="checkbox" value="yes" checked>立即生成</td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  <div align="center">
    <p>
	  <input name="ChannelID" type="hidden" id="ChannelID" value="<%=ChannelID%>">
      <input name="Action" type="hidden" id="Action" value="SaveAdd">
      <input name="Add" type="submit"  id="Add" value=" 添 加 " style="cursor:hand;">
      &nbsp; 
      <input name="Cancel" type="button" id="Cancel" value=" 取 消 " onClick="window.location.href='User_Soft.Asp?ChannelID=<%=ChannelID%>'" style="cursor:hand;">
    </p>
  </div>
</form>
<script type="text/javascript">
<!--
function chkUseServer()
{
	if (document.myform.UseServer.checked==true)
	{
		document.getElementById('UseServerM').style.display="";
		document.getElementById('NoUseServerM').style.display="none";
	}
	else
	{
		document.getElementById('UseServerM').style.display="none";
		document.getElementById('NoUseServerM').style.display="";
	}
}
//-->
</script>
<%
End Sub

Sub ModifyMain()
	Dim rsInfo
	Dim strCusTom
	Dim sSoftType,sSoftLanguage,sCopyrightType,sOperatingSystem,sAuthor,sKeyword
	Dim sSoftTypeV,sSoftLanguageV,sCopyrightTypeV,sOperatingSystemV,sAuthorV,sKeywordV
	FoundErr		= False
	SoftID			= Cl.ChkClng(request("SoftID"))
	if SoftID=0 then User_ShowErr("<li>请指定要修改的软件ID</li>")
	sql="select * from Cl_Soft where SoftID=" & SoftID & ""
	Set rsInfo= Cl.Execute(sql)
	if rsInfo.bof and rsInfo.eof then
		User_ShowErr("<br /><li>找不到软件</li>")
	else
		ClassID=rsInfo("ClassID")
		set tClass=Cl.Execute("select ClassName,RootID,ParentID,Depth,ParentPath From Cl_Class where ChannelID="&ChannelID&" and ClassID=" & ClassID)
		if tClass.bof and tClass.eof then
			tClass.Close :Set tClass=Nothing
			User_ShowErr("<li>找不到指定的栏目</li>")
		else
			ClassName=tClass(0):RootID=tClass(1)
			ParentID=tClass(2):Depth=tClass(3)
			ParentPath=tClass(4)
			tClass.Close :Set tClass=Nothing
			if Not Cl.TrueChannelPurview_U(2,ChannelID) then
				dim sTempP,IsTruePurview
				sTempP=Split(ParentPath & "," & ClassID,",")
				IsTruePurview=False
				if rsInfo("Passed")=True then
					for i=1 to Ubound(sTempP)
						IsTruePurview = Cl.TrueClassPurview_U(1,ChannelID,sTempP(i))
						if IsTruePurview Then Exit For
					Next
				elseif rsInfo("Editor")=Cl.User_Info(5) then
					IsTruePurview=True
				else
					for i=1 to Ubound(sTempP)
						IsTruePurview = Cl.TrueClassPurview_U(2,ChannelID,sTempP(i))
						if IsTruePurview Then Exit For
					Next
				end if
				if Not IsTruePurview then
					User_ShowErr("<li>你无权修改此栏目下资料</li>")
				end if
			end if
		end if
	end if
	strCusTom		= Split(Cl.Channel_Setting(21),"@@@")
	sSoftType		= Split(strCusTom(0),"$")
	sSoftLanguage	= Split(strCusTom(1),"$")
	sCopyrightType	= Split(strCusTom(2),"$")
	sOperatingSystem= Split(strCusTom(3),"$")
	sAuthor			= Split(strCusTom(4),"$")
	sKeyword		= Split(strCusTom(5),"$")
	sSoftTypeV		= Split(Cl.GotTopic(strCusTom(0),60),"$")
	sSoftLanguageV	= Split(Cl.GotTopic(strCusTom(1),60),"$")
	sCopyrightTypeV	= Split(Cl.GotTopic(strCusTom(2),60),"$")
	sOperatingSystemV=Split(Cl.GotTopic(strCusTom(3),60),"$")
	sAuthorV		= Split(Cl.GotTopic(strCusTom(4),60),"$")
	sKeywordV		= Split(Cl.GotTopic(strCusTom(5),60),"$")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改<%=Cl.Channel_Setting(2)%></title>
<link rel="stylesheet" type="text/css" href="../Skins/User_Style.Css">
<script src="../Inc/Js/Admin.js" type="text/javascript"></script>
<script language = "JavaScript">
function CheckForm()
{
  document.myform.SoftIntro.value=editor.Editor.document.body.innerHTML;
  if (document.myform.ClassID.value=="0")
  {
    alert("<%=Cl.Channel_Setting(2)%>所属栏目为外部栏目或您无此栏目添加权限！");
	document.myform.ClassID.focus();
	return false;
  }
  if (document.myform.SoftName.value=="")
  {
    alert("<%=Cl.Channel_Setting(2)%>名称不能为空！");
	document.myform.SoftName.focus();
	return false;
  }
  if (document.myform.Author.value=="")
  {
    alert("<%=Cl.Channel_Setting(2)%>作者/开发商不能为空！");
	document.myform.Author.focus();
	return false;
  }
  if (document.myform.OperatingSystem.value=="")
  {
    alert("系统平台不能为空！");
	document.myform.OperatingSystem.focus();
	return false;
  }
  if (document.myform.Keyword.value=="")
  {
    alert("关键字不能为空！");
	document.myform.Keyword.focus();
	return false;
  }
  if (document.myform.SoftIntro.value=="")
  {
    alert("<%=Cl.Channel_Setting(2)%>简介不能为空！");
	document.myform.SoftIntro.focus();
	return false;
  }
  if (document.myform.UseServer.checked==true)
  {
	  if(document.myform.FileAddress.value=="")
	  {
		alert("<%=Cl.Channel_Setting(2)%>文件地址不能为空！");
		document.myform.FileAddress.focus();
		return false;
	  }
  }
  else
  {
	if(document.myform.DownloadUrl.length==0)
	{
	alert("<%=Cl.Channel_Setting(2)%>下载地址不能为空，最少要添加一条下载地址！");
	document.myform.DownloadUrl.focus();
	return false;
	}
	for(var i=0;i<document.myform.DownloadUrl.length;i++){
      if (document.myform.DownloadUrls.value=="") document.myform.DownloadUrls.value=document.myform.DownloadUrl.options[i].value;
      else document.myform.DownloadUrls.value+="@@@"+document.myform.DownloadUrl.options[i].value;
	}
  }
  for(var i=0;i<document.myform.TempUploadFiles.length;i++){
      if (document.myform.UploadFiles.value=="") document.myform.UploadFiles.value=document.myform.TempUploadFiles.options[i].value;
      else document.myform.UploadFiles.value+="@@@"+document.myform.TempUploadFiles.options[i].value;
  }
  return true;
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form method="POST" name="myform" onSubmit="return CheckForm();" action="User_Soft.asp" target="_self">
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
    <tr class="title">
      <td height="22" align="center" colspan=4><b>修改<%=Cl.Channel_Setting(2)%></b></td>
    </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>所属栏目：</strong></td>
            <td colspan="3">
			  <select name="ClassID">
				  <%=ShowClass_Option(ChannelID,rsInfo("ClassID"),0,4)%>
			  </select>&nbsp;&nbsp;
			  <font color="#FF0000"><strong>注意：</strong></font><font color="#0000FF">不能指定为外部栏目</font>
            </td>
          </tr>
          <tr class="tdbg">
            <td width="100" align="right"><strong>所属专题：</strong></td>
            <td colspan="2">
			<select name="SpecialID" id="SpecialID" multiple style="height:90px;width:200px;">
			<%=ShowSpecial_Option(ChannelID,rsInfo("SpecialID"),1)%>
			</select>&nbsp;&nbsp
			  <font color="#FF0000"><strong>说明：</strong></font><font color="#0000FF">按“Shift”“Ctrl”可多选</font>
			</td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong><%=Cl.Channel_Setting(2)%>名称：</strong></td>
            <td colspan="3"><input name="SoftName" type="text" id="SoftName" value="<%=rsInfo("SoftName")%>" size="80" maxlength="250"> <font color="#FF0000">*</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"></td>
            <td colspan="3"><strong>版本：</strong><input name="SoftVersion" type="text" id="SoftVersion" size="30" maxlength="100" value="<%=rsInfo("SoftVersion")%>">&nbsp;<input name="Check" type="button" id="Check" value="检测名称" onClick="CheckTitle('SoftName','<%=ChannelID%>');"></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong><%=Cl.Channel_Setting(2)%>类别：</strong></td>
            <td colspan="3"><input name="SoftType" type="text" id="SoftType" value="<%=rsInfo("SoftType")%>" size="80" maxlength="80"> <font color="#FF0000"> *</font><br />
			<font color="#808080">类别选择：</font><font color=#0000FF><%for i=0 to Ubound(sSoftTypeV)
			Response.write "<a href=""javascript:ToValue('','SoftType','"&sSoftTypeV(i)&"')"">"&sSoftType(i)&"</a>"
			if i<Ubound(sSoftTypeV) then Response.write "/"
			next%></font>&nbsp;&nbsp;<font color=#66666>more...</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong><%=Cl.Channel_Setting(2)%>语言：</strong></td>
            <td colspan="3"><input name="SoftLanguage" type="text" id="SoftLanguage" value="<%=rsInfo("SoftLanguage")%>" size="80" maxlength="80"> <font color="#FF0000"> *</font><br />
			<font color="#808080">语言选择：</font><font color="#0000FF"><%for i=0 to Ubound(sSoftLanguageV)
			Response.write "<a href=""javascript:ToValue('','SoftLanguage','"&sSoftLanguageV(i)&"')"">"&sSoftLanguage(i)&"</a>"
			if i<Ubound(sSoftLanguageV) then Response.write "/"
			next%></font>&nbsp;&nbsp;<font color=#66666>more...</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>授权形式：</strong></td>
            <td colspan="3"><input name="CopyrightType" type="text" id="CopyrightType" value="<%=rsInfo("CopyrightType")%>" size="80" maxlength="80"> <font color="#FF0000"> *</font><br />
			<font color="#808080">授权形式：</font><font color="#0000FF"><%for i=0 to Ubound(sCopyrightTypeV)
			Response.write "<a href=""javascript:ToValue('','CopyrightType','"&sCopyrightTypeV(i)&"')"">"&sCopyrightType(i)&"</a>"
			if i<Ubound(sCopyrightTypeV) then Response.write "/"
			next%></font>&nbsp;&nbsp;<font color=#66666>more...</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong><%=Cl.Channel_Setting(2)%>平台：</strong></td>
            <td colspan="3"><input name="OperatingSystem" type="text" id="OperatingSystem" value="<%=rsInfo("OperatingSystem")%>" size="80" maxlength="100"> <font color="#FF0000">*</font><br />
			<font color="#808080">平台选择：</font><font color="#0000FF"><%for i=0 to Ubound(sOperatingSystemV)
			Response.write "<a href=""javascript:ToValue('add','OperatingSystem','/"&sOperatingSystemV(i)&"')"">"&sOperatingSystem(i)&"</a>"
			if i<Ubound(sOperatingSystemV) then Response.write "/"
			next%></font>&nbsp;&nbsp;<font color=#66666>more...</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>开 发 商：</strong></td>
            <td colspan="3"><input name="Author" type="text" id="Author" size="30" maxlength="100" value="<%=rsInfo("Author")%>"> <font color="#FF0000">*</font>&nbsp;&nbsp;&nbsp;信&nbsp;箱：<input name="AuthorEmail" type="text" id="AuthorEmail" size="36" maxlength="100" value="<%=rsInfo("AuthorEmail")%>"><br />
			<font color="#808080">开 发 商：</font><font color="#0000FF"><%for i=0 to Ubound(sAuthorV)
			Response.write "<a href=""javascript:ToValue('','Author','"&sAuthorV(i)&"')"">"&sAuthor(i)&"</a>"
			if i<Ubound(sAuthorV) then Response.write "/"
			next%></font>&nbsp;&nbsp;<font color=#66666>more...</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>相关链接：</strong></td>
            <td colspan="3">&nbsp;开发商主页：<input name="AuthorHomepage" type="text" id="AuthorHomepage" value="<%=rsInfo("AuthorHomepage")%>" size="67" maxlength="100"><br />&nbsp;演示&nbsp;&nbsp;地址：<input name="DemoUrl" type="text" id="DemoUrl" value="<%=rsInfo("DemoUrl")%>" size="67" maxlength="200">
		   </td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>关 键 字：</strong></td>
            <td colspan="3"><input name="Keyword" type="text"
           id="Keyword" size="80" maxlength="255" value="<%=rsInfo("Keyword")%>"> <font color="#FF0000">*</font><br />
			<font color="#808080">关 键 字：</font><font color="#0000FF"><%for i=0 to Ubound(sKeywordV)
			Response.write "<a href=""javascript:ToValue('add','Keyword','|"&sKeywordV(i)&"')"">"&sKeyword(i)&"</a>"
			if i<Ubound(sKeywordV) then Response.write "/"
			next%></font>&nbsp;&nbsp;<font color=#66666>more...</font><br /> 
              <font color="#0000FF">用来查找相关<%=Cl.Channel_Setting(2)%>，可输入多个关键字，中间用<font color="#FF0000">“|”</font>隔开。不能出现&quot;&quot;'*?,.()等字符。</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong><%=Cl.Channel_Setting(2)%>图片：</strong></td>
            <td colspan="3"><input name="SoftPicUrl" type="text" id="SoftPicUrl" size="80" maxlength="200" value="<%=rsInfo("SoftPicUrl")%>" onclick="doPreview('SoftPicUrl','<%=Cl.WebDir%>','<%=Cl.UploadDir%>')"><br />
			<iframe style="top:2px" ID="UpFile" src="../User/Upload.asp?ID=<%=ChannelID%>&Type=0&Obj=SoftPicUrl&TObj=TempUploadFiles" frameborder=0 scrolling=no width="530" height="25"></iframe>
			</td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>服 务 器：</strong></td>
            <td colspan="3">
				 <input type="checkbox" name="UseServer" ID="UseServer" value="yes" onclick="chkUseServer();"> 启用服务器</td>
          </tr>
          <tr class="tdbg" ID="UseServerM" style="display:none">
            <td width="100" align="right"><strong>文件地址：</strong></td>
            <td colspan="3">
				<input name="FileAddress" type="text" id="FileAddress" value="<%=rsInfo("FileAddress")%>" size="55" maxlength="250"> <font color="#FF0000">*</font>
				<font color="#888888">下载地址 = 服务器地址+文件地址</font><br />
				<iframe style="top:2px" ID="UpFile" src="../User/Upload.asp?ID=<%=ChannelID%>&Type=3&Obj=FileAddress&Obj2=SoftSize&TObj=TempUploadFiles" frameborder=0 scrolling=no width="530" height="25"></iframe><br /><font color="#888888">如果<%=Cl.Channel_Setting(2)%>比较大（5M以上），建议使用ASPUpLoad上传组件。</font>
				</td>
          </tr>
          <tr class="tdbg" ID="NoUseServerM">
            <td width="100" align="right"><strong>下载地址：</strong></td>
            <td colspan="3">
				<input type="hidden" name="DownloadUrls" value="">
				<select name="DownloadUrl" style="width:95%;height:150" size="2" ondblclick="ModifyUrl('下载地址','DownloadUrl');">
				<%
				dim StrDownloadUrl',i
				StrDownloadUrl=Trim(rsInfo("DownloadUrl"))
				if Instr(StrDownloadUrl,"@@@") >0 then
					StrDownloadUrl=Split(StrDownloadUrl,"@@@")
					for i=0 to Ubound(StrDownloadUrl)
				%>
					<option value="<%=StrDownloadUrl(i)%>"><%=StrDownloadUrl(i)%></option>
				<%
					Next
				elseif StrDownloadUrl<>"" then
				%>
				<option value="<%=StrDownloadUrl%>"><%=StrDownloadUrl%></option>
				<%end if%>
				</select> <font color="#FF0000">*</font><br />
				<input type="button" name="addurl" value="添加下载地址" onclick="AddUrl('下载地址','DownloadUrl');">
				<input type="button" name="addurl" value="修改当前地址" onclick="ModifyUrl('下载地址','DownloadUrl');">
				<input type="button" name="addurl" value="删除当前地址" onclick="DelUrl('下载地址','DownloadUrl');">
				<input type="button" name="upurl" value="↑" onclick="UpUrl('下载地址','DownloadUrl');">
				<input type="button" name="downurl" value="↓" onclick="DownUrl('下载地址','DownloadUrl');"><br />
				<iframe style="top:2px" ID="UpFile" src="../User/Upload.asp?ID=<%=ChannelID%>&Type=3&Obj=DownLoadUrl&Obj2=SoftSize&TObj=TempUploadFiles" frameborder=0 scrolling=no width="530" height="25"></iframe><br /><font color="#888888">如果<%=Cl.Channel_Setting(2)%>比较大（5M以上），建议使用ASPUpLoad上传组件。</font>
				</td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>已 上 传：</strong></td>
            <td><select name="TempUploadFiles" style="width:500;height:132" size="2" onclick="doPreview('TempUploadFiles','<%=Cl.WebDir%>','<%=Cl.UploadDir%>')"><%
				dim sUploadFiles
				sUploadFiles = Trim(rsInfo("UploadFiles"))
				if Instr(sUploadFiles,"@@@") >0 then
					sUploadFiles = Split(sUploadFiles,"@@@")
					for i=0 to Ubound(sUploadFiles)
				%>
					<option value="<%=sUploadFiles(i)%>"><%=sUploadFiles(i)%></option>
				<%
					Next
				elseif sUploadFiles<>"" then
				%>
				<option value="<%=sUploadFiles%>"><%=sUploadFiles%></option>
				<%end if%></select><br />
				<input type="button" name="SetDefaultPic" value="设为首页图片" onclick="SetPicUrl('TempUploadFiles','SoftPicUrl');">
				<input type="button" name="InsEditor" value="插入编辑器" onclick="InsertEditor('TempUploadFiles','<%=Cl.WebDir%>','<%=Cl.UploadDir%>');">
				<input type="hidden" name="UploadFiles" value="">
			</td>
            <td width=180>
				<fieldset style="height:100%">
				<legend>预览</legend>
				<table border=0 cellpadding=0 cellspacing=1 width="180" height="150" valign=top>
				<tr><td align=center valign=middle id=tdPreview height="100%">

				</td></tr>
				</table>
				</fieldset>
			</td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong><%=Cl.Channel_Setting(2)%>大小：</strong></td>
            <td colspan="3"><strong><input name="SoftSize" type="text" id="SoftSize" size="16" maxlength="15" value="<%=rsInfo("SoftSize")%>"><input name="SizeUnit" type="radio" id="SizeUnit" value="k" checked>KB&nbsp;<input name="SizeUnit" type="radio" id="SizeUnit" value="m">MB&nbsp;<input name="SizeUnit" type="radio" id="SizeUnit" value="g">GB</strong> <font color="#FF0000">*</font>&nbsp;&nbsp;&nbsp;&nbsp;<strong>解压密码：</strong> 
              <input name="DecompressPassword" type="text" id="DecompressPassword" size="38" maxlength="100" value="<%=rsInfo("DecompressPassword")%>"></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right" valign="middle"><strong><%=Cl.Channel_Setting(2)%>简介：</strong><br />
              支持各种UBB代码</td>
            <td colspan="3"><textarea name="SoftIntro" style="display:none"><%=rsInfo("SoftIntro")%></textarea> 
			<IFRAME ID="editor" src="../Editor/Editor.asp?id=SoftIntro&style=other&cid=<%=ChannelID%>&TObj=TempUploadFiles" frameborder="0" scrolling="no" width="95%" height="350"></IFRAME>
            </td>
          </tr>
		  <%if Cl.TrueChannelPurview_U(3,ChannelID) then%>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong><%=Cl.Channel_Setting(2)%>属性：</strong></td>
            <td colspan="3"> <input name="OnTop" type="checkbox" id="OnTop" value="yes" <%if rsInfo("OnTop")=True then response.write " checked"%>>
              固顶<%=Cl.Channel_Setting(2)%>&nbsp;&nbsp;&nbsp; <input name="Hot" type="checkbox" id="Hot" value="yes" <%if rsInfo("Hot")=True then response.write " checked"%>>
              热门<%=Cl.Channel_Setting(2)%>&nbsp;&nbsp;&nbsp; <input name="Elite" type=checkbox id="Elite" value="yes" <%if rsInfo("Elite")=True then response.write " checked"%>>
              推荐<%=Cl.Channel_Setting(2)%>&nbsp;&nbsp;&nbsp; <strong>评分等级：</strong> <select name="Stars" id="Stars">
                <option value="5" <%if rsInfo("Stars")=5 then response.write " selected"%>>★★★★★</option>
                <option value="4" <%if rsInfo("Stars")=4 then response.write " selected"%>>★★★★</option>
                <option value="3" <%if rsInfo("Stars")=3 then response.write " selected"%>>★★★</option>
                <option value="2" <%if rsInfo("Stars")=2 then response.write " selected"%>>★★</option>
                <option value="1" <%if rsInfo("Stars")=1 then response.write " selected"%>>★</option>
                <option value="0" <%if rsInfo("Stars")=0 then response.write " selected"%>>无</option>
              </select> <font color="#FF0000">*</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>下载次数：</strong></td>
            <td colspan="3">本日： 
              <input name="DayHits" type="text" id="DayHits" value="<%=rsInfo("DayHits")%>" size="10" maxlength="10"> 
              &nbsp;&nbsp;&nbsp;&nbsp;本周： 
              <input name="WeekHits" type="text" id="WeekHits" value="<%=rsInfo("WeekHits")%>" size="10" maxlength="10"> 
              &nbsp;&nbsp;&nbsp;&nbsp;本月： 
              <input name="MonthHits" type="text" id="MonthHits" value="<%=rsInfo("MonthHits")%>" size="10" maxlength="10"> 
              &nbsp;&nbsp;&nbsp;&nbsp;总计： 
              <input name="Hits" type="text" id="Hits" value="<%=rsInfo("Hits")%>" size="10" maxlength="10"></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>下载等级：</strong></td>
            <td colspan="3">
			<input name="SoftLevel" type="hidden" id="SoftLevel" value="<%=rsInfo("SoftLevel")%>">
			<input name="SoftLevelView" type="text" id="SoftLevelView" value="<%=Cl.GetUserGroupName(rsInfo("SoftLevel"))%>" size="80" onclick="SelectUserGroup('SoftLevel');" Readonly Disabled>&nbsp;<input type="checkbox" name="GetClassPurview" value="yes" checked onclick="document.myform.SoftLevelView.disabled=this.checked">继承栏目权限<br /><font color="#0000FF">只有具有相应权限的人才能下载此<%=Cl.Channel_Setting(2)%>。</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>下载<%=Cl.Web_Setting(28)%>：</strong></td>
            <td colspan="3"><input name="SoftPoint" type="text" id="SoftPoint" value="<%=rsInfo("SoftPoint")%>" size="8" maxlength="5"> <%=Cl.Web_Setting(29)%>
              &nbsp;&nbsp;&nbsp; <font color="#0000FF">如果大于0，则用户下载此软件时将消耗相应<%=Cl.Web_Setting(28)%>。（对游客无效）</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>下载<%=Cl.Web_Setting(26)%>：</strong></td>
            <td colspan="3"><input name="SoftMoney" type="text" id="SoftMoney" value="<%=rsInfo("SoftMoney")%>" size="8" maxlength="5"> <%=Cl.Web_Setting(27)%>
              &nbsp;&nbsp;&nbsp; <font color="#0000FF">如果大于0，则用户下载此软件时将消耗相应<%=Cl.Web_Setting(26)%>。（对游客无效）</font></td>
          </tr>
          <tr class="tdbg">
            <td width="100" align="right"><strong>回扣设置：</strong></td>
            <td colspan="2">
			<%=Cl.Web_Setting(28)%>：<input name="BackPoint" type="text" id="BackPoint" value="<%=rsInfo("BackPoint")%>" size="5" maxlength="3" style="text-align: right;">&nbsp;<%=Cl.Web_Setting(29)%>＋<%=Cl.Web_Setting(28)%>的<input name="BackPointRate" type="text" id="BackPointRate" value="<%=rsInfo("BackPointRate")%>" size="5" maxlength="2" style="text-align: right;">%<br />
			<%=Cl.Web_Setting(26)%>：<input name="BackMoney" type="text" id="BackMoney" value="<%=rsInfo("BackMoney")%>" size="5" maxlength="3" style="text-align: right;">&nbsp;<%=Cl.Web_Setting(27)%>＋<%=Cl.Web_Setting(26)%>的<input name="BackMoneyRate" type="text" id="BackMoneyRate" value="<%=rsInfo("BackMoneyRate")%>" size="5" maxlength="2" style="text-align: right;">%<br /><font color="#0000FF">即当用户游览或下载此内容时，给予一定的回扣给添加者！</font>
			</td>
		  </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>录入时间：</strong></td>
            <td colspan="3"><input name="UpdateTime" type="text" id="UpdateTime" value="<%=rsInfo("UpdateTime")%>" maxlength="50"> <font color=blue><--【<a href='javascript:ToValue("","UpdateTime","<%=now%>")'>设为当前时间</a>】</font>
              <br />时间格式为“年-月-日 时:分:秒”，如：<font color="#0000FF"><%=now()%></font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>立即发布：</strong></td>
            <td colspan="3"><input name="Passed" type="checkbox" id="Passed" value="yes" <%if rsInfo("Passed")=True then response.write " checked"%>> 是<font color="#0000FF">（如果选中的话将直接发布，否则审核后才能发布。）</font>&nbsp;&nbsp;<input name="NowCreate" type="checkbox" value="yes" checked>立即生成</td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><font color=blue><strong>快捷操作：</strong></font></td>
            <td colspan="3"><%
'if Cl.TrueChannelPurview_U(2,ChannelID) then
	if rsInfo("Passed")=False then
		response.write "<a href='User_Property.asp?ChannelID="&ChannelID&"&Action=SetPassed&InfoID=" & rsInfo("SoftID") & "'>通过审核</a>&nbsp;&nbsp;"
	Else
  		response.write "<a href='User_Property.asp?ChannelID="&ChannelID&"&Action=CancelPassed&InfoID=" & rsInfo("SoftID") & "'>取消审核</a>&nbsp;&nbsp;"
  	end if
  	if rsInfo("OnTop")=False then
   		response.write "<a href='User_Property.asp?ChannelID="&ChannelID&"&Action=SetOnTop&InfoID=" & rsInfo("SoftID") & "'>固顶</a>&nbsp;&nbsp;"
   	else
		response.write "<a href='User_Property.asp?ChannelID="&ChannelID&"&Action=CancelOnTop&InfoID=" & rsInfo("SoftID") & "'>解固</a>&nbsp;&nbsp;" 
   	end if
  	if rsInfo("Elite")=False then
   		response.write "<a href='User_Property.asp?ChannelID="&ChannelID&"&Action=SetElite&InfoID=" & rsInfo("SoftID") & "'>设为推荐</a>&nbsp;&nbsp;"
   	else
		response.write "<a href='User_Property.asp?ChannelID="&ChannelID&"&Action=CancelElite&InfoID=" & rsInfo("SoftID") & "'>取消推荐</a>&nbsp;&nbsp;"
    end if
	if rsInfo("Deleted")=True then
		response.write "<a href='User_InfoDel.asp?ChannelID="&ChannelID&"&Action=Restore&InfoID="&rsInfo("SoftID")&"'>还原</a>&nbsp;&nbsp;"
	else
		response.write "<a href='User_InfoDel.asp?Action=Del&InfoID=" & rsInfo("SoftID") & "'>删除</a>&nbsp;&nbsp;" 
	end if
'end if
%>&nbsp;&nbsp;<a href="User_Comment.asp?ChannelID=<%=ChannelID%>&InfoID=<%=rsInfo("SoftID")%>"> 管理此<%=Cl.Channel_Setting(2)%>的评论</a></td>
          </tr>
		  <%end if%>
  </table>
  <div align="center"> 
    <p>
		<input name="ChannelID" type="hidden" id="ChannelID" value="<%=ChannelID%>">
		<input name="SoftID" type="hidden" id="SoftID" value="<%=SoftID%>">
		<input name="Action" type="hidden" id="Action" value="SaveModify">
		<input name="Save" type="submit"  id="Save" value="保存修改结果" style="cursor:hand;">
		&nbsp; 
		<input name="Add" type="submit" id="Add" value="添加为新<%=Cl.Channel_Setting(2)%>" onClick="document.myform.Action.value='SaveAdd';" style="cursor:hand;">
		&nbsp; 
		<input name="Cancel" type="button" id="Cancel" value=" 取 消 " onClick="window.location.href='User_Soft.Asp?ChannelID=<%=ChannelID%>'" style="cursor:hand;">
    </p>
  </div>
</form>
<script type="text/javascript">
<!--
<%if rsInfo("UseServer") then%>
document.myform.UseServer.checked=true;
document.getElementById('UseServerM').style.display="";
document.getElementById('NoUseServerM').style.display="none";
<%end if%>
function chkUseServer()
{
	if (document.myform.UseServer.checked==true)
	{
		document.getElementById('UseServerM').style.display="";
		document.getElementById('NoUseServerM').style.display="none";
	}
	else
	{
		document.getElementById('UseServerM').style.display="none";
		document.getElementById('NoUseServerM').style.display="";
	}
}
//-->
</script>
<%
rsInfo.close:set rsInfo=Nothing
End Sub

Sub DoSaveRecord()
	FoundErr			= False
	SoftID				= Cl.ChkClng(Request.Form("SoftID"))
	ClassID				= Cl.ChkClng(request.form("ClassID"))
	SpecialID			= Trim(request.Form("SpecialID"))
	SoftName			= Trim(request.form("SoftName"))
	SoftVersion			= Trim(request.form("SoftVersion"))
	SoftType			= Trim(request.form("SoftType"))
	SoftLanguage		= Trim(request.form("SoftLanguage"))
	CopyrightType		= Trim(request.form("CopyrightType"))
	OperatingSystem		= Trim(request.form("OperatingSystem"))
	Author				= Trim(request.form("Author"))
	AuthorEmail			= Trim(request.form("AuthorEmail"))
	AuthorHomepage		= Trim(request.form("AuthorHomePage"))
	DemoUrl				= Trim(request.form("DemoUrl"))
	RegUrl				= Trim(request.form("RegUrl"))
	SoftPicUrl			= Trim(request.form("SoftPicUrl"))
	SoftIntro			= Trim(request.form("SoftIntro"))
	Keyword				= Trim(request.form("Keyword"))
	OnTop				= Trim(request.form("OnTop"))
	Hot					= Trim(request.form("Hot"))
	Elite				= Trim(request.form("Elite"))
	Stars				= Cl.ChkClng(request.form("Stars"))
	UpdateTime			= Trim(request.form("UpdateTime"))
	Hits				= Cl.ChkClng(request.form("Hits"))
	DayHits				= Cl.ChkClng(request.form("DayHits"))
	WeekHits			= Cl.ChkClng(request.form("WeekHits"))
	MonthHits			= Cl.ChkClng(request.form("MonthHits"))
	SoftLevel			= Trim(request.form("SoftLevel"))
	SoftPoint			= Cl.ChkClng(request.form("SoftPoint"))
	SoftMoney			= Cl.ChkClng(request.form("SoftMoney"))
	BackPoint			= Cl.ChkClng(request.form("BackPoint"))
	BackPointRate		= Cl.ChkClng(request.form("BackPointRate"))
	BackMoney			= Cl.ChkClng(request.form("BackMoney"))
	BackMoneyRate		= Cl.ChkClng(request.form("BackMoneyRate"))
	Passed				= Trim(request.form("Passed"))
	DecompressPassword	= Trim(request.form("DecompressPassword"))
	SoftSize			= Cl.ChkClng(request.form("SoftSize"))
	SizeUnit			= Trim(request.form("SizeUnit"))
	DownloadUrls		= Trim(request.form("DownloadUrls"))
	NowCreate			= Trim(request.form("NowCreate"))
	UploadFiles			= Trim(request.form("UploadFiles"))
	Editor				= Cl.User_Info(5)
	UseServer			= Trim(request.form("UseServer"))
	FileAddress			= Trim(request.form("FileAddress"))
	if ClassID<=0 then
		FoundErr=True
		ErrMsg=ErrMsg & "<br /><li>指定了非法的栏目（外部栏目或不存在的栏目）</li>"
	end if
	if SoftName="" then
		founderr=true
		errmsg=ErrMsg & "<br /><li>软件名称不能为空</li>"
	end if
	if SoftType="" then
		founderr=true
		errmsg=ErrMsg & "<br /><li>软件类别不能为空</li>"
	end if
	if Softlanguage="" then
		founderr=true
		errmsg=ErrMsg & "<br /><li>软件语言不能为空</li>"
	end if
	if CopyrightType="" then
		founderr=true
		errmsg=ErrMsg & "<br /><li>授权形式不能为空</li>"
	end if
	if Author="" then
		founderr=true
		errmsg=errmsg & "<br /><li>请输入软件作者/开发商</li>"
	end if
	if Keyword="" then
		founderr=true
		errmsg=errmsg & "<br /><li>请输入软件关键字</li>"
	end if
	if Lcase(UseServer)="yes" then
		UseServer=True
		if FileAddress="" then
			founderr=true
			errmsg=errmsg & "<br /><li>下载文件地址不能为空</li>"
		end if
	else
		UseServer=False
		if DownloadUrls="" then
			founderr=true
			errmsg=errmsg & "<br /><li>软件下载地址不能为空</li>"
		end if
	end if
	if FoundErr=True then User_ShowErr(ErrMsg)
	set tClass=Cl.Execute("select ClassName,Depth,ParentPath,Child,BrowsePurview,DisabledAdd,AddPoint,AddIsChk,MaxLimit,IsOuter From Cl_Class where ClassID=" & ClassID)
	if tClass.bof and tClass.eof then
		FoundErr=True
		ErrMsg=ErrMsg & "<br /><li>找不到指定的栏目</li>"
	else
		if tClass(9)=1 then
			FoundErr=True
			ErrMsg=ErrMsg & "<br /><li>不能指定外部栏目</li>"
		elseif tClass(5)<>0 then
			FoundErr=True
			ErrMsg=ErrMsg & "<br /><li>对不起，此栏目禁止添加资料</li>"
		else
			ClassName=tClass(0):Depth=tClass(1)
			ParentPath=tClass(2):Child=tClass(3)
			sAddPoint=tClass(6):sAddIsChk=tClass(7)
			sMaxLimit=tClass(8)
			if request("GetClassPurview")="yes" then SoftLevel="5"
		end if
	end if
	tClass.Close :Set tClass=Nothing
	if SoftIntro="" then
		SoftIntro="暂无简介"
	else
		if Cl.strLength(SoftIntro)>sMaxLimit and sMaxLimit<>0 then
			founderr=true
			errmsg=errmsg & "<br /><li>简介内容大小超过了最大限制（"&sMaxLimit&" 字节！）</li>"
		end if
		if Trim(Cl.Web_Setting(9))="Yes" then
			SoftIntro=Cl.DeCode(SoftIntro,Trim(Cl.Web_Setting(10)))
		end if
	end if
	if FoundErr=True then User_ShowErr(ErrMsg)
	if SpecialID="" then
		SpecialID="0"
	else
		SpecialID=Replace(SpecialID," ","")
		if Len(SpecialID)>250 then
			Dim TempStr,SpecialStr
			TempStr=Split(SpecialID,",")
			SpecialStr="0"
			For i=0 to Ubound(TempStr)
				if TempStr(i)<>"" then SpecialStr=SpecialStr & "," & TempStr(i)
				if Len(SpecialStr)>=230 then Exit For
			Next
			SpecialID=SpecialStr
		End if
		SpecialID=Replace(SpecialID,"0,","")
	end if
	Keyword=Cl.ReplaceBadChar(Keyword)
	Keyword=Replace(Keyword,"||","|")
	if Left(Keyword,1)="|" then Keyword=Right(Keyword,Len(Keyword)-1)
	if Right(Keyword,1)="|" then Keyword=Left(Keyword,Len(Keyword)-1)
	if UpdateTime<>"" and IsDate(UpdateTime)=true then
		UpdateTime=CDate(UpdateTime)
	else
		UpdateTime=now()
	end if
	SoftLevel=Replace(SoftLevel," ","")
	if Not IsNumeric(Replace(SoftLevel,",","")) then SoftLevel="5"
	SoftSize=Cl.CheckUnit(SoftSize,SizeUnit)
	if OnTop="yes" then
		OnTop=True
	else
		OnTop=False
	end if
	if Hot="yes" then
		Hot=True
	else
		Hot=False
	end if
	if Elite="yes" then
		Elite=True
	else
		Elite=False
	end if
	if Passed="yes" then
		Passed=True
	else
		Passed=False
	end if
	dim sTempP
	IsTruePurview	= False
	IsTruePurview_P	= False
	if Cl.TrueChannelPurview_U(2,ChannelID) then
		IsTruePurview	= True
		IsTruePurview_P	= True
	else
		sTempP=Split(ParentPath & "," & ClassID,",")
		for i=1 to Ubound(sTempP)
			IsTruePurview = Cl.TrueClassPurview_U(3,ChannelID,sTempP(i))
			if IsTruePurview Then Exit For
		Next
		for i=1 to Ubound(sTempP)
			IsTruePurview_P = Cl.TrueClassPurview_U(2,ChannelID,sTempP(i))
			if IsTruePurview_P Then Exit For
		Next
	end if
	if Not IsTruePurview then 
		User_ShowErr("<br /><li>您无权在此栏目下添加或修改资料。</li>")
	end if
	set rs=server.createobject("adodb.recordset")
	if Action="SaveAdd" then
		Dim MaxTID
		MaxTID=Cl.Execute("select max(SoftID) from Cl_Soft")(0)
		if isnull(MaxTID) or Not IsNumeric(MaxTID) then MaxTID=0
		SoftID=MaxTID+1
		sql="select * from Cl_Soft" 
		OpenConn : rs.open sql,Conn,1,3
		rs.addnew
		rs("SoftID")=SoftID
		rs("ChannelID")=ChannelID
		Call SaveData()
		rs("Editor")=Editor
		rs.update
	elseif Action="SaveModify" then
  		if SoftID<=0 then
			User_ShowErr("<br /><li>不能确定SoftID的值</li>")
		else
			sql="select * from Cl_Soft where Softid=" & SoftID
			OpenConn : rs.open sql,Conn,1,3
			if rs.bof and rs.eof then
				rs.close : set rs=Nothing
				User_ShowErr("<br /><li>找不到此软件，可能已经被其他人删除。</li>")
 			else
				Editor	= rs("Editor")
				if rs("Passed")=True then
					Cl.Execute_U("update " & Db.UserTable & " set " & Db.UserPoint & "=" & Db.UserPoint & "-"&sAddPoint&"," & Db.UserDataNum & "=" & Db.UserDataNum & "-1 where " & Db.UserName & "='" & Editor & "'")
				end if
				call SaveData()
				rs.update
			end if
		end if
	else
		User_ShowErr("<br /><li>参数错误!</li>")
	end if
	rs.close : set rs=Nothing
	Cl.ChkUploadFile SoftID,SoftPicUrl & DownloadUrls & SoftIntro,UploadFiles
	Cl.SaveAdminLog
	SaveSuccess
end sub

sub SaveData()
	rs("ClassID")			= ClassID
	rs("SpecialID")			= SpecialID
	rs("SoftName")			= SoftName
	rs("SoftVersion")		= SoftVersion
	rs("SoftType")			= SoftType
	rs("SoftLanguage")		= SoftLanguage
	rs("CopyrightType")		= CopyrightType
	rs("OperatingSystem")	= OperatingSystem
	rs("Author")			= Author
	rs("AuthorEmail")		= AuthorEmail
	rs("AuthorHomepage")	= AuthorHomepage
	rs("DemoUrl")			= DemoUrl
	rs("RegUrl")			= RegUrl
	rs("SoftPicUrl")		= SoftPicUrl
	rs("SoftIntro")			= SoftIntro
	rs("Keyword")			= Keyword
	rs("Hits")				= Hits
	rs("DayHits")			= DayHits
	rs("WeekHits")			= WeekHits
	rs("MonthHits")			= MonthHits
	rs("SoftLevel")			= SoftLevel
	rs("SoftPoint")			= SoftPoint
	rs("SoftMoney")			= SoftMoney
	rs("Stars")				= Stars
	rs("UpdateTime")		= UpdateTime
	if sAddIsChk=False then
		rs("Passed")	= True
		rs("Censor")	= Cl.User_Info(5)
		rs("CensorTime")= Date()
		Cl.Execute_U("update " & Db.UserTable & " set " & Db.UserPoint & "=" & Db.UserPoint & "+"&sAddPoint&"," & Db.UserDataNum & "=" & Db.UserDataNum & "+1 where " & Db.UserName & "='" & Editor & "'")
		Passed			= True
	elseif Passed and (IsTruePurview_P or Cint(Cl.User_Purview(ChannelID))=4) then
		rs("Passed")	= True
		rs("Censor")	= Cl.User_Info(5)
		rs("CensorTime")= Date()
		Cl.Execute_U("update " & Db.UserTable & " set " & Db.UserPoint & "=" & Db.UserPoint & "+"&sAddPoint&"," & Db.UserDataNum & "=" & Db.UserDataNum & "+1 where " & Db.UserName & "='" & Editor & "'")
	else
		rs("Passed")	= False
		Passed			= False
	end if
	rs("OnTop")				= OnTop
	rs("Hot")				= Hot
	rs("Elite")				= Elite
	rs("DecompressPassword")= DecompressPassword
	rs("SoftSize")			= SoftSize
	rs("DownloadUrl")		= DownloadUrls
	rs("UploadFiles")		= UploadFiles
	rs("Nopass")			= False
	rs("UseServer")			= UseServer
	rs("FileAddress")		= FileAddress
	rs("BackPoint")			= BackPoint
	rs("BackPointRate")		= BackPointRate
	rs("BackMoney")			= BackMoney
	rs("BackMoneyRate")		= BackMoneyRate
end sub
	
Sub SaveSuccess()
%>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="../Skins/User_Style.Css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<br /><br />
<table class="border" align=center width="400" border="0" cellpadding="0" cellspacing="1">
  <tr align=center> 
    <td  height="22" align="center" class="title"><b> 
      <%if action="SaveAdd"then%>添加<%else%>修改<%end if%><%=Cl.Channel_Setting(2)%>成功</b></td>
  </tr>
<%if Not Passed then%>
  <tr class="tdbg"> 
    <td height="60"><font color="#0000FF">注意：</font><br />
      &nbsp;&nbsp;&nbsp; 你的<%=Cl.Channel_Setting(2)%>尚未真正发表！只有等管理员审核并通过了你的<%=Cl.Channel_Setting(2)%>后，你所添加的<%=Cl.Channel_Setting(2)%>才会发表。</td>
  </tr>
<%end if%>
  <tr> 
    <td><table width="100%" border="0" cellpadding="2" cellspacing="1">
        <tr class="tdbg"> 
          <td width="100" align="right"><strong>所属栏目：</strong></td>
          <td><%=ShowManageClassPath(ChannelID,ClassName,ParentPath,Depth)%></td>
        </tr>
        <tr class="tdbg"> 
          <td width="100" align="right"><strong><%=Cl.Channel_Setting(2)%>名称：</strong></td>
          <td><%= Cl.HTMLEncode(SoftName) %></td>
        </tr>
        <tr class="tdbg"> 
          <td width="100" align="right"><strong><%=Cl.Channel_Setting(2)%>版本：</strong></td>
          <td><%= Cl.HTMLEncode(SoftVersion) %></td>
        </tr>
        <tr class="tdbg"> 
          <td width="100" align="right"><strong><%=Cl.Channel_Setting(2)%>作者：</strong></td>
          <td><%= Cl.HTMLEncode(Author) %></td>
        </tr>
        <tr class="tdbg"> 
          <td width="100" align="right"><strong>关 键 字：</strong></td>
          <td><%= Keyword %></td>
        </tr>
      </table></td>
  </tr>
  <tr class="tdbg"> 
    <td height="30" align="center">【<a href="User_Soft.Asp?Action=Modify&ChannelID=<%=ChannelID%>&SoftID=<%=SoftID%>">修改此<%=Cl.Channel_Setting(2)%></a>】&nbsp;【<a href="User_Soft.Asp?Action=Add&ChannelID=<%=ChannelID%>">继续添加<%=Cl.Channel_Setting(2)%></a>】&nbsp;【<a href="User_Soft.Asp?ChannelID=<%=ChannelID%>"><%=Cl.Channel_Setting(2)%>管理</a>】</td>
  </tr>
</table>
<%
if Clng(Cl.Channel_Setting(10))=1 and Passed and NowCreate="yes" then
	Dim sCreate
	'if CBool(Cl.Channel_Setting(14)) and CBool(Cl.Channel_Setting(15)) then

	'	sCreate="CreateSoft,CreateClass,CreateUpDate,CreateElite,CreateIndex,CreateWebIndex"
	'	if SpecialID>0 then sCreate=sCreate&",CreateSpecial"
	'else
		sCreate="CreateSoft,CreateIndex,CreateWebIndex"
	'end if
	%>
	<br /><br />
	<iframe width="100%" height="220" frameborder="0" src="User_Create_Soft.asp?ChannelID=<%=ChannelID%>&Action=<%=sCreate%>&InfoID=<%=SoftID%>&ClassID=<%=ClassID%>&SpecialID=<%=SpecialID%>" name="Make"></iframe>
<%end if
End Sub
%>
<%
'<!--
'┌───────────────────────────────────────────────────────┐
'│														 │
'│		CreateLive CMS Version 3.1						 │
'│　　　　　　　　				Powered by Aspoo.CN	 	 │
'│　		　　　　　　　　　　						 │
'│　	邮箱: aspoo@126.com			Info@aspoo.cn　　	 │
'│		ＱＱ: 3315263				596197794			 │
'│		网站: www.aspoo.cn			www.aspoo.com		 │
'│		论坛: bbs.aspoo.cn			bbs.aspoo.com		 │
'│														 │
'│	Copyright (C) 2005 Aspoo.CN All Rights Reserved.	 │
'└───────────────────────────────────────────────────────┘
'-->
%>
