Go to the documentation of this file.
28 require
'../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/lib/contact.lib.php';
30 require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
32 $action =
GETPOST(
'action',
'aZ09');
35 $langs->load(
"companies");
45 if ($user->socid > 0) {
46 if ($object->fk_soc > 0 && $object->fk_soc != $user->socid) {
50 $result =
restrictedArea($user,
'contact', $id,
'socpeople&societe');
53 $permissionnote = $user->rights->societe->creer;
57 $hookmanager->initHooks(array(
'contactnote'));
63 $reshook = $hookmanager->executeHooks(
'doActions', array(), $object, $action);
67 if (empty($reshook)) {
68 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
78 $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans(
"Contacts") : $langs->trans(
"ContactsAddresses"));
82 $help_url =
'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
89 if (!empty($conf->notification->enabled)) {
90 $langs->load(
"mails");
97 $linkback =
'<a href="'.DOL_URL_ROOT.
'/contact/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
99 $morehtmlref =
'<a href="'.DOL_URL_ROOT.
'/contact/vcard.php?id='.$object->id.
'" class="refid">';
100 $morehtmlref .=
img_picto($langs->trans(
"Download").
' '.$langs->trans(
"VCard"),
'vcard.png',
'class="valignmiddle marginleftonly paddingrightonly"');
101 $morehtmlref .=
'</a>';
103 $morehtmlref .=
'<div class="refidno">';
104 if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) {
106 $objsoc->fetch($object->socid);
108 $morehtmlref .= $langs->trans(
'ThirdParty').
' : ';
109 if ($objsoc->id > 0) {
110 $morehtmlref .= $objsoc->getNomUrl(1);
112 $morehtmlref .= $langs->trans(
"ContactNotLinkedToCompany");
115 $morehtmlref .=
'</div>';
117 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'ref', $morehtmlref);
119 $cssclass =
'titlefield';
123 print
'<div class="fichecenter">';
124 print
'<div class="underbanner clearboth"></div>';
126 print
'<table class="border centpercent tableforfield">';
129 print
'<tr><td class="'.$cssclass.
'">'.$langs->trans(
"UserTitle").
'</td><td>';
130 print $object->getCivilityLabel();
136 $cssclass =
"titlefield";
137 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.php';
Class to manage third parties objects (customers, suppliers, prospects...)
restrictedArea($user, $features, $objectid=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.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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.
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.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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.
dol_now($mode='auto')
Return date for now.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.