Example #1
0
 // Login Dolibarr
 print '<tr><td>';
 print '<table class="nobordernopadding" width="100%"><tr><td>';
 print $langs->trans("LinkedToDolibarrUser");
 print '</td>';
 if ($action != 'editlogin' && $user->rights->adherent->creer) {
     print '<td align="right">';
     if ($user->rights->user->user->creer) {
         print '<a href="' . $_SERVER["PHP_SELF"] . '?action=editlogin&amp;rowid=' . $object->id . '">' . img_edit($langs->trans('SetLinkToUser'), 1) . '</a>';
     }
     print '</td>';
 }
 print '</tr></table>';
 print '</td><td colspan="2" class="valeur">';
 if ($action == 'editlogin') {
     $form->form_users($_SERVER['PHP_SELF'] . '?rowid=' . $object->id, $object->user_id, 'userid', '');
 } else {
     if ($object->user_id) {
         $form->form_users($_SERVER['PHP_SELF'] . '?rowid=' . $object->id, $object->user_id, 'none');
     } else {
         print $langs->trans("NoDolibarrAccess");
     }
 }
 print '</td></tr>';
 // Date end subscription
 print '<tr><td>' . $langs->trans("SubscriptionEndDate") . '</td><td class="valeur">';
 if ($object->datefin) {
     print dol_print_date($object->datefin, 'day');
     if ($object->hasDelay()) {
         print " " . img_warning($langs->trans("Late"));
     }
Example #2
0
 print '<tr><td>';
 print '<table class="nobordernopadding" width="100%"><tr><td>';
 print $langs->trans("LinkedToDolibarrUser");
 print '</td>';
 if ($_GET['action'] != 'editlogin' && $user->rights->adherent->creer) {
     print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editlogin&amp;rowid=' . $adh->id . '">' . img_edit($langs->trans('SetLinkToUser'), 1) . '</a></td>';
 }
 print '</tr></table>';
 print '</td><td class="valeur">';
 if ($_GET['action'] == 'editlogin') {
     /*$include=array();
       if (empty($user->rights->user->user->creer))    // If can edit only itself user, we can link to itself only
       {
       $include=array($adh->user_id,$user->id);
       }*/
     print $html->form_users($_SERVER['PHP_SELF'] . '?rowid=' . $adh->id, $adh->user_id, 'userid', '');
 } else {
     if ($adh->user_id) {
         print $html->form_users($_SERVER['PHP_SELF'] . '?rowid=' . $adh->id, $adh->user_id, 'none');
     } else {
         print $langs->trans("NoDolibarrAccess");
     }
 }
 print '</td></tr>';
 print "</table>\n";
 print '</form>';
 dol_fiche_end();
 dol_htmloutput_errors($errmsg, $errmsgs);
 /*
  * Barre d'actions
  */