Project

General

Profile

Revision 117

View differences:

tags/eXtplorer-2.0.1-released/install.extplorer.php
1
<?php
2
// ensure this file is being included by a parent file
3
if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access' );
4
/**
5
* @version $Id$
6
* @package eXtplorer
7
* @copyright (C) 2005-2008 Soeren
8
* @license GNU / GPL
9
* @author soeren
10
* eXtplorer is Free Software
11
*/
12
function com_install(){
13
	global $database;
14
	
15
	if( is_callable( array( 'JFactory', 'getDBO' ))) {
16
		$database = JFactory::getDBO();
17
	}
18
	$mypath = dirname(__FILE__);
19
	require_once($mypath . "/include/functions.php");
20
	require_once($mypath . "/libraries/Archive/archive.php");
21
	
22
	ext_RaiseMemoryLimit( '50M' );
23
	error_reporting( E_ALL ^ E_NOTICE );
24
	
25
	$archive_name = $mypath.'/scripts.tar.gz';
26
	$extract_dir = $mypath.'/';
27
	
28
	$result = extArchive::extract( $archive_name, $extract_dir );
29
	if( !PEAR::isError( $result )) {
30
		unlink( $archive_name );
31
	} else {
32
		echo '<pre style="color:white; font-weight:bold; background-color:red;">Error!
33
		'.$result->getMessage().'
34
		</pre>';
35
	}
36
	$database->setQuery( "SELECT id FROM #__components WHERE admin_menu_link = 'option=com_extplorer'" );
37
	$id = $database->loadResult();
38

  
39
	//add new admin menu images
40
	$database->setQuery( "UPDATE #__components SET admin_menu_img = '../administrator/components/com_extplorer/images/joomla_x_icon.png', admin_menu_link = 'option=com_extplorer' WHERE id=$id");
41
	$database->query();
42
}
43
?>
0 44

  
tags/eXtplorer-2.0.1-released/extplorer.j15.xml
1
<?xml version="1.0" encoding="utf-8"?>
2
<!DOCTYPE install SYSTEM "http://dev.joomla.org/xml/1.5/component-install.dtd">
3
<install type="component" version="1.5.0">
4
<!-- Joomla! 1.5 Installer XML File -->
5
    <name>eXtplorer</name>
6
    <creationDate>15.01.2008</creationDate>
7
    <author>soeren, QuiX Project</author>
8
    <copyright>Soeren Eberhardt-Biermann, QuiX Project</copyright>
9
    <license>GNU/GPL, alternative: MPL</license>
10
    <authorEmail>soeren|at|virtuemart.net</authorEmail>
11
    <authorUrl>http://joomlacode.org/gf/project/joomlaxplorer/</authorUrl>
12
    <version>2.0.1</version>
13
    <description><![CDATA[
14
	<div align="left"><img src="components/com_extplorer/images/eXtplorer.gif" alt="eXtplorer Logo" /></div>
15
	<h2>Successfully installed eXtplorer&nbsp;</h2>
16
	eXtplorer is a powerful File- and FTP/WebDAV Manager script. 
17
	<br/>It allows 
18
	  <ul><li>Browsing Directories & Files,</li>
19
	  <li>Editing, Copying, Moving and Deleting files,</li>
20
	  <li>Searching, Uploading and Downloading files,</li>
21
	  <li>Creating new Files and Directories,</li>
22
	  <li>Creating and Extracting Archives with Files and Directories,</li>
23
	  <li>Changing file permissions (chmod)</li></ul><br/>and much more.<br/><br/>
24
	  <strong>By default restricted to Superadministrators!</strong>
25
	]]></description>
26
    <files>
27
        <filename>configuration.ext.php</filename>
28
        <filename>extplorer.php</filename>
29
        <filename>extplorer.init.php</filename>
30
        <filename>extplorer.list.php</filename>
31
    </files>
32
    
33
    <install>
34
    	<queries></queries>
35
    </install>
36
    <uninstall>
37
    	<queries></queries>    	
38
    </uninstall>
39
    <installfile>install.extplorer.php</installfile>
40
    <uninstallfile></uninstallfile>
41
    <administration>
42
        <menu>eXtplorer</menu>
43
        <files>
44
			<filename>CHANGELOG.txt</filename>
45
			<filename>README.txt</filename>
46
			<filename>admin.extplorer.php</filename>
47
			<filename>application.php</filename>
48
			<filename>config/.htaccess</filename>
49
			<filename>config/.htusers.php</filename>
50
			<filename>config/conf.php</filename>
51
			<filename>config/index.html</filename>
52
			<filename>config/mimes.php</filename>
53
			<filename>eXtplorer.ico</filename>
54
			<filename>fetchscript.php</filename>
55
			<filename>ftp_tmp/index.html</filename>
56
			<filename>images/_.gif</filename>
57
			<filename>images/_admin.gif</filename>
58
			<filename>images/_arrowdown.gif</filename>
59
			<filename>images/_arrowup.gif</filename>
60
			<filename>images/_extract.png</filename>
61
			<filename>images/_home.gif</filename>
62
			<filename>images/_rename.gif</filename>
63
			<filename>images/_rename_.gif</filename>
64
			<filename>images/archive.png</filename>
65
			<filename>images/bookmark_add.png</filename>
66
			<filename>images/cancel.png</filename>
67
			<filename>images/chmod.png</filename>
68
			<filename>images/document.png</filename>
69
			<filename>images/documents.png</filename>
70
			<filename>images/down.png</filename>
71
			<filename>images/eXtplorer.gif</filename>
72
			<filename>images/edit.png</filename>
73
			<filename>images/editcopy.png</filename>
74
			<filename>images/editdelete.png</filename>
75
			<filename>images/extract.gif</filename>
76
			<filename>images/filefind.png</filename>
77
			<filename>images/filenew.png</filename>
78
			<filename>images/flash.gif</filename>
79
			<filename>images/folder.png</filename>
80
			<filename>images/folder_html.png</filename>
81
			<filename>images/folder_new.png</filename>
82
			<filename>images/fonts.png</filename>
83
			<filename>images/header.gif</filename>
84
			<filename>images/help.png</filename>
85
			<filename>images/home.png</filename>
86
			<filename>images/html.png</filename>
87
			<filename>images/image.gif</filename>
88
			<filename>images/image.png</filename>
89
			<filename>images/index.html</filename>
90
			<filename>images/indicator.gif</filename>
91
			<filename>images/info.png</filename>
92
			<filename>images/java_jar.png</filename>
93
			<filename>images/joomla_x_icon.png</filename>
94
			<filename>images/js.gif</filename>
95
			<filename>images/js.png</filename>
96
			<filename>images/log_error.png</filename>
97
			<filename>images/logo.gif</filename>
98
			<filename>images/logout.png</filename>
99
			<filename>images/messagebox_warning.png</filename>
100
			<filename>images/midi.png</filename>
101
			<filename>images/move.png</filename>
102
			<filename>images/multimedia.png</filename>
103
			<filename>images/music.png</filename>
104
			<filename>images/ooo_calc.png</filename>
105
			<filename>images/ooo_writer.png</filename>
106
			<filename>images/pdf.png</filename>
107
			<filename>images/publish_x.png</filename>
108
			<filename>images/real.png</filename>
109
			<filename>images/reload.png</filename>
110
			<filename>images/remove.png</filename>
111
			<filename>images/run.png</filename>
112
			<filename>images/sound.gif</filename>
113
			<filename>images/source.png</filename>
114
			<filename>images/source_cpp.png</filename>
115
			<filename>images/source_css.png</filename>
116
			<filename>images/source_h.png</filename>
117
			<filename>images/source_j.png</filename>
118
			<filename>images/source_java.png</filename>
119
			<filename>images/source_php.png</filename>
120
			<filename>images/source_pl.png</filename>
121
			<filename>images/source_py.png</filename>
122
			<filename>images/source_s.png</filename>
123
			<filename>images/spread.gif</filename>
124
			<filename>images/src.gif</filename>
125
			<filename>images/systeminfo.gif</filename>
126
			<filename>images/tar.gif</filename>
127
			<filename>images/tar.png</filename>
128
			<filename>images/tgz.gif</filename>
129
			<filename>images/tgz.png</filename>
130
			<filename>images/txt.gif</filename>
131
			<filename>images/txt.png</filename>
132
			<filename>images/up.png</filename>
133
			<filename>images/video.gif</filename>
134
			<filename>images/view.png</filename>
