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='.
GETPOSTINT(
'linkid').(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',
120if (empty($formfile) || !is_object($formfile)) {
125$formfile->form_attach_new_file(
126 $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.(empty($withproject) ?
'' :
'&withproject=1').(empty($moreparam) ?
'' : $moreparam),
131 $conf->browser->layout ==
'phone' ? 40 : 60,
141$formfile->list_of_documents(
147 $relativepathwithnofile,
165$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.