print '<td align="center" class="nowrap">'; print '<a title=' . $langs->trans("All") . ' alt=' . $langs->trans("All") . ' href="perms.php?id=' . $fgroup->id . '&action=addrights&module=' . $obj->module . '#' . $objMod->getName() . '">' . $langs->trans("All") . "</a>"; print '/'; print '<a title=' . $langs->trans("None") . ' alt=' . $langs->trans("None") . ' href="perms.php?id=' . $fgroup->id . '&action=delrights&module=' . $obj->module . '#' . $objMod->getName() . '">' . $langs->trans("None") . "</a>"; print '</td>'; print '<td colspan="2"> </td>'; print '</tr>'; } } print '<tr ' . $bc[$var] . '>'; // Module print '<td class="nowrap">' . img_object('', $picto) . ' ' . $objMod->getName() . '</td>'; if (in_array($obj->id, $permsgroup)) { // Own permission by group if ($caneditperms) { print '<td align="center"><a href="perms.php?id=' . $fgroup->id . '&action=delrights&rights=' . $obj->id . '#' . $objMod->getName() . '">' . img_edit_remove($langs->trans("Remove")) . '</a></td>'; } print '<td align="center">'; print img_picto($langs->trans("Active"), 'tick'); print '</td>'; } else { // Do not own permission if ($caneditperms) { print '<td align="center"><a href="perms.php?id=' . $fgroup->id . '&action=addrights&rights=' . $obj->id . '#' . $objMod->getName() . '">' . img_edit_add($langs->trans("Add")) . '</a></td>'; } print '<td> </td>'; } $perm_libelle = $conf->global->MAIN_USE_ADVANCED_PERMS && $langs->trans("PermissionAdvanced" . $obj->id) != "PermissionAdvanced" . $obj->id ? $langs->trans("PermissionAdvanced" . $obj->id) : ($langs->trans("Permission" . $obj->id) != "Permission" . $obj->id ? $langs->trans("Permission" . $obj->id) : $obj->libelle); print '<td>' . $perm_libelle . '</td>'; print '</tr>'; $i++;
while ($i < $num) { $objp = $db->fetch_object($resql); $var = !$var; print "<tr " . $bc[$var] . ">"; // print '<form method="post" action="rappro.php?account='.$_GET["account"].'">'; // print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; // print "<input type=\"hidden\" name=\"rowid\" value=\"".$objp->rowid."\">"; // Date op print '<td align="center" class="nowrap">' . dol_print_date($db->jdate($objp->do), "day") . '</td>'; // Date value if (!$objp->rappro && ($user->rights->banque->modifier || $user->rights->banque->consolidate)) { print '<td align="center" class="nowrap">'; print '<span id="datevalue_' . $objp->rowid . '">' . dol_print_date($db->jdate($objp->dv), "day") . "</span>"; print ' <span> '; print '<a class="ajax" href="' . $_SERVER['PHP_SELF'] . '?action=dvprev&account=' . $acct->id . '&rowid=' . $objp->rowid . '">'; print img_edit_remove() . "</a> "; print '<a class="ajax" href="' . $_SERVER['PHP_SELF'] . '?action=dvnext&account=' . $acct->id . '&rowid=' . $objp->rowid . '">'; print img_edit_add() . "</a></span>"; print '</td>'; } else { print '<td align="center">'; print dol_print_date($db->jdate($objp->dv), "day"); print '</td>'; } // Type + Number $label = $langs->trans("PaymentType" . $objp->type) != "PaymentType" . $objp->type ? $langs->trans("PaymentType" . $objp->type) : $objp->type; // $objp->type is a code if ($label == 'SOLD') { $label = ''; } print '<td class="nowrap">' . $label . ($objp->num_chq ? ' ' . $objp->num_chq : '') . '</td>';
} if (count($result->rows)) { foreach ($result->rows as $aRow) { print '<tr>'; $object->values->name = $aRow->value->name; $object->values->numero = $aRow->value->numero; $object->values->rights_class = $aRow->value->rights_class; $object->values->id = $aRow->value->id; $object->values->perm = $aRow->value->perm; $object->values->Status = $aRow->value->Status == true ? "true" : "false"; print '<td>' . $aRow->value->id . '</td>'; print '<td>' . img_object('', $aRow->value->picto) . " " . $object->getName() . '</td>'; print '<td>' . $object->getPermDesc() . '<a name="' . $aRow->value->id . '"> </a></td>'; print '<td>'; if ($aRow->value->Status) { print '<a href="' . $_SERVER['PHP_SELF'] . '?id=' . $aRow->value->_id . '&pid=' . $aRow->value->idx . '&action=remove#' . $aRow->value->id . '">' . img_edit_remove() . '</a>'; } else { print '<a href="' . $_SERVER['PHP_SELF'] . '?id=' . $aRow->value->_id . '&pid=' . $aRow->value->idx . '&action=add#' . $aRow->value->id . '">' . img_edit_add() . '</a>'; } print '</td>'; print '</tr>'; } } print '</tbody>'; print '</table>'; $obj->aaSorting = array(array(1, 'asc')); $obj->sDom = 'l<fr>t<\\"clear\\"rtip>'; $obj->iDisplayLength = -1; print $object->datatablesCreate($obj, "default_right"); /* // Break found, it's a new module to catch
$var=!$var; print '<tr '. $bc[$var].'>'; print '<td>'.img_object('',$picto).' '.$objMod->getName(); print '<a name="'.$objMod->getName().'"> </a>'; $perm_libelle=($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id)!=("PermissionAdvanced".$obj->id))?$langs->trans("PermissionAdvanced".$obj->id):(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$obj->libelle)); print '<td>'.$perm_libelle. '</td>'; print '<td align="center">'; if ($obj->bydefault == 1) { print img_tick(); print '</td><td>'; print '<a href="perms.php?pid='.$obj->id.'&action=remove#'.$objMod->getName().'">'.img_edit_remove().'</a>'; } else { print ' '; print '</td><td>'; print '<a href="perms.php?pid='.$obj->id.'&action=add#'.$objMod->getName().'">'.img_edit_add().'</a>'; } print '</td></tr>'; $i++; } } print '</table>';
} print '<tr ' . $bc[$var] . '>'; // Picto and label of permission print '<td>' . img_object('', $picto) . ' ' . $objMod->getName() . '</td>'; // Permission and tick if (!empty($object->admin) && !empty($objMod->rights_admin_allowed)) { if ($caneditperms) { print '<td align="center">' . img_picto($langs->trans("Administrator"), 'star') . '</td>'; } print '<td align="center" class="nowrap">'; print img_picto($langs->trans("Active"), 'tick'); print '</td>'; } else { if (in_array($obj->id, $permsuser)) { if ($caneditperms) { print '<td align="center"><a class="reposition" href="perms.php?id=' . $object->id . '&action=delrights&rights=' . $obj->id . '">' . img_edit_remove($langs->trans("Remove")) . '</a></td>'; } print '<td align="center" class="nowrap">'; print img_picto($langs->trans("Active"), 'tick'); print '</td>'; } else { if (is_array($permsgroupbyentity[$entity])) { if (in_array($obj->id, $permsgroupbyentity[$entity])) { if ($caneditperms) { print '<td align="center">'; print $form->textwithtooltip($langs->trans("Inherited"), $langs->trans("PermissionInheritedFromAGroup")); print '</td>'; } print '<td align="center" class="nowrap">'; print img_picto($langs->trans("Active"), 'tick'); print '</td>';