<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
<title>軟件頻道設置</title>
<link href="css/base.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function AddServer()
{
   if(document.form1.serverurl.value==""||document.form1.serverurl.value=="http://"){ alert('服務器網址不能為空！'); return ;}
   if(document.form1.servername.value==""){ alert('服務器名稱不能為空！'); return ;}
   document.form1.sites.value += document.form1.serverurl.value+" | "+document.form1.servername.value+"\r\n";
}
</script>
</head>
<body background='images/allbg.gif' leftmargin='8' topmargin='8'>
<table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center">
  <form name="form1" action="soft_config.php" method="post">
    <input type="hidden" name="dopost" value="save" />
    <tr> 
      <td height="28" colspan="2" background='images/tbg.gif'> <table width="98%" border="0" cellpadding="0" cellspacing="0">
          <tr> 
            <td width="30%" height="18" style="padding-left:10px;"><strong>軟件頻道設置：</strong></td>
            <td width="70%" align="right">&nbsp;</td>
          </tr>
        </table></td>
    </tr>
    <tr> 
      <td bgcolor="#FFFFFF" width="200">鏈接顯示方式：</td>
      <td bgcolor="#FFFFFF">
      	<input type="radio" name="downtype" class="np" value="0"<?php if($row['downtype']==0) echo " checked='checked' ";?>/>
        直接顯示地址列表 
        <input name="downtype" type="radio" value="1" class="np"<?php if($row['downtype']==1) echo " checked='checked' ";?>/>
        要求進入下載地址列表頁
      </td>
    </tr>
    <tr> 
      <td bgcolor="#FFFFFF">附件下載方式：</td>
      <td bgcolor="#FFFFFF">
      	<input type="radio" name="gotojump" class="np" value="0"<?php if($row['gotojump']==0) echo " checked='checked' ";?>/>
        鏈接到真實軟件地址 
        <input name="gotojump" type="radio" class="np" value="1"<?php if($row['gotojump']==1) echo " checked='checked' ";?>/>
        鏈接到跳轉頁面
      </td>
    </tr>
    <tr> 
      <td bgcolor="#FFFFFF">是否啟用鏡像站點：</td>
      <td bgcolor="#FFFFFF">
      	<input type="radio" name="ismoresite" class="np" value="1"<?php if($row['ismoresite']==1) echo " checked='checked' ";?>/>
        啟用 
        <input name="ismoresite" type="radio" class="np" value="0"<?php if($row['ismoresite']==0) echo " checked='checked' ";?>/>
        不啟用       </td>
    </tr>
    <tr> 
      <td bgcolor="#FFFFFF">啟用鏡像站點後是否保留本地下載：</td>
      <td bgcolor="#FFFFFF">
      	<input type="radio" name="islocal" class="np" value="1"<?php if($row['islocal']==1) echo " checked='checked' ";?>/>
        保留
        <input name="islocal" type="radio" class="np" value="0"<?php if($row['islocal']==0) echo " checked='checked' ";?>/>
        不保留       </td>
    </tr>
    <tr> 
      <td bgcolor="#FFFFFF">鏡像處理方式：</td>
      <td bgcolor="#FFFFFF">
      	<input type="radio" name="moresitedo" class="np" value="1"<?php if($row['moresitedo']==1) echo " checked='checked' ";?>/>
        根據本地地址和服務器列表自動生成
        <input name="moresitedo" type="radio" class="np" value="0"<?php if($row['moresitedo']==0) echo " checked='checked' ";?>/>
        發佈時按服務器生成列表由我手工填寫
      </td>
    </tr>
    <tr> 
      <td bgcolor="#F9FCEF" colspan='2' style="padding-left:10px;"><b>不管是全局，還是具體某軟件設置了下面的參數，附件下載方式都必須鏈接到中轉頁，否則無效！</b></td>
    </td>
    <tr> 
      <td bgcolor="#FFFFFF">下載默認等級：</td>
      <td bgcolor="#FFFFFF">
      	<select name="dfrank" id="dfrank" style="width:150px">
         <?php
              $urank = $cuserLogin->getUserRank();
              $dsql->SetQuery("Select * from `#@__arcrank` where `rank`>=0 ");
              $dsql->Execute();
              while($nrow = $dsql->GetArray())
              {
                	if($nrow['rank']==0) $nrow['membername'] = "開放下載";
                	if($nrow['rank']==$row['dfrank']) echo "     <option value='{$nrow['rank']}' selected>{$nrow['membername']}</option>\r\n";
                	else echo "     <option value='{$nrow['rank']}'>{$nrow['membername']}</option>\r\n";
              }
         ?>
        </select>
      </td>
    </tr>
    <tr> 
      <td bgcolor="#FFFFFF">下載默認金幣：</td>
      <td bgcolor="#FFFFFF">
      	<input type="text" name="dfywboy" class="np" value="<?php echo $row['dfywboy']; ?>" style='width:80px;' />
      </td>
    </tr>
    <tr> 
      <td bgcolor="#FFFFFF">參數限制方式：</td>
      <td bgcolor="#FFFFFF">
      	<input type="radio" name="argrange" class="np" value="0"<?php if($row['argrange']==0) echo " checked='checked' ";?>/>允許發佈時重新選擇權限
      	<input type="radio" name="argrange" class="np" value="2"<?php if($row['argrange']==1) echo " checked='checked' ";?>/>所有軟件均使用此權限
      </td>
    </tr>
    <tr> 
      <td height="26" colspan="2" bgcolor="#F9FCEF" style="padding-left:10px;">
      	<strong>鏡像服務器列表：      </strong></td>
    </tr>
    <tr> 
      <td colspan="2" bgcolor="#FFFFFF">服務器網址： 
        <input name="serverurl" type="text" id="serverurl" value="http://" />
        服務器名稱： 
        <input name="servername" type="text" id="servername" />
		<input type="button" name="Submit" value="增加一項" onClick="AddServer()"  class="coolbg np" />
       </td>
    </tr>
    <tr>
      <td height="62" colspan="2" bgcolor="#FFFFFF"><textarea name="sites" id="sites" style="width:99%;height:150px"><?php echo $row['sites']; ?></textarea></td>
    </tr>
    <tr>
      <td height="26" colspan="2" bgcolor="#F9FCEF" style="padding-left:10px;"><strong>下載說明：</strong></td>
    </tr>
    <tr> 
      <td height="62" colspan="2" bgcolor="#FFFFFF"><?php GetEditor('downmsg',$row['downmsg'],250); ?></td>
    </tr>
    <tr> 
      <td height="41" colspan="2" bgcolor="#F9FCEF" align="center">
      <input type="submit" name="Submit" value="保存設置" class="coolbg np" />　　　　        
        <input type="reset" name="rset" id="rset" value="重置" class="coolbg np" />
      </td>
    </tr>
  </form>
</table>
</body>
</html>
