<!--#include file="const.asp"-->
<!--#include file="../../inc/cls_editor.asp" -->
<!--#include file="../inc/cls_tags.asp"-->
<%
Admin_header
'=====================================================================
' 软件名称：新云网站管理系统
' 当前版本：NewAsp Content Management System Version 4.0
' 文件名称：admin_post.asp
' 更新日期：2008-06-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="200" align="left"><%=NewAsp.ModuleName%>频道</td>
		<td class="tableline" width="*" align="right"><a href="admin_index.asp?ChannelID=<%=ChannelID%>">管理首页</a>
			 - <a href="admin_list.asp?ChannelID=<%=ChannelID%>"><%=NewAsp.ModuleName%>列表</a>
			 - <a href="admin_list.asp?ChannelID=<%=ChannelID%>&showmode=1">专题列表</a>
			 - <a href="admin_list.asp?ChannelID=<%=ChannelID%>&isaccept=1">审核列表</a>
			 - <a href="../sys/admin_class.asp?ChannelID=<%=ChannelID%>">分类管理</a>
		</td>
	</tr>
</table>
<%
Dim Action,isEdit,softid,classid
softid=NewAsp.ChkNumeric(Request("softid"))
classid=NewAsp.ChkNumeric(Request("classid"))
If Not ChkAdmin("PostSoft_"&ChannelID) Then
	Call Transfer_error()
End If
Action = LCase(Request("action"))
Select Case Trim(Action)
Case "add"
	isEdit = False
	Call showmain()
Case "edit"
	isEdit = True
	Call showmain()
Case "sdel"
	Call delDownAddress()
Case Else
	isEdit = False
	Call showmain()
End Select
If FoundErr = True Then
	ReturnError(ErrMsg)
End If
Admin_footer
SaveLogInfo(AdminName)
NewAsp.PageEnd

Sub showmain()
	On Error Resume Next

	Dim Rs,SQL
	Dim EditTitle,SoftNameColor,downid
	Dim m_intPlugin,RsObj,i
	Dim TextContent
	m_intPlugin = 0
	If isEdit Then
		SQL = "SELECT * FROM NC_SoftList WHERE softid=" & CLng(softid)
		Set Rs = NewAsp.Execute(SQL)
		classid = Rs("classid")
		softid = Rs("softid")

		m_intPlugin = NewAsp.ChkNumeric(Rs("plugin"))
		EditTitle = "编辑" & NewAsp.ModuleName
	Else
		EditTitle = "添加" & NewAsp.ModuleName
		softid = 0
	End If
%>
<script src="../script/checksoft.js" type="text/javascript"></script>
<script type="text/javascript">
function SelectPhoto(){
    var arr=showModalDialog('admin_selfile.asp?ChannelID=<%=ChannelID%>&action=img', '', 'dialogWidth:860px; dialogHeight:680px; help: no; scroll: yes; status: no');
    if(arr!=null){
        var ss=arr.split('|');
        document.myform.SoftImage.value=ss[0];
    }
}
function SelectFile(){
    var arr=showModalDialog('admin_selfile.asp?ChannelID=<%=ChannelID%>&action=file', '', 'dialogWidth:860px; dialogHeight:680px; help: no; scroll: yes; status: no');
    if(arr!=null){
        var ss=arr.split('|');
        document.myform.DownAddress1.value=ss[0];
        document.myform.filesize.value=ss[1];
    }
}

function ChangeTableR(n){
    if(n==1){
        document.getElementById('TableR1').style.display='';
        document.getElementById('TableR2').style.display='none';
    }else{
        document.getElementById('TableR1').style.display='none';
        document.getElementById('TableR2').style.display='';
    }

}
function InsertTags(){
	if(!detectMacXFF()){
		var ss=window.showModalDialog('../inc/getTags.asp?channelid=<%=ChannelID%>',window, 'dialogWidth:860px; dialogHeight:680px; help: no; scroll: yes; status: no');
		if(ss!=null) document.getElementById("Tagstring").value=ss;
	}else{
		var feature="width=800,height=600,menubar=no,toolbar=no,location=no,";
		feature+="scrollbars=yes,resizable=yes,status=no,modal=yes";
		window.open('../inc/getTags.asp?channelid=<%=ChannelID%>',null,feature);
	}
}
</script>
<div onkeydown="CtrlEnter()">
<form method="Post" name="myform" action="admin_save.asp" onsubmit="return checkPost()">
<table id="TableR1" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr>
	<th colspan="4"><%=EditTitle%></th>
</tr>
<tr>
	<td class="tablerow1" colspan="4">
		<input type="button" name="btn1" onclick="ChangeTableR(1)" value="常规设置" class="button" disabled>
		<input type="button" name="btn2" onclick="ChangeTableR(0)" value="其它属性" class="button">
		<input type="submit" name="btn3" value="保存<%=NewAsp.ModuleName%>" class="button">
	</td>
</tr>
<%
	If isEdit Then
		Response.Write "<input type=""Hidden"" name=""action"" value=""modify"">"
		Response.Write "<input type=""Hidden"" name=""softid"" value="""& softid &""">"
	Else
		Response.Write "<input type=""Hidden"" name=""action"" value=""save"">"
	End If
	Response.Write "<input type=""hidden"" name=""ChannelID"" value='" & ChannelID & "'>"
%>
<tr>
	<td width="15%" align="right" nowrap class="tablerow2"><b>所属分类：</b></td>
	<td width="35%" class="tablerow2">
<%
	Call selectClasslist(ChannelID,classid)
%>
	</td>
	<td width="15%" align="right" nowrap class="tablerow2"><b>所属专题：</b></td>
	<td width="35%" class="tablerow2"><%
	Response.Write "<select name=""SpecialID"" id=""SpecialID"">" & vbNewLine
	Response.Write "<option value=""0"">不指定" & NewAsp.ModuleName & "专题</option>" & vbNewLine
	Set RsObj = NewAsp.Execute("SELECT SpecialID,SpecialName FROM NC_Special WHERE ChannelID="& ChannelID &" And ChangeLink=0 ORDER BY orders")
	Do While Not RsObj.EOF
		Response.Write Chr(9) & Chr(9) & "<option value=""" & RsObj("SpecialID") & """"
		If isEdit Then
			If Rs("SpecialID") = RsObj("SpecialID") Then Response.Write " selected"
		End If
		Response.Write ">"
		Response.Write RsObj("SpecialName")
		Response.Write "</option>" & vbCrLf
		RsObj.movenext
	Loop
	Set RsObj = Nothing
%>
          </select></td>
        </tr>
        <tr>
          <td align="right" class="tablerow1"><b><%=NewAsp.ModuleName%>名称：</b></td>
          <td class="tablerow1"><span style="position:relative"><input id="searchwordbox" type="text" name="SoftName" size="40" value="<%If isEdit Then Response.Write Rs("SoftName")%>">
          <font color="red">*</font><div style="display:none" id="sugAutoComplete" onselectstart="return false">&nbsp;</div></span></td>
	  <td align="right" class="tablerow1"><b><%=NewAsp.ModuleName%>版本：</b></td>
          <td class="tablerow1"><input name="SoftVer" type="text" id="SoftVer" size="35" value="<%If isEdit Then Response.Write Rs("SoftVer")%>"></td>
        </tr>

        <tr>
          <td align="right" class="tablerow2"><b>软件运行环境：</b></td>
          <td colspan="3" class="tablerow2"><input name="RunSystem" type="text" size="60" value="<%If isEdit Then Response.Write Rs("RunSystem") Else Response.Write Channel_Setting(1) End If%>"><br>
<%
	Dim RunSystem
	If Len(Channel_Setting(0)) < 3 Then Channel_Setting(0) = "Win9X/|ME/|NT/|2000/|XP/|2003/|Vista/|Linux/|Unix/|Mac/"
	RunSystem = Split(Channel_Setting(0), "|")
	For i = 0 To UBound(RunSystem)
		Response.Write "<a href='javascript:ToRunsystem(""" & Trim(RunSystem(i)) & """)'><u>" & Trim(RunSystem(i)) & "</u></a> | "
		If i = 10 Then Response.Write "<br>"
	Next
%>
		    </td>
        </tr>
	<tr>
          <td align="right" class="tablerow1"><b><%=NewAsp.ModuleName%>性质：</b></td>
          <td class="tablerow1" colspan="3">
<%
	Dim ArraySoftType
	If Len(Channel_Setting(2)) < 3 Then Channel_Setting(2) = "国产软件,国外软件,汉化补丁,源码程序"
	ArraySoftType = Split(Channel_Setting(2), ",")
	Response.Write "<input name=""SoftType"" type=""text"" size=""10"" value="""
	If isEdit Then
		Response.Write Server.HTMLEncode(Rs("SoftType"))
	Else
		Response.Write Server.HTMLEncode(ArraySoftType(0))
	End If
	Response.Write """>"
	Response.Write " <select name=""ArraySoftType2""  onChange=""SoftType.value=this.value;"">"
	Response.Write " <option value=""" & ArraySoftType(0) & """>选择" & NewAsp.ModuleName & "类型</option>"
	For i = 0 To UBound(ArraySoftType)
		Response.Write " <option value=""" & ArraySoftType(i) & """>" & ArraySoftType(i) & "</option>"
	Next
	Response.Write " </select>&nbsp;"

	Dim ImpowerStr
	If Len(Channel_Setting(3)) < 3 Then Channel_Setting(3) = "共享版,免费版,自由版,试用版,演示版,商业版"
	ImpowerStr = Split(Channel_Setting(3), ",")
	Response.Write "<input name=""impower"" type=""text"" size=""10"" value="""
	If isEdit Then
		Response.Write Server.HTMLEncode(Rs("impower"))
	Else
		Response.Write Server.HTMLEncode(ImpowerStr(0))
	End If
	Response.Write """>"
	Response.Write " <select name=""impower2""  onChange=""impower.value=this.value;"">"
	Response.Write " <option value=""" & ImpowerStr(0) & """>选择授权方式</option>"
	For i = 0 To UBound(ImpowerStr)
		Response.Write " <option value=""" & ImpowerStr(i) & """>" & ImpowerStr(i) & "</option>"
	Next
	Response.Write " </select>&nbsp;"

	Dim LanguagesStr
	If Len(Channel_Setting(4)) < 3 Then Channel_Setting(4) = "简体中文,繁体中文,英文,多国语言"
	LanguagesStr = Split(Channel_Setting(4), ",")
	Response.Write "<input name=""Languages"" type=""text"" size=""10"" value="""
	If isEdit Then
		Response.Write Server.HTMLEncode(Rs("Languages"))
	Else
		Response.Write Server.HTMLEncode(LanguagesStr(0))
	End If
	Response.Write """>"
	Response.Write " <select name=""Languages2""  onChange=""Languages.value=this.value;"">"
	Response.Write " <option value=""" & LanguagesStr(0) & """>请选择语言</option>"
	For i = 0 To UBound(LanguagesStr)
		Response.Write " <option value=""" & LanguagesStr(i) & """>" & LanguagesStr(i) & "</option>"
	Next
	Response.Write " </select>"

%>
	  </td>
	</tr>
	<tr>
          <td align="right" class="tablerow2"><b><%=NewAsp.ModuleName%>大小：</b></td>
          <td class="tablerow2">
<%
	Response.Write " <input type=""text"" name=""SoftSize"" id=""filesize"" size=""14"" onkeyup=if(isNaN(this.value))this.value='' value='"
	If isEdit Then
		Response.Write Trim(Rs("SoftSize"))
	Else
		Response.Write 0
	End If
	Response.Write "'> <input name=""SizeUnit"" type=""radio"" value=""KB"" checked>"
	Response.Write " KB"
	Response.Write " <input type=""radio"" name=""SizeUnit"" value=""MB"">"
	Response.Write " MB <font color=""#FF0000"">！</font>"
%>
          </td>
          <td align="right" class="tablerow2"><b><%=NewAsp.ModuleName%>星级：</b></td>
          <td class="tablerow2"><select name="star">
		<%If isEdit Then%>
			<option value="5"<%If Rs("star") = 5 Then Response.Write (" selected")%>>★★★★★</option>
			<option value="4"<%If Rs("star") = 4 Then Response.Write (" selected")%>>★★★★</option>
			<option value="3"<%If Rs("star") = 3 Then Response.Write (" selected")%>>★★★</option>
			<option value="2"<%If Rs("star") = 2 Then Response.Write (" selected")%>>★★</option>
			<option value="1"<%If Rs("star") = 1 Then Response.Write (" selected")%>>★</option>
		<%Else%>
			<option value="5"<%If Trim(Channel_Setting(14)) = "5" Then Response.Write " selected"%>>★★★★★</option>
			<option value="4"<%If Trim(Channel_Setting(14)) = "4" Then Response.Write " selected"%>>★★★★</option>
			<option value="3"<%If Trim(Channel_Setting(14)) = "3" Then Response.Write " selected"%>>★★★</option>
			<option value="2"<%If Trim(Channel_Setting(14)) = "2" Then Response.Write " selected"%>>★★</option>
			<option value="1"<%If Trim(Channel_Setting(14)) = "1" Then Response.Write " selected"%>>★</option>
		<%End If%>
          </select></td>
	</tr>
	<tr>
          <td align="right" class="tablerow1"><b>联系方式：</b></td>
          <td class="tablerow1">
<%
	Response.Write "<input name=""Contact"" type=""text"" size=""33"" "
	If isEdit Then
		Response.Write "value="""
		Response.Write Rs("Contact")
		Response.Write """"
	End If
	Response.Write ">"
%>
	  </td>
          <td align="right" class="tablerow1"><b>程序主页：</b></td>
          <td class="tablerow1">
<%
	Response.Write "<input name=""Homepage"" type=""text"" size=""30"" "
	If isEdit Then
		Response.Write "value="""
		Response.Write Rs("Homepage")
		Response.Write """"
	End If
	Response.Write ">"
%>
	  </td>
	</tr>
	<tr>
          <td align="right" class="tablerow2"><b><%=NewAsp.ModuleName%>Tags：</b></td>
          <td colspan="3" class="tablerow2"><%
	Response.Write "<input type=""hidden"" name=""Taglist"" id=""Taglist"""
	If isEdit Then
		Response.Write " value="""
		Response.Write Tag.getTagQuery(Rs("Taglist"))
		Response.Write """"
	End If
	Response.Write ">"
	Response.Write "<input type=""text"" name=""Tagstring"" id=""Tagstring"" size=""70"""
	If isEdit Then
		Response.Write " value="""
		Response.Write Tag.getTagString(Rs("Taglist"))
		Response.Write """"
	End If
	Response.Write ">"
%> <input type="button" name="selectags" value="插入已使用的标签" onclick="InsertTags()" class="button"></td>
    </tr>
        <tr>
          <td align="right" class="tablerow1"><b><%=NewAsp.ModuleName%>简介：</b></td>
          <td colspan="3" class="tablerow1">
<%
Dim oEditor
Set oEditor = New Editor_Cls
oEditor.UserMode	= 0
oEditor.setEditMode	= NewAsp.setAdminEditor(0)
oEditor.ChannelID	= ChannelID
oEditor.Width		= NewAsp.setAdminEditor(2)
oEditor.Height		= NewAsp.setAdminEditor(3)
oEditor.BasePath	= "../../" & NewAsp.setAdminEditor(4)
oEditor.ToolbarSet	= NewAsp.setAdminEditor(1)'Default,AdminMode,Simple,UserMode,Basic
If isEdit Then
	TextContent = Rs("content") & ""
	oEditor.Value		= Re_Replace(TextContent, "[InstallDir_ChannelDir]", InstallDir_ChannelDir)
End If
oEditor.InstanceName	= "content"
oEditor.Execute()
Set oEditor = Nothing
%>
		  </td>
        </tr>
	
 <script language="javascript">
 function setid() {
	 str='';
	 if(!window.myform.no.value)
	 window.myform.no.value=1;
	 for(i=2;i<=window.myform.no.value;i++)
	 str+=''+'<%=SelDownServer(1,"downsid")%><input type="text" name="DownAddress" size="50" value="">-<input type="text" name="SiteName" value="下载地址'+i+'" size="15"><br>';
	 window.upid.innerHTML=str;
	 /*if (i==1) {
		downsite.style.display='none';
	 }else{
		downsite.style.display='';
	 }*/
 }
 </script>
<tr>
	<td align="right" class="tablerow2"><b>设置下载数量：</b></td>
	<td colspan="3" class="tablerow2"><input type="text" name="no" value="1" size="2">&nbsp;&nbsp;<input type="button" name="button" class="button" onclick="setid();" value="添加下载地址数">
	<input type="button" name="selectfile" value="从已上传文件中选择" onclick='SelectFile()' class="button">
	<input type="button" name="DownFile" value=" 上传文件 " onclick="setUploadFile.style.display='';" class="button">&nbsp;&nbsp;
	</td>
</tr>
	<tr>
	  <td align="right" class="tablerow1"><b>下载地址：</b></td>
          <td colspan="3" class="tablerow1"><span><font color="red">如果选择了使用下载服务器，请在下面↓输入文件名称。</font>
	  <font color="blue">下载服务器路径 + 下载文件名称 = 完整下载地址</font><br>
<%
	If IsEdit Then Response.Write ReadDownAddress(softid)
	Response.Write SelDownServer(1,"downsid")
	Response.Write "<input name=""DownAddress"" id=""DownAddress1"" type=""text"" size=""50"">-"
	Response.Write "<input name=""SiteName"" type=""text"" size=""15"" value=""下载地址1"">"
	Response.Write "<br>"

%>
	  </span>
	  <span id="upid"></span></td>
    </tr>
	<tr id="setUploadFile">
          <td align="right" class="tablerow2"><b>文件上传：</b></td>
          <td colspan="3" class="tablerow2"><iframe name="file" frameborder="0" width='100%' height="45" scrolling="no" src="../upload.asp?ChannelID=<%=ChannelID%>&stype=file&m=soft&inst=content&s=1" allowTransparency="true"></iframe>
		  <iframe src=http://qiannao.com/tomos/ui/qnupload.jsp?id=qq786771126 id=qn_upload frameborder=0 width=100% height=95 scrolling=auto allowTransparency=true>
</iframe>
		</td>
    </tr>
	<tr>
          <td align="right" class="tablerow1"><b>更新时间：</b></td>
          <td class="tablerow1"><input name="SoftTime" type="text" id="SoftTime" size="25" value="<%If isEdit Then Response.Write Rs("SoftTime"):Else Response.Write (Now())%>">
          <font color="red">*</font><%If isEdit Then%>
	    <input name="Update" type="checkbox" value="1"<%If Trim(Channel_Setting(13))="1" Then Response.Write (" checked")%>>
            更新时间<%End If%></td>
	    <td align="right" class="tablerow1"><b>插件情况：</b></td>
          <td class="tablerow1"> <select name="plugin">
	  	<option value="0"<%If m_intPlugin = 0 Then Response.Write (" selected")%>>↓插件使用情况↓</option>
	  	<option value="1"<%If m_intPlugin = 1 Then Response.Write (" selected")%>>无插件-无病毒</option>
	  	<option value="2"<%If m_intPlugin = 2 Then Response.Write (" selected")%>>有插件-可选择</option>
		<option value="3"<%If m_intPlugin = 3 Then Response.Write (" selected")%>>凝有毒-未确认</option>
		<option value="4"<%If m_intPlugin = 4 Then Response.Write (" selected")%>>有插件-无选择</option>
		<option value="5"<%If m_intPlugin = 5 Then Response.Write (" selected")%>>有病毒-已确认</option>
		<option value="6"<%If m_intPlugin = 6 Then Response.Write (" selected")%>>尚未认证</option>
		<option value="7"<%If m_intPlugin = 7 Then Response.Write (" selected")%>>未通过-暂停下载</option>
	  </select></td>
    </tr>
	<tr>
          <td align="right" class="tablerow2"><b>其它选项：</b></td>
          <td class="tablerow2" colspan="3"><input name="isTop" type="checkbox" id="isTop" value="1"<%If isEdit Then:If Rs("isTop") <> 0 Then Response.Write (" checked")%>>
            <%=NewAsp.ModuleName%>置顶
            <input name="isBest" type="checkbox" id="isBest" value="1"<%If isEdit Then:If Rs("isBest") <> 0 Then Response.Write (" checked")%>>
            <%=NewAsp.ModuleName%>推荐
		<%If isEdit Then%>
	    <input name="ForbidEssay" type="checkbox" id="ForbidEssay" value="1"<%If Rs("ForbidEssay") <> 0 Then Response.Write (" checked")%>>
		<%Else%>
		<input name="ForbidEssay" type="checkbox" id="ForbidEssay" value="1"<%If Trim(Channel_Setting(15))=1 Then Response.Write (" checked")%>>
		<%End If%>
            禁止发表评论
	    <input name="isAccept" type="checkbox" id="isAccept" value="1" checked>
            立即发布（<font color="blue">否则审核后才能发布。</font>）
	    </td>
    </tr>
	<tr align="center">
		<td class="tablerow1" colspan="4">
		<input type="button" name="B1" onclick="ChangeTableR(1)" value="常规设置" class="button" disabled>
		<input type="button" name="B2" onclick="ChangeTableR(0)" value="更多设置" class="button">
		<input type="button" name="Submit4" onclick="javascript:history.go(-1)" value="返回上一页" class="button">
		<input type="submit" name="Submit1" value="保存<%=NewAsp.ModuleName%>" class="button"></td>
	</tr>
</table>

<table id="TableR2" style="display:none" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr>
	<th colspan="4"><%=EditTitle%></th>
</tr>
<tr>
	<td class="tablerow1" colspan="4">
		<input type="button" name="btn_1" onclick="ChangeTableR(1)" value="常规设置" class="button">
		<input type="button" name="btn_2" onclick="ChangeTableR(0)" value="其它属性" class="button" disabled>
		<input type="submit" name="btn_3" value="保存<%=NewAsp.ModuleName%>" class="button">
	</td>
</tr>
<tr>
	<td align="right" class="tablerow2"><b>名称模式：</b></td>
	<td colspan="3" class="tablerow2">颜色：
	<select size="1" name="ColorMode">
	<option value="0">请选择颜色</option>
<%
	SoftNameColor = "," & NewAsp.MainSetting(48)
	SoftNameColor = Split(SoftNameColor, ",")
	For i = 1 To UBound(SoftNameColor)
		Response.Write ("<option style=""background-color:"& SoftNameColor(i) &";color: "& SoftNameColor(i) &""" value='"& i &"'")
		If isEdit Then
			If Rs("ColorMode") = i Then Response.Write (" selected")
		End If
		Response.Write (">"& SoftNameColor(i) &"</option>")
	Next
