* * 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 ?>
'; // Toolbar //if (preg_match('/\/ecm/', $_SERVER['PHP_SELF'])) { //if ($module == 'ecm') { if ($permtoadd) { print ''; print ''; print ''; } else { print ''; print ''; print ''; } if ($module == 'ecm') { $tmpurl=((! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS))?'#':($_SERVER["PHP_SELF"].'?action=refreshmanual'.($module?'&module='.$module:'').($section?'&section='.$section:''))); print ''; print ''; print ''; } //} // Start "Add new file" area $nameforformuserfile = 'formuserfileecm'; print '
'; // To attach new file if ((! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) || ! empty($section)) { if ((empty($section) || $section == -1) && ($module != 'medias')) { ?> '."\n"; include_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; $formfile=new FormFile($db); $formfile->form_attach_new_file($_SERVER["PHP_SELF"], 'none', 0, ($section?$section:-1), $permtoupload, 48, null, '', 0, '', 0, $nameforformuserfile, '', $sectiondir); } else print ' '; print '
'; // End "Add new file" area print '
'; // 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 ''; $showonrightsize=''; // Manual section $htmltooltip=$langs->trans("ECMAreaDesc2"); if (! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) { print ''; } else { print ''; } print "
'; print ' '.$langs->trans("ECMSections"); 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 '
'; $_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 '
"; } // End left panel ?>
use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) { include DOL_DOCUMENT_ROOT.'/ecm/tpl/enablefiletreeajax.tpl.php'; } ?>