*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
* Output code for the filemanager
* $module must be defined ('ecm', 'medias', ...)
*/
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page filemanager.tpl.php can't be called as URL";
exit;
}
?>
rights->ecm->setup;
$permtoupload = $user->rights->ecm->upload;
}
if ($module == 'medias')
{
$permtoadd = ($user->rights->mailing->creer || $user->rights->website->write);
$permtoupload = ($user->rights->mailing->creer || $user->rights->website->write);
}
// Confirm remove file (for non javascript users)
if (($action == 'delete' || $action == 'file_manager_delete') && empty($conf->use_javascript_ajax))
{
// TODO Add website, pageid, filemanager if defined
print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$section.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile','','',1);
}
// Start container of all panels
?>
';
// End top panel, toolbar
?>
formconfirm($_SERVER["PHP_SELF"].'?section='.$section, $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection','','',1);
}
// End confirm
if (empty($action) || $action == 'editfile' || $action == 'file_manager' || preg_match('/refresh/i',$action) || $action == 'delete')
{
print '
'."\n";
print ''."\n";
print ''."\n";
print '| ';
print ' '.$langs->trans("ECMSections");
print ' |
';
$showonrightsize='';
// Manual section
$htmltooltip=$langs->trans("ECMAreaDesc2");
if (! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS))
{
print '| ';
// Show filemanager tree (will be filled by call of ajax enablefiletreeajax.tpl.php that execute ajaxdirtree.php)
print '';
if ($action == 'deletefile') print $form->formconfirm('eeeee', $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', '', 'deletefile');
print ' |
';
}
else
{
print '| ';
$_POST['modulepart'] = $module;
$_POST['openeddir'] = GETPOST('openeddir');
$_POST['dir'] = empty($_POST['dir'])?'/':$_POST['dir'];
// Show filemanager tree (will be filled by direct include of ajaxdirtree.php in mode noajax, this will return all dir - all levels - to show)
print ' ';
$mode='noajax';
if (empty($url)) $url=DOL_URL_ROOT.'/ecm/index.php';
include DOL_DOCUMENT_ROOT.'/core/ajax/ajaxdirtree.php';
print ' ';
print ' |
';
}
print "
";
}
// End left panel
?>
use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) {
include DOL_DOCUMENT_ROOT.'/ecm/tpl/enablefiletreeajax.tpl.php';
}
?>