<!--{template 'head'}-->
<script type="text/javascript">
setSubject("下载服务器管理");
</script>
<table width="100%" border="0" cellspacing="1" cellpadding="3" align=center class="tableborder">
	<tr>
		<td class="tablerow" colspan=2>
		<p><B>说明</B>：<BR>①、在这里您可以进行添加/删除下载服务器<BR>②、建议添加后的服务器不要轻易删除，下载路径可以根据需要修改、删除</p></td>
	</tr>
	<tr>
		<td class="tablerow"  colspan=2><B>操作选项</B>：<a href="module.php?mod=download&action=server&channelid={$channelid}&action_do=modify">服务器管理首页</a> | <a href="module.php?mod=download&action=server&action_do=add&channelid={$channelid}">添加新的服务器</a></td>
	</tr>
</table>

<!--{if $action_do=='modify'}-->
<table id="mytable" width="100%" class="tableborder" cellspacing="0" cellpadding="0" align=center>
<tr>
<td width="10%" class="tablerowhighlight">服务器名称</td>
<td width="30%" class="tablerowhighlight">服务器地址 </td>
<td width="15%" class="tablerowhighlight">适用范围</td>
<td width="10%" class="tablerowhighlight">状态</td>
<td width="35%" class="tablerowhighlight">操 作</td>
</tr>
<!--{loop $serverlists $serverlist}-->
<tr class="item">
<td width=10% class="tablerowl">{$serverlist[name]}</td>
<td width=30% class="tablerow" style="padding-left:10px;">{$serverlist[serverpath]}</td>
<td width=15% class="tablerow" align=center><!--{if $serverlist[channelid]}-->本频道独享<!--{else}-->下载模型共用<!--{/if}--></td>
<td width=10% class="tablerow" align=center><!--{if $serverlist[is_lock]}-->锁定状态<!--{else}-->正常状态<!--{/if}--></td>
<td width=50% class="tablerow" align=center>
<a onclick="return makeSure();" href="module.php?mod=download&action=server&action_do=del&id={$serverlist[id]}&channelid={$channelid}">删除此服务器</a> |
<a href="module.php?mod=download&action=server&action_do=edit&id={$serverlist[id]}&channelid={$channelid}">服务器修改</a>
</td>
</tr>
<!--{/loop}-->
</table>
<!--{/if}-->

<!--{if $action_do=='add' or $action_do=='edit'}-->
<script>
function doCheck(){
	if (document.myform.name.value=="") {
		alert("请输入服务器名称！");
		document.myform.name.focus();
		return false;
	}
	if (document.myform.serverpath.value=="") {
		alert("请输入服务器路径！");
		document.myform.serverpath.focus();
		return false;
	}
	$('submit-btn').disabled = true;
	return true;
}
</script>
<style>
td.tablerowl{text-align:right;padding-right:10px;}
</style>
<table width="100%" border="0" cellspacing="1" cellpadding="3" align=center class="tableborder">
<tr>
<th colspan=2>添加新的服务器</th>
</tr>
<form action="module.php?mod=download&action=server&channelid={$channelid}&action_do={$action_do}" method=post name='myform' id="myform" onsubmit="return doCheck();">
<tr>
<input type=hidden name=up value=1>
<input type=hidden name=id value={$id}>
<td width="30%" class="tablerowl" height=30>服务器名称</td>
<td width="70%" class="tablerow">
<input type="text" name="name" class="f-text" size="60" value="{$info[name]}">
</td>
</tr>
<tr>
<td height=24 class="tablerowl">服务器路径</td>
<td class="tablerow">
<input type="text" name="serverpath"  class="f-text" size="60" value="{$info[serverpath]}">
</td>
</tr>
<tr>
<td height=30 class="tablerowl">服务器范围</td>
<td class="tablerow"> <select name="channelid">
<!--{if $action_do=='add'}-->
<option value="0">下载模型共用</option>
<option value="{$channelid}" selected>本频道独享</option>
<!--{else}-->
<option <!--{if $info[channelid]==0}-->selected<!--{/if}--> value="0">下载模型共用</option>
<option  <!--{if $info[channelid]==$info[channelid]}-->selected<!--{/if}-->  value="{$info[channelid]}">本频道独享</option>
<!--{/if}-->
</select> </td>
</tr>
<tr>
<td height=30 class="tablerowl">锁定该服务器</td>
<td class="tablerow">
	<input type=radio name='is_lock' id="is_lock_0" value="0" checked /> <label for="is_lock_0">否</label>&nbsp;&nbsp; 
	<input type=radio name='is_lock' id="is_lock_1" value="1" /> <label for="is_lock_1">是</label> &nbsp;&nbsp;&nbsp;(锁定后将不能使用)
</td>
</tr>
<tr>
<td height=24 class="tablerowl">服务器排序</td>
<td class="tablerow">
<input type="text" class="f-text"  name="displayorder" size="10"  value="{$info[displayorder]}">
</td>
</tr>
<tr>
<td class="tablerowl" colspan=2 style="text-align:center;">
<input type="submit" name="Submit" id="submit-btn"  value="添加服务器" class="f-button">
</td>
</tr>
</table>
</form>
<!--{/if}-->
<!--{template 'foot'}-->
