<form action="<?=url(RPGM.'menu/?ajax')?>" method="post" id="form2" onsubmit="return yun_submit(this.id)">

<h3 class="title"><span>菜单列表</span><a class="add win" href="<?=url(RPGM.'menunew/?win')?>" >添加新菜单</a><br /></h3>

<div class="in">

  <table width="100%">
    <thead>
      <tr>
        <th width="66">序号</th>
        <th>菜单名称</th>
        <th width="50">ID</th>
        <th width="120">隶属</th>
        <th width="60">主导航</th>
        <th width="60">附导航</th>
        <th width="60">应用</th>
      </tr>
    </thead>
    <tbody>
      <?php foreach($conf['sys_pmenus'] as $id=>$v){?>
      <tr id="ms_<?=$id?>">
        <td><input type="text" name="order[<?=$id?>]" value="<?=htmlspecialchars($v['order'])?>" size="5" maxlength="5" /></td>
        <td><?=htmlxlang($v['name'][LANG])?></td>
        <td><?=$id?></td>
        <td><?php if($v['mod']=='link_'){echo '-自定义链接-';}elseif($v['mod']=='fun_'){ echo '-功能页-';}elseif($v['mod']=='page_'){ echo '-自定义页面-';}elseif($v['mod']=='home_'){ echo '-网站首页-';}else{echo html(modname($v['mod']));}?></td>
        <td><input type="checkbox" name="show_menu[<?=$id?>][]" value="main" <?=in_array('main',$v['show'])?'checked="checked"':''?>/></td>
        <td><input type="checkbox" name="show_menu[<?=$id?>][]" value="foot" <?=in_array('foot',$v['show'])?'checked="checked"':''?>/></td>
        <td><a href="<?=url(RPGM.'menuedit/?win&id='.$id)?>" class="win"><img height="16" width="16" src="<?=THEMEPATH?>images/icons/page_white_edit.png" title="编辑"/></a><a href="javascript:void(0)" onclick="yun_send('<?=url(RPGM.'menudel/?ajax&id='.$id)?>','确定要删除该菜单吗?');return false;"><img height="16" width="16" src="<?=THEMEPATH?>images/icons/page_white_delete.png" title="删除"/></a></td>
      </tr>
     
     <?php if(!isset($conf['sys_pmenus_sub'][$id])) continue; foreach($conf['sys_pmenus_sub'][$id] as $id2=>$v2){?>
      <tr id="ms_<?=$id2?>">
        <td></td>
        <td><input type="text" name="order[<?=$id2?>]" value="<?=htmlspecialchars($v2['order'])?>" size="2" maxlength="2" /> <?=htmlxlang($v2['name'])?></td>
        <td><?=$id2?></td>
        <td><?php if($v2['mod']=='link_'){echo '-自定义链接-';}elseif($v2['mod']=='fun_'){ echo '-功能页-';}elseif($v2['mod']=='page_'){ echo '-自定义页面-';}elseif($v2['mod']=='home_'){ echo '-网站首页-';}else{echo html(modname($v2['mod']));}?></td>
        <td><input type="checkbox" name="show_menu[<?=$id2?>][]" value="main" <?=in_array('main',$v2['show'])?'checked="checked"':''?>/></td>
        <td><input type="checkbox" name="show_menu[<?=$id2?>][]" value="foot" <?=in_array('foot',$v2['show'])?'checked="checked"':''?>/></td>
        <td><a href="<?=url(RPGM.'menuedit/?win&id='.$id2)?>" class="win"><img height="16" width="16" src="<?=THEMEPATH?>images/icons/page_white_edit.png" title="编辑"/></a><a href="javascript:void(0)" onclick="yun_send('<?=url(RPGM.'menudel/?ajax&id='.$id2)?>','确定要删除该菜单吗?');return false;"><img height="16" width="16" src="<?=THEMEPATH?>images/icons/page_white_delete.png" title="删除"/></a></td>
      </tr>      
      <?php }?> 
      <?php }?>
    </tbody>
  </table>

<div align="center" >
	<input value="提交" type="submit" class="button"> 
    <input value="重置" type="reset" class="button">
</div>

</div>

</form>
<script type="text/javascript">
 </script>
