Project

General

Profile

Revision 54

View differences:

trunk/include/footer.php
34 34
 */
35 35
function show_about() {			// footer for html-page
36 36
	echo "\n<div id=\"jx_footer\" style=\"text-align:center;\">
37
	<img src=\""._EXT_URL."/images/logo.gif\" align=\"middle\" alt=\"joomlaXplorer Logo\" />
37
	<img src=\""._EXT_URL."/images/eXtplorer.gif\" align=\"middle\" alt=\"eXtplorer Logo\" />
38 38
	<br />
39 39
	Your Version: <a href=\"".$GLOBALS['jx_home']."\" target=\"_blank\">joomlaXplorer {$GLOBALS['jx_version']}</a>
40 40
	<br />
......
71 71

  
72 72
function show_footer()  {
73 73
	echo "\n<div id=\"jx_footer\" style=\"text-align:center;\">
74
	<img src=\""._EXT_URL."/images/logo.gif\" align=\"middle\" alt=\"joomlaXplorer Logo\" />
74
	<img src=\""._EXT_URL."/images/eXtplorer.gif\" align=\"middle\" alt=\"eXtplorer Logo\" />
75 75
	</div>";
76 76
}
77 77
//------------------------------------------------------------------------------
trunk/include/users.php
82 82
	// Set Login
83 83
	$GLOBALS['__SESSION']["s_user"]	= $data[0];
84 84
	$GLOBALS['__SESSION']["s_pass"]	= $data[1];
85
	$GLOBALS["home_dir"]	= $data[2];
85
	$GLOBALS["home_dir"]	= str_replace( '\\', '/', $data[2] );
86 86
	$GLOBALS["home_url"]	= $data[3];
87 87
	$GLOBALS["show_hidden"]	= $data[4];
88 88
	$GLOBALS["no_access"]	= $data[5];
......
134 134
}
135 135
*/
136 136
//------------------------------------------------------------------------------
137
function get_session_name() {
138

  
139
	$remote_addr 	= explode('.',$_SERVER['REMOTE_ADDR']);
140
	$ip				= $remote_addr[0] .'.'. $remote_addr[1] .'.'. $remote_addr[2];
141
	$value 			= md5( $_SERVER['SERVER_ADDR'] . $id . $ip . $browser );
142

  
143
	return $value;
144
}
137 145
?>
trunk/include/init.php
61 61
	$GLOBALS['home_url'] = "http://".$GLOBALS['__SERVER']['HTTP_HOST'].'/'.dirname($GLOBALS['__SERVER']["PHP_SELF"]);
62 62
}
63 63
$GLOBALS['home_url'] = str_replace( '/administrator', '', $GLOBALS['home_url'] );
64
$GLOBALS['home_dir'] = $_SERVER['DOCUMENT_ROOT'];
64
$GLOBALS['home_dir'] = str_replace( '\\', '/', $_SERVER['DOCUMENT_ROOT'] );
65 65

  
66 66
// Important Definitions!
67 67
define ( "_EXT_PATH", realpath(dirname( __FILE__ ).'/..') );
68 68
define ( "_EXT_FTPTMP_PATH", dirname( __FILE__ ).'/ftp_tmp' );
69
if( function_exists( 'extGetParam') || class_exists( 'jconfig')) {
69
if( function_exists( 'mosGetParam') || class_exists( 'jconfig')) {
70 70
	define ( "_EXT_URL", $GLOBALS['home_url']."/administrator/components/com_extplorer" );
71 71
} else {
72 72
	define ( "_EXT_URL", dirname($GLOBALS['script_name']) );
......
78 78
	require _EXT_PATH . '/libraries/inputfilter.php';
79 79
}
80 80

  
81
$action = stripslashes(extGetParam( $_REQUEST, "action" ));
82

  
81 83
$GLOBALS["language"] = $mainframe->getUserStateFromRequest( 'language', 'lang', $mosConfig_lang );
82 84
// Get Item
83 85
if(isset($_REQUEST["item"])) 
trunk/include/download.php
52 52
		}
