';
- if (! empty($arrayfields['u.login']['checked']))
- {
- print ' | ';
- }
- if (! empty($arrayfields['u.lastname']['checked']))
- {
- print ' | ';
- }
- if (! empty($arrayfields['u.firstname']['checked']))
- {
- print ' | ';
- }
- if (! empty($arrayfields['u.gender']['checked']))
- {
- print '';
- $arraygender=array('man'=>$langs->trans("Genderman"),'woman'=>$langs->trans("Genderwoman"));
- print $form->selectarray('search_gender', $arraygender, $search_gender, 1);
- print ' | ';
- }
- if (! empty($arrayfields['u.employee']['checked']))
- {
- print '';
- print $form->selectyesno('search_employee', $search_employee, 1, false, 1);
- print ' | ';
- }
- if (! empty($arrayfields['u.accountancy_code']['checked']))
- {
- print ' | ';
- }
- if (! empty($arrayfields['u.email']['checked']))
- {
- print ' | ';
- }
- if (! empty($arrayfields['u.fk_soc']['checked']))
- {
- print ' | ';
- }
- if (! empty($arrayfields['u.entity']['checked']))
- {
- print ' | ';
- }
- if (! empty($arrayfields['u.fk_user']['checked']))
- {
- print ' | ';
- }
- if (! empty($arrayfields['u.datelastlogin']['checked']))
- {
- print ' | ';
- }
- if (! empty($arrayfields['u.datepreviouslogin']['checked']))
- {
- print ' | ';
- }
- // Extra fields
- if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
- {
- foreach($extrafields->attribute_label as $key => $val)
- {
- if (! empty($arrayfields["ef.".$key]['checked']))
->>>>>>> branch '4.0' of git@github.com:Dolibarr/dolibarr.git
{
$crit=$val;
$tmpkey=preg_replace('/search_options_/','',$key);
@@ -791,222 +647,12 @@ while ($i < min($num,$limit))
print ''.$userstatic->getLibStatut(3).' | ';
}
// Action column
-<<<<<<< HEAD
- print ' | ';
-=======
- print '';
- $searchpitco=$form->showFilterAndCheckAddButtons(0);
- print $searchpitco;
+ print ' | ';
print ' | ';
->>>>>>> branch '4.0' of git@github.com:Dolibarr/dolibarr.git
print "
\n";
-<<<<<<< HEAD
+
$i++;
-=======
-
- $user2=new User($db);
-
- $var=True;
- //while ($i < min($num,$conf->liste_limit))
- while ($i < $num)
- {
- $obj = $db->fetch_object($result);
- $var=!$var;
-
- $userstatic->id=$obj->rowid;
- $userstatic->ref=$obj->label;
- $userstatic->login=$obj->login;
- $userstatic->statut=$obj->statut;
- $userstatic->email=$obj->email;
- $userstatic->gender=$obj->gender;
- $userstatic->societe_id=$obj->fk_soc;
- $userstatic->firstname=$obj->firstname;
- $userstatic->lastname=$obj->lastname;
- $userstatic->employee=$obj->employee;
- $userstatic->photo=$obj->photo;
-
- $li=$userstatic->getNomUrl(-1,'',0,0,24,1,'login');
-
- print "";
- if (! empty($arrayfields['u.login']['checked']))
- {
- print '| ';
- print $li;
- if (! empty($conf->multicompany->enabled) && $obj->admin && ! $obj->entity)
- {
- print img_picto($langs->trans("SuperAdministrator"),'redstar');
- }
- else if ($obj->admin)
- {
- print img_picto($langs->trans("Administrator"),'star');
- }
- print ' | ';
- }
- if (! empty($arrayfields['u.lastname']['checked']))
- {
- print ''.$obj->lastname.' | ';
- }
- if (! empty($arrayfields['u.firstname']['checked']))
- {
- print ''.$obj->firstname.' | ';
- }
- if (! empty($arrayfields['u.gender']['checked']))
- {
- print '';
- if ($obj->gender) print $langs->trans("Gender".$obj->gender);
- print ' | ';
- }
- if (! empty($arrayfields['u.employee']['checked']))
- {
- print ''.yn($obj->employee).' | ';
- }
- if (! empty($arrayfields['u.accountancy_code']['checked']))
- {
- print ''.$obj->accountancy_code.' | ';
- }
- if (! empty($arrayfields['u.email']['checked']))
- {
- print ''.$obj->email.' | ';
- }
- if (! empty($arrayfields['u.fk_soc']['checked']))
- {
- print "";
- if ($obj->fk_soc)
- {
- $companystatic->id=$obj->fk_soc;
- $companystatic->name=$obj->name;
- $companystatic->canvas=$obj->canvas;
- print $companystatic->getNomUrl(1);
- }
- else if ($obj->ldap_sid)
- {
- print $langs->trans("DomainUser");
- }
- else
- {
- print $langs->trans("InternalUser");
- }
- print ' | ';
- }
- // Multicompany enabled
- if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode))
- {
- if (! empty($arrayfields['u.entity']['checked']))
- {
- print '';
- if (! $obj->entity)
- {
- print $langs->trans("AllEntities");
- }
- else
- {
- // $mc is defined in conf.class.php if multicompany enabled.
- if (is_object($mc))
- {
- $mc->getInfo($obj->entity);
- print $mc->label;
- }
- }
- print ' | ';
- }
- }
- // Supervisor
- if (! empty($arrayfields['u.fk_user']['checked']))
- {
- // Resp
- print '';
- if ($obj->login2)
- {
- $user2->id=$obj->id2;
- $user2->login=$obj->login2;
- $user2->lastname=$obj->lastname2;
- $user2->firstname=$obj->firstname2;
- $user2->gender=$obj->gender2;
- $user2->photo=$obj->photo2;
- $user2->admin=$obj->admin2;
- $user2->email=$obj->email2;
- $user2->societe_id=$obj->fk_soc2;
- print $user2->getNomUrl(-1,'',0,0,24,0,'');
- if (! empty($conf->multicompany->enabled) && $obj->admin2 && ! $obj->entity2)
- {
- print img_picto($langs->trans("SuperAdministrator"),'redstar');
- }
- else if ($obj->admin2)
- {
- print img_picto($langs->trans("Administrator"),'star');
- }
- }
- print ' | ';
- }
-
- // Date last login
- if (! empty($arrayfields['u.datelastlogin']['checked']))
- {
- print ''.dol_print_date($db->jdate($obj->datelastlogin),"dayhour").' | ';
- }
- // Date previous login
- if (! empty($arrayfields['u.datepreviouslogin']['checked']))
- {
- print ''.dol_print_date($db->jdate($obj->datepreviouslogin),"dayhour").' | ';
- }
-
- // Extra fields
- if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
- {
- foreach($extrafields->attribute_label as $key => $val)
- {
- if (! empty($arrayfields["ef.".$key]['checked']))
- {
- print 'getAlignFlag($key);
- if ($align) print ' align="'.$align.'"';
- print '>';
- $tmpkey='options_'.$key;
- print $extrafields->showOutputField($key, $obj->$tmpkey, '', 1);
- print ' | ';
- }
- }
- }
- // Fields from hook
- $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj);
- $reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook
- print $hookmanager->resPrint;
- // Date creation
- if (! empty($arrayfields['u.datec']['checked']))
- {
- print '';
- print dol_print_date($db->jdate($obj->date_creation), 'dayhour');
- print ' | ';
- }
- // Date modification
- if (! empty($arrayfields['u.tms']['checked']))
- {
- print '';
- print dol_print_date($db->jdate($obj->date_update), 'dayhour');
- print ' | ';
- }
- // Status
- if (! empty($arrayfields['u.statut']['checked']))
- {
- $userstatic->statut=$obj->statut;
- print ''.$userstatic->getLibStatut(3).' | ';
- }
- // Action column
- print ' | ';
-
- print "
\n";
- $i++;
- }
-
- $parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
- $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
- print $hookmanager->resPrint;
-
- print "