012e626f3665f7bd869fb487fb8e19ae.php 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php if (!defined('THINK_PATH')) exit();?><div class="bjui-pageHeader" data-layout-fixed="true">
  2. <div class="bjui-searchBar">
  3. <div class="btn-group">
  4. <!-- showMoreSearch 记住显示状态data-name="custom2" -->
  5. </div>
  6. <!--<span style="float:right;"><a href="" class="btn btn-red" data-icon="arrow-up"><i class="fa fa-arrow-up"></i> 导出</a></span>-->
  7. <span style="float:right;margin-right:20px;">
  8. <a class="btn btn-green" data-toggle="dialog" data-options="{id:'rule_add', url:'/jdxf/admin1.php/home/rule/add',
  9. onClose:'rule_sp',height:350,width:600,mask:true}" data-icon="plus" > 新增功能</a>
  10. </span>
  11. <span><a class="btn btn-orange" href="javascript:;" onclick="loadpage(this)" data-icon="undo"><i class="fa fa-undo"></i> 刷新</a></span>
  12. </div>
  13. </div>
  14. <!--header end -->
  15. <div class="bjui-pageContent">
  16. <table class="table table-condensed table-hover" data-width="100%">
  17. <thead>
  18. <tr>
  19. <th width="150" height="30">一级菜单</th>
  20. <th >二级菜单/三级菜单/节点功能</th>
  21. </tr>
  22. </thead>
  23. <tbody>
  24. <?php if(is_array($list)): foreach($list as $key=>$v): ?><tr>
  25. <td>
  26. <a class="btn btn-green" > <?php echo ($v['title']); ?></a>
  27. </td>
  28. <td>
  29. <Table width="100%">
  30. <?php $list1 = M('auth_rule')->field('id,title,(SELECT COUNT(ID) FROM sp_auth_rule b WHERE b.pid= sp_auth_rule.ID AND `level`=3 ) as clicn')->where(' status=1 and level=2 and pid='.$v['id'])->select(); ?>
  31. <?php if(is_array($list1)): foreach($list1 as $key=>$vo): ?><tr>
  32. <td height="30" width="200" >
  33. <a class="btn btn-green" ><?php echo ($vo['title']); ?></a>
  34. </td>
  35. <td>
  36. <table>
  37. <?php if($vo['clicn'] > 0): $list2 = M('auth_rule')->where(' status=1 and level=3 and pid='.$vo['id'])->select(); ?>
  38. <?php if(is_array($list2)): foreach($list2 as $key=>$voo): ?><tr><td height="30" width="130">
  39. <a class="btn btn-green" ><?php echo ($voo['title']); ?></a>
  40. </td>
  41. <td>
  42. <?php $list3 = M('auth_rule')->where(' status=1 and types=2 and pid='.$voo['id'])->select(); ?>
  43. <?php if(is_array($list3)): $i = 0; $__LIST__ = $list3;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v3): $mod = ($i % 2 );++$i;?><span style="width:90px;">
  44. <a class="btn btn-green" data-toggle="dialog" data-mask="true" data-options="{id:'gn<?php echo ($v3["id"]); ?>', url:'/jdxf/admin1.php/Home/Rule/edit/id/<?php echo ($v3["id"]); ?>',
  45. height:350}" ><?php echo ($v3["title"]); ?></a>
  46. </span><?php endforeach; endif; else: echo "" ;endif; ?>
  47. </td>
  48. </tr><?php endforeach; endif; ?>
  49. <?php else: ?>
  50. <tr>
  51. <td height="30" width="130"></td>
  52. <td>
  53. <?php $list4 = M('auth_rule')->where('types=2 and pid='.$vo['id'])->select(); ?>
  54. <?php if(is_array($list4)): $i = 0; $__LIST__ = $list4;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v4): $mod = ($i % 2 );++$i;?><span style="width:90px;">
  55. <a class="btn btn-green" data-toggle="dialog" data-mask="true" data-options="{id:'gn<?php echo ($v4["id"]); ?>', url:'/jdxf/admin1.php/Home/Rule/edit/id/<?php echo ($v4["id"]); ?>',
  56. height:350}" ><?php echo ($v4["title"]); ?></a>
  57. </span><?php endforeach; endif; else: echo "" ;endif; ?>
  58. </td>
  59. </tr><?php endif; ?>
  60. </table>
  61. </td>
  62. </tr><?php endforeach; endif; ?>
  63. </Table>
  64. </td>
  65. </tr><?php endforeach; endif; ?>
  66. </tbody>
  67. </table>
  68. </div>
  69. <div class="bjui-pageFooter">
  70. 底部模块[如:操作按钮]
  71. </div>