33if (empty($langs) || !is_object($langs)) {
34 print
"Error, template page can't be called as URL";
40if (empty($relativepathwithnofile)) {
41 $relativepathwithnofile =
'';
45if (!isset($permission)) {
46 $permission = $permissiontoadd;
48if (!isset($permtoedit)) {
49 $permtoedit = $permissiontoadd;
60if (in_array($modulepart, array(
'product',
'produit',
'societe',
'user',
'ticket',
'holiday',
'expensereport'))) {
64$reshook = $hookmanager->executeHooks(
'isLinkedDocumentObjectNotMovable', $parameters,
$object);
66 $disablemove = $hookmanager->resArray[
'disablemove'];
73if ($action ==
'deletefile' || $action ==
'deletelink') {
74 $langs->load(
"companies");
75 print $form->formconfirm(
76 $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&urlfile='.urlencode(
GETPOST(
"urlfile")).
'&linkid='.
GETPOSTINT(
'linkid').(empty($param) ?
'' : $param),
77 $langs->trans(
'DeleteFile'),
78 $langs->trans(
'ConfirmDeleteFile'),
89if (!isset($savingdocmask) ||
getDolGlobalString(
'MAIN_DISABLE_SUGGEST_REF_AS_PREFIX')) {
93 if (in_array($modulepart, array(
94 'facture_fournisseur',
95 'commande_fournisseur',
123if (empty($formfile) || !is_object($formfile)) {
128$formfile->form_attach_new_file(
129 $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.(empty($withproject) ?
'' :
'&withproject=1').(empty($moreparam) ?
'' : $moreparam),
134 $conf->browser->layout ==
'phone' ? 40 : 60,
144$formfile->list_of_documents(
150 $relativepathwithnofile,
168$formfile->listOfLinks(
$object, $permission, $action,
GETPOSTINT(
'linkid'), $param);
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.