<!--#include file="down_conn.asp"-->
<!--#include file="down_upload.inc"-->
<!-- #include file="inc/const.asp" -->
<!--#include file="down_function.asp"-->
<%
dim flagd,menu,ErrCodes,Errmsg,founderr
Dvbbs.LoadTemplates("")
Dvbbs.Stats="<a href=down_default.asp>下载中心</a>→添加软件"
Dvbbs.Head()'输出头
Dvbbs.Head_var 2,0,Dvbbs.Stats,""
if not DVBBS.founduser then
FoundErrs "你还没有登陆"
end if
sql="select flag from [admin] where username='"&Dvbbs.membername&"'"
set rs=conndown.execute(sql)
if not(rs.eof and rs.bof) then
flagd=rs("flag")
if flagd=5 then
	FoundErrs "<font color=red>你已经被锁定不能添加软件 </font>。请<a href=login.asp>登陆</a>或者同管理员联系。"
elseif (flagd<=0 or flagd="" or flagd>4 or addflag=0) and not dvbbs.master then
	FoundErrs "<font color=red>您没有添加软件的权限</font>。请<a href=login.asp>登陆</a>或者同管理员联系。"
end if
end if
ShowErrs(Dvbbs.Stats)
%>

<form method="POST" name=frmAnnounce action="down_adminsave.asp?action=add" id=up>
  <table width="98%" align="center" cellpadding="1"  cellspacing="1" class="tableborder1">
<tr><th colspan="2" width="100%" height="25"><b>添 加 下 载 程 序</b></th>
  </tr>
		 <tr class="tablebody2">
                <td width="15%" height="20" align="right" valign="top"><b>软件类型：</b></td>
                <td width="85%">
<select class="smallSel" name="classid" size="1" onChange="changelocation(document.frmAnnounce.classid.options[document.frmAnnounce.classid.selectedIndex].value)">		  	  
<%   dim downdir1
        set rs=server.createobject("adodb.recordset")
  	sql="select * from Dclass"
 	rs.open sql,conndown,1,1
	if rs.eof and rs.bof then
		response.write "<option value="" name=classid>没有分类</option>"
	else
	do while not rs.eof
	response.write "<option value='"+CStr(rs("classID"))+"' name=classid>"+rs("class")+"</option>"+chr(13)+chr(10)
	rs.movenext
    	loop
	end if	
	rs.close
	%>        
</select>
&nbsp;&nbsp;选择分类： <select name="Nclassid" size="1">                
<%
	sql="select * from DNclass order by Nclassid"
	rs.open sql,conndown,1,1
	if rs.eof and rs.bof then
		response.write "<option value="" name=Nclassid>没有分类</option>"
	else
        do while not rs.eof
        response.write "<option value='" +  Cstr(rs("Nclassid")) + "' name=Nclassid>" + rs("Nclass") + "</option>"
        rs.MoveNext
        Loop
	end if
        rs.close
	set rs=nothing
	
%>
      </select>**
</td></tr>
<tr class="tablebody2">
          <td width="15%" height="30" align="right"><b>下载属性：</b></td>
          <td width="85%" height="30"><input type=radio name="downshow" value="1">开放下载                                   
<input type=radio name="downshow" value="2" checked>会员下载                                   
<input type=radio name="downshow" value="3" <%if vipshow=1 then response.write "disabled" end if%>>VIP下载 
<%if dvbbs.master  or flagd=1 or flagd=2 then%>
<input type=radio name="downshow" value="6" <%if vipshow=1 then response.write "disabled" end if%>>金牌下载                                   
<input type=radio name="downshow" value="4">特约下载<%end if%>
<input type=radio name="downshow" value="5">付费下载 <input name="money" size=6 value="10">
<input type=radio name="downshow" value="7">帖数下载 <input name="tieshu" size=6 value="10">
</td></tr>
<tr class="tablebody2">
          <td width="15%" height="30" align="right"><b>软件属性：</b></td>
          <td width="85%" height="30"><select name="softsx" size="1">
<option selected value="0" name="softsx">普通软件</option>
<option value="1" name="softsx">RealPlay播放</option>
<option value="2" name="softsx">MediaPlay播放</option>
<option value="3" name="softsx">FLASH动画</option>
</select>**</td>
    </tr>
        <tr class="tablebody2">
          <td width="15%" height="30" align="right"><b>显示名称：</b></td>
          <td width="85%" height="30"><input type="text" name="txtshowname" size="60" class="smallinput" maxlength="100">**</td>
        </tr>

          <tr class="tablebody2"><td width="15%" height="30" align="right"><b>下载地址1：</b></td>
          <td width="85%" height="30"><iframe name=ad frameborder=0 width=250 height=22 scrolling=no src=down_upload.asp></iframe>
          <input type="text" name="txtfilename" size="25"
          class="smallinput" maxlength="100" value="<%=downdir1%>">
          ** <select name="ldown1" size="1">
