美文网首页
权限界面及选中

权限界面及选中

作者: Stonesy | 来源:发表于2019-05-18 16:03 被阅读0次

<html> <head> <title></title> <meta charset="UTF-8" /> </head> <body> <script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script> <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" /> <link rel="stylesheet" type="text/css" href="css/nifty.min.css" /> <div class="panel"> <h1 class="text-center"><span style="color:pink;margin-bottom: 10px;border:3px solid yellow;border-radius: 5px;">超级管理员</span></h1> <form action="" method="post"> <input type="hidden" name="id" value="1"> <table class="table table-striped table-bordered table-hover table-condensed                        "> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                控制台 <input type="checkbox" name="rule_ids[]" value="1" checked="checked" onclick="checkAll(this)">                                            </label> </th> <td class="b-child"> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                测试权限 <input type="checkbox" name="rule_ids[]" value="14" checked="checked" onclick="checkAll(this)">                                                            </label> </th> <td> <label>                                                                         666666666666666 <input type="checkbox" name="rule_ids[]" value="185">                                                                    </label> </td> </tr> </tbody> </table> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                个人中心 <input type="checkbox" name="rule_ids[]" value="143" checked="checked" onclick="checkAll(this)">                                                            </label> </th> <td> <label>                                                                         修改个人资料 <input type="checkbox" name="rule_ids[]" value="144" checked="checked">                                                                    </label> <label>                                                                         rrr <input type="checkbox" name="rule_ids[]" value="173">                                                                    </label> <label>                                                                         哥特风格 <input type="checkbox" name="rule_ids[]" value="186">                                                                    </label> </td> </tr> </tbody> </table> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                爱迪生 <input type="checkbox" name="rule_ids[]" value="148" onclick="checkAll(this)">                                                            </label> </th> <td> <label>                                                                         奥迪生 <input type="checkbox" name="rule_ids[]" value="176">                                                                    </label> </td> </tr> </tbody> </table> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                asd <input type="checkbox" name="rule_ids[]" value="177" onclick="checkAll(this)">                                                            </label> </th> <td> </td> </tr> </tbody> </table> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                小哥哥 <input type="checkbox" name="rule_ids[]" value="182" onclick="checkAll(this)">                                                            </label> </th> <td> </td> </tr> </tbody> </table> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                是否 <input type="checkbox" name="rule_ids[]" value="183" onclick="checkAll(this)">                                                            </label> </th> <td> </td> </tr> </tbody> </table> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                犯桃花 <input type="checkbox" name="rule_ids[]" value="184" onclick="checkAll(this)">                                                            </label> </th> <td> </td> </tr> </tbody> </table> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                111 <input type="checkbox" name="rule_ids[]" value="187" onclick="checkAll(this)">                                                            </label> </th> <td> </td> </tr> </tbody> </table> </td> </tr> <tr class="b-group"> <th width="10%"> <label>                                                权限控制 <input type="checkbox" name="rule_ids[]" value="6" checked="checked" onclick="checkAll(this)">                                            </label> </th> <td class="b-child"> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                权限管理 <input type="checkbox" name="rule_ids[]" value="2" checked="checked" onclick="checkAll(this)">                                                            </label> </th> <td> </td> </tr> </tbody> </table> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                角色管理 <input type="checkbox" name="rule_ids[]" value="3" checked="checked" onclick="checkAll(this)">                                                            </label> </th> <td> <label>                                                                         角色分配权限 <input type="checkbox" name="rule_ids[]" value="15" checked="checked">                                                                    </label> <label>                                                                         添加角色 <input type="checkbox" name="rule_ids[]" value="16" checked="checked">                                                                    </label> <label>                                                                         修改角色 <input type="checkbox" name="rule_ids[]" value="17" checked="checked">                                                                    </label> <label>                                                                         删除角色 <input type="checkbox" name="rule_ids[]" value="18" checked="checked">                                                                    </label> </td> </tr> </tbody> </table> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                用户管理 <input type="checkbox" name="rule_ids[]" value="4" checked="checked" onclick="checkAll(this)">                                                            </label> </th> <td> <label>                                                                         添加用户(管理员) <input type="checkbox" name="rule_ids[]" value="20" checked="checked">                                                                    </label> <label>                                                                         修改用户 <input type="checkbox" name="rule_ids[]" value="21" checked="checked">                                                                    </label> </td> </tr> </tbody> </table> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                添加权限 <input type="checkbox" name="rule_ids[]" value="7" checked="checked" onclick="checkAll(this)">                                                            </label> </th> <td> </td> </tr> </tbody> </table> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                修改权限 <input type="checkbox" name="rule_ids[]" value="8" checked="checked" onclick="checkAll(this)">                                                            </label> </th> <td> </td> </tr> </tbody> </table> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                删除权限 <input type="checkbox" name="rule_ids[]" value="9" checked="checked" onclick="checkAll(this)">                                                            </label> </th> <td> </td> </tr> </tbody> </table> </td> </tr> <tr class="b-group"> <th width="10%"> <label>                                                系统设置 <input type="checkbox" name="rule_ids[]" value="10" checked="checked" onclick="checkAll(this)">                                            </label> </th> <td class="b-child"> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                文章管理 <input type="checkbox" name="rule_ids[]" value="11" checked="checked" onclick="checkAll(this)">                                                            </label> </th> <td> <label>                                                                         新增文章 <input type="checkbox" name="rule_ids[]" value="140" checked="checked">                                                                    </label> <label>                                                                         删除文章 <input type="checkbox" name="rule_ids[]" value="141" checked="checked">                                                                    </label> <label>                                                                         文章编辑 <input type="checkbox" name="rule_ids[]" value="142" checked="checked">                                                                    </label> </td> </tr> </tbody> </table> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                菜单管理 <input type="checkbox" name="rule_ids[]" value="12" checked="checked" onclick="checkAll(this)">                                                            </label> </th> <td> </td> </tr> </tbody> </table> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                日志管理 <input type="checkbox" name="rule_ids[]" value="13" checked="checked" onclick="checkAll(this)">                                                            </label> </th> <td> </td> </tr> </tbody> </table> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                退出登录 <input type="checkbox" name="rule_ids[]" value="19" checked="checked" onclick="checkAll(this)">                                                            </label> </th> <td> </td> </tr> </tbody> </table> </td> </tr> <tr class="b-group"> <th width="10%"> <label>                                                2323                                                <input type="checkbox" name="rule_ids[]" value="149" onclick="checkAll(this)">                                            </label> </th> <td></td> </tr> <tr class="b-group"> <th width="10%"> <label>                                                测试权限2                                                <input type="checkbox" name="rule_ids[]" value="150" onclick="checkAll(this)">                                            </label> </th> <td></td> </tr> <tr class="b-group"> <th width="10%"> <label>                                                666 <input type="checkbox" name="rule_ids[]" value="151" onclick="checkAll(this)">                                            </label> </th> <td class="b-child"> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                54354 <input type="checkbox" name="rule_ids[]" value="152" onclick="checkAll(this)">                                                            </label> </th> <td> <label>                                                                         fadsfds <input type="checkbox" name="rule_ids[]" value="153">                                                                    </label> </td> </tr> </tbody> </table> </td> </tr> <tr class="b-group"> <th width="10%"> <label>                                                test                                                <input type="checkbox" name="rule_ids[]" value="156" onclick="checkAll(this)">                                            </label> </th> <td></td> </tr> <tr class="b-group"> <th width="10%"> <label>                                                测试                                                <input type="checkbox" name="rule_ids[]" value="158" onclick="checkAll(this)">                                            </label> </th> <td></td> </tr> <tr class="b-group"> <th width="10%"> <label>                                                22                                                <input type="checkbox" name="rule_ids[]" value="159" onclick="checkAll(this)">                                            </label> </th> <td></td> </tr> <tr class="b-group"> <th width="10%"> <label>                                                11 <input type="checkbox" name="rule_ids[]" value="161" onclick="checkAll(this)">                                            </label> </th> <td class="b-child"> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                发我二哥 <input type="checkbox" name="rule_ids[]" value="165" onclick="checkAll(this)">                                                            </label> </th> <td> <label>                                                                         fwerherh <input type="checkbox" name="rule_ids[]" value="166">                                                                    </label> </td> </tr> </tbody> </table> </td> </tr> <tr class="b-group"> <th width="10%"> <label>                                                1                                                <input type="checkbox" name="rule_ids[]" value="163" onclick="checkAll(this)">                                            </label> </th> <td></td> </tr> <tr class="b-group"> <th width="10%"> <label>                                                发v                                                <input type="checkbox" name="rule_ids[]" value="167" onclick="checkAll(this)">                                            </label> </th> <td></td> </tr> <tr class="b-group"> <th width="10%"> <label>                                                分类管理 <input type="checkbox" name="rule_ids[]" value="169" onclick="checkAll(this)">                                            </label> </th> <td class="b-child"> <table class="table table-striped table-bordered table-hover table-condensed"> <tbody> <tr class="b-group"> <th width="10%"> <label>                                                                分类列表 <input type="checkbox" name="rule_ids[]" value="170" onclick="checkAll(this)">                                                            </label> </th> <td> <label>                                                                         删除 <input type="checkbox" name="rule_ids[]" value="171">                                                                    </label> </td> </tr> </tbody> </table> </td> </tr> <tr class="b-group"> <th width="10%"> <label>                                                添加友情链接                                                <input type="checkbox" name="rule_ids[]" value="172" onclick="checkAll(this)">                                            </label> </th> <td></td> </tr> <tr class="b-group"> <th width="10%"> <label>                                                测试111                                                <input type="checkbox" name="rule_ids[]" value="174" onclick="checkAll(this)">                                            </label> </th> <td></td> </tr> <tr class="b-group"> <th width="10%"> <label>                                                乔永刚                                                <input type="checkbox" name="rule_ids[]" value="181" onclick="checkAll(this)">                                            </label> </th> <td></td> </tr> <tr> <td colspan="2" style="text-align: center;"> <!-- <input class="btn btn-success" type="submit" value="提交"> --> <button class="btn btn-lg btn-success btn-hover-success btn-rounded" type="submit">修改权限</button> </td> </tr> </tbody> </table> </form> </div> <script> $(function() { var auth_ids = '{$info.auth_ids}'; var auth_ids_array = auth_ids.split(',') for(var i = 0; i < auth_ids_array.length; i++) { for(var j = 0; j < $('input[type=checkbox]').length; j++) { if($('input[type=checkbox]').eq(j).val() == auth_ids_array[i]) { if($('input[type=checkbox]').eq(j).attr('class') != 'dr' && $('input[type=checkbox]').eq(j).attr('class') != 'dc') { $('input[type=checkbox]').eq(j).attr('checked', 'checked'); continue; } } } } }); function checkAll(obj) { $(obj).parents('.b-group').eq(0).find("input[type='checkbox']").prop('checked', $(obj).prop('checked')); } </script> </body></html>

相关文章

网友评论

      本文标题:权限界面及选中

      本文链接:https://www.haomeiwen.com/subject/oeutzqtx.html