135
			<filename>images/word.gif</filename>
136
			<filename>images/zip.gif</filename>
137
			<filename>include/.htaccess</filename>
138
			<filename>include/admin.php</filename>
139
			<filename>include/archive.php</filename>
140
			<filename>include/bookmarks.php</filename>
141
			<filename>include/chmod.php</filename>
142
			<filename>include/copy_move.php</filename>
143
			<filename>include/delete.php</filename>
144
			<filename>include/download.php</filename>
145
			<filename>include/edit.php</filename>
146
			<filename>include/extract.php</filename>
147
			<filename>include/footer.php</filename>
148
			<filename>include/ftp_authentication.php</filename>
149
			<filename>include/functions.php</filename>
150
			<filename>include/header.php</filename>
151
			<filename>include/index.html</filename>
152
			<filename>include/init.php</filename>
153
			<filename>include/javascript.php</filename>
154
			<filename>include/js_admin.php</filename>
155
			<filename>include/js_admin2.php</filename>
156
			<filename>include/js_admin3.php</filename>
157
			<filename>include/list.php</filename>
158
			<filename>include/login.php</filename>
159
			<filename>include/mkitem.php</filename>
160
			<filename>include/rename.php</filename>
161
			<filename>include/result.class.php</filename>
162
			<filename>include/search.php</filename>
163
			<filename>include/system_info.php</filename>
164
			<filename>include/transfer.php</filename>
165
			<filename>include/upload.php</filename>
166
			<filename>include/users.php</filename>
167
			<filename>include/view.php</filename>
168
			<filename>index.php</filename>
169
			<filename>install.extplorer.php</filename>
170
			<filename>languages/arabic.php</filename>
171
			<filename>languages/arabic_mimes.php</filename>
172
			<filename>languages/brazilian_portuguese.php</filename>
173
			<filename>languages/brazilian_portuguese_mimes.php</filename>
174
			<filename>languages/bulgarian.php</filename>
175
			<filename>languages/bulgarian_mimes.php</filename>
176
			<filename>languages/danish.php</filename>
177
			<filename>languages/danish_mimes.php</filename>
178
			<filename>languages/dutch.php</filename>
179
			<filename>languages/dutch_mimes.php</filename>
180
			<filename>languages/english.php</filename>
181
			<filename>languages/english_mimes.php</filename>
182
			<filename>languages/finnish.php</filename>
183
			<filename>languages/finnish_mimes.php</filename>
184
			<filename>languages/french.php</filename>
185
			<filename>languages/french_mimes.php</filename>
186
			<filename>languages/german.php</filename>
187
			<filename>languages/german_mimes.php</filename>
188
			<filename>languages/germanf.php</filename>
189
			<filename>languages/germanf_mimes.php</filename>
190
			<filename>languages/germani.php</filename>
191
			<filename>languages/germani_mimes.php</filename>
192
			<filename>languages/greek.php</filename>
193
			<filename>languages/greek_mimes.php</filename>
194
			<filename>languages/hungarian.php</filename>
195
			<filename>languages/hungarian_mimes.php</filename>
196
			<filename>languages/hungariani.php</filename>
197
			<filename>languages/index.html</filename>
198
			<filename>languages/islenska.php</filename>
199
			<filename>languages/islenska_mimes.php</filename>
200
			<filename>languages/italian.php</filename>
201
			<filename>languages/italian_mimes.php</filename>
202
			<filename>languages/norwegian.php</filename>
203
			<filename>languages/norwegian_mimes.php</filename>
204
			<filename>languages/polish.php</filename>
205
			<filename>languages/polish_mimes.php</filename>
206
			<filename>languages/portuguese.php</filename>
207
			<filename>languages/portuguese_mimes.php</filename>
208
			<filename>languages/romanian.php</filename>
209
			<filename>languages/romanian_mimes.php</filename>
210
			<filename>languages/russian.php</filename>
211
			<filename>languages/russian_mimes.php</filename>
212
			<filename>languages/simplified_chinese.php</filename>
213
			<filename>languages/simplified_chinese_mimes.php</filename>
214
			<filename>languages/slovenian.php</filename>
215
			<filename>languages/slovenian_mimes.php</filename>
216
			<filename>languages/spanish.php</filename>
217
			<filename>languages/spanish_mimes.php</filename>
218
			<filename>languages/swedish.php</filename>
219
			<filename>languages/swedish_mimes.php</filename>
220
			<filename>languages/traditional_chinese.php</filename>
221
			<filename>languages/traditional_chinese_mimes.php</filename>
222
			<filename>languages/turkish.php</filename>
223
			<filename>languages/turkish_mimes.php</filename>
224
			<filename>libraries/Archive/adapter/bzip2.php</filename>
225
			<filename>libraries/Archive/adapter/gzip.php</filename>
226
			<filename>libraries/Archive/adapter/index.html</filename>
227
			<filename>libraries/Archive/adapter/tar.php</filename>
228
			<filename>libraries/Archive/adapter/zip.php</filename>
229
			<filename>libraries/Archive/archive.php</filename>
230
			<filename>libraries/Archive/file.php</filename>
231
			<filename>libraries/Archive/folder.php</filename>
232
			<filename>libraries/Archive/index.html</filename>
233
			<filename>libraries/Archive/path.php</filename>
234
			<filename>libraries/Auth/Auth.php</filename>
235
			<filename>libraries/Auth/HTTP/HTTP.php</filename>
236
			<filename>libraries/Console/Getopt.php</filename>
237
			<filename>libraries/FTP.php</filename>
238
			<filename>libraries/FTP/Observer.php</filename>
239
			<filename>libraries/FTP/Socket.php</filename>
240
			<filename>libraries/FTP/index.html</filename>
241
			<filename>libraries/File_Operations.php</filename>
242
			<filename>libraries/HTTP/WebDAV/Server.php</filename>
243
			<filename>libraries/HTTP/WebDAV/Server/Filesystem.php</filename>
244
			<filename>libraries/HTTP/WebDAV/Tools/_parse_lockinfo.php</filename>
245
			<filename>libraries/HTTP/WebDAV/Tools/_parse_propfind.php</filename>
246
			<filename>libraries/HTTP/WebDAV/Tools/_parse_proppatch.php</filename>
247
			<filename>libraries/JSON.php</filename>
248
			<filename>libraries/MIME/Parameter.php</filename>
249
			<filename>libraries/MIME/Type.php</filename>
250
			<filename>libraries/MIME/index.html</filename>
251
			<filename>libraries/PEAR.php</filename>
252
			<filename>libraries/System.php</filename>
253
			<filename>libraries/Tar.php</filename>
254
			<filename>libraries/Zip.php</filename>
255
			<filename>libraries/compat.php41x.php</filename>
256
			<filename>libraries/compat.php42x.php</filename>
257
			<filename>libraries/compat.php50x.php</filename>
258
			<filename>libraries/geshi/geshi.php</filename>
259
			<filename>libraries/geshi/geshi/css.php</filename>
260
			<filename>libraries/geshi/geshi/html4strict.php</filename>
261
			<filename>libraries/geshi/geshi/index.html</filename>
262
			<filename>libraries/geshi/geshi/ini.php</filename>
263
			<filename>libraries/geshi/geshi/javascript.php</filename>
264
			<filename>libraries/geshi/geshi/mysql.php</filename>
265
			<filename>libraries/geshi/geshi/php-brief.php</filename>
266
			<filename>libraries/geshi/geshi/php.php</filename>
267
			<filename>libraries/geshi/geshi/sql.php</filename>
268
			<filename>libraries/geshi/geshi/xml.php</filename>
269
			<filename>libraries/geshi/index.html</filename>
270
			<filename>libraries/index.html</filename>
271
			<filename>libraries/inputfilter.php</filename>
272
			<filename>libraries/lib_zip.php</filename>
273
			<filename>libraries/standalone.php</filename>
274
			<filename>scripts.tar.gz</filename>
275
			<filename>style/index.html</filename>
276
			<filename>style/opacity.js</filename>
277
			<filename>style/style.css</filename>
278
			<filename>style/tablebg.gif</filename>
279
			<filename>webdav.php</filename>
280
			<filename>webdav_authenticate.php</filename>
281
			<filename>webdav_table.sql.php</filename>
282
		</files>
283
    </administration>
284
</install>
0 285

  
tags/eXtplorer-2.0.1-released/extplorer.xml
1
<?xml version="1.0" encoding="iso-8859-1" ?>
2
<mosinstall type="component">
3
<!-- Mambo/Joomla! 1.0 Installer XML File -->
4
    <name>eXtplorer</name>
