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'))) {
70if ($action ==
'deletefile' || $action ==
'deletelink') {
71 $langs->load(
"companies");
72 print $form->formconfirm(
73 $_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&urlfile='.urlencode(
GETPOST(
"urlfile")).
'&linkid='.
GETPOST(
'linkid',
'int').(empty($param) ?
'' : $param),
74 $langs->trans(
'DeleteFile'),
75 $langs->trans(
'ConfirmDeleteFile'),
86if (!isset($savingdocmask) ||
getDolGlobalString(
'MAIN_DISABLE_SUGGEST_REF_AS_PREFIX')) {
90 if (in_array($modulepart, array(
91 'facture_fournisseur',
92 'commande_fournisseur',
119if (empty($formfile) || !is_object($formfile)) {
124$formfile->form_attach_new_file(
125 $_SERVER[
"PHP_SELF"].
'?id='.$object->id.(empty($withproject) ?
'' :
'&withproject=1').(empty($moreparam) ?
'' : $moreparam),
130 $conf->browser->layout ==
'phone' ? 40 : 60,
138$formfile->list_of_documents(
144 $relativepathwithnofile,
162$formfile->listOfLinks($object, $permission, $action,
GETPOST(
'linkid',
'int'), $param);
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 dolibarr global constant string value.