29require
'../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/user/class/user.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/vcard.class.php';
38if ($user->socid > 0) {
39 $socid = $user->socid;
44$object =
new User($db);
45$result = $object->fetch($id);
53if ($object->socid > 0) {
54 $result = $company->fetch($object->socid);
64$output = $v->buildVCardString($object, $company, $langs);
66$filename = trim(urldecode($v->getFileName()));
72header(
"Content-Disposition: attachment; filename=\"".$filename.
"\"");
74header(
"Connection: close");
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage Dolibarr users.
Class to buld vCard files.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.
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.