5
    <creationDate>15.01.2008</creationDate>
6
    <author>soeren, QuiX Project</author>
7
    <copyright>Soeren Eberhardt-Biermann, QuiX Project</copyright>
8
    <authorEmail>soeren|-at|-virtuemart.net</authorEmail>
9
    <authorUrl>http://joomlacode.org/gf/project/joomlaxplorer/</authorUrl>
10
    <version>2.0.1</version>
11
    <description><![CDATA[
12
	<div align="left"><img src="components/com_extplorer/images/eXtplorer.gif" alt="eXtplorer Logo" /></div>
13
	<h2>Successfully installed eXtplorer&nbsp;</h2>
14
	eXtplorer is a powerful File- and FTP/WebDAV Manager script. 
15
	<br/>It allows 
16
	  <ul><li>Browsing Directories & Files,</li>
17
	  <li>Editing, Copying, Moving and Deleting files,</li>
18
	  <li>Searching, Uploading and Downloading files,</li>
19
	  <li>Creating new Files and Directories,</li>
20
	  <li>Creating and Extracting Archives with Files and Directories,</li>
21
	  <li>Changing file permissions (chmod)</li></ul><br/>and much more.<br/><br/>
22
	  <strong>By default restricted to Superadministrators!</strong>
23
	]]></description>
24
    <files><!-- Frontend Files! -->
25
        <filename>configuration.ext.php</filename>
26
        <filename>extplorer.php</filename>
27
        <filename>extplorer.init.php</filename>
28
        <filename>extplorer.list.php</filename>
29
    </files>
30
    <install/>
31
    <uninstall/>	
32
    <installfile>install.extplorer.php</installfile>
33
    <administration>
34
        <menu>eXtplorer</menu>
35
        <files><!-- Backend Files! -->
36
			<filename>CHANGELOG.txt</filename>
37
			<filename>README.txt</filename>
38
			<filename>admin.extplorer.php</filename>
39
			<filename>application.php</filename>
40
			<filename>config/.htaccess</filename>
41
			<filename>config/.htusers.php</filename>
42
			<filename>config/conf.php</filename>
43
			<filename>config/index.html</filename>
44
			<filename>config/mimes.php</filename>
45
			<filename>eXtplorer.ico</filename>
46
			<filename>fetchscript.php</filename>
47
			<filename>ftp_tmp/index.html</filename>
48
			<filename>images/_.gif</filename>
49
			<filename>images/_admin.gif</filename>
50
			<filename>images/_arrowdown.gif</filename>
51
			<filename>images/_arrowup.gif</filename>
52
			<filename>images/_extract.png</filename>
53
			<filename>images/_home.gif</filename>
54
			<filename>images/_rename.gif</filename>
55
			<filename>images/_rename_.gif</filename>
56
			<filename>images/archive.png</filename>
57
			<filename>images/bookmark_add.png</filename>
58
			<filename>images/cancel.png</filename>
59
			<filename>images/chmod.png</filename>
60
			<filename>images/document.png</filename>
61
			<filename>images/documents.png</filename>
62
			<filename>images/down.png</filename>
63
			<filename>images/eXtplorer.gif</filename>
64
			<filename>images/edit.png</filename>
65
			<filename>images/editcopy.png</filename>
66
			<filename>images/editdelete.png</filename>
67
			<filename>images/extract.gif</filename>
68
			<filename>images/filefind.png</filename>
69
			<filename>images/filenew.png</filename>
70
			<filename>images/flash.gif</filename>
71
			<filename>images/folder.png</filename>
72
			<filename>images/folder_html.png</filename>
73
			<filename>images/folder_new.png</filename>
74
			<filename>images/fonts.png</filename>
75
			<filename>images/header.gif</filename>
76
			<filename>images/help.png</filename>
77
			<filename>images/home.png</filename>
78
			<filename>images/html.png</filename>
79
			<filename>images/image.gif</filename>
80
			<filename>images/image.png</filename>
81
			<filename>images/index.html</filename>
82
			<filename>images/indicator.gif</filename>
83
			<filename>images/info.png</filename>
84
			<filename>images/java_jar.png</filename>
85
			<filename>images/joomla_x_icon.png</filename>
86
			<filename>images/js.gif</filename>
87
			<filename>images/js.png</filename>
88
			<filename>images/log_error.png</filename>
89
			<filename>images/logo.gif</filename>
90
			<filename>images/logout.png</filename>
91
			<filename>images/messagebox_warning.png</filename>
92
			<filename>images/midi.png</filename>
93
			<filename>images/move.png</filename>
94
			<filename>images/multimedia.png</filename>
95
			<filename>images/music.png</filename>
96
			<filename>images/ooo_calc.png</filename>
97
			<filename>images/ooo_writer.png</filename>
98
			<filename>images/pdf.png</filename>
99
			<filename>images/publish_x.png</filename>
100
			<filename>images/real.png</filename>
101
			<filename>images/reload.png</filename>
102
			<filename>images/remove.png</filename>
103
			<filename>images/run.png</filename>
104
			<filename>images/sound.gif</filename>
105
			<filename>images/source.png</filename>
106
			<filename>images/source_cpp.png</filename>
107
			<filename>images/source_css.png</filename>
108
			<filename>images/source_h.png</filename>
109
			<filename>images/source_j.png</filename>
110
			<filename>images/source_java.png</filename>
111
			<filename>images/source_php.png</filename>
112
			<filename>images/source_pl.png</filename>
113
			<filename>images/source_py.png</filename>
114
			<filename>images/source_s.png</filename>
115
			<filename>images/spread.gif</filename>
116
			<filename>images/src.gif</filename>
117
			<filename>images/systeminfo.gif</filename>
118
			<filename>images/tar.gif</filename>
119
			<filename>images/tar.png</filename>
120
			<filename>images/tgz.gif</filename>
121
			<filename>images/tgz.png</filename>
122
			<filename>images/txt.gif</filename>
123
			<filename>images/txt.png</filename>
124
			<filename>images/up.png</filename>
125
			<filename>images/video.gif</filename>
126
			<filename>images/view.png</filename>
127
			<filename>images/word.gif</filename>
128
			<filename>images/zip.gif</filename>
129
			<filename>include/.htaccess</filename>
130
			<filename>include/admin.php</filename>
131
			<filename>include/archive.php</filename>
132
			<filename>include/bookmarks.php</filename>
133
			<filename>include/chmod.php</filename>
134
			<filename>include/copy_move.php</filename>
135
			<filename>include/delete.php</filename>
136
			<filename>include/download.php</filename>
137
			<filename>include/edit.php</filename>
138
			<filename>include/extract.php</filename>
139
			<filename>include/footer.php</filename>
140
			<filename>include/ftp_authentication.php</filename>
141
			<filename>include/functions.php</filename>
142
			<filename>include/header.php</filename>
143
			<filename>include/index.html</filename>
144
			<filename>include/init.php</filename>
145
			<filename>include/javascript.php</filename>
146
			<filename>include/js_admin.php</filename>
147
			<filename>include/js_admin2.php</filename>
148
			<filename>include/js_admin3.php</filename>
149
			<filename>include/list.php</filename>
150
			<filename>include/login.php</filename>
151
			<filename>include/mkitem.php</filename>
152
			<filename>include/rename.php</filename>
153
			<filename>include/result.class.php</filename>
154
			<filename>include/search.php</filename>
155
			<filename>include/system_info.php</filename>
156
			<filename>include/transfer.php</filename>
157
			<filename>include/upload.php</filename>
158
			<filename>include/users.php</filename>
159
			<filename>include/view.php</filename>
160
			<filename>index.php</filename>
161
			<filename>install.extplorer.php</filename>
162
			<filename>languages/arabic.php</filename>
163
			<filename>languages/arabic_mimes.php</filename>
164
			<filename>languages/brazilian_portuguese.php</filename>
165
			<filename>languages/brazilian_portuguese_mimes.php</filename>
166
			<filename>languages/bulgarian.php</filename>
167
			<filename>languages/bulgarian_mimes.php</filename>
168
			<filename>languages/danish.php</filename>
169
			<filename>languages/danish_mimes.php</filename>
170
			<filename>languages/dutch.php</filename>
171
			<filename>languages/dutch_mimes.php</filename>
172
			<filename>languages/english.php</filename>
173
			<filename>languages/english_mimes.php</filename>
