<!--#include file="template_Fun.asp" -->
<%call getFile()%>
<!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>
<link href="<%=sitepath%>plugins/codemirror/codemirror.css" rel="stylesheet">
<link href="<%=sitepath%>plugins/codemirror/ambiance.css" rel="stylesheet">
<!--[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 action="?act=edit" method="post" class="form-horizontal" id="contentform">
        <div class="col-sm-12">
          <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-2 control-label">标题</label>
                <div class="col-sm-9">
                  <input type="text" name="filename" required id="filename" value="<%=filename%>" readonly class="form-control">
                   <input type="hidden" name="filepath" required  value="<%=filepath%>" class="form-control">
                </div>
              </div>
              
              <div class="form-group">
                <label class="col-sm-2 control-label">内容
                  </label>
                <div class="col-sm-9">
                 <textarea name="filetext"  id="CodeMirror" class="diff-textarea CodeMirror" ><%=encode(filetext)%></textarea>
             </div>
              </div>
            </div>
          </div>
        </div>
       
        <div class="col-sm-12">
          <div class=" col-sm-10 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="javascript:history.go(-1);" type="reset">返回</button>
          </div>
        </div>
      </form>
    </div>
  </div>
  <!-- End Panel Other --> 
</div>
<style type="text/css">
      .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;  height: auto;min-height:200px;}
</style>
<script src="<%=sitepath%>js/bootstrap.min.js"></script> 
<script src="<%=sitepath&adminPath%>js/content.min.js"></script>
<script src="<%=sitepath&adminPath%>js/adminjs.js"></script>
<script src="<%=sitepath%>plugins/codemirror/codemirror.js"></script>
<script src="<%=sitepath%>plugins/codemirror/javascript.js"></script>
<script src="<%=sitepath%>plugins/codemirror/active-line.js"></script>
<script src="<%=sitepath%>plugins/codemirror/matchbrackets.js"></script>
  <script>
       $(document).ready(function() {
    var editor= CodeMirror.fromTextArea(document.getElementById("CodeMirror"), {	
        lineNumbers: true,//是否显示行号
		// mode:"shell",　//默认脚本编码
		//lineWrapping:true, //是否强制换行
        matchBrackets: true,
       styleActiveLine: true,		
        theme: "ambiance"
    });  
});
    </script>
</body>
</html>
