<!--{template 'download/head'}-->

<script language=javascript>
var i='{$number}';
var id = '{$id}';
</script>
<table width="100%" align="center" cellspacing=0" cellpadding="0" class="tableborder">
  <tr>
    <td width="100%"><form method="post" action="system.php?sys=module&mod={$mod}&channelid={$channelid}&action={$action}" name="myform" onsubmit="return doCheck();" target="post_iframe">
   	<input type="hidden" name="actions" value="update">
	<input type="hidden" name="referer" value="{$_SERVER['HTTP_REFERER']}" />
    	<input type="hidden" name="id" value="{$id}">
    	<input type="hidden" name="dateline" value="{$_output[dateline]}">
	<input type=hidden name=number value="{$number}">
      <table width='100%'  border='0' align='center' cellpadding='0' cellspacing='0'>
        <tr align='center'>
		 <td id='TabTitle0' class='title6' onclick='ShowTabs(0)'>基本属性</td>
          <td id='TabTitle1' class='title5' onclick='ShowTabs(1)'>下载地址</td>
		   <td id='TabTitle2' class='title5' onclick='ShowTabs(2)'>下载属性</td>
            <!--{if $show_money}--><td id='TabTitle3' class='title5' onclick='ShowTabs(3)'>收费选项</td><!--{/if}-->
			<td id='TabTitle4' class='title5' onclick='ShowTabs(4)'>扩展选项</td>
			<!--{if $show_related}--><td id='TabTitle5' class='title5' onclick='ShowTabs(5)'>相关内容</td><!--{/if}-->
          <td >&nbsp;</td>
        </tr>
      </table>
      <table width="100%" align="center" cellspacing="1" cellpadding="4" class="tableborder border" id="down_table">

        <tbody id='Tabs1' style="display:none">
	    <tr>
			<td class="tablerowl" width="10%" height=5></td>
            		<td class="tablerow" width="90%" height=5></td>
            </tr>
	   <!--{if $_output[type] == 1}-->
		<!--镜像模式-->
            <tr>
                      <td class="tablerowl"><font color=red>下载地址</font></td>
                      <td class="tablerow"><input name="urls" type=text class="f-text"  id="urls" size="60" maxlength="255" value="{$urls}" onchange="if(parseInt($('type').value)== 1){this.value='/'+this.value.replace( config.url,'');}"> <input  class='f-button'  type="button" value="上传软件"  id="up" onClick="qmeCms.dialogView.iframe('上传文件','module.php?mod=download&action=upload&id=urls&channelid={$channelid}&file_type=file&javascript=getBrowseSoft',{type:'abs'});"><input  class='f-button'  type=button onclick="SelectBrowse('{$_SET[webpath]}admin/images/browse.html?type=file&channelid={$channelid}&callback=getBrowseSoft','urls',550,360);" value="浏览服务器"></td>
            </tr>
            <tr>
                      <td class="tablerowl"><font color=red>可选服务器</font></td>
                      <td class="tablerow">
						<div class="modify-cate">
							<!--{loop $serverlists $list}--><input type='checkbox' name='serverid[]' <!--{if in_array($list[id], $nowServer)}-->checked<!--{/if}--> value='{$list[id]}' id="serverid_list_{$list[id]}" /><label for="serverid_list_{$list[id]}">{$list[name]}</label><!--{/loop}-->
						</div>
					</td>
            </tr>
	  <!--{else}-->
		<!--普通模式-->
          <tr >
            <td class="tablerowl"></td>
            <td class="tablerow"><input type="button"  class='f-button'  value="下载地址添加" name="addoption" onClick="AddItem();"></td>
          </tr>
	    <!--{loop $downurls $downurl}-->
            <tr>
                <td class="tablerowl"><font color=red>下载地址</font></td>
                <td class="tablerow">
					<input type=text name="url_name[]" class="f-text"  id="url_name_{$downurl[pid]}" size="15" maxlength="30" value="{$downurl[url_name]}">
					<input type=text  name="urls[]" class="f-text"  id="urls_{$downurl[pid]}" size="40" maxlength="255" value="{$downurl[urls]}"><input onclick="save('editurl',{$downurl[pid]},0,this);" value='保存' type='button'  class='f-button' ><input onclick="save('deleteurl',{$downurl[pid]},this.parentNode.parentNode.rowIndex,this);" value='删除' type='button'  class='f-button' ><input type="button"  class='f-button'  value="上传"  onClick="qmeCms.dialogView.iframe('上传文件','module.php?mod=download&action=upload&id=urls_{$downurl[pid]}&channelid={$channelid}&file_type=file&javascript=getBrowseSoft',{type:'abs'});"><input  class='f-button'  type=button onclick="SelectBrowse('{$_SET[webpath]}admin/images/browse.html?type=file&channelid={$channelid}&callback=getBrowseSoft','urls_{$downurl[pid]}',550,360);" value="浏览">
				</td>
            </tr>
	    <!--{/loop}-->
	 <!--{/if}-->
          <tr id="urlsitem">
            <td class="tablerow" colspan="2"> </td>
          </tr>
        </tbody>
        <tbody id='Tabs0'>
          <tr>
            <td class="tablerowl" width="10%"><font color=red>所属分类</font></td>
            <td class="tablerow" width=90%>
				  <div class="modify-cate">
					<select name=cid id="cid"  stye="margin-right:12px;"><option value='0-1'>选择{$channeltitle}所属栏目</option>
						{$strall}
					</select>
				</div>
			</td>
          </tr>
          <tr>
            <td class="tablerowl"><font color=red>软件名称</font></td>
            <td class="tablerow"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td class="tablerow" width=40% style="padding-left:0;">
					  <!--{eval MakeSelectDownload("subject_pre", $_output[subject_pre], 1);}--> 
					<input type=text class="f-text"  name="subject" size="60" value="{$_output[subject]}">
					<input type=text class="f-text"	name='subject_color' onchange="this.style.backgroundColor=this.value" id='subject_color' value="{$_output['subject_color']}" size="7" />
					<input type="button" onclick="return getColor(this, 'subject_color');" value="选择颜色" />
					</td>
                </tr>
              </table></td>
          </tr>
