日期:2014-05-17 浏览次数:20430 次
oListManager.GetFolderRowHtml = function( folderName, folderPath, folderUrl ) { // Build the link to view the folder. var sLink = '<a href="#" onclick="OpenFolder(\'' + ProtectPath( folderPath ) + '\');return false;">' ; return '<tr>' + '<td width="16">' + sLink + '<img alt="" src="images/Folder.gif" width="16" height="16" border="0"><\/a>' + '<\/td><td nowrap colspan="2"> ' + sLink + folderName + '<\/a>' + '<\/td><td align="right" width="45">- <a href="#" onclick="DeleteFolder(\''+folderName+'\',\''+ folderUrl.replace( /'/g, '\\\'') + '\');return false;">Delete</a></td><\/tr>' ; }
oListManager.GetFileRowHtml = function( fileName, fileUrl, fileSize ) { // Build the link to view the folder. var sLink = '<a href="#" onclick="OpenFile(\'' + ProtectPath( fileUrl ) + '\');return false;">' ; // Get the file icon. var sIcon = oIcons.GetIcon( fileName ) ; return '<tr>' + '<td width="16">' + sLink + '<img alt="" src="images/icons/' + sIcon + '.gif" width="16" height="16" border="0"><\/a>' + '<\/td><td> ' + sLink + fileName + '<\/a>' + '<\/td><td align="right" nowrap> ' + fileSize + ' KB' + '<\/td><td align="right" width="45">- <a href="#" onclick="DeleteFile(\''+fileName+'\',\'' + fileUrl.replace( /'/g, '\\\'') + '\');return false;">Delete</a></td><\/tr>' ; }
function DeleteFile( fileName, fileUrl ) { if (confirm('Are you sure you wish to delete ' + fileName + '?')) { oConnector.SendCommand( 'DeleteFile', "FileUrl=" + escape( fileUrl ), Refresh ) ; } } function DeleteFolder( folderName, folderPath ) { if (confirm('Are you sure you wish to delete \'' + folderName + '\' and all files in it?')) { oConnector.SendCommand( 'DeleteFolder', "FolderName=" + escape( folderPath + folderName ), Refresh ) ; } }
oHtml.Append( oListManager.GetFolderRowHtml( sFolderName, sCurrentFolderPath + sFolderName + "/", sCurrentFolderUrl ) ) ;
function DeleteFile( $resourceType, $currentFolder ) { $file = $_SERVER['DOCUMENT_ROOT'].$_GET['FileUrl']; if (is_file($file)) { unlink($file); } else { echo '<error number="1? originaldescription=”unable to locate file">'; } } function DeleteFolder( $resourceType, $currentFolder ) { $folder = $_SERVER['DO