Ejemplo n.º 1
0
             print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '');
         }
     } else {
         dol_print_error($db);
     }
 }
 /* ************************************************************************** */
 /*                                                                            */
 /* Edition mode                                                               */
 /*                                                                            */
 /* ************************************************************************** */
 if ($action == 'edit') {
     $object = new AdherentType($db);
     $object->id = $rowid;
     $object->fetch($rowid);
     $object->fetch_optionals($rowid, $extralabels);
     $head = member_type_prepare_head($object);
     print '<form method="post" action="' . $_SERVER["PHP_SELF"] . '?rowid=' . $rowid . '">';
     print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     print '<input type="hidden" name="rowid" value="' . $rowid . '">';
     print '<input type="hidden" name="action" value="update">';
     dol_fiche_head($head, 'card', $langs->trans("MemberType"), 0, 'group');
     print '<table class="border" width="100%">';
     print '<tr><td width="15%">' . $langs->trans("Ref") . '</td><td>' . $object->id . '</td></tr>';
     print '<tr><td>' . $langs->trans("Label") . '</td><td><input type="text" name="libelle" size="40" value="' . dol_escape_htmltag($object->libelle) . '"></td></tr>';
     print '<tr><td>' . $langs->trans("SubscriptionRequired") . '</td><td>';
     print $form->selectyesno("cotisation", $object->cotisation, 1);
     print '</td></tr>';
     print '<tr><td>' . $langs->trans("VoteAllowed") . '</td><td>';
     print $form->selectyesno("vote", $object->vote, 1);
     print '</td></tr>';
Ejemplo n.º 2
0
             print "</tr>\n";
             $i++;
         }
         print "</table>\n";
         if ($num > $conf->liste_limit) {
             print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '');
         }
     } else {
         dol_print_error($db);
     }
 }
 if ($action == 'edit') {
     $adht = new AdherentType($db);
     $adht->id = $rowid;
     $adht->fetch($rowid);
     $adht->fetch_optionals($rowid, $extralabels);
     $h = 0;
     $head[$h][0] = $_SERVER["PHP_SELF"] . '?rowid=' . $adht->id;
     $head[$h][1] = $langs->trans("Card");
     $head[$h][2] = 'card';
     $h++;
     dol_fiche_head($head, 'card', $langs->trans("MemberType"), 0, 'group');
     print '<form method="post" action="' . $_SERVER["PHP_SELF"] . '?rowid=' . $rowid . '">';
     print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     print '<input type="hidden" name="rowid" value="' . $rowid . '">';
     print '<input type="hidden" name="action" value="update">';
     print '<table class="border" width="100%">';
     print '<tr><td width="15%">' . $langs->trans("Ref") . '</td><td>' . $adht->id . '</td></tr>';
     print '<tr><td>' . $langs->trans("Label") . '</td><td><input type="text" name="libelle" size="40" value="' . $adht->libelle . '"></td></tr>';
     print '<tr><td>' . $langs->trans("SubscriptionRequired") . '</td><td>';
     print $form->selectyesno("cotisation", $adht->cotisation, 1);