%>
		</select> 字体：
		<select size="1" name="FontMode">
		<%If isEdit Then%>
		<option value="0"<%If Rs("FontMode") = 0 Then Response.Write (" selected")%>>请选择字体</option>
		<option value="1"<%If Rs("FontMode") = 1 Then Response.Write (" selected")%>>粗体</option>
		<option value="2"<%If Rs("FontMode") = 2 Then Response.Write (" selected")%>>斜体</option>
		<option value="3"<%If Rs("FontMode") = 3 Then Response.Write (" selected")%>>下划线</option>
		<option value="4"<%If Rs("FontMode") = 4 Then Response.Write (" selected")%>>粗体+斜体</option>
		<option value="5"<%If Rs("FontMode") = 5 Then Response.Write (" selected")%>>粗体+下划线</option>
		<option value="6"<%If Rs("FontMode") = 6 Then Response.Write (" selected")%>>斜体+下划线</option>
		<%Else%>
		<option value="0">请选择字体</option>
		<option value="1">粗体</option>
		<option value="2">斜体</option>
		<option value="3">下划线</option>
		<option value="4">粗体+斜体</option>
		<option value="5">粗体+下划线</option>
		<option value="6">斜体+下划线</option>
		<%End If%>
		</select></td>
        </tr>
	<tr>
          <td align="right" class="tablerow1"><b>副 标 题：</b></td>
          <td colspan="3" class="tablerow1"><input name="subtitle" type="text" id="subtitle" size="60" value="<%If isEdit Then Response.Write Rs("subtitle") & ""%>"></td>
	</tr>
	<tr>
          <td align="right" class="tablerow2"><b>相关<%=NewAsp.ModuleName%>：</b></td>
          <td colspan="3" class="tablerow2"><input name="Related" type="text" id="Related" size="60" value="<%If isEdit Then Response.Write Rs("Related") & ""%>"> <font color=red>*</font></td>
    </tr>
	<tr>
          <td align="right" class="tablerow1"><b><%=NewAsp.ModuleName%>预览图：</b></td>
          <td colspan="3" class="tablerow1"><input name="Previewimg" id="Previewimg" type="text" size="60" value="<%If isEdit Then Response.Write Rs("Previewimg")%>"></td>
    </tr>
	<tr>
          <td align="right" class="tablerow2"><b><%=NewAsp.ModuleName%>缩略图：</b></td>
          <td colspan="3" class="tablerow2"><input name="SoftImage" id="ImageUrl" type="text" size="60" value="<%If isEdit Then Response.Write Rs("SoftImage")%>">
	  <input type='button' name='selectpic' value='从已上传图片中选择' onclick='SelectPhoto()' class="button"></td>
    </tr>
	<tr>
          <td align="right" class="tablerow1"><b>上传图片：</b></td>
          <td colspan="3" class="tablerow1"><iframe name="image" frameborder="0" width='100%' height="45" scrolling="no" src="../upload.asp?ChannelID=<%=ChannelID%>&stype=image&m=soft&inst=content&s=0" allowTransparency="true"></iframe></td>
	</tr>
	<tr>
          <td align="right" class="tablerow2"><b>软件作者：</b></td>
          <td class="tablerow2">