174
			<filename>languages/finnish.php</filename>
175
			<filename>languages/finnish_mimes.php</filename>
176
			<filename>languages/french.php</filename>
177
			<filename>languages/french_mimes.php</filename>
178
			<filename>languages/german.php</filename>
179
			<filename>languages/german_mimes.php</filename>
180
			<filename>languages/germanf.php</filename>
181
			<filename>languages/germanf_mimes.php</filename>
182
			<filename>languages/germani.php</filename>
183
			<filename>languages/germani_mimes.php</filename>
184
			<filename>languages/greek.php</filename>
185
			<filename>languages/greek_mimes.php</filename>
186
			<filename>languages/hungarian.php</filename>
187
			<filename>languages/hungarian_mimes.php</filename>
188
			<filename>languages/hungariani.php</filename>
189
			<filename>languages/index.html</filename>
190
			<filename>languages/islenska.php</filename>
191
			<filename>languages/islenska_mimes.php</filename>
192
			<filename>languages/italian.php</filename>
193
			<filename>languages/italian_mimes.php</filename>
194
			<filename>languages/norwegian.php</filename>
195
			<filename>languages/norwegian_mimes.php</filename>
196
			<filename>languages/polish.php</filename>
197
			<filename>languages/polish_mimes.php</filename>
198
			<filename>languages/portuguese.php</filename>
199
			<filename>languages/portuguese_mimes.php</filename>
200
			<filename>languages/romanian.php</filename>
201
			<filename>languages/romanian_mimes.php</filename>
202
			<filename>languages/russian.php</filename>
203
			<filename>languages/russian_mimes.php</filename>
204
			<filename>languages/simplified_chinese.php</filename>
205
			<filename>languages/simplified_chinese_mimes.php</filename>
206
			<filename>languages/slovenian.php</filename>
207
			<filename>languages/slovenian_mimes.php</filename>
208
			<filename>languages/spanish.php</filename>
209
			<filename>languages/spanish_mimes.php</filename>
210
			<filename>languages/swedish.php</filename>
211
			<filename>languages/swedish_mimes.php</filename>
212
			<filename>languages/traditional_chinese.php</filename>
213
			<filename>languages/traditional_chinese_mimes.php</filename>
214
			<filename>languages/turkish.php</filename>
215
			<filename>languages/turkish_mimes.php</filename>
216
			<filename>libraries/Archive/adapter/bzip2.php</filename>
217
			<filename>libraries/Archive/adapter/gzip.php</filename>
218
			<filename>libraries/Archive/adapter/index.html</filename>
219
			<filename>libraries/Archive/adapter/tar.php</filename>
220
			<filename>libraries/Archive/adapter/zip.php</filename>
221
			<filename>libraries/Archive/archive.php</filename>
222
			<filename>libraries/Archive/file.php</filename>
223
			<filename>libraries/Archive/folder.php</filename>
224
			<filename>libraries/Archive/index.html</filename>
225
			<filename>libraries/Archive/path.php</filename>
226
			<filename>libraries/Auth/Auth.php</filename>
227
			<filename>libraries/Auth/HTTP/HTTP.php</filename>
228
			<filename>libraries/Console/Getopt.php</filename>
229
			<filename>libraries/FTP.php</filename>
230
			<filename>libraries/FTP/Observer.php</filename>
231
			<filename>libraries/FTP/Socket.php</filename>
232
			<filename>libraries/FTP/index.html</filename>
233
			<filename>libraries/File_Operations.php</filename>
234
			<filename>libraries/HTTP/WebDAV/Server.php</filename>
235
			<filename>libraries/HTTP/WebDAV/Server/Filesystem.php</filename>
236
			<filename>libraries/HTTP/WebDAV/Tools/_parse_lockinfo.php</filename>
237
			<filename>libraries/HTTP/WebDAV/Tools/_parse_propfind.php</filename>
238
			<filename>libraries/HTTP/WebDAV/Tools/_parse_proppatch.php</filename>
239
			<filename>libraries/JSON.php</filename>
240
			<filename>libraries/MIME/Parameter.php</filename>
241
			<filename>libraries/MIME/Type.php</filename>
242
			<filename>libraries/MIME/index.html</filename>
243
			<filename>libraries/PEAR.php</filename>
244
			<filename>libraries/System.php</filename>
245
			<filename>libraries/Tar.php</filename>
246
			<filename>libraries/Zip.php</filename>
247
			<filename>libraries/compat.php41x.php</filename>
248
			<filename>libraries/compat.php42x.php</filename>
249
			<filename>libraries/compat.php50x.php</filename>
250
			<filename>libraries/geshi/geshi.php</filename>
251
			<filename>libraries/geshi/geshi/css.php</filename>
252
			<filename>libraries/geshi/geshi/html4strict.php</filename>
253
			<filename>libraries/geshi/geshi/index.html</filename>
254
			<filename>libraries/geshi/geshi/ini.php</filename>
255
			<filename>libraries/geshi/geshi/javascript.php</filename>
256
			<filename>libraries/geshi/geshi/mysql.php</filename>
257
			<filename>libraries/geshi/geshi/php-brief.php</filename>
258
			<filename>libraries/geshi/geshi/php.php</filename>
259
			<filename>libraries/geshi/geshi/sql.php</filename>
260
			<filename>libraries/geshi/geshi/xml.php</filename>
261
			<filename>libraries/geshi/index.html</filename>
262
			<filename>libraries/index.html</filename>
263
			<filename>libraries/inputfilter.php</filename>
264
			<filename>libraries/lib_zip.php</filename>
265
			<filename>libraries/standalone.php</filename>
266
			<filename>scripts.tar.gz</filename>
267
			<filename>style/index.html</filename>
268
			<filename>style/opacity.js</filename>
269
			<filename>style/style.css</filename>
270
			<filename>style/tablebg.gif</filename>
271
			<filename>webdav.php</filename>
272
			<filename>webdav_authenticate.php</filename>
273
			<filename>webdav_table.sql.php</filename>
274
        </files>
275
    </administration>
276
</mosinstall>
tags/eXtplorer-2.0.1-released/include/system_info.php
1
<?php
2
// ensure this file is being included by a parent file
3
if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access' );
4
/**
5
 * @version $Id$
6
 * @package eXtplorer
7
 * @copyright soeren 2007
8
 * @author The eXtplorer project (http://sourceforge.net/projects/extplorer)
9
 * 
10
 * @license
11
 * The contents of this file are subject to the Mozilla Public License
12
 * Version 1.1 (the "License"); you may not use this file except in
13
 * compliance with the License. You may obtain a copy of the License at
14
 * http://www.mozilla.org/MPL/
15
 * 
16
 * Software distributed under the License is distributed on an "AS IS"
17
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
18
 * License for the specific language governing rights and limitations
19
 * under the License.
20
 * 
21
 * Alternatively, the contents of this file may be used under the terms
22
 * of the GNU General Public License Version 2 or later (the "GPL"), in
23
 * which case the provisions of the GPL are applicable instead of
24
 * those above. If you wish to allow use of your version of this file only
25
 * under the terms of the GPL and not to allow others to use
26
 * your version of this file under the MPL, indicate your decision by
27
 * deleting  the provisions above and replace  them with the notice and
28
 * other provisions required by the GPL.  If you do not delete
29
 * the provisions above, a recipient may use your version of this file
30
 * under either the MPL or the GPL."
31
 * 
32
 */
