<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>{#$txt_title#} - Powered by HuCart.COM</title>
<link href="./css/bootstrap.min.css" rel="stylesheet">
<link href="./css/info.css" rel="stylesheet">
<script language="javascript" src="{#$base_weburl#}/js/pinyin.js"></script>
<script language="javascript" src="{#$base_weburl#}/js/admin_common.js"></script>
<script src="{#$base_weburl#}/js/jquery.min.js"></script>
<!--[if lt IE 9]>
  <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script language="javascript">
	var webroot_url = '{#$base_weburl#}';
	  function select_all_over(chk,id)
	  {
		var chks = document.getElementsByName(id+'[]');
		for(var i=0; i<chks.length; i++)
		{
		   if(chks[i].type=="checkbox"){
				chks[i].checked=chk.checked;

				var chks_sm = document.getElementsByName('menu_item['+chks[i].value+'][]');
				for(var ism=0; ism<chks_sm.length; ism++)
				{
					chks_sm[ism].checked=chk.checked;
					var chks_three = document.getElementsByName('menu_item['+chks[i].value+']['+chks_sm[ism].value+'][]');
					for(var ithree=0; ithree<chks_three.length; ithree++)
					{
						chks_three[ithree].checked=chk.checked;
					}

				}
		   }
		}
	  }

	function select_two_all(chk,id)
	{
		var chks = document.getElementsByName(id+'[]');
		for(var i=0; i<chks.length; i++)
		{
		   if(chks[i].type=="checkbox"){
		  	 chks[i].checked=chk.checked;
			 select_all(chk,'menu_item['+chk.value+']['+chks[i].value+']');
		   }
		}
	}
</script>
</head>
<body>
    <div class="info-tit"><span class="glyphicon glyphicon-paperclip"> </span> <a href="index.php?load={#$master_act#}&act=info_list" >{#$lang.title#}</a> > <a href="index.php?load={#$master_act#}&act=item_list&id={#$id#}">{#$txt_title#}</a> ({#$lang.need_edit#}&nbsp;&nbsp; {#$lang.need_add#} {#$lang.need_del#})</div>
    <!-- custom con start -->
    <div class="info-add" >
      <form class="form-horizontal" name="add-form" id="add-form" method="post" action="{#$act_url#}">
        <div class="form-group form-group-sm">
		<table class="table table-hover table-condensed">
		{#foreach item=item key=key from=$power_arr#}
        <tr><td>
        <div class="form-group form-group-sm">
          <label class="col-sm-2 control-label" for="i-tit"><h4> <input type="checkbox" name="menu[]" id="menu[{#$key#}]" value="{#$key#}" onClick="select_two_all(this,'menu_item[{#$key#}]')"  {#if $item.is_select eq 1#} checked {#/if#}>&nbsp;&nbsp;{#$item.lang#}</h4></label>
          <div class="col-sm-9">
              {#foreach item=item_sm key=key_sm from=$item.m#}
              <label class="checkbox-inline"  >
  				<input type="checkbox"  name="menu_item[{#$key#}][]" id="menu_item[{#$key#}][]" value="{#$key_sm#}" onClick="select_all(this,'menu_item[{#$key#}][{#$key_sm#}]')" {#if $item_sm.is_select eq 1#} checked {#/if#}><strong>  {#$item_sm.lang#}</strong>
               	{#if $item_sm.arr neq ''#}
                  <div class="checkbox" style="width:100%">
                	{#foreach item=item_thr key=key_thr from=$item_sm.arr#}
                   <label> <input type="checkbox"  name="menu_item[{#$key#}][{#$key_sm#}][]" id="menu_item[{#$key#}][]" value="{#$key_thr#}" {#if $item_thr eq 1#} checked {#/if#} > {#$lang.field_arr[$key][$key_thr]#}</label>
                  {#/foreach#}
                 </div>
                {#/if#}
			 </label>
              {#/foreach#}
          </div>
        </div>
        </td></tr>
        {#/foreach#}
        </table>
        <div class="form-group">
          <div class="col-sm-offset-2 col-sm-10">{#$lang.select_all#} <input type="checkbox" name="allall" id="allall"  onClick="select_all_over(this,'menu')" >&nbsp;&nbsp;&nbsp;&nbsp;
            <button type="submit" class="btn btn-primary  btn-sm" >{#$edit_submit#}</button>&nbsp;&nbsp;&nbsp;&nbsp;
            <button type="reset" class="btn btn-default btn-sm" >{#$lang.reset#}</button>
          </div>
        </div>
        <input type="hidden" name="act_type" value="{#$act_type#}">
        <input type="hidden" name="id" id="id"  value="{#$id#}">
         <input type="hidden" name="adm_id" id="adm_id"  value="{#$item_info.adm_id#}">
      </form>
    </div>
    <!-- custom con end -->
    
    <footer class="footer">
      <div class="container">
        <p class="text-muted">Powered by <a href="http://Www.HuCart.COM" target="_blank">HuCart.COM</a></p>
      </div>
    </footer>

<script src="{#$base_weburl#}/js/base.js"></script>
</body>
</html>