53 53
		else {
54 54
			$abs_item = get_abs_item($dir,$item);
55
			if( !strstr( $abs_item, realpath($GLOBALS['home_dir']) ))
55
			if( !strstr( $abs_item, $GLOBALS['home_dir']) )
56 56
			  $abs_item = realpath($GLOBALS['home_dir']).$abs_item;
57 57
		}
58 58
		
trunk/include/login.php
35 35
 */
36 36

  
37 37
//------------------------------------------------------------------------------
38
require _EXT_PATH."/include/users.php";
38
require_once _EXT_PATH."/include/users.php";
39 39
load_users();
40 40
//------------------------------------------------------------------------------
41 41

  
......
72 72
			
73 73
			$langs = get_languages();
74 74
			?>
75
			<div style="width: 400px;" id="formContainer">
76
	    <div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>
77
	    <div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc">
75
		<div style="width: 400px;" id="formContainer">
76
			<?php show_footer(); ?>
77
	    	<div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>
78
	    	<div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc">
78 79
	
79 80
	        <h3 style="margin-bottom:5px;">eXtplorer - <?php echo jx_Lang::msg('actlogin') ?></h3>
80 81
	        <div id="adminForm">
81 82
	
82 83
	        </div><div class="jx_statusbar" id="statusBar"></div>
83
	    </div></div></div>
84
	    <div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>
85
	    
84
	    	</div></div></div>
85
	    	<div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>
86
	    	
86 87
	</div>
87 88
	<script type="text/javascript">
88 89
	var languages = new Ext.data.SimpleStore({
......
154 155
	simple.addButton('<?php echo jx_Lang::msg( 'btnreset', true ) ?>', function() { simple.reset(); } );
155 156
	simple.render('adminForm');
156 157
	Ext.get( 'formContainer').center();
158
	Ext.get( 'formContainer').setTop(100);
157 159
	simple.findField('p_user').focus();
158 160

  
159 161
</script><?php
160
			show_footer();
161 162
			define( '_LOGIN_REQUIRED', 1 );
162 163
		}
163 164
	}
......
166 167
function logout() {
167 168
	session_destroy();
168 169
	session_write_close();
169
	header("location: ".$GLOBALS["script_name"]);
170
	header("Location: ".$GLOBALS["script_name"]);
170 171
}
171 172
//------------------------------------------------------------------------------
172 173
?>
trunk/include/functions.php
63 63
//------------------------------------------------------------------------------
64 64
function get_abs_dir($dir) {			// get absolute path
65 65
	if( jx_isFTPMode() ) {
66
		if( $dir != '' && $dir[0] != '/' ) {
66
		if( $dir != '' && $dir[0] != '/' && $dir[1] != ':') {
67 67
			$dir = '/'.$dir;
68 68
		}
69 69
		return $dir;
......
75 75
	/*else {
76 76
		$abs_dir = $dir;
77 77
	}*/
78
	$realpath = realpath($abs_dir);
79
	/*if( $realpath == '') {
78
	$realpath = str_replace('\\', '/', realpath($abs_dir) );
79
	if( $realpath == '') {
80 80
		return $abs_dir;
81 81
	}
82 82
	else {
83 83
		return $realpath;
84
	}*/
84
	}
85 85
	
86 86
	return $realpath;
87 87
}
......
308 308
	foreach( $files as $item) {
309 309
		$item = str_replace( '\\', '/', $item );
310 310
		if( get_is_dir($item)) {
311
			$index = str_replace( get_abs_dir($GLOBALS['home_dir']).$GLOBALS['separator'], '', $item );
311
			
312
			$index = str_replace( $GLOBALS['home_dir'].$GLOBALS['separator'], '', $item );
312 313
			$dirs[$index]= basename($index);
313 314
		}
314 315
	}
315 316
	return $dirs;
316 317
}
318
/**
319
 * Returns select lists with all the subdirectories along the current directory path
320
 *
321
 * @param string $dir
322
 * @return string
323
 */
