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;
54 $result = $company->fetch(
$object->socid);
62if (
GETPOST(
'mode') ==
'virtualcard') {
73 if (
getDolUserInt(
'USER_PUBLIC_HIDE_OFFICE_PHONE', 0, $object)) {
76 if (
getDolUserInt(
'USER_PUBLIC_HIDE_OFFICE_FAX', 0, $object)) {
79 if (
getDolUserInt(
'USER_PUBLIC_HIDE_USER_MOBILE', 0, $object)) {
90 if (
getDolUserInt(
'USER_PUBLIC_HIDE_SOCIALNETWORKS', 0, $object)) {
91 $object->socialnetworks = array();
95 if (
getDolUserInt(
'USER_PUBLIC_HIDE_COMPANY', 0, $object) ||
getDolUserInt(
'USER_PUBLIC_HIDE_SOCIALNETWORKS_BUSINESS', 0, $object)) {
96 $company->socialnetworks = array();
102$output = $v->buildVCardString($object, $company, $langs);
104$filename = trim(urldecode($v->getFileName()));
110header(
"Content-Disposition: attachment; filename=\"".$filename.
"\"");
111header(
"Content-Length: ".
dol_strlen($output));
112header(
"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.