30require
'../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.
'/user/class/user.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/vcard.class.php';
46if ($user->socid > 0) {
47 $socid = $user->socid;
62 $result = $company->fetch(
$object->socid);
70if (
GETPOST(
'mode') ==
'virtualcard') {
81 if (
getDolUserInt(
'USER_PUBLIC_HIDE_OFFICE_PHONE', 0, $object)) {
84 if (
getDolUserInt(
'USER_PUBLIC_HIDE_OFFICE_FAX', 0, $object)) {
87 if (
getDolUserInt(
'USER_PUBLIC_HIDE_USER_MOBILE', 0, $object)) {
98 if (
getDolUserInt(
'USER_PUBLIC_HIDE_SOCIALNETWORKS', 0, $object)) {
99 $object->socialnetworks = array();
103 if (
getDolUserInt(
'USER_PUBLIC_HIDE_COMPANY', 0, $object) ||
getDolUserInt(
'USER_PUBLIC_HIDE_SOCIALNETWORKS_BUSINESS', 0, $object)) {
104 $company->socialnetworks = array();
110$output = $v->buildVCardString($object, $company, $langs);
112$filename = trim(urldecode($v->getFileName()));
118header(
"Content-Disposition: attachment; filename=\"".$filename.
"\"");
119header(
"Content-Length: ".
dol_strlen($output));
120header(
"Connection: close");
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage Dolibarr users.
Class to build vCard files.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
getDolUserInt($key, $default=0, $tmpuser=null)
Return Dolibarr user constant int value.
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.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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.