{:tpl head}
<table cellpadding="0" cellspacing="1" class="table_list">
 <caption>模块管理</caption>
 <tr>
  <td>
   <strong>管理选项：</strong>
   <a href="?c=module&a=add">安装模块</a> |
   <a href="?c=module">管理模块</a>
  </td>
 </tr>
</table>
<div class="tabshead">
 <span>附件模块配置</span>
 <ul class="tabs" id="tabs_list">
  <li class="active">上传配置</li>
  <li>水印配置</li>
 </ul>
</div>
<form action="?c=attachment&a=config" method="post" name="myform">
<input type="hidden" name="id" value="{:$module['id']}" />
<input type="hidden" name="forward" value="{:$referer}" />
<input type="hidden" name="default" value="allowuploadimage=0|allowuploadflash=0|allowuploadmedia=0|allowuploadfile=0" />
<table cellpadding="0" cellspacing="1" class="table_form">
 <tbody id="tabs_list_0">
 <tr>
  <td align="right">上传目录：</td>
  <td><input type="text" size="20" value="{:$data['uploaddir']}" name="info[uploaddir]"> <span class="fred">仅对修改后上传有效</span></td>
 </tr>
 <tr>
  <td align="right">每次附件个数：</td>
  <td><input type="text" size="20" value="{:$data['attachnum']}" name="info[attachnum]"></td>
 </tr>
 <tr>
  <td align="right">上传图片类型：</td>
  <td>
   <input type="text" size="47" value="{:$data['uploadimage']}" name="info[uploadimage]">
   <input type="checkbox" name="info[allowuploadimage]" value="1"{:Tag::checked($data['allowuploadimage'], 1)} />允许前台上传
  </td>
 </tr>
 <tr>
  <td align="right">缩略图宽：</td>
  <td><input type="text" size="10" value="{:$data['constrainw']}" name="info[constrainw]"> 像素</td>
 </tr>
 <tr>
  <td align="right">缩略图高：</td>
  <td><input type="text" size="10" value="{:$data['constrainh']}" name="info[constrainh]"> 像素</td>
 </tr>
 <tr>
  <td align="right">JPEG缩略图质量：</td>
  <td><input type="text" size="3" value="{:$data['constrainq']}" name="info[constrainq]"> <span class="fred">范围为 1~100 的整数，数值越大，结果图片效果越好，文件也越大</span></td>
 </tr>
 <tr>
  <td align="right">无效文件清理周期：</td>
  <td><input type="text" size="3" value="{:$data['deltime']}" name="info[deltime]"> 分钟，<span class="fred">指关联内容ID为0的已上传文件自动清理周期，周期设为0表示手工清理</span></td>
 </tr>
 <tr>
  <td align="right">上传flash类型：</td>
  <td>
   <input type="text" size="47" value="{:$data['uploadflash']}" name="info[uploadflash]">
   <input type="checkbox" name="info[allowuploadflash]" value="1"{:Tag::checked($data['allowuploadflash'], 1)} />允许前台上传
  </td>
 </tr><tr>
  <td align="right">上传媒体类型：</td>
  <td>
   <input type="text" size="47" value="{:$data['uploadmedia']}" name="info[uploadmedia]">
   <input type="checkbox" name="info[allowuploadmedia]" value="1"{:Tag::checked($data['allowuploadmedia'], 1)} />允许前台上传
  </td>
 </tr>
 <tr>
  <td align="right">上传文件类型：</td>
  <td>
   <input type="text" size="47" value="{:$data['uploadfile']}" name="info[uploadfile]">
   <input type="checkbox" name="info[allowuploadfile]" value="1"{:Tag::checked($data['allowuploadfile'], 1)} />允许前台上传
  </td>
 </tr>
 <tr>
  <td align="right">上传文件大小：</td>
  <td><input type="text" size="20" value="{:$data['uploadmaxsize']}" name="info[uploadmaxsize]"> KB&nbsp;&nbsp;<span class="fred">1M=1024K，一般服务器允许最大上传2MB</span></td>
 </tr>
 <tr>
  <td align="right">远程上传类型：</td>
  <td><input type="text" size="60" value="{:$data['remotetype']}" name="info[remotetype]"></td>
 </tr>
 <tr>
  <td align="right">远程上传方式：</td>
  <td><input type="radio" name="info[remotemode]" value="copy"{:Tag::checked($data['remotemode'],'copy')}>Copy，需要<span class="fred">allow_url_fopen</span>支持&nbsp;&nbsp;<input type="radio" name="info[remotemode]" value="socket"{:Tag::checked($data['remotemode'],'socket')}>Socket，Copy方式获取不到时选用</td>
 </tr>
 </tbody>
 <tbody id="tabs_list_1" style="display:none">
 <tr>
  <td align="right" width="22%">开启水印功能：</td>
  <td>
   <input type="radio" name="info[watermarkenable]" value="1"{:Tag::checked($data['watermarkenable'],1)}> 是&nbsp;&nbsp;
   <input type="radio" name="info[watermarkenable]" value="0"{:Tag::checked($data['watermarkenable'],0)}> 否
  </td>
 </tr>
 <tr>
  <td align="right">采集图片水印功能：</td>
  <td>
   <input type="radio" name="info[spiderwatermark]" value="1"{:Tag::checked($data['spiderwatermark'],1)}> 是&nbsp;&nbsp;
   <input type="radio" name="info[spiderwatermark]" value="0"{:Tag::checked($data['spiderwatermark'],0)}> 否
  </td>
 </tr>
 <tr>
  <td align="right">水印方式：</td>
  <td>
   <input type="radio" name="info[watermarktype]" value="0"{:Tag::checked($data['watermarktype'],0)}> 文字&nbsp;&nbsp;
   <input type="radio" name="info[watermarktype]" value="1"{:Tag::checked($data['watermarktype'],1)}> 图片
  </td>
 </tr>
 <tr>
  <td align="right">水印添加条件：</td>
  <td>
   宽 <input type="text" name="info[watermarkw]" value="{:$data['watermarkw']}" size="3"> px &nbsp;
   高 <input type="text" name="info[watermarkh]" value="{:$data['watermarkh']}" size="3"> px &nbsp;<span class="fblue">少于该尺寸则不加水印</span>
  </td>
 </tr>
 <tr>
  <td align="right">水印图片路径：</td>
  <td>
   <input type="text" name="info[watermarkimg]" value="{:$data['watermarkimg']}" size="20">
   <span class="fblue">您可替换文件，以达到不同的水印效果，支持PNG和GIF</span>
  </td>
 </tr>
 <tr>
  <td align="right">水印文字：</td>
  <td>
   <input type="text" name="info[watermarktext]" value="{:$data['watermarktext']}" size="20">
  </td>
 </tr>
 <tr>
  <td align="right">水印文字属性：</td>
  <td>
   大小&nbsp;<input type="text" name="info[watermarkfont]" value="{:$data['watermarkfont']}" size="3">&nbsp;
   颜色&nbsp;<input type="text" name="info[watermarkcolor]" value="{:$data['watermarkcolor']}" size="7">&nbsp;
   字体&nbsp;
   <select name="info[watermarkfontn]">
    <option value=""{:Tag::selected('', $data['watermarkfontn'])}>随机</option>
	<!--{:loop $fonts $font}--><option value="{:$font}"{:Tag::selected($font, $data['watermarkfontn'])}>{:$font}</option><!--{:/loop}-->
   </select>
  </td>
 </tr>
 <tr>
  <td align="right">水印透明度：</td>
  <td>
   <input type="text" name="info[watermarkpct]" value="{:$data['watermarkpct']}" size="3">&nbsp;
   <span class="fblue">范围为 1~100 的整数，数值越小水印图片越透明</span>
  </td>
 </tr>
 <tr>
  <td align="right">JPEG水印图质量：</td>
  <td>
   <input type="text" name="info[watermarkq]" value="{:$data['watermarkq']}" size="3">&nbsp;
   <span class="fblue">范围为 1~100 的整数，数值越大，结果图片效果越好，文件也越大</span>
  </td>
 </tr>
 <tr>
  <td align="right">水印位置：</td>
  <td>
   <input type="radio" name="info[watermarkpos]" value="0"{:Tag::checked($data['watermarkpos'],0)}> 随机
   <table cellspacing="1" cellpadding="1" width="140" bgcolor="#dddddd">
	<tr align="center"  bgcolor="#ffffff">
	 <td><input type="radio" name="info[watermarkpos]" value="1"{:Tag::checked($data['watermarkpos'],1)}> 1</td>
	 <td><input type="radio" name="info[watermarkpos]" value="2"{:Tag::checked($data['watermarkpos'],2)}> 2</td>
	 <td><input type="radio" name="info[watermarkpos]" value="3"{:Tag::checked($data['watermarkpos'],3)}> 3</td>
	</tr>
	<tr align="center"  bgcolor="#ffffff">
	 <td><input type="radio" name="info[watermarkpos]" value="4"{:Tag::checked($data['watermarkpos'],4)}> 4</td>
	 <td><input type="radio" name="info[watermarkpos]" value="5"{:Tag::checked($data['watermarkpos'],5)}> 5</td>
	 <td><input type="radio" name="info[watermarkpos]" value="6"{:Tag::checked($data['watermarkpos'],6)}> 6</td>
	</tr>
	<tr align="center" bgcolor="#ffffff">
	 <td><input type="radio" name="info[watermarkpos]" value="7"{:Tag::checked($data['watermarkpos'],7)}> 7</td>
	 <td><input type="radio" name="info[watermarkpos]" value="8"{:Tag::checked($data['watermarkpos'],8)}> 8</td>
	 <td><input type="radio" name="info[watermarkpos]" value="9"{:Tag::checked($data['watermarkpos'],9)}> 9</td>
	</tr>
   </table>
  </td>
 </tr>
 </tbody>
</table>
<div style="text-align:center">
<button name="submit" type="submit">提交</button>
<button name="back" type="button" onclick="history.go(-1)">返回</button>
</div>
</form>
{:tpl foot}