';
- // Action column
- if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
- print '| ';
- if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
- $selected = 0;
- if (in_array($obj->rowid, $arrayofselected)) {
- $selected = 1;
+ // Action column
+ if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
+ print ' | ';
+ if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
+ $selected = 0;
+ if (in_array($obj->rowid, $arrayofselected)) {
+ $selected = 1;
+ }
+ print '';
}
- print '';
+ print ' | ';
}
- print '';
- }
- // ID
- if (!empty($arrayfields['p.rowid']['checked'])) {
- print '';
- print dol_escape_htmltag($obj->rowid);
- print " | \n";
- if (!$i) {
- $totalarray['nbfield']++;
+ // ID
+ if (!empty($arrayfields['p.rowid']['checked'])) {
+ print '';
+ print dol_escape_htmltag($obj->rowid);
+ print " | \n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- // Name
- if (!empty($arrayfields['p.lastname']['checked'])) {
- print '';
- print $contactstatic->getNomUrl(1);
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ // Name
+ if (!empty($arrayfields['p.lastname']['checked'])) {
+ print '';
+ print $contactstatic->getNomUrl(1);
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- // Firstname
- if (!empty($arrayfields['p.firstname']['checked'])) {
- print ''.dol_escape_htmltag($obj->firstname).' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ // Firstname
+ if (!empty($arrayfields['p.firstname']['checked'])) {
+ print ''.dol_escape_htmltag($obj->firstname).' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- // Job position
- if (!empty($arrayfields['p.poste']['checked'])) {
- print ''.dol_escape_htmltag($obj->poste).' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ // Job position
+ if (!empty($arrayfields['p.poste']['checked'])) {
+ print ''.dol_escape_htmltag($obj->poste).' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- // Address
- if (!empty($arrayfields['p.address']['checked'])) {
- print ''.dol_escape_htmltag($obj->address).' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ // Address
+ if (!empty($arrayfields['p.address']['checked'])) {
+ print ''.dol_escape_htmltag($obj->address).' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- // Zip
- if (!empty($arrayfields['p.zip']['checked'])) {
- print ''.dol_escape_htmltag($obj->zip).' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ // Zip
+ if (!empty($arrayfields['p.zip']['checked'])) {
+ print ''.dol_escape_htmltag($obj->zip).' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- // Town
- if (!empty($arrayfields['p.town']['checked'])) {
- print ''.dol_escape_htmltag($obj->town).' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ // Town
+ if (!empty($arrayfields['p.town']['checked'])) {
+ print ''.dol_escape_htmltag($obj->town).' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- // State
- /*if (!empty($arrayfields['state.nom']['checked']))
- {
- print "".$obj->state_name." | \n";
- if (! $i) $totalarray['nbfield']++;
- }
- // Region
- if (!empty($arrayfields['region.nom']['checked']))
- {
- print "".$obj->region_name." | \n";
- if (! $i) $totalarray['nbfield']++;
- }*/
- // Country
- if (!empty($arrayfields['country.code_iso']['checked'])) {
- print '';
- $tmparray = getCountry($obj->fk_pays, 'all');
- print dol_escape_htmltag($tmparray['label']);
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ // State
+ /*if (!empty($arrayfields['state.nom']['checked']))
+ {
+ print "".$obj->state_name." | \n";
+ if (! $i) $totalarray['nbfield']++;
}
- }
- // Phone
- if (!empty($arrayfields['p.phone']['checked'])) {
- print ''.dol_print_phone($obj->phone_pro, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'phone').' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ // Region
+ if (!empty($arrayfields['region.nom']['checked']))
+ {
+ print "".$obj->region_name." | \n";
+ if (! $i) $totalarray['nbfield']++;
+ }*/
+ // Country
+ if (!empty($arrayfields['country.code_iso']['checked'])) {
+ print '';
+ $tmparray = getCountry($obj->fk_pays, 'all');
+ print dol_escape_htmltag($tmparray['label']);
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- // Phone perso
- if (!empty($arrayfields['p.phone_perso']['checked'])) {
- print ''.dol_print_phone($obj->phone_perso, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'phone').' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ // Phone
+ if (!empty($arrayfields['p.phone']['checked'])) {
+ print ''.dol_print_phone($obj->phone_pro, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'phone').' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- // Phone mobile
- if (!empty($arrayfields['p.phone_mobile']['checked'])) {
- print ''.dol_print_phone($obj->phone_mobile, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'mobile').' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ // Phone perso
+ if (!empty($arrayfields['p.phone_perso']['checked'])) {
+ print ''.dol_print_phone($obj->phone_perso, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'phone').' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- // Fax
- if (!empty($arrayfields['p.fax']['checked'])) {
- print ''.dol_print_phone($obj->fax, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'fax').' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ // Phone mobile
+ if (!empty($arrayfields['p.phone_mobile']['checked'])) {
+ print ''.dol_print_phone($obj->phone_mobile, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'mobile').' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- // EMail
- if (!empty($arrayfields['p.email']['checked'])) {
- print ''.dol_print_email($obj->email, $obj->rowid, $obj->socid, 'AC_EMAIL', 18, 0, 1).' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ // Fax
+ if (!empty($arrayfields['p.fax']['checked'])) {
+ print ''.dol_print_phone($obj->fax, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'fax').' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- // No EMail
- if (!empty($arrayfields['unsubscribed']['checked'])) {
- print '';
- if (empty($obj->email)) {
- //print ''.$langs->trans("NoEmail").'';
- } else {
- print yn(($obj->unsubscribed > 0) ? 1 : 0);
+ // EMail
+ if (!empty($arrayfields['p.email']['checked'])) {
+ print ' | '.dol_print_email($obj->email, $obj->rowid, $obj->socid, 'AC_EMAIL', 18, 0, 1).' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- print '';
- if (!$i) {
- $totalarray['nbfield']++;
+ // No EMail
+ if (!empty($arrayfields['unsubscribed']['checked'])) {
+ print '';
+ if (empty($obj->email)) {
+ //print ''.$langs->trans("NoEmail").'';
+ } else {
+ print yn(($obj->unsubscribed > 0) ? 1 : 0);
+ }
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- if (isModEnabled('socialnetworks')) {
- foreach ($socialnetworks as $key => $value) {
- if ($value['active'] && !empty($arrayfields['p.'.$key]['checked'])) {
- print ''.(empty($arraysocialnetworks[$key]) ? '' : dol_print_socialnetworks($arraysocialnetworks[$key], $obj->rowid, $obj->socid, $key, $socialnetworks)).' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ if (isModEnabled('socialnetworks')) {
+ foreach ($socialnetworks as $key => $value) {
+ if ($value['active'] && !empty($arrayfields['p.'.$key]['checked'])) {
+ print ''.(empty($arraysocialnetworks[$key]) ? '' : dol_print_socialnetworks($arraysocialnetworks[$key], $obj->rowid, $obj->socid, $key, $socialnetworks)).' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
}
}
- }
- // Company
- if (!empty($arrayfields['p.fk_soc']['checked']) || !empty($arrayfields['s.nom']['checked'])) {
- print '';
- if ($obj->socid) {
- $objsoc = new Societe($db);
- $objsoc->fetch($obj->socid);
- print $objsoc->getNomUrl(1);
- } else {
- print ' ';
- }
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Private/Public
- if (!empty($arrayfields['p.priv']['checked'])) {
- print ''.$contactstatic->LibPubPriv($obj->priv).' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- if (!empty($arrayfields['p.fk_prospectcontactlevel']['checked'])) {
- // Prospect level
- print '';
- print $contactstatic->getLibProspLevel();
- print " | ";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- if (!empty($arrayfields['p.fk_stcommcontact']['checked'])) {
- // Prospect status
- print '';
- print ' '.$contactstatic->libProspCommStatut($obj->stcomm_id, 2, $contactstatic->cacheprospectstatus[$obj->stcomm_id]['label'], $obj->stcomm_picto);
- print ' - | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Extra fields
- include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
- // Fields from hook
- $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
- $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
- print $hookmanager->resPrint;
- // Date creation
- if (!empty($arrayfields['p.datec']['checked'])) {
- print '';
- print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Date modification
- if (!empty($arrayfields['p.tms']['checked'])) {
- print '';
- print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Status
- if (!empty($arrayfields['p.statut']['checked'])) {
- print ''.$contactstatic->getLibStatut(5).' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Import key
- if (!empty($arrayfields['p.import_key']['checked'])) {
- print '';
- print dol_escape_htmltag($obj->import_key);
- print " | \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Action column
- if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
- print '';
- if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
- $selected = 0;
- if (in_array($obj->rowid, $arrayofselected)) {
- $selected = 1;
+ // Private/Public
+ if (!empty($arrayfields['p.priv']['checked'])) {
+ print ' | '.$contactstatic->LibPubPriv($obj->priv).' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
}
- print '';
}
- print '';
- }
- if (!$i) {
- $totalarray['nbfield']++;
- }
- print "
\n";
+ if (!empty($arrayfields['p.fk_prospectcontactlevel']['checked'])) {
+ // Prospect level
+ print '