<option value="0" name="ldown1"selected>★普通连接</option>
<option value="1" name="ldown1">☆本地上传</option>
<option value="2" name="ldown1">※FTP 下载</option></select><font color=red>请正确选择</font></td>
        </tr>
        <tr class="tablebody2">
          <td width="15%" height="30" align="right"><b>下载地址2：</b></td>
          <td width="85%" height="30">
          <iframe name=ad frameborder=0 width=250 height=22 scrolling=no src=down_upload.asp?act=1></iframe>
          <input type="text" name="txtfilename1" size="25"
          class="smallinput" maxlength="100" value="">**  <select name="ldown2" size="1">
<option value="0" name="ldown2"selected>★普通连接</option>
<option value="1" name="ldown2">☆本地上传</option>
<option value="2" name="ldown2">※FTP 下载</option></select><font color=red>请正确选择</font></td>
        </tr>
        <tr class="tablebody2">
          <td width="15%" height="30" align="right"><b>下载地址3：</b></td>
          <td width="85%" height="30">
          <iframe name=ad frameborder=0 width=250 height=22 scrolling=no src=down_upload.asp?act=2></iframe>
          <input type="text" name="txtfilename2" size="25"
          class="smallinput" maxlength="100" value="">**  <select name="ldown3" size="1">
<option value="0" name="ldown3"selected>★普通连接</option>
<option value="1" name="ldown3">☆本地上传</option>
<option value="2" name="ldown3">※FTP 下载</option></select><font color=red>请正确选择</font></td>
        </tr>
<tr class="tablebody2">
          <td width="15%" height="30" align="right"><b>下载地址4：</b></td>
          <td width="85%" height="30">
          <iframe name=ad frameborder=0 width=250 height=22 scrolling=no src=down_upload.asp?act=3></iframe>
          <input type="text" name="txtfilename3" size="25"
          class="smallinput" maxlength="100" value="">** <select name="ldown4" size="1">
<option value="0" name="ldown4"selected>★普通连接</option>
<option value="1" name="ldown4">☆本地上传</option>
<option value="2" name="ldown4">※FTP 下载</option></select><font color=red>请正确选择</font></td>
    </tr>
<tr class="tablebody2">
          <td width="15%" height="30" align="right"><b>下载地址5：</b></td>
          <td width="85%" height="30">
          <iframe name=ad frameborder=0 width=250 height=22 scrolling=no src=down_upload.asp?act=4></iframe>
          <input type="text" name="txtfilename4" size="25"
          class="smallinput" maxlength="100" value="">** <select name="ldown5" size="1">
<option value="0" name="ldown5"selected>★普通连接</option>
<option value="1" name="ldown5">☆本地上传</option>
<option value="2" name="ldown5">※FTP 下载</option></select><font color=red>请正确选择</font></td>
    </tr>
        <tr class="tablebody2">
	  <td width="15%" height="30" align="right"><b>每日下载次数限制：</b></td>
	  <td width="85%" height="30">
<input type="text" name="daydown" size="15"
          class="smallinput" maxlength="100" value="0">人次**（填写“0”表示无限制）</td>
	</tr>
<tr class="tablebody2">
	  <td width="15%" height="30" align="right"><b>下载有效期：</b></td>
	  <td width="85%" height="30">
<select name="usetime" size="1">
<option selected value="0" name="usetime" selected>无限期</option>
<option value="1" name="usetime">一天</option>
<option value="2" name="usetime">二天</option>
<option value="3" name="usetime"">三天</option>
<option value="7" name="usetime">一周</option>
<option value="14" name="usetime"">二周</option>
<option value="30" name="usetime">一个月</option>
<option value="60" name="usetime"">二个月</option>
<option value="90" name="usetime"">三个月</option>
<option value="180" name="usetime">半年</option>
<option value="360" name="usetime">一年</option>
</select>**</td>
	</tr>
	<tr class="tablebody2">
	  <td width="15%" height="30" align="right"><b>推荐度：</b></td>
	  <td width="85%" height="30">
