|
' . $current_path . ''; ?> |
|
|
|
|
|
|
|
|
|
' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . ''; ?> |
|
read()) {
if ( ($file != '.') && ($file != 'CVS') && ( ($file != '..') || ($current_path != DIR_FS_DOCUMENT_ROOT) ) ) {
$file_size = number_format(filesize($current_path . '/' . $file)) . ' bytes';
$permissions = tep_get_file_permissions(fileperms($current_path . '/' . $file));
if ($showuser) {
$user = @posix_getpwuid(fileowner($current_path . '/' . $file));
$group = @posix_getgrgid(filegroup($current_path . '/' . $file));
} else {
$user = $group = array();
}
$contents[] = array('name' => $file,
'is_dir' => is_dir($current_path . '/' . $file),
'last_modified' => strftime(DATE_TIME_FORMAT, filemtime($current_path . '/' . $file)),
'size' => $file_size,
'permissions' => $permissions,
'user' => $user['name'],
'group' => $group['name']);
}
}
function tep_cmp($a, $b) {
return strcmp( ($a['is_dir'] ? 'D' : 'F') . $a['name'], ($b['is_dir'] ? 'D' : 'F') . $b['name']);
}
usort($contents, 'tep_cmp');
?>
|
|
|
|
|
|
|
name)) {
if ($fInfo->is_dir) {
echo ' ' . "\n";
$onclick_link = 'goto=' . $goto_link;
} else {
echo ' ' . "\n";
$onclick_link = 'info=' . urlencode($fInfo->name) . '&action=edit';
}
} else {
echo ' ' . "\n";
$onclick_link = 'info=' . urlencode($contents[$i]['name']);
}
if ($contents[$i]['is_dir']) {
if ($contents[$i]['name'] == '..') {
$icon = tep_image(DIR_WS_ICONS . 'previous_level.gif', ICON_PREVIOUS_LEVEL);
} else {
$icon = (isset($fInfo) && is_object($fInfo) && ($contents[$i]['name'] == $fInfo->name) ? tep_image(DIR_WS_ICONS . 'current_folder.gif', ICON_CURRENT_FOLDER) : tep_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER));
}
$link = tep_href_link(FILENAME_FILE_MANAGER, 'goto=' . $goto_link);
} else {
$icon = tep_image(DIR_WS_ICONS . 'file_download.gif', ICON_FILE_DOWNLOAD);
$link = tep_href_link(FILENAME_FILE_MANAGER, 'action=download&filename=' . urlencode($contents[$i]['name']));
}
?>
' . $icon . ' ' . $contents[$i]['name']; ?> |
|
|
|
|
|
' . tep_image(DIR_WS_ICONS . 'delete.gif', ICON_DELETE) . ' '; if (isset($fInfo) && is_object($fInfo) && ($fInfo->name == $contents[$i]['name'])) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ''; } ?> |
|
|
'' . $fInfo->name . '');
$contents = array('form' => tep_draw_form('file', FILENAME_FILE_MANAGER, 'info=' . urlencode($fInfo->name) . '&action=deleteconfirm'));
$contents[] = array('text' => TEXT_DELETE_INTRO);
$contents[] = array('text' => ' ' . $fInfo->name . '');
$contents[] = array('align' => 'center', 'text' => ' ' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' ' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '');
break;
case 'new_folder':
$heading[] = array('text' => '' . TEXT_NEW_FOLDER . '');
$contents = array('form' => tep_draw_form('folder', FILENAME_FILE_MANAGER, 'action=insert'));
$contents[] = array('text' => TEXT_NEW_FOLDER_INTRO);
$contents[] = array('text' => ' ' . TEXT_FILE_NAME . ' ' . tep_draw_input_field('folder_name'));
$contents[] = array('align' => 'center', 'text' => ' ' . (($directory_writeable == true) ? tep_image_submit('button_save.gif', IMAGE_SAVE) : '') . ' ' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '');
break;
case 'upload':
$heading[] = array('text' => '' . TEXT_INFO_HEADING_UPLOAD . '');
$contents = array('form' => tep_draw_form('file', FILENAME_FILE_MANAGER, 'action=processuploads', 'post', 'enctype="multipart/form-data"'));
$contents[] = array('text' => TEXT_UPLOAD_INTRO);
$file_upload = '';
for ($i=1; $i<6; $i++) $file_upload .= tep_draw_file_field('file_' . $i) . ' ';
$contents[] = array('text' => ' ' . $file_upload);
$contents[] = array('align' => 'center', 'text' => ' ' . (($directory_writeable == true) ? tep_image_submit('button_upload.gif', IMAGE_UPLOAD) : '') . ' ' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '');
break;
default:
if (isset($fInfo) && is_object($fInfo)) {
$heading[] = array('text' => '' . $fInfo->name . '');
if (!$fInfo->is_dir) $contents[] = array('align' => 'center', 'text' => '' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '');
$contents[] = array('text' => ' ' . TEXT_FILE_NAME . ' ' . $fInfo->name . '');
if (!$fInfo->is_dir) $contents[] = array('text' => ' ' . TEXT_FILE_SIZE . ' ' . $fInfo->size . '');
$contents[] = array('text' => ' ' . TEXT_LAST_MODIFIED . ' ' . $fInfo->last_modified);
}
}
if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
echo ' ' . "\n";
$box = new box;
echo $box->infoBox($heading, $contents);
echo ' | ' . "\n";
}
?>
|
|