33

  
34
function get_php_setting($val, $recommended=1) {
35
	$value = ini_get($val);
36
	$r = ( $value == $recommended ? 1 : 0);
37
	if( empty($value)) {
38
		$onoff = 1;
39
	}
40
	else {
41
		$onoff = 0;
42
	}
43
	return $r ? '<span style="color: green;">' . $GLOBALS['messages']['sionoff'][$onoff] . '</span>' : '<span style="color: red;">' . $GLOBALS['messages']['sionoff'][$onoff] . '</span>';
44
}
45

  
46
function get_server_software() {
47
	if (isset($_SERVER['SERVER_SOFTWARE'])) {
48
		return $_SERVER['SERVER_SOFTWARE'];
49
	} else if (($sf = getenv('SERVER_SOFTWARE'))) {
50
		return $sf;
51
	} else {
52
		return 'n/a';
53
	}
54
}
55

  
56
function system_info() {
57
	$version = $GLOBALS['ext_version'];
58
	//$tab = extGetParam( $_REQUEST, 'tab', 'tab1' );
59
	$width = 400;	// width of 100%
60
	
61
	?>
62
	<br />
63
	<div id="sysinfo">
64
	<div id="system-page" class="x-tab" title="<?php echo ext_Lang::msg( 'sisysteminfo' ) ?>">
65
	
66
	<table class="adminform">
67
	<tr>
68
		<td valign="top" width="250" style="font-weight:bold;">
69
		Logged in as:
70
		</td>
71
		<td><?php echo $_SESSION['s_user'] ?></td>
72
	<tr>
73
		<td valign="top" width="250" style="font-weight:bold;">
74
			<?php echo ext_lang::msg( 'sibuilton' ); ?>:
75
		</td>
76
		<td>
77
		<?php echo php_uname(); ?>
78
		</td>
79
	</tr>
80
	<tr>
81
		<td valign="top" style="font-weight:bold;">
82
			<?php echo ext_lang::msg( 'siphpversion' ); ?>:
83
		</td>
84
		<td>
85
		<?php echo phpversion(); ?>
86
		&nbsp;
87
		<?php echo phpversion() >= '4.3' ? '' : $GLOBALS['messages']['siphpupdate']; ?>
88
		</td>
89
	</tr>
90
	<tr>
91
		<td style="font-weight:bold;">
92
			<?php echo ext_lang::msg( 'siwebserver' ); ?>:
93
		</td>
94
		<td>
95
		<?php echo get_server_software(); ?>
96
		</td>
97
	</tr>
98
	<tr>
99
		<td style="font-weight:bold;">
100
			<?php echo ext_lang::msg( 'siwebsphpif' ); ?>:
101
		</td>
102
		<td>
103
		<?php echo php_sapi_name(); ?>
104
		</td>
105
	</tr>
106
	<tr>
107
		<td style="font-weight:bold;">
108
			<?php echo ext_lang::msg( 'simamboversion' ); ?>:
109
		</td>
110
		<td>
111
		<?php echo $version; ?>
112
		</td>
113
	</tr>
114
	<tr>
115
		<td style="font-weight:bold;">
116
			<?php echo ext_lang::msg( 'siuseragent' ); ?>:
117
		</td>
118
		<td>
119
		<?php echo phpversion() <= "4.2.1" ? getenv( "HTTP_USER_AGENT" ) : $_SERVER['HTTP_USER_AGENT'];?>
120
		</td>
121
	</tr>
122
	<tr>
123
		<td valign="top" style="font-weight:bold;">
124
			<?php echo ext_lang::msg( 'sirelevantsettings' ); ?>:
125
		</td>
126
		<td>
127
			<table cellspacing="1" cellpadding="1" border="0">
128
			<tr>
129
				<td valign="top">
130
					<?php echo ext_lang::msg( 'sisafemode' ); ?>:
131
				</td>
132
				<td>
133
				<?php echo get_php_setting('safe_mode', 0); ?>
134
				</td>
135
			</tr>
136
			<tr>
137
				<td>
138
					<?php echo ext_lang::msg( 'sibasedir' ); ?>:
139
				</td>
140
				<td>
141
				<?php echo (($ob = ini_get('open_basedir')) ? $ob : 'none'); ?>
142
				</td>
143
			</tr>
144
			<tr>
145
				<td>
146
					<?php echo ext_lang::msg( 'sidisplayerrors' ); ?>:
147
				</td>
148
				<td>
149
				<?php echo get_php_setting('display_errors'); ?>
150
				</td>
151
			</tr>
152
			<tr>
153
				<td>
154
					<?php echo ext_lang::msg( 'sishortopentags' ); ?>:
155
				</td>
156
				<td>
157
				<?php echo get_php_setting('short_open_tag'); ?>
158
				</td>
159
			</tr>
160
			<tr>
161
				<td>
162
					<?php echo ext_lang::msg( 'sifileuploads' ); ?>:
163
				</td>
164
				<td>
165
				<?php echo get_php_setting('file_uploads'); ?>
166
				</td>
167
			</tr>
168
			<tr>
169
				<td>
170
					<?php echo ext_lang::msg( 'simagicquotes' ); ?>:
171
				</td>
172
				<td>
173
				<?php echo get_php_setting('magic_quotes_gpc'); ?>
174
				</td>
175
			</tr>
176
			<tr>
177
				<td>
178
					<?php echo ext_lang::msg( 'siregglobals' ); ?>:
179
				</td>
180
				<td>
181
				<?php echo get_php_setting('register_globals', 0); ?>
182
				</td>
183
			</tr>
184
			<tr>
185
				<td>
186
					<?php echo ext_lang::msg( 'sioutputbuf' ); ?>:
187
				</td>
188
				<td>
189
				<?php echo get_php_setting('output_buffering', 0); ?>
190
				</td>
191
			</tr>
192
			<tr>
193
				<td>
194
					<?php echo ext_lang::msg( 'sisesssavepath' ); ?>:
195
				</td>
196
				<td>
197
				<?php echo (( $sp=ini_get( 'session.save_path' )) ? $sp : 'none' ); ?>
198
				</td>
199
			</tr>
200
			<tr>
201
				<td>
202
					<?php echo ext_lang::msg( 'sisessautostart' ); ?>:
203
				</td>
204
				<td>
205
				<?php echo intval( ini_get( 'session.auto_start' ) ); ?>
206
				</td>
207
			</tr>
208
			<tr>
209
				<td>
210
					<?php echo ext_lang::msg( 'sixmlenabled' ); ?>:
211
				</td>
212
				<td>
213
					<?php echo extension_loaded('xml') ? '<font style="color: green;">' . $GLOBALS['messages']['miscyesno'][0] . '</font>' : '<font style="color: red;">' . $GLOBALS['messages']['miscyesno'][1] . '</font>'; ?>
214
				</td>
215
			</tr>
216
			<tr>
217
				<td>
218
					<?php echo ext_lang::msg( 'sizlibenabled' ); ?>:
219
				</td>
220
				<td>
221
				<?php echo extension_loaded('zlib') ? '<font style="color: green;">' . $GLOBALS['messages']['miscyesno'][0] . '</font>' : '<font style="color: red;">' . $GLOBALS['messages']['miscyesno'][1] . '</font>'; ?>
222
				</td>
223
			</tr>
224
			<tr>
225
				<td>
226
					<?php echo ext_lang::msg( 'sidisabledfuncs' ); ?>:
227
				</td>
228
				<td>
229
				<?php echo (( $df=ini_get('disable_functions' )) ? $df : 'none' ); ?>
230
				</td>
231
			</tr>
232
			</table>
233
		</td>
234
	</tr>
235
	</table>
236
	</div>
237
	<div id="php-page" class="x-tab" title="<?php echo ext_Lang::msg('siphpinfo' ); ?>">
238
	<table class="adminform">
239
	<tr>
240
		<th colspan="2">
241
			<?php echo ext_lang::msg( 'siphpinformation' ); ?>:
242
		</th>
243
	</tr>
244
	<tr>
245
		<td>
246
		<?php
247
		ob_start();
248
		phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES);
249
		$phpinfo = ob_get_contents();
250
		ob_end_clean();
251
		preg_match_all('#<body[^>]*>(.*)</body>#siU', $phpinfo, $output);
252
		$output = preg_replace('#<table#', '<table class="adminlist" align="center"', $output[1][0]);
253
		$output = preg_replace('#(\w),(\w)#', '\1, \2', $output);
254
		$output = preg_replace('#border="0" cellpadding="3" width="600"#', 'border="0" cellspacing="1" cellpadding="4" width="95%"', $output);
255
		$output = preg_replace('#<hr />#', '', $output);
256
		echo $output;
257
		?>
258
		</td>
259
	</tr>
260
	</table>
261
	</div>
262
	</div>
263
	<script type="text/javascript">
264
<!--
265
var tabs = new Ext.TabPanel( "sysinfo" );
266
tabs.addTab( "system-page","<?php echo ext_Lang::msg( 'sisysteminfo' ) ?>" ); 
267
tabs.addTab( "php-page","<?php echo ext_Lang::msg('siphpinfo' ); ?>" ); 
268
tabs.activate( "system-page" );
269
//-->
270
</script>
271
	<?php
272
}
273
?>
0 274

  
tags/eXtplorer-2.0.1-released/include/init.php
1
<?php
2
// ensure this file is being included by a parent file
3
if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access' );
4
/**
5
 * @version $Id$
6
 * @package eXtplorer
7
 * @copyright soeren 2007
8
 * @author The eXtplorer project (http://sourceforge.net/projects/extplorer)
9
 * @author The  The QuiX project (http://quixplorer.sourceforge.net)
10
 * 
11
 * @license
12
 * The contents of this file are subject to the Mozilla Public License
13
 * Version 1.1 (the "License"); you may not use this file except in
14
 * compliance with the License. You may obtain a copy of the License at
15
 * http://www.mozilla.org/MPL/
16
 * 
17
 * Software distributed under the License is distributed on an "AS IS"
18
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
19
 * License for the specific language governing rights and limitations
20
 * under the License.
21
 * 
22
 * Alternatively, the contents of this file may be used under the terms
23
 * of the GNU General Public License Version 2 or later (the "GPL"), in
24
 * which case the provisions of the GPL are applicable instead of
25
 * those above. If you wish to allow use of your version of this file only
26
 * under the terms of the GPL and not to allow others to use
27
 * your version of this file under the MPL, indicate your decision by
28
 * deleting  the provisions above and replace  them with the notice and
29
 * other provisions required by the GPL.  If you do not delete
30
 * the provisions above, a recipient may use your version of this file
31
 * under either the MPL or the GPL."
32
 * 
33
 * This file initializes most of the variables and constants we need in joomlaXplorer
34
 */
35
// Vars	
36
if(isset($_SERVER)) {
37
	$GLOBALS['__GET']	=&$_GET;
38
	$GLOBALS['__POST']	=&$_POST;
39
	$GLOBALS['__SERVER']	=&$_SERVER;
40
	$GLOBALS['__FILES']	=&$_FILES;
41
} 
42
elseif(isset($HTTP_SERVER_VARS)) {
43
	$GLOBALS['__GET']	=&$HTTP_GET_VARS;
44
	$GLOBALS['__POST']	=&$HTTP_POST_VARS;
45
	$GLOBALS['__SERVER']	=&$HTTP_SERVER_VARS;
46
	$GLOBALS['__FILES']	=&$HTTP_POST_FILES;
47
} 
48
else {
49
	die("<strong>ERROR: Your PHP version is too old</strong><br/>".
50
	"You need at least PHP 4.0.0 to run eXtplorer; preferably PHP 4.4.4 or higher.");
51
}
52
//------------------------------------------------------------------------------
53
// check for the existance of Joomla!/Mambo mainframe variable
54
	if( !is_callable( array( $GLOBALS['mainframe'], 'getuser') )) {
55
		// login to use eXtplorer: (true/false)
56
		$GLOBALS["require_login"] = true;
57
	} else {
58
		$GLOBALS["require_login"] = false;
59
	}
60
	// if gzcompress is available, we can use Zip, Tar and TGz
61
	if( function_exists("gzcompress")) {
62
	  	$GLOBALS["zip"] = $GLOBALS["tgz"] = true;
63
	}
64
	else {
65
	  	$GLOBALS["zip"] = $GLOBALS["tgz"] = false;
66
	}
67
	
68
// the filename of the eXtplorer script: (you rarely need to change this)
69
if($_SERVER['SERVER_PORT'] == 443 ) {
70
	$GLOBALS["script_name"] = "https://".$GLOBALS['__SERVER']['HTTP_HOST'].$GLOBALS['__SERVER']["PHP_SELF"];
71
	$GLOBALS['home_url'] = "https://".$GLOBALS['__SERVER']['HTTP_HOST'].dirname($GLOBALS['__SERVER']["PHP_SELF"]);
72
}
73
else {
74
	$GLOBALS["script_name"] = "http://".$GLOBALS['__SERVER']['HTTP_HOST'].$GLOBALS['__SERVER']["PHP_SELF"];
75
	$GLOBALS['home_url'] = "http://".$GLOBALS['__SERVER']['HTTP_HOST'].dirname($GLOBALS['__SERVER']["PHP_SELF"]);
76
}
77
$GLOBALS['home_url'] = str_replace( '/administrator', '', $GLOBALS['home_url'] );
78
$GLOBALS['home_dir'] = !empty( $_SERVER['DOCUMENT_ROOT'] ) ? $_SERVER['DOCUMENT_ROOT'] : '.';
79

  
80
// Important Definitions!
81
define ( "_EXT_PATH", realpath(dirname( __FILE__ ).'/..') );
82
define ( "_EXT_FTPTMP_PATH", realpath( dirname( __FILE__ ).'/../ftp_tmp') );
83
if( function_exists( 'mosGetParam') || class_exists( 'jconfig')) {
84
	define ( "_EXT_URL", $GLOBALS['home_url']."/administrator/components/com_extplorer" );
85
} else {
86
	define ( "_EXT_URL", dirname($GLOBALS['script_name']) );
87
}
88

  
89
require_once( _EXT_PATH . '/application.php' );
90
require_once( _EXT_PATH.'/include/functions.php' );
91

  
92
if( !class_exists('InputFilter')) {
93
	require_once( _EXT_PATH . '/libraries/inputfilter.php' );
94
}
95

  
96
$GLOBALS["separator"] = ext_getSeparator();
97
	
98
$action = stripslashes(extGetParam( $_REQUEST, "action" ));
99
$default_lang = !empty( $GLOBALS['mosConfig_lang'] ) ? $GLOBALS['mosConfig_lang'] : ext_Lang::detect_lang();
100
$GLOBALS["language"] = basename($mainframe->getUserStateFromRequest( 'language', 'lang', $default_lang ));
101
// Get Item
102
if(isset($_REQUEST["item"])) 
103
  $GLOBALS["item"]=$item = stripslashes(rawurldecode($_REQUEST["item"]));
104
else 
105
  $GLOBALS["item"]=$item ="";
106

  
107
if( !empty( $GLOBALS['__POST']["selitems"] )) {
108
	// Arrayfi the string 'selitems' if necessary
109
	if( !is_array( $GLOBALS['__POST']["selitems"] ) ) $GLOBALS['__POST']["selitems"] = array( $GLOBALS['__POST']["selitems"] );
110
	foreach( $GLOBALS['__POST']["selitems"] as $i => $myItem ) {
111
		$GLOBALS['__POST']["selitems"][$i] = urldecode( $myItem );
112
	}
113
}
114

  
115
// Get Sort
116
$GLOBALS["order"]=extGetParam( $_REQUEST, 'order', 'name');
117
// Get Sortorder
118
$GLOBALS["direction"]=extGetParam( $_REQUEST, 'direction', 'ASC');
119
$GLOBALS["start"]=extGetParam( $_REQUEST, 'start', 0);
120
$GLOBALS["limit"]=extGetParam( $_REQUEST, 'limit', 50);
121

  
122
//------------------------------------------------------------------------------
123

  
124
/** @var $GLOBALS['file_mode'] Can be 'file' or 'ftp' */
125
if( !isset( $_REQUEST['file_mode'] ) && !empty($_SESSION['file_mode'] )) {
126
	$GLOBALS['file_mode'] = extGetParam( $_SESSION, 'file_mode', 'file' );
127
}
128
else {
129
	if( @$_REQUEST['file_mode'] == 'ftp' && @$_SESSION['file_mode'] == 'file') {
130
		if( empty( $_SESSION['ftp_login']) && empty( $_SESSION['ftp_pass'])) {
131
			extRedirect( make_link( 'ftp_authentication') );
132
		}
133
		else {
134
			$GLOBALS['file_mode'] = $_SESSION['file_mode'] = extGetParam( $_REQUEST, 'file_mode', 'file' );
135
		}
136
	}
137
	elseif( isset( $_REQUEST['file_mode'] )) {
138
		$GLOBALS['file_mode'] = $_SESSION['file_mode'] = extGetParam( $_REQUEST, 'file_mode', 'file' );
139
	}
140
	else {
141
		$GLOBALS['file_mode'] = extGetParam( $_SESSION, 'file_mode', 'file' );
142
	}
143
}
144

  
145
// Necessary files
146

  
147
require_once( _EXT_PATH."/config/conf.php" );
148
if( file_exists(_EXT_PATH."/languages/".$GLOBALS["language"].".php")) {
149
	require_once( _EXT_PATH."/languages/".$GLOBALS["language"].".php" );
150
}
151
else {
152
	require_once( _EXT_PATH."/languages/english.php" );
153
}
154
if( file_exists(_EXT_PATH."/languages/".$GLOBALS["language"]."_mimes.php")) {
155
	require_once( _EXT_PATH."/languages/".$GLOBALS["language"]."_mimes.php" );
156
}
157
else {
158
	require_once( _EXT_PATH."/languages/english_mimes.php" );
159
}
160

  
161
require_once( _EXT_PATH."/config/mimes.php" );
162
require_once( _EXT_PATH . '/libraries/JSON.php' );
163
require_once( _EXT_PATH."/libraries/File_Operations.php" );
164
require_once( _EXT_PATH."/include/header.php" );
165
require_once( _EXT_PATH."/include/footer.php" );
166
require_once( _EXT_PATH."/include/result.class.php" );
167

  
168

  
169
//------------------------------------------------------------------------------
170

  
171
// Raise Memory Limit
172
ext_RaiseMemoryLimit( '8M' );
173

  
174
$GLOBALS['ext_File'] = new ext_File();
175

  
176
if( ext_isFTPMode() ) {
177
	// Try to connect to the FTP server.    	HOST,   PORT, TIMEOUT
178
	$ftp_host = extGetParam( $_SESSION, 'ftp_host', 'localhost:21' );
179
	$url = @parse_url( 'ftp://' . $ftp_host);
180
	$port = empty($url['port']) ? 21 : $url['port'];
181
	$ftp = new Net_FTP( $url['host'], $port, 20 );
182
	/** @global Net_FTP $GLOBALS['FTPCONNECTION'] */
183
	$GLOBALS['FTPCONNECTION'] = new Net_FTP( $url['host'], $port, 20 );
184
	$res = $GLOBALS['FTPCONNECTION']->connect();
185
	if( PEAR::isError( $res )) {
186
		echo $res->getMessage();
187
		$GLOBALS['file_mode'] = $_SESSION['file_mode'] = 'file';
188
	}
189
	else {
190
		if( empty( $_SESSION['ftp_login']) && empty( $_SESSION['ftp_pass'])) {
191
			extRedirect( make_link('ftp_authentication', null, null, null, null, null, '&file_mode=file' ));
192
		}
193
		$login_res = $GLOBALS['FTPCONNECTION']->login( $_SESSION['ftp_login'], $_SESSION['ftp_pass'] );
194
		if( PEAR::isError( $res )) {
195
			echo $login_res->getMessage();
196
			$GLOBALS['file_mode'] = $_SESSION['file_mode'] = 'file';
197
		}	
198
	}
199
	
200
}
201
//------------------------------------------------------------------------------
202
if($GLOBALS["require_login"]) {	// LOGIN
203

  
204
	require _EXT_PATH."/include/login.php";
205
	
206
	if($GLOBALS["action"]=="logout") {
207
		logout();
208
	} else {
209
		login();
210
	}
211
}
212
if( ext_isWindows() ) {
213
	if( strstr($GLOBALS['home_dir'], ':')) {
214
		$GLOBALS['home_dir'][0] = strtoupper($GLOBALS['home_dir'][0]);
215
	}
216
}
217
//------------------------------------------------------------------------------
218
if( !isset( $_REQUEST['dir'] ) ) {
219

  
220
	$GLOBALS["dir"] = $dir = extGetParam( $_SESSION,'ext_'.$GLOBALS['file_mode'].'dir', '' );
221
	if( !empty( $dir )) {
222
		$dir = @$dir[0] == '/' ? substr( $dir, 1 ) : $dir;
223
	}
224
	$try_this = ext_isFTPMode() ? '/'.$dir : $GLOBALS['home_dir'].'/'.$dir;
225
	if( !empty( $dir ) && !$GLOBALS['ext_File']->file_exists( $try_this )) {
226
		$dir = '';
227
	}
228
}
229
else {
230
	$GLOBALS["dir"] = $dir = urldecode(stripslashes(extGetParam( $_REQUEST, "dir" )));
231
}
232
if( $dir == 'ext_root') {
233
	$GLOBALS["dir"] = $dir = '';
234
}
235
if( ext_isFTPMode() && $dir != '' ) {
236
	$GLOBALS['FTPCONNECTION']->cd( $dir );
237
}
238

  
239
$abs_dir=get_abs_dir($GLOBALS["dir"]);
240
if(!file_exists($GLOBALS["home_dir"])) {
241
  if(!file_exists($GLOBALS["home_dir"].$GLOBALS["separator"])) {
242
	if($GLOBALS["require_login"]) {
243
		$extra="<a href=\"".make_link("logout",NULL,NULL)."\">".
244
			$GLOBALS["messages"]["btnlogout"]."</a>";
245
	} 
246
	else $extra=NULL;
247
	ext_Result::sendResult('', false, $GLOBALS["error_msg"]["home"]." (".$GLOBALS["home_dir"].")",$extra);
248
  }
249
}
250
if(!down_home($abs_dir)) {
251
	ext_Result::sendResult('', false, $GLOBALS["dir"]." : ".$GLOBALS["error_msg"]["abovehome"]);
252
	$dir = '';
253
}
254
if(!get_is_dir(utf8_decode($abs_dir)) && !get_is_dir($abs_dir.$GLOBALS["separator"])) {
255
	ext_Result::sendResult('', false, $abs_dir." : ".$GLOBALS["error_msg"]["direxist"]);
256
	$dir = '';
257
}
258
$_SESSION['ext_'.$GLOBALS['file_mode'].'dir'] = $dir;
259
//------------------------------------------------------------------------------
260
?>
0 261

  
tags/eXtplorer-2.0.1-released/include/functions.php
1
<?php
2
// ensure this file is being included by a parent file
3
if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access' );
4
/**
5
 * @version $Id$
6
 * @package eXtplorer
7
 * @copyright soeren 2007
8
 * @author The eXtplorer project (http://sourceforge.net/projects/extplorer)
9
 * @author The  The QuiX project (http://quixplorer.sourceforge.net)
10
 * 
11
 * @license
12
 * The contents of this file are subject to the Mozilla Public License
13
 * Version 1.1 (the "License"); you may not use this file except in
14
 * compliance with the License. You may obtain a copy of the License at
15
 * http://www.mozilla.org/MPL/
16
 * 
17
 * Software distributed under the License is distributed on an "AS IS"
18
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
19
 * License for the specific language governing rights and limitations
20
 * under the License.
21
 * 
22
 * Alternatively, the contents of this file may be used under the terms
23
 * of the GNU General Public License Version 2 or later (the "GPL"), in
24
 * which case the provisions of the GPL are applicable instead of
25
 * those above. If you wish to allow use of your version of this file only
26
 * under the terms of the GPL and not to allow others to use
27
 * your version of this file under the MPL, indicate your decision by
28
 * deleting  the provisions above and replace  them with the notice and
29
 * other provisions required by the GPL.  If you do not delete
30
 * the provisions above, a recipient may use your version of this file
31
 * under either the MPL or the GPL."
32
 * 
33
 */
34

  
35
/**
36
 * THESE ARE NUMEROUS HELPER FUNCTIONS FOR THE OTHER INCLUDE FILES
37
 */
38

  
39
function make_link($_action,$_dir,$_item=NULL,$_order=NULL,$_srt=NULL,$languages=NULL, $extra=null) {
40
	// make link to next page
41
	if($_action=="" || $_action==NULL) $_action="list";
42
	
43
	if($_item=="") $_item=NULL;
44
	if($_order==NULL) $_order=$GLOBALS["order"];
45
	if($_srt==NULL) $_srt=$GLOBALS["direction"];
46
	if($languages==NULL) $languages=(isset($GLOBALS["lang"])?$GLOBALS["lang"]:NULL);
47
	
48
	$link=$GLOBALS["script_name"]."?option=com_extplorer&action=".$_action;
49
	if(!is_null($_dir )) {
50
		$link.="&dir=".urlencode($_dir);
51
	}
52
	if($_item!=NULL) $link.="&item=".urlencode($_item);
53
	if($_order!=NULL) $link.="&order=".$_order;
54
	if($_srt!=NULL) $link.="&direction=".$_srt;
55
	if($languages!=NULL) $link.="&lang=".$languages;
56
	if(!is_null($extra)) {
57
		$link .= $extra;
58
	}
59
	return $link;
60
}
61
//------------------------------------------------------------------------------
62
function get_abs_dir($dir) {			// get absolute path
63
	if( ext_isFTPMode() ) {
64
		if( $dir != '' && $dir[0] != '/' && $dir[1] != ':') {
65
			$dir = '/'.$dir;
66
		}
67
		return $dir;
68
	}
69
	$abs_dir=$GLOBALS["home_dir"];
70
	
71
	if($dir!="" && !@stristr( $dir, $abs_dir )) $abs_dir.="/".$dir;
72
	elseif(@stristr( $dir, $abs_dir )) $abs_dir = "/".$dir;
73
	/*else {
74
		$abs_dir = $dir;
75
	}*/
76
	$realpath = str_replace('\\', '/', realpath($abs_dir) );
77
	if( $realpath == '') {
78
		return $abs_dir;
79
	}
80
	else {
81
		return $realpath;
82
	}
83
	
84
	return $realpath;
85
}
86
//------------------------------------------------------------------------------
87
function get_abs_item($dir, $item) {		// get absolute file+path
88
	if( is_array( $item )) {
89
		// FTP Mode
90
		$abs_item = '/' . get_abs_dir($dir)."/".$item['name'];
91
		if( get_is_dir($item)) $abs_item.='/';
92
		return extPathName($abs_item); 
93
	}
94
	return extPathName( get_abs_dir($dir)."/".$item );
95
}
96
/**
97
 * Returns the LS info array from an ftp directory listing
98
 *
99
 * @param unknown_type $dir
100
 * @param unknown_type $item
101
 * @return unknown
102
 */
103
function get_item_info( $dir, $item ) {
104
	$ls = getCachedFTPListing( $dir );
105
	foreach( $ls as $entry ) {
106
		if( $entry['name'] == $item ) {
107
			return $entry;
108
		}
109
	}
110
	if( $dir != '') {
111
		return $dir.'/'.$item;
112
	}
113
	return $item;
114
}
115
//------------------------------------------------------------------------------
116
function get_rel_item($dir,$item) {		// get file relative from home
117
	if($dir!="") return $dir."/".$item;
118
	else return $item;
119
}
120
//------------------------------------------------------------------------------
121
function get_is_file( $abs_item) {		// can this file be edited?
122
	if( ext_isFTPMode() && is_array( $abs_item )) {
123
		return empty($abs_item['is_dir']);
124
	} elseif( ext_isFTPMode() ) {
125
		$info = get_item_info( dirname($abs_item), basename($abs_item));
126
		return empty($info['is_dir']);
127
	}
128
	
129
	return @is_file($abs_item);
130
}
131
//------------------------------------------------------------------------------
132
function get_is_dir( $abs_item ) {		// is this a directory?
133
	if( ext_isFTPMode() && is_array( $abs_item )) {
134
		return !empty($abs_item['is_dir']);
135
	}
136
	elseif( ext_isFTPMode() ) {
137
		$info = get_item_info( dirname( $abs_item), basename( $abs_item ));
138
		return !empty($info['is_dir']);
139
	}
140
	return @is_dir( $abs_item );
141
}
142
//------------------------------------------------------------------------------
143
function parse_file_type( $abs_item ) {		// parsed file type (d / l / -)
144
	
145
	if(@get_is_dir($abs_item)) return "d";
146
	if(@is_link($abs_item)) return "l";
147
	return "-";
148
}
149
//------------------------------------------------------------------------------
150
function get_file_perms( $item) {		// file permissions
151
	if( ext_isFTPMode() ) {
152
		$perms = decoct( bindec( decode_ftp_rights($item['rights']) ) );
153
		return $perms;
154
	}
155
	return @decoct(@fileperms( $item ) & 0777);
156
}
157

  
158
function get_languages() {
159
	$langfiles = extReadDirectory( _EXT_PATH.'/languages' );
160
	$langs = array();
161
	foreach( $langfiles as $lang ) {
162
		if( stristr( $lang, '_mimes') || $lang == 'index.html') continue;
163
		$langs[basename( $lang, '.php' )] = ucwords(str_replace( '_', ' ', basename( $lang, '.php' )));
164
	}
165
	return $langs;
166
}
167
//------------------------------------------------------------------------------
168
function parse_file_perms($mode) {		// parsed file permisions
169
	
170
	if(strlen($mode)<3) return "---------";
171
	$parsed_mode="";
172
	for($i=0;$i<3;$i++) {
173
		// read
174
		if(($mode{$i} & 04)) $parsed_mode .= "r";
175
		else $parsed_mode .= "-";
176
		// write
177
		if(($mode{$i} & 02)) $parsed_mode .= "w";
178
		else $parsed_mode .= "-";
179
		// execute
180
		if(($mode{$i} & 01)) $parsed_mode .= "x";
181
		else $parsed_mode .= "-";
182
	}
183
	return $parsed_mode;
184
}
185

  
186
function decode_ftp_rights( $rights) {
187
	$parsed_mode="";
188
	for($i=0;$i<9;$i++) {
189
		// read
190
		if( $rights[$i] != '-' ) {
191
			$parsed_mode .= '1';
192
		}
193
		else {
194
			$parsed_mode.= '0';
195
		}
196
	}
197
	
198
	return $parsed_mode;	
199
}
200
//------------------------------------------------------------------------------
201
function get_file_size( $abs_item) {		// file size
202
	return @$GLOBALS['ext_File']->filesize( $abs_item );
203
}
204
//------------------------------------------------------------------------------
205
function parse_file_size($size) {		// parsed file size
206
	if($size >= 1073741824) {
207
		$size = round($size / 1073741824 * 100) / 100 . " GB";
208
	} elseif($size >= 1048576) {
209
		$size = round($size / 1048576 * 100) / 100 . " MB";
210
	} elseif($size >= 1024) {
211
		$size = round($size / 1024 * 100) / 100 . " KB";
212
	} else $size = $size . " Bytes";
213
	if($size==0) $size="-";
214

  
215
	return $size;
216
}
217
//------------------------------------------------------------------------------
218
function get_file_date( $item) {		// file date
219
	return @$GLOBALS['ext_File']->filemtime( $item );
220
}
221
//------------------------------------------------------------------------------
222
function parse_file_date($date) {		// parsed file date
223
	return @date($GLOBALS["date_fmt"],$date);
224
}
225
//------------------------------------------------------------------------------
226
function get_is_image( $abs_item ) {		// is this file an image?
227
	if(!get_is_file($abs_item)) return false;
228
	if( isset($abs_item['name'])) {
229
		$abs_item = $abs_item['name'];
230
	}
231
	return @eregi($GLOBALS["images_ext"], $abs_item);
232
}
233
//-----------------------------------------------------------------------------
234
function get_is_editable( $abs_item ) {		// is this file editable?
235
	if(!get_is_file( $abs_item )) return false;
236
	if( is_array( $abs_item ) ) {
237
		 $abs_item = $abs_item['name'];
238
	}
239
	foreach($GLOBALS["editable_ext"] as $pat) if(@eregi($pat,$abs_item)) return true;
240
	
241
	return strpos( basename($abs_item), "." ) ? false : true;
242
	
243
}
244
//-----------------------------------------------------------------------------
245
function get_mime_type( $abs_item, $query) {	// get file's mimetype
246
	
247
	if(get_is_dir( $abs_item )) {			// directory
248
		$mime_type	= $GLOBALS["super_mimes"]["dir"][0];
249
		$image		= $GLOBALS["super_mimes"]["dir"][1];
250
		
251
		if($query=="img") return $image;
252
		else return $mime_type;
253
	}
254
	$extra = $GLOBALS['ext_File']->is_link( $abs_item ) ? ' ('.$GLOBALS['mimes']['symlink'].')' : '';
255
	if( ext_isFTPMode() && isset($abs_item['name']) ) {
256
		$abs_item=$abs_item['name'];
257
	}
258
				// mime_type
259
	foreach($GLOBALS["used_mime_types"] as $mime) {
260
		list($desc,$img,$ext)	= $mime;
261
		if(@eregi($ext,basename($abs_item) )) {
262
			$mime_type	= $desc;
263
			$image		= $img;
264
			if($query=="img") return $image;
265
			else return $mime_type . $extra;
266
		}
267
	}
268
	
269
	if((function_exists("is_executable") &&
270
		@is_executable( $abs_item )) ||
271
		@eregi($GLOBALS["super_mimes"]["exe"][2],$abs_item))		
272
	{						// executable
273
		$mime_type	= $GLOBALS["super_mimes"]["exe"][0];
274
		$image		= $GLOBALS["super_mimes"]["exe"][1];
275
	} else {					// unknown file
276
		$mime_type	= $GLOBALS["super_mimes"]["file"][0];
277
		$image		= $GLOBALS["super_mimes"]["file"][1];
278
	}
279
	
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff