<!--#include file="uploads_Fun.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="<%=sitepath%>css/bootstrap.min.css" rel="stylesheet">
<link href="<%=sitepath%>css/font-awesome.min.css" rel="stylesheet">
<link href="<%=sitepath%>css/animate.min.css" rel="stylesheet">
<link href="<%=sitepath%>css/style.min.css" rel="stylesheet">
<link href="<%=sitepath&adminPath%>css/adminstyle.css" rel="stylesheet">
<script src="<%=sitepath%>js/jquery.min.js"></script>
<script src="<%=sitepath%>plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
<!--[if lte IE 9]>
<script src="<%=sitepath%>js/respond.min.js"></script>
<script src="<%=sitepath%>js/html5.js"></script>
<![endif]-->
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">
<div class="ibox float-e-margins">
<div class="row row-lg">
<div class="col-md-6">
							<div class="panel">
								<div class="panel-heading">
									<h3 class="panel-title">上传设置</h3>
									<div class="panel-aj">
										<button type="button" class="btn-toggle-collapse"><i class="fa fa-chevron-down"></i></button>
										<button type="button" class="btn-remove"><i class="fa fa-times"></i></button>
									</div>
								</div>
<div class="panel-body">
<div class="panel-body no-padding">		

<form method="post" action="?act=editsystem" class="form-horizontal" id="contentform">
        <div class="ibox-content">
          <div class="row m-t">
            <div class="col-sm-12">
              <%if isObjInstalled("Scripting.FileSystemObject") then%>
              <div class="panel-body">
                <div class="form-group">
                  <label class="col-sm-2 control-label">FSO权限</label>
                  <span class='badge badge-primary'>支持</span> </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label">上传开关</label>
                  <div class="col-sm-1" id="upLoadMark">
                    <input type="checkbox"  name="upLoadMark" class="js-switch" value="1" <%=checkonoff(upLoadMark,"checked")%>>
                    <span class="help-block m-b-none"><%=checkonoff(upLoadMark,"ch")%></span> </div>
                  <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 关闭后，所有上传功能失效。</span> </div>
                <div class="show-<%=upLoadMark%>" id="showupLoad">
                  <div class="form-group">
                    <label class="col-sm-2 control-label">上传目录</label>
                    <div class="col-sm-4">
                      <input type="text" value="<%=upLoadPath%>" required name="upLoadPath" id="upLoadPath" class="form-control"  onFocus="layer.tips('默认“upload/”，务必以/结尾',this)">
                    </div>
                     <label class="col-sm-1 control-label">子目录</label>
                    <div class="col-sm-2">
                      <select name="datefolder" class="form-control" onclick="layer.tips('图片较多推荐创建',this)">
                      <option value="0" <% if datefolder=0 then echo"selected" end if %>>不创建</option>
                      <option value="1" <% if datefolder=1 then echo"selected" end if %>>创建日期子文件夹</option>
                   
                    </select>
                    </div>
                     <label class="col-sm-1 control-label">重复</label>
                    <div class="col-sm-2">
                      <select name="coverMark" class="form-control"  onclick="layer.tips('推荐使用替换',this)">
                      <option value="0" <% if coverMark=0 then echo"selected" end if %>>尾部加数字</option>
                      <option value="1" <% if coverMark=1 then echo"selected" end if %>>替换</option>
                      <option value="2" <% if coverMark=2 then echo"selected" end if %>>略过</option>
                    </select>
                    </div>
                    
       				</div>
        		      
        
                  <div class="form-group">
                    <label class="col-sm-2 control-label">图片类型</label>
                    <div class="col-sm-4">
                      <input type="text" value="<%=imageExt%>" required name="imageExt" id="imageExt" class="form-control"  onFocus="layer.tips('上传图片允许格式',this)">
                    </div>                    
                    <label class="col-sm-1 control-label">最大</label>
                    <div class="col-sm-2">
                      <input type="text" value="<%=imageMaxSize%>" required name="imageMaxSize" id="imageMaxSize" class="form-control" onFocus="layer.tips('请一定要小于空间限制',this)">
                    </div>
                     <label class="col-sm-1 control-label">命名</label>
                    <div class="col-sm-2">
                      <select name="imageFormat" class="form-control">
                      <option value="{yy}{mm}{dd}{hh}{ii}{ss}{rand:6}" <% if imageFormat="{yy}{mm}{dd}{hh}{ii}{ss}{rand:6}" then echo"selected" end if %>>日期</option>
                      <option value="{pinyin}" <% if imageFormat="{pinyin}" then echo"selected" end if %>>拼音</option>
                      <option value="{filename}" <% if imageFormat="{filename}" then echo"selected" end if %>>原名</option>
                    </select>
                    </div>
               </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">压缩宽度</label>

                    <div class="col-sm-4">
                      <input type="text" value="<%=compresswidth%>" required name="compresswidth" id="compresswidth" class="form-control"  onFocus="layer.tips('超过此宽度缩放',this)">
                    </div>                    
                    <label class="col-sm-1 control-label">压缩高度</label>
                    <div class="col-sm-2">
                      <input type="text" value="<%=compressheight%>" required name="compressheight" id="compressheight" class="form-control" onFocus="layer.tips('超过此高度缩放',this)">
                    </div>
                     <label class="col-sm-1 control-label">压缩质量</label>
                    <div class="col-sm-2">
                    <input type="text" value="<%=compressquality%>" required name="compressquality" id="compressquality" class="form-control" onFocus="layer.tips('压缩质量1-100',this)">
                    </div>
               </div>
                  <div class="form-group">
                    <label class="col-sm-2 control-label">附件类型</label>
                    <div class="col-sm-4">
                      <input type="text" value="<%=fileExt%>" required name="fileExt" id="fileExt" class="form-control"  onFocus="layer.tips('上传附件允许格式',this)">
                    </div>
                    <label class="col-sm-1 control-label">最大</label>
                    <div class="col-sm-2">
                      <input type="text" value="<%=fileMaxSize%>" required name="fileMaxSize" id="fileMaxSize" class="form-control" onFocus="layer.tips('请一定要小于空间限制',this)">
                    </div>
                     <label class="col-sm-1 control-label">命名</label>
                    <div class="col-sm-2">
                      <select name="fileFormat" class="form-control">
                      <option value="{yy}{mm}{dd}{hh}{ii}{ss}{rand:6}" <% if fileFormat="{yy}{mm}{dd}{hh}{ii}{ss}{rand:6}" then echo"selected" end if %>>日期</option>
                      <option value="{pinyin}" <% if fileFormat="{pinyin}" then echo"selected" end if %>>拼音</option>
                      <option value="{filename}" <% if fileFormat="{filename}" then echo"selected" end if %>>原名</option>
                    </select>
                    </div>
                    
                   </div>
                  <div class="form-group">
                    <label class="col-sm-2 control-label">视频类型</label>
                    <div class="col-sm-4">
                      <input type="text" value="<%=videoExt%>" required name="videoExt" id="videoExt" class="form-control" onFocus="layer.tips('上传视频允许格式',this)">
                    </div>
                    <label class="col-sm-1 control-label">最大</label>
                    <div class="col-sm-2">
                      <input type="text" value="<%=videoMaxSize%>" required name="videoMaxSize" id="videoMaxSize" class="form-control" onFocus="layer.tips('请一定要小于空间限制',this)">
                    </div>
                    <label class="col-sm-1 control-label">命名</label>
                    <div class="col-sm-2">
                      <select name="videoFormat" class="form-control">
                      <option value="{yy}{mm}{dd}{hh}{ii}{ss}{rand:6}" <% if videoFormat="{yy}{mm}{dd}{hh}{ii}{ss}{rand:6}" then echo"selected" end if %>>日期</option>
                      <option value="{pinyin}" <% if videoFormat="{pinyin}" then echo"selected" end if %>>拼音</option>
                      <option value="{filename}" <% if videoFormat="{filename}" then echo"selected" end if %>>原名</option>
                    </select>
                    </div>
                    </div>
                       
                    
                    
                  <div class="form-group">
                    <label class="col-sm-2 control-label">微缩图开关</label>
                    <div class="col-sm-1" id="smallMark">
                      <input type="checkbox"  name="smallMark" class="js-switch" value="1" <%=checkonoff(smallMark,"checked")%>>
                      <span class="help-block m-b-none"><%=checkonoff(smallMark,"ch")%></span> </div>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> <%=checkonoff(smallMark,"仅做用于内容管理中设置为缩略图的图片将自动裁切为下面尺寸|关闭后，不再生成缩略图")%></span> </div>
               <div class="show-<%=smallMark%>"  id="showsmall">
                  <div class="form-group">
                    <label class="col-sm-2 control-label">缩略图位置</label>
                        <div class="col-sm-2">
                    <select name="smallMode" class="form-control">
                      <option value="0" <% if smallMode=0 then echo"selected" end if %>>缩放后居中裁切</option>
                      <option value="1" <% if smallMode=1 then echo"selected" end if %>>缩放后左上裁切</option>
                      <option value="2" <% if smallMode=2 then echo"selected" end if %>>宽等比缩放</option>
                      <option value="3" <% if smallMode=3 then echo"selected" end if %>>高等比缩放</option>
                    </select>
                  </div> <a href='?act=setallsmall' class="btn btn-primary1" type="button"><i class="fa fa-refresh"></i> 更新全部缩略图</a> </div>
                  <div class="form-group">
                    <label class="col-sm-2 control-label">缩略图宽</label>
                    <div class="col-sm-2">
                      <input type="text" value="<%=smallwidth%>" required name="smallwidth"  class="form-control"  onFocus="layer.tips('缩略图宽（像素）',this);">
                    </div>
                    <label class="col-sm-2 control-label">缩略图高</label>
                    <div class="col-sm-2">
                      <input type="text" value="<%=smallheight%>" required name="smallheight" class="form-control"  onFocus="layer.tips('缩略图高（像素）',this);">
                    </div>
                    <label class="col-sm-2 control-label">质量度</label>
                    <div class="col-sm-2">
                      <input type="number" value="<%=smallquality%>" required name="smallquality"  class="form-control"  onFocus="layer.tips('影响缩略图大小',this);">
                    </div>
                  </div>
                 </div>
                 
                </div>
              </div>
              <%else%>
              <div class="form-group">
                <label class="col-sm-2 control-label">FSO权限</label>
                <span class='badge badge-primary'>您空间不支持FSO权限，不能开启静态和缓存功能</span> </div>
              <%end if%>
            </div>
          </div>
        </div>
        <div class="ibox-content">
          <div class="row">
            <div class=" col-sm-10 col-md-offset-1">
              <button class="btn btn-primary" type="submit"><i class="fa fa-floppy-o"></i>　保存内容</button>
            </div>
          </div>
        </div>
      </form>

