} ?> <?php } ?> </select> </td> <td colspan="6"></td> </tr> <tr> <td class="privilege" colspan="8"><input type="checkbox" id="selectPermissions" /><label for="selectPermissions">Seleccionar todos los permisos</label></td> </tr> <?php $p = new Permission(); $up = new UserPermission(); $userPermissions = $up->getByIdUser($u->getIdUser()); $sections = Section::findAll(); foreach ($sections as $item) { if ($item->getIdSection() == 11 && !fAuthorization::checkAuthLevel('super')) { continue; } ?> <tr> <td class="privilege" colspan="8"><?php echo $item->prepareName(); ?> </td> </tr> <?php $i = 0; $permissions = $p->getByIdSection($item->getIdSection());
break; case 3: case 4: case 5: case 6: case 7: case 8: fAuthorization::setUserAuthLevel('employee'); break; case 9: default: fAuthorization::setUserAuthLevel('guest'); break; } $up = new UserPermission(); $tmp = $up->getByIdUser($u->prepareIdUser()); $permissions = array('banner' => array(), 'news' => array(), 'classified' => array(), 'social' => array(), 'poll' => array(), 'turism' => array(), 'plaza' => array(), 'autoplus' => array(), 'real' => array(), 'user' => array(), 'franchise' => array()); foreach ($tmp as $item) { switch ($item->prepareIdPermission()) { case 1: $permissions['banner'][] = 'add'; break; case 2: $permissions['banner'][] = 'edit'; break; case 3: $permissions['banner'][] = 'delete'; break; case 4: $permissions['news'][] = 'add'; break;