317 324
function get_dir_selects( $dir ) {
318
	$dirs = explode( "/", $dir );
325
	$dirs = explode( "/", str_replace( "\\", '/', $dir ) );
319 326
	
320 327
	$subdirs = get_dir_list();
321 328
	if( empty($dirs[0]) ) array_shift($dirs);
trunk/include/result.class.php
96 96
		
97 97
		if( empty( $_GET['error'] )) {
98 98
			session_write_close();
99
			mosRedirect( make_link("show_error", $GLOBALS["dir"], null, null, null, null, '&error=1&extra='.urlencode( $extra )) );
99
			extRedirect( make_link("show_error", $GLOBALS["dir"], null, null, null, null, '&error=1&extra='.urlencode( $extra )) );
100 100
		}
101 101
		else {
102 102
			show_header($GLOBALS["error_msg"]["error"]);
trunk/include/header.php
40 40
	$mode = extGetParam( $_SESSION, 'file_mode', 'file' );
41 41
	$logoutlink = $mode == 'ftp' ? ' <a href="'.$GLOBALS['script_name'].'?option=com_extplorer&amp;action=ftp_logout" title="'.$GLOBALS['messages']['logoutlink'].'">['.$GLOBALS['messages']['logoutlink'].']</a>' : '';
42 42
	$alternate_mode = $mode == 'file' ? 'ftp' : 'file';
43
	echo '<tr><td width=\"20%\">';
43
	echo '<tr><td width="20%">';
44 44
	if( is_object( $GLOBALS['_VERSION'])) {
45 45
		echo "<a href=\"index2.php\">Back to ".$GLOBALS['_VERSION']->PRODUCT.'</a>';
46 46
	} else {
47
		echo jx_selectList('language_selector', $GLOBALS['language'], get_languages(), 1, '', 'onchange="document.location.href=document.location.href + \'&lang=\' + this.options[this.selectedIndex].value;"');
47
		echo jx_selectList('language_selector', $GLOBALS['language'], get_languages(), 1, '', 'onchange="document.location.href=\''.$GLOBALS['script_name'].'?lang=\' + this.options[this.selectedIndex].value;"');
48 48
	}
49 49
	// Logo
50 50
	echo "</td><td style=\"color:black;\" width=\"10%\">";
51 51
	//echo "<div style=\"margin-left:10px;float:right;\" width=\"305\" >";
52 52
	echo "<a href=\"".$GLOBALS['jx_home']."\" target=\"_blank\" title=\"joomlaXplorer Project\">
53
		<img src=\""._EXT_URL."/images/extplorer.png\" alt=\"eXtplorer\" border=\"0\" /></a>
53
		<img src=\""._EXT_URL."/images/eXtplorer.gif\" alt=\"eXtplorer\" border=\"0\" /></a>
54 54
		</td>";
55 55
	//echo "</div>";
56 56
	echo "<td style=\"padding-left: 15px; color:black;\" id=\"bookmark_container\" width=\"35%\"></td>\n";
trunk/extplorer.xml
8 8
    <authorUrl>http://joomlacode.org/gf/project/joomlaxplorer/</authorUrl>
9 9
    <version>2.0.0 beta3</version>
10 10
    <description><![CDATA[
11
	<div align="left"><img src="components/com_extplorer/images/joomlaXplorer.png" alt="joomlaXplorer Logo" /></div>
11
	<div align="left"><img src="components/com_extplorer/images/logo.gif" alt="joomlaXplorer Logo" /></div>
12 12
	<h2>Successfully installed joomlaXplorer&nbsp;</h2>
13 13
	joomlaXplorer is a powerful File- and FTP Manager script. 
14 14
	<br/>It allows 
......
42 42
			<filename>config/conf.php</filename>
43 43
			<filename>config/index.html</filename>
44 44
			<filename>config/mimes.php</filename>
45
			<filename>extplorer.ico</filename>
45 46
			<filename>fetchscript.php</filename>
46 47
			<filename>ftp_tmp/index.html</filename>
47 48
			<filename>images/_.gif</filename>
......
81 82
			<filename>images/info.png</filename>
82 83
			<filename>images/java_jar.png</filename>
83 84
			<filename>images/joomla_x_icon.png</filename>
84
			<filename>images/extplorer.png</filename>
85
			<filename>images/eXtplorer.gif</filename>
85 86
			<filename>images/js.gif</filename>
86 87
			<filename>images/js.png</filename>
87 88
			<filename>images/log_error.png</filename>
88 89
			<filename>images/logo.gif</filename>
90
			<filename>images/logout.png</filename>
89 91
			<filename>images/midi.png</filename>
90 92
			<filename>images/move.png</filename>
91 93
			<filename>images/multimedia.png</filename>
......
251 253
			<filename>libraries/Archive/Writer/Zip.php</filename>
252 254
			<filename>libraries/Archive/Writer/index.html</filename>
253 255
			<filename>libraries/Archive/index.html</filename>
256
			<filename>libraries/compat.php41x.php</filename>
257
			<filename>libraries/compat.php42x.php</filename>
258
			<filename>libraries/compat.php50x.php</filename>
254 259
			<filename>libraries/FTP.php</filename>
255 260
			<filename>libraries/FTP/Observer.php</filename>
256 261
			<filename>libraries/FTP/Socket.php</filename>
257 262
			<filename>libraries/FTP/index.html</filename>
258 263
			<filename>libraries/File_Operations.php</filename>
264
			<filename>libraries/geshi/geshi.php</filename>
265
			<filename>libraries/geshi/index.html</filename>
266
			<filename>libraries/geshi/geshi/css.php</filename>
267
			<filename>libraries/geshi/geshi/html4strict.php</filename>
268
			<filename>libraries/geshi/geshi/ini.php</filename>
269
			<filename>libraries/geshi/geshi/javascript.php</filename>
270
			<filename>libraries/geshi/geshi/mysql.php</filename>
271
			<filename>libraries/geshi/geshi/php.php</filename>
272
			<filename>libraries/geshi/geshi/php-brief.php</filename>
273
			<filename>libraries/geshi/geshi/sql.php</filename>
274
			<filename>libraries/geshi/geshi/xml.php</filename>
275
			<filename>libraries/geshi/geshi/index.html</filename>
276
			<filename>libraries/inputfilter.php</filename>
259 277
			<filename>libraries/JSON.php</filename>
260 278
			<filename>libraries/MIME/Parameter.php</filename>
261 279
			<filename>libraries/MIME/Type.php</filename>
262 280
			<filename>libraries/MIME/index.html</filename>
263 281
			<filename>libraries/PEAR.php</filename>
282
			<filename>libraries/standalone.php</filename>
264 283
			<filename>libraries/Tar.php</filename>
265 284
			<filename>libraries/index.html</filename>
266 285
			<filename>libraries/lib_zip.php</filename>
trunk/build_component.bat
18 18
C:\Programme\7-Zip\7z.exe a -tzip -r %PATH%\scripts.zip scripts
19 19
C:\Programme\7-Zip\7z.exe d -r %PATH%\scripts.zip .svn\
20 20

  
21
C:\Programme\7-Zip\7z.exe a -tzip -r %PATH%\com_joomlaxplorer.zip
22
C:\Programme\7-Zip\7z.exe d -r %PATH%\com_joomlaxplorer.zip .svn\
23
C:\Programme\7-Zip\7z.exe d %PATH%\com_joomlaxplorer.zip scripts\
21
C:\Programme\7-Zip\7z.exe a -tzip -r %PATH%\com_extplorer.zip
22
C:\Programme\7-Zip\7z.exe d -r %PATH%\com_extplorer.zip .svn\
23
C:\Programme\7-Zip\7z.exe d %PATH%\com_extplorer.zip scripts\
24 24

  
25
C:\Programme\7-Zip\7z.exe d -r %PATH%\com_joomlaxplorer.zip build_component.sh build_component.bat .project .projectOptions .cache
25
C:\Programme\7-Zip\7z.exe d -r %PATH%\com_extplorer.zip build_component.sh build_component.bat .project .projectOptions .cache
26 26

  
27 27
del %PATH%\scripts.zip
trunk/scripts/codepress/codepress.js
119 119

  
120 120

  
121 121
CodePress.run = function() {
122
	if( document.location.href.indexOf( 'com_extplorer' ) && !document.location.href.indexOf( 'com_extplorer/index.php' )) {
122
	if( document.location.href.indexOf( 'com_extplorer' ) && document.location.href.indexOf( 'com_extplorer/index.php' ) == -1) {
123 123
		CodePress.path = 'components/com_extplorer/scripts/codepress/';
124 124
	} else {
125 125
		CodePress.path = 'scripts/codepress/';
trunk/index.php
54 54
<html xmlns="http://www.w3.org/1999/xhtml">
55 55
	<head>
56 56
		<?php echo $mainframe->getHead(); ?>
57
		<link rel="shortcut icon" href="<?php echo $mosConfig_live_site; ?>/images/favicon.ico" />
57
		<link rel="shortcut icon" href="<?php echo _EXT_URL ?>/extplorer.ico" />
58 58
		<meta http-equiv="Content-Type" content="text/html; <?php echo $GLOBALS["charset"]; ?>" />
59 59
		<meta name="robots" content="noindex, nofollow" />
60 60
	</head>
trunk/admin.extplorer.php
69 69
//------------------------------------------------------------------------------
70 70
require_once dirname( __FILE__) . "/include/init.php";	// Init
71 71
//------------------------------------------------------------------------------
72

  
73
$action = stripslashes(extGetParam( $_REQUEST, "action" ));
74 72
if( $action == "post" )
75 73
  $action = extGetParam( $_REQUEST, "do_action" );
76 74
elseif( empty( $action ))
......
85 83

  
86 84
if( defined( '_LOGIN_REQUIRED')) return;
87 85

  
88
if( $action != "arch" && $action != "download" ) {
89
	$mainframe->addCustomHeadTag( '<script type="text/javascript" src="components/com_extplorer/style/opacity.js"></script>' );
90
	if( $action == "archive") {
91
		$mainframe->addCustomHeadTag( '<script type="text/javascript" src="components/com_extplorer/scripts/mootools.ajax.js"></script>' );
92
	}	
86
$mainframe->addCustomHeadTag( '<script type="text/javascript" src="components/com_extplorer/style/opacity.js"></script>' );
87
if( $action == "archive") {
88
	$mainframe->addCustomHeadTag( '<script type="text/javascript" src="components/com_extplorer/scripts/mootools.ajax.js"></script>' );
93 89
}
94 90

  
95 91
// Empty the output buffer if this is a XMLHttpRequest
trunk/config/conf.php
19 19

  
20 20
//------------------------------------------------------------------------------
21 21
// Global User Variables (used when $require_login==false)
22
	
23
	if( $GLOBALS['isWindows'] ) {
24
		$GLOBALS["separator"] = "\\";
25
	}
26
	else {
27
		$GLOBALS["separator"] = "/";
28
	}
22
	$GLOBALS["separator"] = "/";
29 23
	  
30 24
	// the home directory for the filemanager: (use '/', not '\' or '\\', no trailing '/')
31 25

  
trunk/libraries/standalone.php
24 24
if (version_compare( phpversion(), '5.0' ) < 0) {
25 25
	require_once( dirname( __FILE__ ) . '/compat.php50x.php' );
26 26
}
27

  
27
require_once( dirname( __FILE__ ) .'/../include/users.php' );
28 28
@set_magic_quotes_runtime( 0 );
29 29

  
30 30
// platform neurtral url handling
......
62 62
	* @param string The path of the ext directory
63 63
	*/
64 64
	function extMainFrame() {
65
		session_name( get_session_name() );
65 66
		session_start();
66 67
		if( !isset( $_SESSION['_userstate'])) {
67 68
			$_SESSION['_userstate'] = array();

Also available in: Unified diff