mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-26 23:35:02 +02:00
2010-07-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_filemanager.php: changed the form to upload one or more files to more easy. And changed other things for stetic reasons. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3003 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
897705cce1
commit
0ae90d4551
@ -1,3 +1,8 @@
|
|||||||
|
2010-07-13 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* include/functions_filemanager.php: changed the form to upload one or more
|
||||||
|
files to more easy. And changed other things for stetic reasons.
|
||||||
|
|
||||||
2010-07-13 Sergio Martin <sergio.martin@artica.es>
|
2010-07-13 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* operation/agentes/datos_agente.php: Putted back data range
|
* operation/agentes/datos_agente.php: Putted back data range
|
||||||
|
@ -108,8 +108,8 @@ if (!function_exists ('mime_content_type')) {
|
|||||||
$upload_file_or_zip = (bool) get_parameter('upload_file_or_zip');
|
$upload_file_or_zip = (bool) get_parameter('upload_file_or_zip');
|
||||||
|
|
||||||
if ($upload_file_or_zip) {
|
if ($upload_file_or_zip) {
|
||||||
$zip_or_file = get_parameter('zip_or_file');
|
$decompress = get_parameter('decompress');
|
||||||
if ($zip_or_file == 'file') {
|
if (!$decompress) {
|
||||||
$upload_file = true;
|
$upload_file = true;
|
||||||
$upload_zip = false;
|
$upload_zip = false;
|
||||||
}
|
}
|
||||||
@ -458,6 +458,7 @@ function file_explorer($real_directory, $relative_directory, $url, $father = '',
|
|||||||
$table->data = array ();
|
$table->data = array ();
|
||||||
$table->head = array ();
|
$table->head = array ();
|
||||||
$table->size = array ();
|
$table->size = array ();
|
||||||
|
$table->align[3] = 'right';
|
||||||
$table->align[4] = 'center';
|
$table->align[4] = 'center';
|
||||||
|
|
||||||
$table->size[0] = '24px';
|
$table->size[0] = '24px';
|
||||||
@ -510,8 +511,10 @@ function file_explorer($real_directory, $relative_directory, $url, $father = '',
|
|||||||
$table->data[1][1] .= '<form method="post" action="' . $url . '" enctype="multipart/form-data">';
|
$table->data[1][1] .= '<form method="post" action="' . $url . '" enctype="multipart/form-data">';
|
||||||
$table->data[1][1] .= print_help_tip (__("The zip upload in this dir, easy to upload multiple files."), true);
|
$table->data[1][1] .= print_help_tip (__("The zip upload in this dir, easy to upload multiple files."), true);
|
||||||
$table->data[1][1] .= print_input_file ('file', true, false);
|
$table->data[1][1] .= print_input_file ('file', true, false);
|
||||||
$table->data[1][1] .= print_radio_button('zip_or_file', 'zip', '', false, true) . __('Multiple files zipped');
|
$table->data[1][1] .= print_checkbox('decompress', 1, false, true);
|
||||||
$table->data[1][1] .= print_radio_button('zip_or_file', 'file', '', true, true) . __('One');
|
$table->data[1][1] .= __('Decompress');
|
||||||
|
// $table->data[1][1] .= print_radio_button('zip_or_file', 'zip', '', false, true) . __('Multiple files zipped');
|
||||||
|
// $table->data[1][1] .= print_radio_button('zip_or_file', 'file', '', true, true) . __('One');
|
||||||
$table->data[1][1] .= ' ';
|
$table->data[1][1] .= ' ';
|
||||||
$table->data[1][1] .= print_submit_button (__('Go'), 'go', false, 'class="sub next"', true);
|
$table->data[1][1] .= print_submit_button (__('Go'), 'go', false, 'class="sub next"', true);
|
||||||
$table->data[1][1] .= print_input_hidden ('real_directory', $real_directory, true);
|
$table->data[1][1] .= print_input_hidden ('real_directory', $real_directory, true);
|
||||||
@ -574,9 +577,10 @@ function file_explorer($real_directory, $relative_directory, $url, $father = '',
|
|||||||
//Actions buttons
|
//Actions buttons
|
||||||
//Delete button
|
//Delete button
|
||||||
$data[4] = '';
|
$data[4] = '';
|
||||||
|
$data[4] .= '<span style="">';
|
||||||
if (is_writable ($fileinfo['realpath']) &&
|
if (is_writable ($fileinfo['realpath']) &&
|
||||||
(! is_dir ($fileinfo['realpath']) || count (scandir ($fileinfo['realpath'])) < 3)) {
|
(! is_dir ($fileinfo['realpath']) || count (scandir ($fileinfo['realpath'])) < 3)) {
|
||||||
$data[4] = '<form method="post" action="' . $url . '" style="float: left;">';
|
$data[4] .= '<form method="post" action="' . $url . '" style="display: inline;">';
|
||||||
$data[4] .= '<input type="image" src="images/cross.png" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
$data[4] .= '<input type="image" src="images/cross.png" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||||
$data[4] .= print_input_hidden ('filename', $fileinfo['realpath'], true);
|
$data[4] .= print_input_hidden ('filename', $fileinfo['realpath'], true);
|
||||||
$data[4] .= print_input_hidden('hash', md5($fileinfo['realpath'] . $config['dbpass']), true);
|
$data[4] .= print_input_hidden('hash', md5($fileinfo['realpath'] . $config['dbpass']), true);
|
||||||
@ -585,10 +589,11 @@ function file_explorer($real_directory, $relative_directory, $url, $father = '',
|
|||||||
|
|
||||||
if ($editor) {
|
if ($editor) {
|
||||||
if ($fileinfo['mime'] == MIME_TEXT) {
|
if ($fileinfo['mime'] == MIME_TEXT) {
|
||||||
$data[4] .= "<a href='$url&edit_file=1&location_file=" . $fileinfo['realpath'] . "&hash=" . md5($fileinfo['realpath'] . $config['dbpass']) . "' style='float: left;'><img src='images/edit.png' style='margin-top: 2px;' /></a>";
|
$data[4] .= "<a style='vertical-align: top;' href='$url&edit_file=1&location_file=" . $fileinfo['realpath'] . "&hash=" . md5($fileinfo['realpath'] . $config['dbpass']) . "' style='float: left;'><img src='images/edit.png' style='margin-top: 2px;' /></a>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$data[4] .= '</span>';
|
||||||
|
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user