<tr>
	<td class="tablerowl">{$channeltitle}过滤</td>
	<td class="tablerow">
		<div class="modify-cate">
			<!--{echo makeFilterBox($_output['filter']);}-->
		</div>
	</td>
</tr>
          <tr>
            <td class="tablerowl">软件插件</td>
            <td class="tablerow"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td class="tablerow" width=120 style="padding-left:0;"><!--{eval MakeSelectDownload("plugin" ,$_output[plugin]);}--></td>
                  <td class="tablerowl" width=100>软件语言</td>
                  <td class="tablerow" width=120><!--{eval MakeSelectDownload("language",$_output[language]);}--></td>
                  <td class="tablerowl" width=100><font color=red>软件大小</font></td>
                  <td class="tablerow"><input type=text class="f-text" id="soft-size" name="size" size="10" value="{$_output[size]}"> KB</td>
                </tr>
              </table>
          </tr>
        </tr>

        <tr>
          <td class="tablerowl">软件类别</td>
          <td class="tablerow"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td class="tablerow" width=120 style="padding-left:0;"> <!--{eval MakeSelectDownload("softtype",$_output[softtype]);}--> </td>
                <td class="tablerowl" width=100>受权方式</td>
                <td class="tablerow"> <!--{eval MakeSelectDownload("use_type",$_output[use_type]);}--> </td>
              </tr>
            </table>
        </tr>
        
        <tr>
          <td class="tablerowl">运行环境</td>
          <td class="tablerow">
		  <!--{eval makeDownCheckBox('systems', $_output[systems])}-->
			</td>
        </tr>


            <tr>
              <td class="tablerowl">{lang pic}</td>
              <td class="tablerow">
						<input size=50 name="thumb"  class="f-text" type=text id=thumb value="{$_output[thumb]}"> 
						<input type=button  class='f-button'  onclick="qmeCms.dialogView.iframe('上传图片','system.php?sys=upload&id=thumb&channelid={$channelid}&thumb=1',{type:'abs'});" value="上传图片" />
						<input type=button  class='f-button'  onclick="SelectBrowse('{$_SET[webpath]}admin/images/browse.html?type=image&channelid={$channelid}','thumb',550,360);" value="浏览服务器">
				</td>
            </tr>
          <tr>
            <td class="tablerowl"><font color=red>软件简介</font></td>
            <td  class="tablerow"><textarea id=content name="content" style="display:none">{$_output[description]}</textarea>
				<iframe height="300" frameborder="0" width="100%" scrolling="no" src="../images/fck/editor/fckeditor.html?InstanceName=content&amp;Toolbar=Standard&channelid={$channelid}" id="FCKeditor1___Frame" name="FCKeditor1___Frame" style="border: 0pt none ; margin: 0pt; padding: 0pt; background-color: transparent; background-image: none; width: 100%; height: 300px;"></iframe>
            </td>
          </tr>
        </tbody>
 <tbody id='Tabs2' style="display:none">
			<tr>
				<td class="tablerowl" width="60" style="height:30px">已有关键字</td>
				<td class="tablerow">
					<div class="tag-list" id="keyword_start">
						<ul>
							<!--{loop $keywords_array	$key $val}-->
							<li id='tag_{$val[tid]}'>
								<a class="keyword" title="删除" href="###" onclick="return delTag({$val[tid]},{$val[kid]}, this);">{$val[name]}</a>
							</li>
							<!--{/loop}-->				
						</ul>
					</div>
				</td>
			</tr>
  		<tr>
			<td class="tablerowl">添加关键字</td>
			<td class="tablerow"><input type=text class="f-text"  id="name" onkeypress="return Form.ob(event, 'add_tag');"  size="30" /> <input type=button  class='f-button'  id='add_tag' value="添加关键词" onclick="addTag();"  />&nbsp;&nbsp;&nbsp;&nbsp;(<font color=red style="vertical-align:middle">设置关键词,多个关键词用|分割</font>)</td>
 		 </tr>
            <tr>
              <td class="tablerowl">{lang author}</td>
              <td class="tablerow">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td class="tablerow" width=40% style="padding-left:0;"><input type=text class="f-text"  value="{$_output[author]}" name="author" size="20" id="author"></td>
                    <td class="tablerow" width=60% colspan=2></td>
                  </tr>
                </table></td>
            </tr>
            <tr>
              <td class="tablerowl">来源</td>
              <td class="tablerow">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td class="tablerow" width=40% style="padding-left:0;"><input type=text class="f-text"  name="source" value="{$_output[source]}" size="60" id="source"></td>
                    <td class="tablerow" width=60% colspan=2></td>
                  </tr>
                </table></td>
            </tr>
  	   <tr>
		<td class="tablerowl">{$channeltitle}性质</td>
		<td class="tablerow">
			<div class="modify-cate">
				<select name='is_comend' id='is_comend' style="margin-right:15px;">
					<option value="0"<!--{if $_output[is_comend]==0}--> selected<!--{/if}-->>{$channeltitle}推荐等级</option>
					<option value="1"<!--{if $_output[is_comend]==1}--> selected<!--{/if}-->>☆</option>
					<option value="2"<!--{if $_output[is_comend]==2}--> selected<!--{/if}-->>☆☆</option>
					<option value="3"<!--{if $_output[is_comend]==3}--> selected<!--{/if}-->>☆☆☆</option>
					<option value="4"<!--{if $_output[is_comend]==4}--> selected<!--{/if}-->>☆☆☆☆</option>
					<option value="5"<!--{if $_output[is_comend]==5}--> selected<!--{/if}-->>☆☆☆☆☆</option>
				</select>
				<input name='nocoment' type='checkbox' id='nocoment' value='1'<!--{if $_output[nocoment]==1}--> checked<!--{/if}-->><label for="nocoment">禁止评论</label>
				评分等级
				<select name='stars' id='stars'>
					<option value='5'>5星级</option>
					<option value='4'>4星级</option>
					<option value='3' selected>3星级</option>
					<option value='2'>2星级</option>
					<option value='1'>1星级</option>
				</select>
			</div>
		</td>
  		</tr>
		 <!--{if $_SET['modify_views']}-->
	    <tr>
		<td class="tablerowl">初始下载</td>
		<td class="tablerow">
		今日：<input name='dview' type=text class="f-text"  id='dview' value="<!--{eval echo isset($_output[dview])?$_output[dview]:20;}-->" size='10' maxlength=8 style='text-align:center'>
		本周：<input name='wview' type=text class="f-text"  id='wview' value="<!--{eval echo isset($_output[wview])?$_output[wview]:100;}-->" size='10' maxlength=8 style='text-align:center'>
		本月：<input name='mview' type=text class="f-text"  id='mview' value="<!--{eval echo isset($_output[mview])?$_output[mview]:500;}-->" size='10' maxlength=8 style='text-align:center'>
		总共：<input name='views' type=text class="f-text"  id='views' value="<!--{eval echo isset($_output[views])?$_output[views]:1000;}-->" size='10' maxlength=8 style='text-align:center'>
		</td>
  	   </tr>
	   <!--{/if}-->
   	   <tr>
		<td class="tablerowl">{$channeltitle}状态</td>
		<td class="tablerow">
			<div class="modify-cate">
					<input name='status' type='radio'  value='1' id='status_1' /><label for="status_1">草稿</label>
					<input name='status' type='radio'  value='2' id='status_2' /><label for="status_2">未通过审核</label>
					<input name='status' type='radio'  value='3' id='status_3' /><label for="status_3">待审核</label>
					<input name='status' type='radio'  value='0' id='status' checked /><label for="status">通过审核</label>
			</div>
		</td>
  	   </tr>
   <tr>
	<td class=tablerowl align=center >自定义文件名</td>
	<td class=tablerow>
		<p style="padding-top:6px;">
			<input type=text class="f-text" name="filename" id="filename" size=40 maxlength="64" value="{$_output[filename]}" /> <input type="checkbox" name="auto_filename" id="auto_filename" value="1" <!--{if $_SET['auto_filename']}--> checked<!--{/if}--> /><label for="auto_filename">自动生成</label>
		</p>
		<p style="padding:6px 0;color:blue"> 自定义生成静态文件名，只能由英文字母，数字，和-_组成, 不包含文件扩展名 </p>
	</td>
  </tr> 	   
  	   <tr>
		<td class=tablerowl align=center>使用模板</td>
		<td class=tablerow><input type=text class="f-text" name="showphp" id="showphp" size=40 value="{$_output[showphp]}"> <input  class='f-button'  type="button" onclick="SelectBrowse('images/browse.html?type=read&amp;channelid=-1&amp;callback=getDir','showphp',550,360);" value="选择模版"/> 为空则使用系统默认模板</td>
  	   </tr>
 </tbody>
	<!--{if $show_money}-->
	<tbody id='Tabs3' style='display:none'>
	<!--{template 'element/money'}-->
	</tbody>
	<!--{/if}-->
    <tbody id='Tabs4' style='display:none'>
		<!--{template 'element/extend'}-->
  </tbody>
<!--{if $show_related}-->
<tbody id='Tabs5' style='display:none'>
   <!--{template 'element/related'}-->

</tbody>
<!--{/if}-->
	<tbody>
          <tr>
          	<td class="tablerowhighlight tablerowl" width="100%" colspan=2 align="center" id="submitrow" height=30>
			<input type="hidden" name='pid' value="{$pid}">
			<input type="hidden" name="myFormAc" value="update">
			<input type="hidden" name='type' id='type' value="{$_output[type]}">
			<input type="submit" id='submit' value="   保存   " class="f-button" >
        	</td>
          </tr>
        </tbody>

      </table>
	 </form>
</td>
</tr></table>
<script language=javascript>
	selectChecked( 'stars', '{$_output[stars]}');
	var specialid = [];
	    <!--{loop $specialids $key $val}-->
	    specialid[$key] = '{$val[sid]}';
	    <!--{/loop}-->
	selectChecked( 'specialid', specialid);
	selectChecked( 'read_purview', '{$_output[read_purview]}');
	selectChecked( 'pay_type', '{$_output[pay_type]}');
	selectChecked( 'status', '{$_output[status]}');
</script>
<!--{template 'foot'}-->