</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="<%=sitepath%>js/bootstrap.min.js"></script> 

<link href="<%=sitepath%>plugins/colorpicker/bootstrap-colorpicker.min.css" rel="stylesheet">
<script src="<%=sitepath%>plugins/switchery/switchery.js"></script>
<link href="<%=sitepath%>plugins/switchery/switchery.css" rel="stylesheet">
<script src="<%=sitepath%>js/klorofil-common.js"></script>
<script src="<%=sitepath%>plugins/layer/layer.min.js"></script> 
<script src="<%=sitepath&adminPath%>js/content.min.js"></script> 
<script>
$(function () {
var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
	elems.forEach(function(html) {
  var switchery = new Switchery(html);
   	html.onchange = function() {
	var help=$(this).parent().find(".help-block")
	if(html.checked==true) {help.text("已开启")}
	else{help.text("已关闭")}
	};
});
  $("#upLoadMark").click(function () {
		    if ($("#upLoadMark input").is(":checked")) {
                $("#showupLoad").css("display", "block");
            }
            else {
                $("#showupLoad").css("display", "none");
            }
        });
  $("#smallMark").click(function () {
		    if ($("#smallMark input").is(":checked")) {
                $("#showsmall").css("display", "block");
            }
            else {
                $("#showsmall").css("display", "none");
            }
        });
});
</script>
</body>
</html>