51if (empty($langs) || !is_object($langs)) {
52 print
"Error, template page can't be called as URL";
56@phan-var-force array<array{name:string,path:string,level1name:string,relativename:string,fullname:string,date:string,size:int,perm:int,type:string,position_name:string,cover:string,keywords:string,acl:string,rowid:int,label:string,share:string}> $filearray
57@phan-var-force ?int<0,1> $permtoedit
58@phan-var-force ?int<0,1> $permission
59@phan-var-force int<0,1> $permissiontoadd
60@phan-var-force ?string $savingdocmask
61@phan-var-force ?string $param
62@phan-var-force CommonObject $object
67if (empty($relativepathwithnofile)) {
68 $relativepathwithnofile =
'';
72if (!isset($permission)) {
73 $permission = $permissiontoadd;
75if (!isset($permtoedit)) {
76 $permtoedit = $permissiontoadd;
87if (in_array($modulepart, array(
'product',
'produit',
'societe',
'user',
'ticket',
'holiday',
'expensereport'))) {
91$reshook = $hookmanager->executeHooks(
'isLinkedDocumentObjectNotMovable', $parameters,
$object);
93 $disablemove = $hookmanager->resArray[
'disablemove'];
100if ($action ==
'deletefile' || $action ==
'deletelink') {
101 $langs->load(
"companies");
102 print $form->formconfirm(
103 $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&urlfile='.urlencode(
GETPOST(
"urlfile")).
'&linkid='.
GETPOSTINT(
'linkid').(empty($param) ?
'' : $param),
104 $langs->trans(
'DeleteFile'),
105 $langs->trans(
'ConfirmDeleteFile'),
106 'confirm_deletefile',
116if (!isset($savingdocmask) ||
getDolGlobalString(
'MAIN_DISABLE_SUGGEST_REF_AS_PREFIX')) {
120 if (in_array($modulepart, array(
121 'facture_fournisseur',
122 'commande_fournisseur',
150if (empty($formfile) || !is_object($formfile)) {
151 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
156$tmparray = $formfile->form_attach_new_file(
157 $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.(empty($withproject) ?
'' :
'&withproject=1').(empty($moreparam) ?
'' : $moreparam),
162 $conf->browser->layout ==
'phone' ? 40 : 60,
177$formToUploadAFile =
'';
180if (is_array($tmparray) && !empty($tmparray)) {
181 $formToUploadAFile = $tmparray[
'formToUploadAFile'];
182 $formToAddALink = $tmparray[
'formToAddALink'];
188 print
'<div class="fichecenter">';
189 print
'<div class="fichehalfleft">';
192$formfile->list_of_documents(
198 $relativepathwithnofile,
214 array(
'afteruploadtitle' => $formToUploadAFile,
'showhideaddbutton' => 1)
219 print
'<div class="fichehalfright">';
225$formfile->listOfLinks(
232 array(
'afterlinktitle' => $formToAddALink,
'showhideaddbutton' => 1)
if(! $sortfield) if(! $sortorder) $object
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.