<!--#include file="Sort_Fun.asp" -->
<%getSort%>
<!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">
<link href="<%=sitepath&adminpath%>css/checkbox.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="../../inc/webuploader/css/webuploader.css" />
<link rel="stylesheet" type="text/css" href="../../inc/webuploader/css/style.css" />
<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 m-t">
      <form method="post" action="?act=edit&Stype=<%=S_type%>&SID=<%=SID%>" class="form-horizontal" id="contentform">
        <div class="col-sm-12">
          <div class="col-sm-6">
            <div class="ibox float-e-margins"> <a class="collapse-link">
              <div class="ibox-title">
                <h5>编辑分类</h5>
                <div class="ibox-tools"> <i class="fa fa fa-chevron-up"></i> </div>
              </div>
              </a>
              <div class="ibox-content">
                <input type="hidden" name="SID"  value="<%=SID%>">
                <div class="form-group">
             
                  <label class="col-sm-2 control-label">分类模型</label>
                  <div class="col-sm-4">
                    <select class="form-control col-sm-2" required name="S_type" id="Stype">
                      <%getMobel s_type,"edit"%>
                    </select>
                  </div>
                       <label class="col-sm-2 control-label">上级分类</label>
                  <div class="col-sm-4">
                    <select class="form-control col-sm-2" name="S_PID">
                      <option value="0">一级分类</option>
                      <%call getsortOption(0,s_pid,"",sid)%>
                    </select>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label">中文标题</label>
                  <div class="col-sm-4">
                    <input type="text" name="S_name" required id="title" placeholder="中文名称" value="<%=S_name%>" class="form-control">
                  </div>
                  <label class="col-sm-2 control-label">英文标题</label>
                  <div class="col-sm-4">
                    <input type="text" name="S_EnName"  id="S_EnName" placeholder="英文名称"  value="<%=S_EnName%>" class="form-control">
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label">分类位置</label>
                  <div class="col-sm-10">
                    <div class="checkbox checkbox-success checkbox-inline">
                      <input type="checkbox" id="S_Postion1" value="menu" name="S_Postion" <%=setchecked(S_Postion,"menu")%>>
                      <label for="S_Postion1"> menu </label>
                    </div>
                    <div class="checkbox checkbox-success checkbox-inline">
                      <input type="checkbox" id="S_Postion2" value="top" name="S_Postion" <%=setchecked(S_Postion,"top")%>>
                      <label for="S_Postion2"> top </label>
                    </div>
                    <div class="checkbox checkbox-success checkbox-inline">
                      <input type="checkbox" id="S_Postion3" value="left" name="S_Postion" <%=setchecked(S_Postion,"left")%>>
                      <label for="S_Postion3"> left </label>
                    </div>
                    <div class="checkbox checkbox-success checkbox-inline">
                      <input type="checkbox" id="S_Postion4" value="end" name="S_Postion" <%=setchecked(S_Postion,"end")%>>
                      <label for="S_Postion4"> end </label>
                    </div>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label">栏目大图</label>
                  <div class="col-sm-5">
                    <input type="text" name="S_Pic" id="spic"  value="<%=S_Pic%>" class="form-control pics">
                  </div>
                  <div class="col-sm-2">
                    <div id="spic_upload">上传</div>
                  </div>
                  <div class="col-sm-2"><img src="<%=S_Pic%>" height="30" id="img_spic"></div>
                </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label">栏目小图</label>
                  <div class="col-sm-5">
                    <input type="text" name="S_ico" id="sico"  value="<%=S_ico%>" class="form-control pics">
                  </div>
                  <div class="col-sm-2">
                	 <div id="sico_upload">上传</div>
                  </div>
                  <div class="col-sm-2"><img src="<%=S_ico%>" height="30" id="img_sico"></div>
                </div>
              </div>
            </div>
          </div>
          
        </div>
        <div class="col-sm-12">
          <div class="col-sm-6">
            <div class="ibox float-e-margins"> <a class="collapse-link">
              <div class="ibox-title">
                <h5>状态管理</h5>
                <div class="ibox-tools"> <i class="fa fa fa-chevron-up"></i> </div>
              </div>
              </a>
              <div class="ibox-content ">
                <div class="form-group">
                  <label class="col-sm-3 control-label">排序</label>
                  <div class="col-sm-3">
                    <input type="text" name="S_Order" id="S_Order" value="<%=S_order%>" class="form-control" >
                  </div>
                  <label class="col-sm-3 control-label">权限</label>
                  <div class="col-sm-3">
                    <select name='s_gid' id='SGID' class="form-control" >
                    <%=getGroupOption(S_GID,0)%>
                  </select>                  
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-3 control-label">其他1</label>
                  <div class="col-sm-9">
                    <input type="text" name="S_other1" id="S_other1"  value="<%=S_other1%>"  class="form-control" >
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-3 control-label">其他2</label>
                  <div class="col-sm-9">
                    <input type="text" name="S_other2" id="S_other2"  value="<%=S_other2%>"  class="form-control" >
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="col-sm-12">
          <div class="  col-md-offset-1">
            <button class="btn btn-primary" type="submit"><i class="fa fa-floppy-o"></i>　保存内容</button>
            <button class="btn btn-white" onClick="closelayer()" type="reset"><i class="fa fa-close"></i> 返回</button>
          </div>
        </div>
      </form>
    </div>
  </div>
  <!-- End Panel Other --> 
</div>
<script src="<%=sitepath%>js/bootstrap.min.js"></script> 
<script type="text/javascript" src="../../inc/webuploader/js/webuploader.js"></script> 
<script type="text/javascript" charset="utf-8" src="../../inc/webuploader/config.asp"></script> 
<script type="text/javascript" src="../../inc/webuploader/js/oneupload.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%>plugins/layer/layer.min.js"></script>
<script src="<%=sitepath&adminPath%>js/adminjs.js"></script>
<script src="<%=sitepath&adminPath%>js/content.min.js"></script> 
<script>
$(function(){ 
	//按钮，类型，上传目录，返回id，命名
	fileuploader("spic_upload","image","sort","spic","pic_<%=sid%>")
	fileuploader("sico_upload","image","sort","sico","ico_<%=sid%>")	
	$("#S_URL").change(function(){ 
	var str=$(this).val();
	$("#S_URL").val(UpperFirstLetter(str))
	}) 	
}) 
$(".pics").change(function(){
	// alert($(this).val())
	$(this).parent().parent().find("img").attr("src",$(this).val()) 
	 })
$('#Stype').change(function(){ 
	var stp=$(this).children('option:selected').attr("stp"); 
	var ctp=$(this).children('option:selected').attr("ctp"); 
	var sfd=$(this).children('option:selected').attr("sfd"); 
	var cfd=$(this).children('option:selected').attr("cfd"); 
	var sname=$(this).children('option:selected').attr("sname"); 
	var cname=$(this).children('option:selected').attr("cname");
	$("#S_Template").prepend("<option value='"+stp+"' selected>"+stp+"</option>");
	$("#C_Template").prepend("<option value='"+ctp+"' selected>"+ctp+"</option>");
	$("#S_Folder").val(sfd);
	$("#C_Folder").val(cfd);
	$("#S_FileName").val(sname);
	$("#C_FileName").val(cname);
	}) 
</script> 
</body>
</html>