<!--#include file="about_Fun.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<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%>plugins/bootstrap-table/bootstrap-table.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&adminPath%>js/adminjs.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="ibox-content">
      <div class="row row-lg">
        <div class="col-sm-12">
          <div class="col-sm-7">
           <a id="delall" href='about_fun.asp?act=delall' class="btn btn-danger" type="button"><i class="fa fa-trash"></i> 删除所有未匹配</a>
           <button onclick="parent.$('#custom a').click()" class="btn" type="button"><i class="fa fa-sliders"></i> 参数管理</button>
                <button onClick="location.reload()" class="btn" type="button"><i class="fa fa-refresh"></i> 刷新</button>
               <button onClick="closetab()" class="btn" type="button"><i class="fa fa-reply"></i> 关闭</button>
               </div>
          <FORM name="" action="" id="sortlist" method="post">
            <table id="table"
           data-toggle="table"
           data-pagination="true"
                     data-show-toggle="true"
           data-show-columns="true"
           data-id-field="id"       
           data-id-table="advancedTable"
           data-page-size="20"
           data-page-list="[20,50,100]">
              <thead>
                <tr>               
                  <th class="tableorder" data-field="aid" data-sortable="true">栏目ID</th>    
                  <th class="tableorder" data-field="sid" data-sortable="true">分类ID</th>     
                  <th class="tablename" data-field="sname" data-sortable="true">分类名称</th>   
                  <th class="tabletype" data-field="stype" data-sortable="true">分类类型</th>     
                  <th class="tablename" data-field="A_name">中文名称</th>
                  <th class="tablename" data-field="A_enname">英文名称</th>                       
                  <th class="tableorder" data-field="order" data-sortable="true">排序</th>    
                  <th class="tableorder" data-field="onoff">状态</th>                         
                  <th class="tableedit" data-field="edit" class="text-right">编辑</th>
                </tr>
              </thead>
           <%  
sql="select *,b.S_name,b.S_Type from [dbpre]About as a left join [dbpre]sort as b on(a.A_sid=b.sid) order by A_order asc, AID asc"
Dim rs,aonoff:set rs=dbsqlr1(sql)
'echop sql
	do while not rs.eof 		
		aonoff=dbcount("[dbpre]sort","sid="&rs("A_sID")&" and S_Type='about'")
		echo"<tr>"&vbcrlf& _	
				"<td>"&rs("AID")&"</td>"&vbcrlf& _	
				"<td>"&rs("A_SID")&"</td>"&vbcrlf& _	
				"<td>"&rs("S_name")&"</td>"&vbcrlf& _	
				"<td>"&rs("S_type")&"</td>"&vbcrlf& _	
				"<td><input type='text' class='title' id='A_name-"&rs("AID")&"'  placeholder='"&rs("A_name")&"' value='"&rs("A_name")&"'></td>"&vbcrlf& _	
				"<td><input type='text' class='title' id='A_enname-"&rs("AID")&"'  placeholder='"&rs("A_enname")&"' value='"&rs("A_enname")&"'></td>"&vbcrlf& _	
				"<td><input type='number'  class='order'  min='0' max='99' id='A_order-"&rs("AID")&"'placeholder='"&rs("A_order")&"' value='"&rs("A_order")&"'></td>"&vbcrlf& _	
			    "<td><button type='button' class='btn btn-"&aonoff&"  dim'><i class='fa fa-toggle-on'></i></button>"&vbcrlf& _		
			   	"<td><button type='button' class='btn btn-info dim' onclick=opennew('about_edit.asp?aid="&rs("AID")&"')><i class='fa fa-pencil'></i></button>"
		if aonoff=0 then echo "　<button type='button' class='btn btn-danger dim' onclick=delabout('"&rs("AID")&"')><i class='fa fa-times'></i></button>"
		echo	"</td></tr>"
		
	rs.movenext
	Loop
closers rs

              %>
            </table>
          </FORM>
        </div>
      </div>
    </div>
  </div>
</div>
<!-- End Panel Other -->
</div>
<div id="jieguo"></div>
<script>
function delabout(id){layer.confirm('确定删除吗，删除后不可恢复！',function(){$.post("about_Fun.asp?act=del&id="+id, function(data) {location.reload() });})}
$("#table").on("blur", "input", function() {
    var colval = $(this).val();
    var colplace = $(this).attr('placeholder')
    var colid = $(this).attr('id').split("-")[1];
    var colname = $(this).attr('id').split("-")[0];
    if (colval != colplace) {
        $(this).attr('placeholder', colval);
        $.post("about_Fun.asp?act=saveid&colval="+colval+"&colid="+colid+"&colname="+colname,function(data){layer.msg('保存成功');});
    }
});
</script> 
<script src="<%=sitepath%>js/bootstrap.min.js"></script> 
<script src="<%=sitepath%>plugins/bootstrap-table/bootstrap-table.min.js"></script> 
<script src="<%=sitepath%>plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> 
<script src="<%=sitepath%>plugins/layer/layer.min.js"></script>
</body>
</html>
