33if (empty($langs) || !is_object($langs)) {
34 print
"Error, template page can't be called as URL";
40if (empty($relativepathwithnofile)) {
41 $relativepathwithnofile =
'';
44if (!isset($permission)) {
45 $permission = $permissiontoadd;
47if (!isset($permtoedit)) {
48 $permtoedit = $permissiontoadd;
59if (in_array($modulepart, array(
'product',
'produit',
'societe',
'user',
'ticket',
'holiday',
'expensereport'))) {
69if ($action ==
'deletefile' || $action ==
'deletelink') {
70 $langs->load(
"companies");
71 print $form->formconfirm(
72 $_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&urlfile='.urlencode(
GETPOST(
"urlfile")).
'&linkid='.
GETPOST(
'linkid',
'int').(empty($param) ?
'' : $param),
73 $langs->trans(
'DeleteFile'),
74 $langs->trans(
'ConfirmDeleteFile'),
85if (!isset($savingdocmask) || !empty($conf->global->MAIN_DISABLE_SUGGEST_REF_AS_PREFIX)) {
87 if (empty($conf->global->MAIN_DISABLE_SUGGEST_REF_AS_PREFIX)) {
89 if (in_array($modulepart, array(
90 'facture_fournisseur',
91 'commande_fournisseur',
118if (empty($formfile) || !is_object($formfile)) {
123$formfile->form_attach_new_file(
124 $_SERVER[
"PHP_SELF"].
'?id='.$object->id.(empty($withproject) ?
'' :
'&withproject=1').(empty($moreparam) ?
'' : $moreparam),
129 $conf->browser->layout ==
'phone' ? 40 : 60,
137$formfile->list_of_documents(
143 $relativepathwithnofile,
161$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.