</style> </head> <body> <? if (!isset($_GET['id'])) { ?> <div class='content'><h4>Seleccione un rol</h4></div> <? } else { ?> <div class='row'> <h4><? echo ucfirst(strtolower($rec[0]['nombre'])); ?></h4> <table class="bordered hoverable"> <th>Menú</th> <th>Sub Menú</th> <th>Barra de Menú</th> <th>Crear</th> <th>Editar</th> <th>Eliminar</th> <? foreach ($permiso->findPermiso($_GET['id']) as $value) { $m = $submenu->find($value['id_submenu']); $mp = $menu->find($value['id_menu']); ?> <tr> <td><? echo $mp[0]['ver']; ?></td> <td><? echo $m[0]['ver']; ?></td> <td><input type='checkbox' name='ver' id='<? echo $value['id']; ?>' <? if ($value['ver']==1) echo "checked "; ?> onClick='javascript:updateCheck(this.name,this.id,this.checked);' <? if ($per[0]['editar']==0) echo "disabled"; ?>>Ver</td> <td><input type='checkbox' name='crear' id='<? echo $value['id']; ?>' <? if ($value['crear']==1) echo "checked "; ?> onClick='javascript:updateCheck(this.name,this.id,this.checked);' <? if ($per[0]['editar']==0) echo "disabled"; ?>>Crear</td> <td><input type='checkbox' name='editar' id='<? echo $value['id']; ?>' <? if ($value['editar']==1) echo "checked "; ?> onClick='javascript:updateCheck(this.name,this.id,this.checked);' <? if ($per[0]['editar']==0) echo "disabled"; ?>>Editar</td> <td><input type='checkbox' name='eliminar' id='<? echo $value['id']; ?>' <? if ($value['eliminar']==1) echo "checked "; ?> onClick='javascript:updateCheck(this.name,this.id,this.checked);' <? if ($per[0]['editar']==0) echo "disabled"; ?>>Eliminar</td> </tr> <? } ?> </table> </div> <? } ?>