24require
'../../connectors/php/config.inc.php';
31<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
34 <title><?php echo $langs->trans(
"MediaBrowser").
' - '.$Config[
'UserFilesAbsolutePathRelative']; ?></title>
35 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
37print
'<!-- Includes CSS for Dolibarr theme -->'.
"\n";
41if (!empty($conf->modules_parts[
'theme'])) {
42 foreach ($conf->modules_parts[
'theme'] as $reldir) {
45 $themesubdir = $reldir;
53print
'<link rel="stylesheet" type="text/css" href="'.$themepath.$themeparam.
'">'.
"\n";
55 <script
type=
"text/javascript" src=
"js/fckxml.js"></script>
56 <script
type=
"text/javascript">
60 var d = document.domain ;
67 var test = window.opener.document.domain ;
74 d = d.replace( /.*?(?:\.|$)/,
'' );
90function GetUrlParam( paramName )
92 var oRegex =
new RegExp(
'[\?&]' + paramName +
'=([^&]+)',
'i' );
93 var oMatch = oRegex.exec( window.top.location.search );
95 if ( oMatch && oMatch.length > 1 )
96 return decodeURIComponent( oMatch[1] );
101var oConnector =
new Object();
102oConnector.CurrentFolder =
'/' ;
104var sConnUrl = GetUrlParam(
'Connector' );
107if ( sConnUrl.substring(0,1) !=
'/' && sConnUrl.indexOf(
'://' ) < 0 )
108 sConnUrl = window.location.href.replace( /browser.php.*$/,
'' ) + sConnUrl ;
110oConnector.ConnectorUrl = sConnUrl + ( sConnUrl.indexOf(
'?') != -1 ?
'&' :
'?' );
112var sServerPath = GetUrlParam(
'ServerPath' );
113if ( sServerPath.length > 0 )
114 oConnector.ConnectorUrl +=
'ServerPath=' + encodeURIComponent( sServerPath ) +
'&' ;
117oConnector.ConnectorUrl =
'<?php echo DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php?
'; ?>';
118console.log(
'ConnectorUrl='+oConnector.ConnectorUrl);
120oConnector.ResourceType = GetUrlParam(
'Type' );
121oConnector.ShowAllTypes = ( oConnector.ResourceType.length == 0 );
123if ( oConnector.ShowAllTypes )
124 oConnector.ResourceType =
'File' ;
126oConnector.SendCommand =
function( command, params, callBackFunction )
128 var sUrl = this.ConnectorUrl +
'Command=' + command ;
129 sUrl +=
'&Type=' + this.ResourceType ;
130 sUrl +=
'&CurrentFolder=' + encodeURIComponent( this.CurrentFolder );
132 if ( params ) sUrl +=
'&' + params ;
135 sUrl +=
'&uuid=' +
new Date().getTime();
137 var oXML =
new FCKXml();
139 if ( callBackFunction )
140 oXML.LoadUrl( sUrl, callBackFunction );
142 return oXML.LoadUrl( sUrl );
147oConnector.CheckError =
function( responseXml )
149 var iErrorNumber = 0 ;
150 var oErrorNode = responseXml.SelectSingleNode(
'Connector/Error' );
154 iErrorNumber = parseInt( oErrorNode.attributes.getNamedItem(
'number').value, 10 );
156 switch ( iErrorNumber )
161 alert( oErrorNode.attributes.getNamedItem(
'text').value );
164 alert(
'Folder already exists' );
167 alert(
'Invalid folder name' );
170 alert(
'You have no permissions to create the folder' );
173 alert(
'Unknown error creating folder' );
176 alert(
'Error on your request. Error number: ' + iErrorNumber );
180 return iErrorNumber ;
183var oIcons =
new Object();
185oIcons.AvailableIconsArray = [
186 'ai',
'avi',
'bmp',
'cs',
'dll',
'doc',
'exe',
'fla',
'gif',
'htm',
'html',
'jpg',
'js',
187 'mdb',
'mp3',
'pdf',
'png',
'ppt',
'rdp',
'swf',
'swt',
'txt',
'vsd',
'xls',
'xml',
'zip' ] ;
189oIcons.AvailableIcons =
new Object();
191for ( var i = 0 ; i < oIcons.AvailableIconsArray.length ; i++ )
192 oIcons.AvailableIcons[ oIcons.AvailableIconsArray[i] ] =
true ;
194oIcons.GetIcon =
function( fileName )
196 var sExtension = fileName.substr( fileName.lastIndexOf(
'.') + 1 ).toLowerCase();
198 if ( this.AvailableIcons[ sExtension ] ==
true )
201 return 'default.icon' ;
204function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
206 if (errorNumber ==
"1")
207 window.frames[
'frmUpload'].OnUploadCompleted( errorNumber, customMsg );
209 window.frames[
'frmUpload'].OnUploadCompleted( errorNumber, fileName );
214 <frameset cols=
"200,*" framespacing=
"3" border=
"1" style=
"border: 2px solid #CCCCCC;">
215 <frame
name=
"frmFolders" src=
"frmfolders.php" scrolling=
"auto" frameborder=
"1">
216 <frameset rows=
"50,*,70" framespacing=
"0">
217 <frame
name=
"frmActualFolder" src=
"frmactualfolder.php" scrolling=
"no" frameborder=
"0">
218 <frame
name=
"frmResourcesList" src=
"frmresourceslist.php" scrolling=
"auto" frameborder=
"0">
219 <frameset cols=
"200,*" framespacing=
"0" border=
"0">
220 <frame
name=
"frmCreateFolder" src=
"frmcreatefolder.php" scrolling=
"no" frameborder=
"0">
221 <frame
name=
"frmUpload" src=
"frmupload.php" scrolling=
"no" frameborder=
"0">
222 <frame
name=
"frmUploadWorker" src=
"javascript:void(0)" scrolling=
"no" frameborder=
"0">
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
$conf db name
Only used if Module[ID]Name translation string is not found.