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++; } } print '</table>'; } llxFooter(); $db->close();
print '<td colspan="' . ($rowspan ? '3' : '4') . '">'; print dol_print_date($db->jdate($objp->do), "day"); print '</td>'; } print '</tr>'; // Value date print "<tr><td>" . $langs->trans("DateValue") . "</td>"; if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print '<td colspan="3">'; print $form->select_date($db->jdate($objp->dv), 'datev', '', '', '', 'update', 1, 0, 1, $objp->rappro); if (!$objp->rappro) { print ' '; print '<a href="' . $_SERVER['PHP_SELF'] . '?action=dvprev&id=' . $id . '&rowid=' . $objp->rowid . '">'; print img_edit_remove() . "</a> "; print '<a href="' . $_SERVER['PHP_SELF'] . '?action=dvnext&id=' . $id . '&rowid=' . $objp->rowid . '">'; print img_edit_add() . "</a>"; } print '</td>'; } else { print '<td colspan="' . ($rowspan ? '3' : '4') . '">'; print dol_print_date($db->jdate($objp->dv), "day"); print '</td>'; } print "</tr>"; // Description print "<tr><td>" . $langs->trans("Label") . "</td>"; if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print '<td colspan="3">'; print '<input name="label" class="flat" ' . ($objp->rappro ? ' disabled' : '') . ' value="'; if (preg_match('/^\\((.*)\\)$/i', $objp->label, $reg)) { // Label generique car entre parentheses. On l'affiche en le traduisant
$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>'; // Description print '<td valign="center"><a href="' . DOL_URL_ROOT . '/compta/bank/ligne.php?rowid=' . $objp->rowid . '&account=' . $acct->id . '">';
$sql .= " FROM " . MAIN_DB_PREFIX . "menu as m"; $sql .= " WHERE menu_handler = '" . $menu_handler_to_search . "'"; $sql .= " AND entity = " . $conf->entity; $sql .= " AND fk_menu >= 0"; $sql .= " ORDER BY m.position, m.rowid"; // Order is position then rowid (because we need a sort criteria when position is same) $res = $db->query($sql); if ($res) { $num = $db->num_rows($res); $i = 1; while ($menu = $db->fetch_array($res)) { if (!empty($menu['langs'])) { $langs->load($menu['langs']); } $titre = $langs->trans($menu['titre']); $data[] = array('rowid' => $menu['rowid'], 'fk_menu' => $menu['fk_menu'], 'title' => $titre, 'mainmenu' => $menu['mainmenu'], 'leftmenu' => $menu['leftmenu'], 'fk_mainmenu' => $menu['fk_mainmenu'], 'fk_leftmenu' => $menu['fk_leftmenu'], 'entry' => '<table class="nobordernopadding centpercent"><tr><td>' . '<strong> <a href="edit.php?menu_handler=' . $menu_handler_to_search . '&action=edit&menuId=' . $menu['rowid'] . '">' . $titre . '</a></strong>' . '</td><td align="right">' . '<a href="edit.php?menu_handler=' . $menu_handler_to_search . '&action=edit&menuId=' . $menu['rowid'] . '">' . img_edit('default', 0, 'class="menuEdit" id="edit' . $menu['rowid'] . '"') . '</a> ' . '<a href="edit.php?menu_handler=' . $menu_handler_to_search . '&action=create&menuId=' . $menu['rowid'] . '">' . img_edit_add('default') . '</a> ' . '<a href="index.php?menu_handler=' . $menu_handler_to_search . '&action=delete&menuId=' . $menu['rowid'] . '">' . img_delete('default') . '</a> ' . ' ' . '<a href="index.php?menu_handler=' . $menu_handler_to_search . '&action=up&menuId=' . $menu['rowid'] . '">' . img_picto("Monter", "1uparrow") . '</a><a href="index.php?menu_handler=' . $menu_handler_to_search . '&action=down&menuId=' . $menu['rowid'] . '">' . img_picto("Descendre", "1downarrow") . '</a>' . '</td></tr></table>'); $i++; } } // Appelle de la fonction recursive (ammorce) // avec recherche depuis la racine. //var_dump($data); tree_recur($data, $data[0], 0); print '</td>'; print '</tr>'; print '</table>'; print '</div>'; /* * Boutons actions */ print '<div class="tabsAction">';
/** * Show an element with correct offset * * @param array $tab Array of all elements * @param int $rang Level of offset * @return void */ function tree_showline($tab, $rang) { global $conf, $rangLast, $idLast, $menu_handler; if ($conf->use_javascript_ajax) { if ($rang == $rangLast) { print '<script type="text/javascript">imgDel(' . $idLast . ');</script>'; //print '<a href="'.DOL_URL_ROOT.'/admin/menus/index.php?menu_handler=eldy&action=delete&menuId='.$idLast.'">aa</a>'; } elseif ($rang > $rangLast) { print '<li><ul>'; } elseif ($rang < $rangLast) { print '<script type="text/javascript">imgDel(' . $idLast . ')</script>'; for ($i = $rang; $i < $rangLast; $i++) { print '</ul></li>'; echo "\n"; } } } else { if ($rang > $rangLast) { print '<li><ul>'; } elseif ($rang < $rangLast) { for ($i = $rang; $i < $rangLast; $i++) { print '</ul></li>'; echo "\n"; } } } print '<li id=li' . $tab[0] . '>'; // Content of line print '<strong> <a href="edit.php?menu_handler=' . $menu_handler . '&action=edit&menuId=' . $tab[0] . '">' . $tab[2] . '</a></strong>'; print '<div class="menuEdit"><a href="edit.php?menu_handler=' . $menu_handler . '&action=edit&menuId=' . $tab[0] . '">' . img_edit('default', 0, 'class="menuEdit" id="edit' . $tab[0] . '"') . '</a></div>'; print '<div class="menuNew"><a href="edit.php?menu_handler=' . $menu_handler . '&action=create&menuId=' . $tab[0] . '">' . img_edit_add('default', 0, 'class="menuNew" id="new' . $tab[0] . '"') . '</a></div>'; print '<div class="menuDel"><a href="index.php?menu_handler=' . $menu_handler . '&action=delete&menuId=' . $tab[0] . '">' . img_delete('default', 0, 'class="menuDel" id="del' . $tab[0] . '"') . '</a></div>'; print '<div class="menuFleche"><a href="index.php?menu_handler=' . $menu_handler . '&action=up&menuId=' . $tab[0] . '">' . img_picto("Monter", "1uparrow") . '</a><a href="index.php?menu_handler=' . $menu_handler . '&action=down&menuId=' . $tab[0] . '">' . img_picto("Descendre", "1downarrow") . '</a></div>'; print '</li>'; echo "\n"; $rangLast = $rang; $idLast = $tab[0]; }
$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 '</div>'; $db->close(); llxFooter('$Date: 2011/08/01 12:53:37 $ - $Revision: 1.43 $');
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 if ($oldmod <> $obj->module) { $oldmod = $obj->module;
print '</td>'; } print '<td align="center" class="nowrap">'; print img_picto($langs->trans("Active"), 'tick'); print '</td>'; } else { // Do not own permission if ($caneditperms) { print '<td align="center"><a class="reposition" href="perms.php?id=' . $object->id . '&action=addrights&entity=' . $entity . '&rights=' . $obj->id . '">' . img_edit_add($langs->trans("Add")) . '</a></td>'; } print '<td> </td>'; } } else { // Do not own permission if ($caneditperms) { print '<td align="center"><a class="reposition" href="perms.php?id=' . $object->id . '&action=addrights&entity=' . $entity . '&rights=' . $obj->id . '">' . img_edit_add($langs->trans("Add")) . '</a></td>'; } print '<td> </td>'; } } } $permlabel = $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) : $langs->trans($obj->libelle)); print '<td>' . $permlabel . '</td>'; print '</tr>' . "\n"; $i++; } } else { dol_print_error($db); } print '</table>'; // For multicompany transversal mode