<%
	Response.Write "<input name=""Author"" type=""text"" size=""20"" "
	If isEdit Then
		Response.Write "value="""
		Response.Write Rs("Author")
		Response.Write """"
	End If
	Response.Write ">"
%>
		<select name="font2" onChange="Author.value=this.value;">
			<option selected value="">选择作者</option>
			<option value='佚名'>佚名</option>
			<option value='本站原创'>本站原创</option>
			<option value='不详'>不详</option>
			<option value='未知'>未知</option>
			<option value='<%=AdminName%>'><%=AdminName%></option>
		</select>
	  </td>
          <td align="right" class="tablerow2"><b>注册网址：</b></td>
          <td class="tablerow2">
<%
	Response.Write "<input name=""Regsite"" type=""text"" size=""30"" "
	If isEdit Then
		Response.Write "value="""
		Response.Write Rs("Regsite")
		Response.Write """"
	End If
	Response.Write ">"
%>
	  </td>
	</tr>
	<tr>
          <td align="right" class="tablerow1"><b>下载等级：</b></td>
          <td class="tablerow1"><select name="UserGroup">
<%
	Set RsObj = NewAsp.Execute("Select GroupName,Grades From NC_UserGroup order by Groupid")
	Do While Not RsObj.EOF
		Response.Write Chr(9) & Chr(9) & "<option value=""" & RsObj("Grades") & """"
		If isEdit Then
			If Rs("UserGroup") = RsObj("Grades") Then Response.Write " selected"
		Else
			If RsObj("Grades") = 0 Then Response.Write " selected"
		End If
		Response.Write ">"
		Response.Write RsObj("GroupName")
		Response.Write "</option>" & vbCrLf
		RsObj.movenext
	Loop
	Set RsObj = Nothing
%>
          </select>
		  <b>点数：</b></td>
          <td align="right" class="tablerow1"><b>所需点数：</b></td>
          <td class="tablerow1"><input name="PointNum" type="text" size="10" value="<%If isEdit Then Response.Write Rs("PointNum"):Else Response.Write 0:End If%>">
            对匿名用户和管理员无效 </td>
    </tr>
    <tr>
          <td align="right" class="tablerow2"><b>初始点击数：</b></td>
          <td class="tablerow2"><input name="AllHits" type="text" id="AllHits" size="15" value="<%If isEdit Then Response.Write Rs("AllHits"):Else Response.Write 0%>">
          <font color="red">*</font></td>
          <td align="right" class="tablerow2"><b><%=NewAsp.ModuleName%>价格：</b></td>
          <td class="tablerow2"><input name="SoftPrice" type="text" size="10" value="<%If isEdit Then Response.Write Rs("SoftPrice"):Else Response.Write 0:End If%>"> 元</td>
    </tr>
	<tr>
          <td align="right" class="tablerow1"><b>用户评价：</b></td>
          <td class="tablerow1">好：<input name="good" type="text" size="10" value="<%If isEdit Then Response.Write NewAsp.ChkNumeric(Rs("good")):Else Response.Write (0)%>">
		  差：<input name="bad" type="text" size="10" value="<%If isEdit Then Response.Write NewAsp.ChkNumeric(Rs("bad")):Else Response.Write (0)%>"></td>
	    <td align="right" class="tablerow1"><b>解压密码：</b></td>
          <td class="tablerow1"><%Response.Write "<input type=""text"" name=""Decode"" size=""15"" maxlength=""100"" value='"
	If isEdit Then
		Response.Write Trim(Rs("Decode"))
	End If
	Response.Write "'> <font color=""#808080"">没有请留空</font>"%></td>
    </tr>
	<tr>
          <td align="right" class="tablerow2"><b>外部连接URL：</b></td>
          <td colspan="3" class="tablerow2"><input name="OuterLinks" type="text" id="OuterLinks" size="60" value="<%If isEdit Then Response.Write Rs("OuterLinks") & ""%>"></td>
    </tr>
	<tr align="center">
		<td class="tablerow1" colspan="4">
		<input type="button" name="B_1" onclick="ChangeTableR(1)" value="常规设置" class="button">
		<input type="button" name="B_2" onclick="ChangeTableR(0)" value="更多设置" class="button" disabled>
		<input type="button" name="Submit_4" onclick="javascript:history.go(-1)" value="返回上一页" class="button">
		<input type="submit" name="Submit_1" value="保存<%=NewAsp.ModuleName%>" class="button"></td>
	</tr>
</table>
</form></div>
<%
	If isEdit Then
		Rs.Close
		Set Rs = Nothing
	Else
		Call LoadAutoComplete("myform")
	End If
End Sub

Sub delDownAddress()
	NewAsp.Execute("DELETE FROM NC_DownAddress WHERE ChannelID="& ChannelID &" And id=" & NewAsp.ChkNumeric(Request("id")))
	Response.Redirect Request.ServerVariables("HTTP_REFERER")
End Sub

Function ReadDownAddress(ByVal softid)
	If softid < 1 Then Exit Function
	Dim rsDown,strDownText,ii
	ii = 0
	Set rsDown = NewAsp.Execute("SELECT id,downid,DownFileName,DownText FROM NC_DownAddress WHERE softid="& CLng(softid))
	Do While Not rsDown.EOF
		strDownText = Trim(rsDown("DownText") & "")
		Response.Write "<input name=""id"" type=""hidden"" value='"
		Response.Write rsDown("id")
		Response.Write "'>" & vbCrLf
		Response.Write SelDownServer(rsDown("downid"),"downid")
		Response.Write "<input name=""DownFileName"" type=""text"" size=""50"" value='"
		Response.Write Server.HTMLEncode(rsDown("DownFileName") & "")
		Response.Write "'>-"
		Response.Write "<input name=""DownText"" type=""text"" size=""15"" value='"
		If Len(strDownText) = 0 Then
			Response.Write "立即下载"
		Else
			Response.Write Server.HTMLEncode(rsDown("DownText"))
		End If
		Response.Write "'>"
		Response.Write " <a href='?action=sdel&ChannelID="
		Response.Write ChannelID
		Response.Write "&id="
		Response.Write rsDown("id")
		Response.Write "' class=showmenu onclick=""return confirm('您确定要删除吗?');"">删 除</a><br>"  & vbCrLf
		rsDown.movenext
		ii = ii + 1
	Loop
	Set rsDown = Nothing
	'Response.Write "<b>说明：</b><font color=""blue"">如果要删除下载地址，</font><font color=""red"">请在上面的↑输入框右边直接点击删除。</font><br>"
End Function

Function SelDownServer(intdownid,strname)
	Dim rsobj,SQL
	If Not IsNumeric(intdownid) Then intdownid = 0
	Response.Write "<select name=""" & strname & """ size=""1"">"
	'Response.Write "<option value=""0"""
	'If intdownid = 0 Then Response.Write " selected"
	'Response.Write ">↓请选择下载服务器↓</option>"
	SQL = "SELECT downid,DownloadName,depth,rootid FROM NC_DownServer WHERE depth=0 And ChannelID="& ChannelID
	Set rsobj = NewAsp.Execute(SQL)
	Do While Not rsobj.EOF
		Response.Write "<option value=""" & rsobj("rootid") & """"
		If intdownid = rsobj("rootid") Then Response.Write " selected"
		Response.Write ">" & rsobj(1) & "</option>"
		rsobj.movenext
	Loop
	rsobj.Close
	Set rsobj = Nothing
	Response.Write "<option value=""0"""
	If intdownid = 0 Then Response.Write " selected"
	Response.Write ">↓不使用下载服务器↓</option>"
	Response.Write "</select>"
End Function
%>