<?php
	!defined('IN_MANAGE') && exit('Access Denied!');
?>
<!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=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link href="admin/template/images/tm_right.css" type="text/css" rel="stylesheet" />
<link href="statics/ui-jquery/jquery-ui.css" type="text/css" rel="stylesheet" />
<title>网站后台管理</title>
<script language="javascript" src="statics/ui-jquery/jquery-1.8.3.js"></script>
<script language="javascript" src="statics/ui-jquery/jquery-ui.js"></script>
<script language="javascript" src="admin/template/images/tm-core.js"></script>
</head>

<body>
	<div class="top-tips">
		<div class="tips-wrap">
			<div class="title">上传配置</div>
			设置网站的一些上传配置，如需开启水印请保证上传水印图片。<a href="<?php echo IN_SYS;?>" target="_blank" style="color:#FF0000">获取帮助</a>
		</div>
	</div>
	<form action="" method="post" name="myform" enctype="multipart/form-data">
	<input type="hidden" name="do_submit" value="1" />
	<table class="table-wrap" cellpadding="0" cellspacing="0">
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">允许上传的附件类型<span>*</span></td>
			<td><input type="text" title="请输入允许上传的附件类型" value="<?php echo $settings['uploadtype'];?>" name="setting[uploadtype]" class="input-txt" size="45" /></td>
			<td class="tb-tips">用|分隔，如jpg|png</td>
		</tr>
		<tr>
			<td bgcolor="#EFF7FF"  class="tb-name">允许附件大小<span>*</span></td>
			<td><input type="text" class="input-txt" name="setting[uploadsizelimit]" value="<?php echo $settings['uploadsizelimit'];?>" size="8" /> Byte</td>
			<td class="tb-tips">1MB = 1024 KB ，1KB = 1024 Byte</td>
		</tr>
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">图片是否启用水印<span>*</span></td>
			<td><label><input type="radio" onclick="$('#uploadwatermarkwidthheight').show();" name="setting[uploadwatermarkenable]" <?php echo $settings['uploadwatermarkenable']?' checked="checked"':'';?> value="1" />启用</label> &nbsp;&nbsp;<label><input type="radio" onclick="$('#uploadwatermarkwidthheight').hide();" name="setting[uploadwatermarkenable]" <?php echo $settings['uploadwatermarkenable']?'':' checked="checked"';?> value="0" />禁用</label></td>
			<td class="tb-tips">图片是否启用水印</td>
		</tr>
		<tbody id="uploadwatermarkwidthheight" style="display:<?php echo $settings['uploadwatermarkenable']?'':'none';?>">
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">图片加水印限制<span>*</span></td>
			<td>图片宽度大于：<input type="text" class="input-txt" name="setting[uploadwatermarkwidth]" value="<?php echo $settings['uploadwatermarkwidth'];?>" size="4" /> PX  &nbsp;&nbsp;图片高度大于：<input type="text" class="input-txt" name="setting[uploadwatermarkheight]" value="<?php echo $settings['uploadwatermarkheight'];?>" size="4" /> PX </td>
			<td class="tb-tips">0为所有图片均开启水印</td>
		</tr>
		
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">水印透明度<span>*</span></td>
			<td><input type="text" class="input-txt" name="setting[uploadwatermarkpct]" value="<?php echo $settings['uploadwatermarkpct'];?>" size="4" /></td>
			<td class="tb-tips">范围为 1~100 的整数，数值越小水印图片越透明</td>
		</tr>
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">水印添加位置<span>*</span></td>
			<td colspan="2"><table cellspacing="1" cellpadding="4" width="100%">
					  <tr align="center" ><td><label><input type="radio" class="radio" name="setting[uploadwatermarkpos]" value="1" <?php echo $settings['uploadwatermarkpos']==1?' checked="checked"':'';?>> 顶部居左</label></td><td><label><input type="radio" class="radio" name="setting[uploadwatermarkpos]" value="2" <?php echo $settings['uploadwatermarkpos']==2?' checked="checked"':'';?>> 顶部居中</label></td><td><label><input type="radio" class="radio" name="setting[uploadwatermarkpos]" value="3" <?php echo $settings['uploadwatermarkpos']==3?' checked="checked"':'';?>> 顶部居右</label></td></tr>
					  <tr align="center"><td><label><input type="radio" class="radio" name="setting[uploadwatermarkpos]" value="4" <?php echo $settings['uploadwatermarkpos']==4?' checked="checked"':'';?>> 中部居左</label></td><td><label><input type="radio" class="radio" name="setting[uploadwatermarkpos]" value="5" <?php echo $settings['uploadwatermarkpos']==5?' checked="checked"':'';?>> 中部居中</label></td><td><label><input type="radio" class="radio" name="setting[uploadwatermarkpos]" value="6" <?php echo $settings['uploadwatermarkpos']==6?' checked="checked"':'';?>> 中部居右</label></td></tr>
					  <tr align="center"><td><label><input type="radio" class="radio" name="setting[uploadwatermarkpos]" value="7" <?php echo $settings['uploadwatermarkpos']==7?' checked="checked"':'';?>> 底部居左</label></td><td><label><input type="radio" class="radio" name="setting[uploadwatermarkpos]" value="8" <?php echo $settings['uploadwatermarkpos']==8?' checked="checked"':'';?>> 底部居中</label></td><td><label><input type="radio" class="radio" name="setting[uploadwatermarkpos]" value="9"  <?php echo $settings['uploadwatermarkpos']==9?' checked="checked"':'';?>> 底部居右</label></td></tr>
					  </table>
</td>
		</tr>
		<tr>
			<td bgcolor="#EFF7FF" class="tb-name">水印图片<span>*</span></td>
			<td><?php echo imagebutton('setting','uploadwatermark',$settings['uploadwatermark']);?></td>
			<td class="tb-tips">支持 .Gif/.Png 格式</td>
		</tr>
		</tbody>
		<tr>
			<td colspan="3" class="save-td"><input type="submit" class="save-btn" value="保存设置" /></td>
		</tr>
	</table>
	</form>
</body>
</html>
