65
65
global $edited_Item;
67
$popfor = param( 'popfor', 'string', '' );
68
71
<!-- FILE BROWSER -->
71
$Widget = new Widget( 'file_browser' );
74
$Widget = new Widget( 'file_browser' );
77
{ // this is not a popup so offer the upload page
72
78
$Widget->global_icon( T_('Upload...'), 'upload', regenerate_url( 'ctrl', 'ctrl=upload' ), T_('Upload').' »', 1, 5 );
74
if( !empty($edited_Item) )
75
{ // Return to post editing:
76
$Widget->global_icon( T_('Close file manager'), 'close', '?ctrl=items&p='.$edited_Item->ID );
79
$Widget->title = get_manual_link('file-browser').T_('File browser');
80
$Widget->disp_template_replaced( 'block_start' );
81
{ // or offer to close the popup
82
$Widget->global_icon( T_('Close file manager'), 'close', 'javascript:window.close();', T_('Close file manager'), 3, 3, array( 'class'=>'action_icon highlight') );
85
$Widget->title = get_manual_link('file-browser').T_('File browser');
86
$Widget->disp_template_replaced( 'block_start' );
83
89
<table id="fm_browser" cellspacing="0" cellpadding="0">
270
// ______________________________ Directory tree ______________________________
271
if( ! $fm_hide_dirtree )
276
// ______________________________ Directory tree ______________________________
277
if( ! $fm_hide_dirtree )
279
echo '<td id="fm_dirtree">';
281
// Version with all roots displayed
282
//echo get_directory_tree( NULL, NULL, $ads_list_path );
284
// Version with only the current root displayed:
285
echo get_directory_tree( $fm_Filelist->_FileRoot, $fm_Filelist->_FileRoot->ads_path, $ads_list_path );
290
echo '<td id="fm_files">';
291
// ______________________________ Files ______________________________
293
require dirname(__FILE__).'/_file_list.inc.php';
295
// ______________________________ Toolbars ______________________________
296
echo '<div id="fileman_toolbars_bottom">';
299
* CREATE FILE/FOLDER TOOLBAR:
301
if( ($Settings->get( 'fm_enable_create_dir' ) || $Settings->get( 'fm_enable_create_file' ))
302
&& $current_User->check_perm( 'files', 'add' ) )
303
{ // dir or file creation is enabled and we're allowed to add files:
273
echo '<td id="fm_dirtree">';
275
// Version with all roots displayed
276
//echo get_directory_tree( NULL, NULL, $ads_list_path );
278
// Version with only the current root displayed:
279
echo get_directory_tree( $fm_Filelist->_FileRoot, $fm_Filelist->_FileRoot->ads_path, $ads_list_path );
284
echo '<td id="fm_files">';
285
// ______________________________ Files ______________________________
287
require dirname(__FILE__).'/_file_list.inc.php';
289
// ______________________________ Toolbars ______________________________
290
echo '<div id="fileman_toolbars_bottom">';
293
* CREATE FILE/FOLDER TOOLBAR:
295
if( ($Settings->get( 'fm_enable_create_dir' ) || $Settings->get( 'fm_enable_create_file' ))
296
&& $current_User->check_perm( 'files', 'add' ) )
297
{ // dir or file creation is enabled and we're allowed to add files:
300
308
echo '<div class="toolbaritem">';
301
309
$Form = new Form( NULL, 'fmbar_create_checkchanges', 'post', 'none' );
302
310
$Form->begin_form();