22 if (empty($conf) || !is_object($conf))
24 print "Error, template page filemanager.tpl.php can't be called as URL";
30 <!-- BEGIN PHP TEMPLATE core/tpl/filemanager.tpl.php -->
31 <!-- Doc of fileTree plugin at https:
35 require_once DOL_DOCUMENT_ROOT.
'/ecm/class/ecmdirectory.class.php';
37 if (empty($module)) $module =
'ecm';
44 $permtoadd = $user->rights->ecm->setup;
45 $permtoupload = $user->rights->ecm->upload;
48 if ($module ==
'medias')
50 $permtoadd = ($user->rights->mailing->creer || $user->rights->website->write);
51 $permtoupload = ($user->rights->mailing->creer || $user->rights->website->write);
58 if (($action ==
'delete' || $action ==
'file_manager_delete') && empty($conf->use_javascript_ajax))
61 print $form->formconfirm(
$_SERVER[
"PHP_SELF"].
'?section='.$section.
'&urlfile='.urlencode($_GET[
"urlfile"]), $langs->trans(
'DeleteFile'), $langs->trans(
'ConfirmDeleteFile'),
'confirm_deletefile',
'',
'', 1);
66 <!-- Begin div
id=
"containerlayout" -->
67 <div
id=
"containerlayout">
68 <div
id=
"ecm-layout-north" class=
"toolbar largebutton">
72 print '<div class="inline-block toolbarbutton centpercent">';
77 print
'<a href="'.DOL_URL_ROOT.
'/ecm/dir_add_card.php?action=create&module='.urlencode($module).($websitekey ?
'&website='.$websitekey :
'').($pageid ?
'&pageid='.$pageid :
'').
'&backtopage='.urlencode(
$_SERVER[
"PHP_SELF"].
'?file_manager=1&website='.$websitekey.
'&pageid='.$pageid).
'" class="inline-block valignmiddle toolbarbutton paddingtop" title="'.
dol_escape_htmltag($langs->trans(
'ECMAddSection')).
'">';
78 print
'<img class="toolbarbutton" border="0" src="'.DOL_URL_ROOT.
'/theme/common/folder-new.png">';
81 print
'<a href="#" class="inline-block valignmiddle toolbarbutton paddingtop" title="'.$langs->trans(
"NotAllowed").
'">';
82 print
'<img class="toolbarbutton disabled" border="0" src="'.DOL_URL_ROOT.
'/theme/common/folder-new.png">';
87 $tmpurl = ((!empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) ?
'#' : (
$_SERVER[
"PHP_SELF"].
'?action=refreshmanual'.($module ?
'&module='.$module :
'').($section ?
'&section='.$section :
'')));
88 print
'<a href="'.$tmpurl.
'" class="inline-block valignmiddle toolbarbutton paddingtop" title="'.
dol_escape_htmltag($langs->trans(
'ReSyncListOfDir')).
'">';
89 print
'<img id="refreshbutton" class="toolbarbutton" border="0" src="'.DOL_URL_ROOT.
'/theme/common/view-refresh.png">';
94 $nameforformuserfile =
'formuserfileecm';
96 print
'<div class="inline-block valignmiddle floatright">';
99 if ((!empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) || !empty($section))
101 if ((empty($section) || $section == -1) && ($module !=
'medias'))
105 jQuery(document).ready(
function() {
106 jQuery(
'#<?php echo $nameforformuserfile ?>').hide();
113 print
'<!-- Start form to attach new file in filemanager.tpl.php sectionid='.$section.
' sectiondir='.$sectiondir.
' -->'.
"\n";
114 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
116 $formfile->form_attach_new_file(
$_SERVER[
"PHP_SELF"],
'none', 0, ($section ? $section : -1), $permtoupload, 48, null,
'', 0,
'', 0, $nameforformuserfile,
'', $sectiondir);
117 }
else print
' ';
128 <div
id=
"ecm-layout-west" class=
"inline-block">
134 if ($action ==
'delete_section')
136 print $form->formconfirm(
$_SERVER[
"PHP_SELF"].
'?section='.$section, $langs->trans(
'DeleteSection'), $langs->trans(
'ConfirmDeleteSection', $ecmdir->label),
'confirm_deletesection',
'',
'', 1);
141 if (empty($action) || $action ==
'editfile' || $action ==
'file_manager' || preg_match(
'/refresh/i', $action) || $action ==
'delete')
145 print
'<table width="100%" class="liste noborderbottom">'.
"\n";
147 print
'<!-- Title for manual directories -->'.
"\n";
148 print
'<tr class="liste_titre">'.
"\n";
149 print
'<th class="liste_titre left">';
150 print
' '.$langs->trans(
"ECMSections");
153 $showonrightsize =
'';
156 $htmltooltip = $langs->trans(
"ECMAreaDesc2");
158 if (!empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS))
163 print
'<tr><td><div style="padding-left: 5px; padding-right: 5px;"><a href="'.$_SERVER[
"PHP_SELF"].
'?file_manager=1&pageid='.$pageid.
'">';
164 if ($module ==
'medias') print $langs->trans(
"RootOfMedias");
165 else print $langs->trans(
"Root");
166 print
'</a></div></td></tr>';
172 print
'<div id="filetree" class="ecmfiletree"></div>';
174 if ($action ==
'deletefile') print $form->formconfirm(
'eeeee', $langs->trans(
'DeleteFile'), $langs->trans(
'ConfirmDeleteFile'),
'confirm_deletefile',
'',
'',
'deletefile');
178 print
'<tr><td style="padding-left: 20px">';
180 $_POST[
'modulepart'] = $module;
181 $_POST[
'openeddir'] =
GETPOST(
'openeddir');
182 $_POST[
'dir'] = empty($_POST[
'dir']) ?
'/' : $_POST[
'dir'];
185 print
'<div id="filetree" class="ecmfiletree">';
191 if (empty($url)) $url = DOL_URL_ROOT.
'/ecm/index.php';
192 include DOL_DOCUMENT_ROOT.
'/core/ajax/ajaxdirtree.php';
206 <div
id=
"ecm-layout-center" class=
"inline-block">
207 <div
class=
"pane-in ecm-in-layout-center">
208 <div
id=
"ecmfileview" class=
"ecmfileview">
214 if (empty($url)) $url = DOL_URL_ROOT.
'/ecm/index.php';
215 include DOL_DOCUMENT_ROOT.
'/core/ajax/ajaxdirpreview.php';
224 </div> <!-- End div
id=
"containerlayout" -->
228 if (!empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS))
235 if (
GETPOST(
'section_dir',
'alpha')) { $preopened =
GETPOST(
'section_dir',
'alpha'); }
237 include DOL_DOCUMENT_ROOT.
'/ecm/tpl/enablefiletreeajax.tpl.php';
241 <!-- END PHP TEMPLATE core/tpl/filemanager.tpl.php -->
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
print $_SERVER["PHP_SELF"]
Edit parameters.
print
Draft customers invoices.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $keepmoretags= '', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields...