29 require
'../main.inc.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/contact.lib.php';
31 require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
33 $action =
GETPOST(
'action',
'aZ09');
36 $langs->load(
"companies");
46 if ($user->socid > 0) {
47 if ($object->fk_soc > 0 && $object->fk_soc != $user->socid) {
51 $result =
restrictedArea($user,
'contact', $id,
'socpeople&societe');
54 $permissionnote = $user->rights->societe->creer;
58 $hookmanager->initHooks(array(
'contactnote'));
64 $reshook = $hookmanager->executeHooks(
'doActions', array(), $object, $action);
68 if (empty($reshook)) {
69 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
79 $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans(
"Contacts") : $langs->trans(
"ContactsAddresses"));
83 $help_url =
'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
91 $langs->load(
"mails");
98 $linkback =
'<a href="'.DOL_URL_ROOT.
'/contact/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
100 $morehtmlref =
'<a href="'.DOL_URL_ROOT.
'/contact/vcard.php?id='.$object->id.
'" class="refid">';
101 $morehtmlref .=
img_picto($langs->trans(
"Download").
' '.$langs->trans(
"VCard"),
'vcard.png',
'class="valignmiddle marginleftonly paddingrightonly"');
102 $morehtmlref .=
'</a>';
104 $morehtmlref .=
'<div class="refidno">';
105 if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) {
107 $objsoc->fetch($object->socid);
109 $morehtmlref .= $langs->trans(
'ThirdParty').
' : ';
110 if ($objsoc->id > 0) {
111 $morehtmlref .= $objsoc->getNomUrl(1);
113 $morehtmlref .= $langs->trans(
"ContactNotLinkedToCompany");
116 $morehtmlref .=
'</div>';
118 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'ref', $morehtmlref);
120 $cssclass =
'titlefield';
124 print
'<div class="fichecenter">';
125 print
'<div class="underbanner clearboth"></div>';
127 print
'<table class="border centpercent tableforfield">';
130 print
'<tr><td class="'.$cssclass.
'">'.$langs->trans(
"UserTitle").
'</td><td>';
131 print $object->getCivilityLabel();
137 $cssclass =
"titlefield";
138 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.php';
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage third parties objects (customers, suppliers, prospects...)
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
dol_now($mode='auto')
Return date for now.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
isModEnabled($module)
Is Dolibarr module enabled.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.