39if (empty($langs) || !is_object($langs)) {
40 print
"Error, template page can't be called as URL";
46if (empty($relativepathwithnofile)) {
47 $relativepathwithnofile =
'';
51if (!isset($permission)) {
52 $permission = $permissiontoadd;
54if (!isset($permtoedit)) {
55 $permtoedit = $permissiontoadd;
66if (in_array($modulepart, array(
'product',
'produit',
'societe',
'user',
'ticket',
'holiday',
'expensereport'))) {
70$reshook = $hookmanager->executeHooks(
'isLinkedDocumentObjectNotMovable', $parameters,
$object);
72 $disablemove = $hookmanager->resArray[
'disablemove'];
79if ($action ==
'deletefile' || $action ==
'deletelink') {
80 $langs->load(
"companies");
81 print $form->formconfirm(
82 $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&urlfile='.urlencode(
GETPOST(
"urlfile")).
'&linkid='.
GETPOSTINT(
'linkid').(empty($param) ?
'' : $param),
83 $langs->trans(
'DeleteFile'),
84 $langs->trans(
'ConfirmDeleteFile'),
95if (!isset($savingdocmask) ||
getDolGlobalString(
'MAIN_DISABLE_SUGGEST_REF_AS_PREFIX')) {
99 if (in_array($modulepart, array(
100 'facture_fournisseur',
101 'commande_fournisseur',
129if (empty($formfile) || !is_object($formfile)) {
134$tmparray = $formfile->form_attach_new_file(
135 $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.(empty($withproject) ?
'' :
'&withproject=1').(empty($moreparam) ?
'' : $moreparam),
140 $conf->browser->layout ==
'phone' ? 40 : 60,
155$formToUploadAFile = $tmparray[
'formToUploadAFile'];
156$formToAddALink = $tmparray[
'formToAddALink'];
160$formfile->list_of_documents(
166 $relativepathwithnofile,
182 array(
'afteruploadtitle' => $formToUploadAFile,
'showhideaddbutton' => 1)
190$formfile->listOfLinks(
197 array(
'afterlinktitle' => $formToAddALink,
'showhideaddbutton' => 1)
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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...