<select name="hot" size="1">
<option selected value="4" name="hot">四星级</option>
<option value="1" name="hot">一星级</option>
<option value="2" name="hot">二星级</option>
<option value="3" name="hot">三星级</option>
<option value="4" name="hot">四星级</option>
<option value="5" name="hot">五星级</option>
</select>**                               
<!--<input type="text" name="hot" size="60" class="smallinput" maxlength="100" value="3">--></td>
	</tr>
	<tr class="tablebody2">
	  <td width="15%" height="30" align="right"><b>运行环境：</b></td>
	  <td width="85%" height="30">
<select name="system" size="1">
<option selected value="Windows9x/NT/xp/03" name="system">Windows9x/NT/xp/03</option>
<option value="手机" name="system">PHP环境</option>
<option value="PHP环境" name="system">CGI环境</option>
<option value="JSP环境" name="system">JSP环境</option>
<option value="ASP环境" name="system">ASP环境</option>
<option value="Linux环境" name="system">Linux环境</option>
</select>**                               
<!--<input type="text" name="system" size="60" class="smallinput" maxlength="100" value="Win98/2000+PWS4&NT+IIS4/5">--></td>
	</tr>
	<tr class="tablebody2">
	  <td width="15%" height="30" align="right"><b>软件大小：</b></td>
	  <td width="85%" height="30"><input type="text" name="size1" size="60"
          class="smallinput" maxlength="100" value="K"></td>
	</tr>
	<tr class="tablebody2">
	  <td width="15%" height="30" align="right"><b>软件来源：</b></td>
	  <td width="85%" height="30"><input type="text" name="fromurl" size="60"
          class="smallinput" maxlength="100" value="http://www.koomv.com/"></td>
	</tr>
	<tr class="tablebody2">
	  <td width="15%" height="30" align="right"><b>授权形式：</b></td>
	  <td width="85%" height="30">
<select name="order" size="1">
<option selected value="免费软件" name="order">免费软件</option>
<option  value="破解软件" name="order">破解软件</option>
<option  value="共享软件" name="order">共享软件</option>
<option value="付费软件" name="order">付费软件</option>
<option value="商业软件" name="order">商业软件</option>
</select>
<!--<input type="text" name="order" size="60" class="smallinput" maxlength="100" value="免费">-->
	是否推荐<input type="checkbox" name="hots" value="on" checked>
<%if flagd<3 or dvbbs.master then%>是否隐藏<input type="checkbox" name="hide" value="on"><font color=red>固顶推荐</font><input type="checkbox" name="guding" value="1"><%end if%>
	</td>
	</tr>
<tr class="tablebody2">
	  <td width="15%" height="30" align="right"><b>上传图片：</b></td>
	  <td width="85%" height="30"><iframe name=ad frameborder=0 width=322 height=25 scrolling=no src=down_picupload.asp></iframe> 
	</td>
	</tr>
	<tr class="tablebody2">
	  <td width="15%" height="30" align="right"><b>软件图片：</b></td>
	  <td width="85%" height="30">
<input type="text" name="pic" size="60"
          class="smallinput" maxlength="100" value="">
	</td>
	</tr>
<tr class="tablebody2"><td width="15%" align="right" valign="top"></td>
<td width="85%"></td>
    </tr>
        <tr class="tablebody2"><td width="15%" align="right" valign="top"><b>程式简介：</b></td>
<td width="85%"><textarea rows="8" name=Content cols="105" class="smallarea"><%=Dvbbs.Forum_info(0)%>_下载中心提供</textarea>**</td>
        </tr>
     <tr align="center"><td class="tablebody2">&nbsp;
</td>
       <td align="left" class="tablebody2"><input type="submit" value=" 添 加 "
  name="cmdok" class="buttonface">
         &nbsp;
         <input type="reset" value=" 清 除 " 
  name="cmdcancel" class="buttonface"></td>
    </tr>     
</table>
</form>
<%dim Count
set rs=server.createobject("adodb.recordset")
     sql = "select * from DNclass order by Nclassid asc"
     rs.open sql,conndown,0,1
%>
<SCRIPT language = "JavaScript">
    var onecount;
    onecount=0;
    subcat = new Array();
        <%count = 0
        do while not rs.eof %>
    subcat[<%=count%>] = new Array("<%= trim(rs("Nclass"))%>","<%=cstr(rs("classid"))%>","<%=cstr(rs("Nclassid"))%>");<%count = count + 1
        rs.movenext
        loop
        rs.close
        %>
    onecount=<%=count%>;

function changelocation(locationid)
    {
    document.frmAnnounce.Nclassid.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.frmAnnounce.Nclassid.options[document.frmAnnounce.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
    </SCRIPT> <br>
</body>
</html>


