Project

General

Profile

Revision 69

View differences:

trunk/LICENSE
1
                          MOZILLA PUBLIC LICENSE
2
                                Version 1.1
3

  
4
                              ---------------
5

  
6
1. Definitions.
7

  
8
     1.0.1. "Commercial Use" means distribution or otherwise making the
9
     Covered Code available to a third party.
10

  
11
     1.1. "Contributor" means each entity that creates or contributes to
12
     the creation of Modifications.
13

  
14
     1.2. "Contributor Version" means the combination of the Original
15
     Code, prior Modifications used by a Contributor, and the Modifications
16
     made by that particular Contributor.
17

  
18
     1.3. "Covered Code" means the Original Code or Modifications or the
19
     combination of the Original Code and Modifications, in each case
20
     including portions thereof.
21

  
22
     1.4. "Electronic Distribution Mechanism" means a mechanism generally
23
     accepted in the software development community for the electronic
24
     transfer of data.
25

  
26
     1.5. "Executable" means Covered Code in any form other than Source
27
     Code.
28

  
29
     1.6. "Initial Developer" means the individual or entity identified
30
     as the Initial Developer in the Source Code notice required by Exhibit
31
     A.
32

  
33
     1.7. "Larger Work" means a work which combines Covered Code or
34
     portions thereof with code not governed by the terms of this License.
35

  
36
     1.8. "License" means this document.
37

  
38
     1.8.1. "Licensable" means having the right to grant, to the maximum
39
     extent possible, whether at the time of the initial grant or
40
     subsequently acquired, any and all of the rights conveyed herein.
41

  
42
     1.9. "Modifications" means any addition to or deletion from the
43
     substance or structure of either the Original Code or any previous
44
     Modifications. When Covered Code is released as a series of files, a
45
     Modification is:
46
          A. Any addition to or deletion from the contents of a file
47
          containing Original Code or previous Modifications.
48

  
49
          B. Any new file that contains any part of the Original Code or
50
          previous Modifications.
51

  
52
     1.10. "Original Code" means Source Code of computer software code
53
     which is described in the Source Code notice required by Exhibit A as
54
     Original Code, and which, at the time of its release under this
55
     License is not already Covered Code governed by this License.
56

  
57
     1.10.1. "Patent Claims" means any patent claim(s), now owned or
58
     hereafter acquired, including without limitation,  method, process,
59
     and apparatus claims, in any patent Licensable by grantor.
60

  
61
     1.11. "Source Code" means the preferred form of the Covered Code for
62
     making modifications to it, including all modules it contains, plus
63
     any associated interface definition files, scripts used to control
64
     compilation and installation of an Executable, or source code
65
     differential comparisons against either the Original Code or another
66
     well known, available Covered Code of the Contributor's choice. The
67
     Source Code can be in a compressed or archival form, provided the
68
     appropriate decompression or de-archiving software is widely available
69
     for no charge.
70

  
71
     1.12. "You" (or "Your")  means an individual or a legal entity
72
     exercising rights under, and complying with all of the terms of, this
73
     License or a future version of this License issued under Section 6.1.
74
     For legal entities, "You" includes any entity which controls, is
75
     controlled by, or is under common control with You. For purposes of
76
     this definition, "control" means (a) the power, direct or indirect,
77
     to cause the direction or management of such entity, whether by
78
     contract or otherwise, or (b) ownership of more than fifty percent
79
     (50%) of the outstanding shares or beneficial ownership of such
80
     entity.
81

  
82
2. Source Code License.
83

  
84
     2.1. The Initial Developer Grant.
85
     The Initial Developer hereby grants You a world-wide, royalty-free,
86
     non-exclusive license, subject to third party intellectual property
87
     claims:
88
          (a)  under intellectual property rights (other than patent or
89
          trademark) Licensable by Initial Developer to use, reproduce,
90
          modify, display, perform, sublicense and distribute the Original
91
          Code (or portions thereof) with or without Modifications, and/or
92
          as part of a Larger Work; and
93

  
94
          (b) under Patents Claims infringed by the making, using or
95
          selling of Original Code, to make, have made, use, practice,
96
          sell, and offer for sale, and/or otherwise dispose of the
97
          Original Code (or portions thereof).
98

  
99
          (c) the licenses granted in this Section 2.1(a) and (b) are
100
          effective on the date Initial Developer first distributes
101
          Original Code under the terms of this License.
102

  
103
          (d) Notwithstanding Section 2.1(b) above, no patent license is
104
          granted: 1) for code that You delete from the Original Code; 2)
105
          separate from the Original Code;  or 3) for infringements caused
106
          by: i) the modification of the Original Code or ii) the
107
          combination of the Original Code with other software or devices.
108

  
109
     2.2. Contributor Grant.
110
     Subject to third party intellectual property claims, each Contributor
111
     hereby grants You a world-wide, royalty-free, non-exclusive license
112

  
113
          (a)  under intellectual property rights (other than patent or
114
          trademark) Licensable by Contributor, to use, reproduce, modify,
115
          display, perform, sublicense and distribute the Modifications
116
          created by such Contributor (or portions thereof) either on an
117
          unmodified basis, with other Modifications, as Covered Code
118
          and/or as part of a Larger Work; and
119

  
120
          (b) under Patent Claims infringed by the making, using, or
121
          selling of  Modifications made by that Contributor either alone
122
          and/or in combination with its Contributor Version (or portions
123
          of such combination), to make, use, sell, offer for sale, have
124
          made, and/or otherwise dispose of: 1) Modifications made by that
125
          Contributor (or portions thereof); and 2) the combination of
126
          Modifications made by that Contributor with its Contributor
127
          Version (or portions of such combination).
128

  
129
          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
130
          effective on the date Contributor first makes Commercial Use of
131
          the Covered Code.
132

  
133
          (d)    Notwithstanding Section 2.2(b) above, no patent license is
134
          granted: 1) for any code that Contributor has deleted from the
135
          Contributor Version; 2)  separate from the Contributor Version;
136
          3)  for infringements caused by: i) third party modifications of
137
          Contributor Version or ii)  the combination of Modifications made
138
          by that Contributor with other software  (except as part of the
139
          Contributor Version) or other devices; or 4) under Patent Claims
140
          infringed by Covered Code in the absence of Modifications made by
141
          that Contributor.
142

  
143
3. Distribution Obligations.
144

  
145
     3.1. Application of License.
146
     The Modifications which You create or to which You contribute are
147
     governed by the terms of this License, including without limitation
148
     Section 2.2. The Source Code version of Covered Code may be
149
     distributed only under the terms of this License or a future version
150
     of this License released under Section 6.1, and You must include a
151
     copy of this License with every copy of the Source Code You
152
     distribute. You may not offer or impose any terms on any Source Code
153
     version that alters or restricts the applicable version of this
154
     License or the recipients' rights hereunder. However, You may include
155
     an additional document offering the additional rights described in
156
     Section 3.5.
157

  
158
     3.2. Availability of Source Code.
159
     Any Modification which You create or to which You contribute must be
160
     made available in Source Code form under the terms of this License
161
     either on the same media as an Executable version or via an accepted
162
     Electronic Distribution Mechanism to anyone to whom you made an
163
     Executable version available; and if made available via Electronic
164
     Distribution Mechanism, must remain available for at least twelve (12)
165
     months after the date it initially became available, or at least six
166
     (6) months after a subsequent version of that particular Modification
167
     has been made available to such recipients. You are responsible for
168
     ensuring that the Source Code version remains available even if the
169
     Electronic Distribution Mechanism is maintained by a third party.
170

  
171
     3.3. Description of Modifications.
172
     You must cause all Covered Code to which You contribute to contain a
173
     file documenting the changes You made to create that Covered Code and
174
     the date of any change. You must include a prominent statement that
175
     the Modification is derived, directly or indirectly, from Original
176
     Code provided by the Initial Developer and including the name of the
177
     Initial Developer in (a) the Source Code, and (b) in any notice in an
178
     Executable version or related documentation in which You describe the
179
     origin or ownership of the Covered Code.
180

  
181
     3.4. Intellectual Property Matters
182
          (a) Third Party Claims.
183
          If Contributor has knowledge that a license under a third party's
184
          intellectual property rights is required to exercise the rights
185
          granted by such Contributor under Sections 2.1 or 2.2,
186
          Contributor must include a text file with the Source Code
187
          distribution titled "LEGAL" which describes the claim and the
188
          party making the claim in sufficient detail that a recipient will
189
          know whom to contact. If Contributor obtains such knowledge after
190
          the Modification is made available as described in Section 3.2,
191
          Contributor shall promptly modify the LEGAL file in all copies
192
          Contributor makes available thereafter and shall take other steps
193
          (such as notifying appropriate mailing lists or newsgroups)
194
          reasonably calculated to inform those who received the Covered
195
          Code that new knowledge has been obtained.
196

  
197
          (b) Contributor APIs.
198
          If Contributor's Modifications include an application programming
199
          interface and Contributor has knowledge of patent licenses which
200
          are reasonably necessary to implement that API, Contributor must
201
          also include this information in the LEGAL file.
202

  
203
               (c)    Representations.
204
          Contributor represents that, except as disclosed pursuant to
205
          Section 3.4(a) above, Contributor believes that Contributor's
206
          Modifications are Contributor's original creation(s) and/or
207
          Contributor has sufficient rights to grant the rights conveyed by
208
          this License.
209

  
210
     3.5. Required Notices.
211
     You must duplicate the notice in Exhibit A in each file of the Source
212
     Code.  If it is not possible to put such notice in a particular Source
213
     Code file due to its structure, then You must include such notice in a
214
     location (such as a relevant directory) where a user would be likely
215
     to look for such a notice.  If You created one or more Modification(s)
216
     You may add your name as a Contributor to the notice described in
217
     Exhibit A.  You must also duplicate this License in any documentation
218
     for the Source Code where You describe recipients' rights or ownership
219
     rights relating to Covered Code.  You may choose to offer, and to
220
     charge a fee for, warranty, support, indemnity or liability
221
     obligations to one or more recipients of Covered Code. However, You
222
     may do so only on Your own behalf, and not on behalf of the Initial
223
     Developer or any Contributor. You must make it absolutely clear than
224
     any such warranty, support, indemnity or liability obligation is
225
     offered by You alone, and You hereby agree to indemnify the Initial
226
     Developer and every Contributor for any liability incurred by the
227
     Initial Developer or such Contributor as a result of warranty,
228
     support, indemnity or liability terms You offer.
229

  
230
     3.6. Distribution of Executable Versions.
231
     You may distribute Covered Code in Executable form only if the
232
     requirements of Section 3.1-3.5 have been met for that Covered Code,
233
     and if You include a notice stating that the Source Code version of
234
     the Covered Code is available under the terms of this License,
235
     including a description of how and where You have fulfilled the
236
     obligations of Section 3.2. The notice must be conspicuously included
237
     in any notice in an Executable version, related documentation or
238
     collateral in which You describe recipients' rights relating to the
239
     Covered Code. You may distribute the Executable version of Covered
240
     Code or ownership rights under a license of Your choice, which may
241
     contain terms different from this License, provided that You are in
242
     compliance with the terms of this License and that the license for the
243
     Executable version does not attempt to limit or alter the recipient's
244
     rights in the Source Code version from the rights set forth in this
245
     License. If You distribute the Executable version under a different
246
     license You must make it absolutely clear that any terms which differ
247
     from this License are offered by You alone, not by the Initial
248
     Developer or any Contributor. You hereby agree to indemnify the
249
     Initial Developer and every Contributor for any liability incurred by
250
     the Initial Developer or such Contributor as a result of any such
251
     terms You offer.
252

  
253
     3.7. Larger Works.
254
     You may create a Larger Work by combining Covered Code with other code
255
     not governed by the terms of this License and distribute the Larger
256
     Work as a single product. In such a case, You must make sure the
257
     requirements of this License are fulfilled for the Covered Code.
258

  
259
4. Inability to Comply Due to Statute or Regulation.
260

  
261
     If it is impossible for You to comply with any of the terms of this
262
     License with respect to some or all of the Covered Code due to
263
     statute, judicial order, or regulation then You must: (a) comply with
264
     the terms of this License to the maximum extent possible; and (b)
265
     describe the limitations and the code they affect. Such description
266
     must be included in the LEGAL file described in Section 3.4 and must
267
     be included with all distributions of the Source Code. Except to the
268
     extent prohibited by statute or regulation, such description must be
269
     sufficiently detailed for a recipient of ordinary skill to be able to
270
     understand it.
271

  
272
5. Application of this License.
273

  
274
     This License applies to code to which the Initial Developer has
275
     attached the notice in Exhibit A and to related Covered Code.
276

  
277
6. Versions of the License.
278

  
279
     6.1. New Versions.
280
     Netscape Communications Corporation ("Netscape") may publish revised
281
     and/or new versions of the License from time to time. Each version
282
     will be given a distinguishing version number.
283

  
284
     6.2. Effect of New Versions.
285
     Once Covered Code has been published under a particular version of the
286
     License, You may always continue to use it under the terms of that
287
     version. You may also choose to use such Covered Code under the terms
288
     of any subsequent version of the License published by Netscape. No one
289
     other than Netscape has the right to modify the terms applicable to
290
     Covered Code created under this License.
291

  
292
     6.3. Derivative Works.
293
     If You create or use a modified version of this License (which you may
294
     only do in order to apply it to code which is not already Covered Code
295
     governed by this License), You must (a) rename Your license so that
296
     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
297
     "MPL", "NPL" or any confusingly similar phrase do not appear in your
298
     license (except to note that your license differs from this License)
299
     and (b) otherwise make it clear that Your version of the license
300
     contains terms which differ from the Mozilla Public License and
301
     Netscape Public License. (Filling in the name of the Initial
302
     Developer, Original Code or Contributor in the notice described in
303
     Exhibit A shall not of themselves be deemed to be modifications of
304
     this License.)
305

  
306
7. DISCLAIMER OF WARRANTY.
307

  
308
     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
309
     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
310
     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
311
     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
312
     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
313
     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
314
     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
315
     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
316
     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
317
     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
318

  
319
8. TERMINATION.
320

  
321
     8.1.  This License and the rights granted hereunder will terminate
322
     automatically if You fail to comply with terms herein and fail to cure
323
     such breach within 30 days of becoming aware of the breach. All
324
     sublicenses to the Covered Code which are properly granted shall
325
     survive any termination of this License. Provisions which, by their
326
     nature, must remain in effect beyond the termination of this License
327
     shall survive.
328

  
329
     8.2.  If You initiate litigation by asserting a patent infringement
330
     claim (excluding declatory judgment actions) against Initial Developer
331
     or a Contributor (the Initial Developer or Contributor against whom
332
     You file such action is referred to as "Participant")  alleging that:
333

  
334
     (a)  such Participant's Contributor Version directly or indirectly
335
     infringes any patent, then any and all rights granted by such
336
     Participant to You under Sections 2.1 and/or 2.2 of this License
337
     shall, upon 60 days notice from Participant terminate prospectively,
338
     unless if within 60 days after receipt of notice You either: (i)
339
     agree in writing to pay Participant a mutually agreeable reasonable
340
     royalty for Your past and future use of Modifications made by such
341
     Participant, or (ii) withdraw Your litigation claim with respect to
342
     the Contributor Version against such Participant.  If within 60 days
343
     of notice, a reasonable royalty and payment arrangement are not
344
     mutually agreed upon in writing by the parties or the litigation claim
345
     is not withdrawn, the rights granted by Participant to You under
346
     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
347
     the 60 day notice period specified above.
348

  
349
     (b)  any software, hardware, or device, other than such Participant's
350
     Contributor Version, directly or indirectly infringes any patent, then
351
     any rights granted to You by such Participant under Sections 2.1(b)
352
     and 2.2(b) are revoked effective as of the date You first made, used,
353
     sold, distributed, or had made, Modifications made by that
354
     Participant.
355

  
356
     8.3.  If You assert a patent infringement claim against Participant
357
     alleging that such Participant's Contributor Version directly or
358
     indirectly infringes any patent where such claim is resolved (such as
359
     by license or settlement) prior to the initiation of patent
360
     infringement litigation, then the reasonable value of the licenses
361
     granted by such Participant under Sections 2.1 or 2.2 shall be taken
362
     into account in determining the amount or value of any payment or
363
     license.
364

  
365
     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
366
     all end user license agreements (excluding distributors and resellers)
367
     which have been validly granted by You or any distributor hereunder
368
     prior to termination shall survive termination.
369

  
370
9. LIMITATION OF LIABILITY.
371

  
372
     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
373
     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
374
     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
375
     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
376
     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
377
     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
378
     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
379
     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
380
     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
381
     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
382
     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
383
     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
384
     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
385
     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
386

  
387
10. U.S. GOVERNMENT END USERS.
388

  
389
     The Covered Code is a "commercial item," as that term is defined in
390
     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
391
     software" and "commercial computer software documentation," as such
392
     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
393
     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
394
     all U.S. Government End Users acquire Covered Code with only those
395
     rights set forth herein.
396

  
397
11. MISCELLANEOUS.
398

  
399
     This License represents the complete agreement concerning subject
400
     matter hereof. If any provision of this License is held to be
401
     unenforceable, such provision shall be reformed only to the extent
402
     necessary to make it enforceable. This License shall be governed by
403
     California law provisions (except to the extent applicable law, if
404
     any, provides otherwise), excluding its conflict-of-law provisions.
405
     With respect to disputes in which at least one party is a citizen of,
406
     or an entity chartered or registered to do business in the United
407
     States of America, any litigation relating to this License shall be
408
     subject to the jurisdiction of the Federal Courts of the Northern
409
     District of California, with venue lying in Santa Clara County,
410
     California, with the losing party responsible for costs, including
411
     without limitation, court costs and reasonable attorneys' fees and
412
     expenses. The application of the United Nations Convention on
413
     Contracts for the International Sale of Goods is expressly excluded.
414
     Any law or regulation which provides that the language of a contract
415
     shall be construed against the drafter shall not apply to this
416
     License.
417

  
418
12. RESPONSIBILITY FOR CLAIMS.
419

  
420
     As between Initial Developer and the Contributors, each party is
421
     responsible for claims and damages arising, directly or indirectly,
422
     out of its utilization of rights under this License and You agree to
423
     work with Initial Developer and Contributors to distribute such
424
     responsibility on an equitable basis. Nothing herein is intended or
425
     shall be deemed to constitute any admission of liability.
426

  
427
13. MULTIPLE-LICENSED CODE.
428

  
429
     Initial Developer may designate portions of the Covered Code as
430
     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
431
     Developer permits you to utilize portions of the Covered Code under
432
     Your choice of the NPL or the alternative licenses, if any, specified
433
     by the Initial Developer in the file described in Exhibit A.
434

  
435
EXHIBIT A -Mozilla Public License.
436

  
437
     ``The contents of this file are subject to the Mozilla Public License
438
     Version 1.1 (the "License"); you may not use this file except in
439
     compliance with the License. You may obtain a copy of the License at
440
     http://www.mozilla.org/MPL/
441

  
442
     Software distributed under the License is distributed on an "AS IS"
443
     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
444
     License for the specific language governing rights and limitations
445
     under the License.
446

  
447
     The Original Code is ______________________________________.
448

  
449
     The Initial Developer of the Original Code is ________________________.
450
     Portions created by ______________________ are Copyright (C) ______
451
     _______________________. All Rights Reserved.
452

  
453
     Contributor(s): ______________________________________.
454

  
455
     Alternatively, the contents of this file may be used under the terms
456
     of the _____ license (the  "[___] License"), in which case the
457
     provisions of [______] License are applicable instead of those
458
     above.  If you wish to allow use of your version of this file only
459
     under the terms of the [____] License and not to allow others to use
460
     your version of this file under the MPL, indicate your decision by
461
     deleting  the provisions above and replace  them with the notice and
462
     other provisions required by the [___] License.  If you do not delete
463
     the provisions above, a recipient may use your version of this file
464
     under either the MPL or the [___] License."
465

  
466
     [NOTE: The text of this Exhibit A may differ slightly from the text of
467
     the notices in the Source Code files of the Original Code. You should
468
     use the text of this Exhibit A rather than the text found in the
469
     Original Code Source Code for Your Modifications.]
470 0

  
trunk/configuration.jx.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
/**
6
 * Configuration settings for frontend file browsing
7
 */
8

  
9
// ALLOW FRONTEND BROWSING ? Change to
10
//$frontend_enabled = true; // If needed!
11
$frontend_enabled = false;
12

  
13
// THE SUBDIRECTORY USERS CAN BROWSE INCLUDING ALL SUBDIRECTORIES
14
// relative to your physical Joomla root path ($mosConfig_absolute_path)!
15
// Please note: You currently can't exclude directories or files within
16
// the specified directory. All files and directories will be visible and downloadable
17
$subdir = '/dmdocuments';
18

  
19
?>
20 0

  
trunk/extplorer.list.php
138 138
function print_table($dir, $list, $allow) {	// print table of files
139 139
	global $dir_up;
140 140
	if(!is_array($list)) return;
141
	if( $dir != "" || strstr( $dir, _JX_PATH ) ) {
141
	if( $dir != "" || strstr( $dir, _EXT_PATH ) ) {
142 142
	  echo "<tr class=\"sectiontableentry1\"><td valign=\"baseline\"><a href=\"".make_link("list",$dir_up,NULL)."\">";
143
	  echo "<img border=\"0\" align=\"absmiddle\" src=\""._JX_URL."/images/_up.png\" ";
143
	  echo "<img border=\"0\" align=\"absmiddle\" src=\""._EXT_URL."/images/up.png\" ";
144 144
	  echo "alt=\"".$GLOBALS["messages"]["uplink"]."\" title=\"".$GLOBALS["messages"]["uplink"]."\"/>&nbsp;&nbsp;..</a></td>\n";
145 145
	  echo "<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>";
146 146
	  echo "</tr>";
......
182 182
		}
183 183
		//else echo "<A>";
184 184
		echo "<img border=\"0\" ";
185
		echo "align=\"absmiddle\" vspace=\"5\" hspace=\"5\" src=\""._JX_URL."/images/".get_mime_type($abs_item, "img")."\" alt=\"\">&nbsp;";
185
		echo "align=\"absmiddle\" vspace=\"5\" hspace=\"5\" src=\""._EXT_URL."/images/".get_mime_type($abs_item, "img")."\" alt=\"\">&nbsp;";
186 186
		$s_item=$item;	
187 187
		if(strlen($s_item)>50) $s_item=substr($s_item,0,47)."...";
188 188
		$s_item = htmlspecialchars($s_item);
......
237 237
	echo '<div class="componentheading">'.$GLOBALS["messages"]["actdir"].": ".$dir_links.'</div>';
238 238
	
239 239
	// Sorting of items
240
	$images = "&nbsp;<img width=\"10\" height=\"10\" border=\"0\" align=\"absmiddle\" src=\""._JX_URL."/images/";
240
	$images = "&nbsp;<img width=\"10\" height=\"10\" border=\"0\" align=\"absmiddle\" src=\""._EXT_URL."/images/";
241 241
	if($GLOBALS["direction"]=="ASC") {
242 242
		$_srt = "DESC";	$images .= "_arrowup.gif\" alt=\"^\">";
243 243
	} else {
......
251 251
	echo "<td>";
252 252
	if( $dir != "" ) {
253 253
	  echo "<a href=\"".make_link("list",$dir_up,NULL)."\">";
254
	  echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\""._JX_URL."/images/_up.png\" ";
254
	  echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\""._EXT_URL."/images/_up.png\" ";
255 255
	  echo "alt=\"".$GLOBALS["messages"]["uplink"]."\" title=\"".$GLOBALS["messages"]["uplink"]."\"></a>";
256 256
	}
257 257
	echo "</td>\n";
258 258
	// HOME DIR
259 259
	echo "<td><a href=\"".make_link("list",NULL,NULL)."\">";
260
	echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\""._JX_URL."/images/_home.gif\" ";
260
	echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\""._EXT_URL."/images/_home.gif\" ";
261 261
	echo "alt=\"".$GLOBALS["messages"]["homelink"]."\" title=\"".$GLOBALS["messages"]["homelink"]."\"></a></td>\n";
262 262
	// RELOAD
263 263
	echo "<td><a href=\"javascript:location.reload();\"><img border=\"0\" width=\"22\" height=\"22\" ";
264
	echo "align=\"absmiddle\" src=\""._JX_URL."/images/_refresh.gif\" alt=\"".$GLOBALS["messages"]["reloadlink"];
264
	echo "align=\"absmiddle\" src=\""._EXT_URL."/images/_refresh.gif\" alt=\"".$GLOBALS["messages"]["reloadlink"];
265 265
	echo "\" title=\"".$GLOBALS["messages"]["reloadlink"]."\"></A></td>\n";
266 266
	// SEARCH
267 267
	echo "<td><a href=\"".make_link("search",$dir,NULL)."\">";
268
	echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\""._JX_URL."/images/_search.gif\" ";
268
	echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\""._EXT_URL."/images/_search.gif\" ";
269 269
	echo "alt=\"".$GLOBALS["messages"]["searchlink"]."\" title=\"".$GLOBALS["messages"]["searchlink"];
270 270
	echo "\"></a></td>\n";
271 271
	
......
273 273
	
274 274
	// Joomla Sysinfo
275 275
	echo "<td><a href=\"".make_link("sysinfo",$dir,NULL)."\">";
276
	echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\""._JX_URL."/images/systeminfo.gif\" ";
276
	echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\""._EXT_URL."/images/systeminfo.gif\" ";
277 277
	echo "alt=\"" . $GLOBALS['messages']['mossysinfolink'] . "\" title=\"" .$GLOBALS['messages']['mossysinfolink'] . "\"></a></td>\n";
278 278
	
279 279
	echo "<td><img src=\"images/menu_divider.png\" height=\"22\" width=\"2\" border=\"0\" alt=\"|\" /></td>";
......
281 281
	if($allow) {
282 282
		// COPY
283 283
		echo "<td><a href=\"javascript:Copy();\"><img border=\"0\" width=\"22\" height=\"22\" ";
284
		echo "align=\"absmiddle\" src=\""._JX_URL."/images/_copy.gif\" alt=\"".$GLOBALS["messages"]["copylink"];
284
		echo "align=\"absmiddle\" src=\""._EXT_URL."/images/_copy.gif\" alt=\"".$GLOBALS["messages"]["copylink"];
285 285
		echo "\" title=\"".$GLOBALS["messages"]["copylink"]."\"></a></td>\n";
286 286
		// MOVE
287 287
		echo "<td><a href=\"javascript:Move();\"><img border=\"0\" width=\"22\" height=\"22\" ";
288
		echo "align=\"absmiddle\" src=\""._JX_URL."/images/_move.gif\" alt=\"".$GLOBALS["messages"]["movelink"];
288
		echo "align=\"absmiddle\" src=\""._EXT_URL."/images/_move.gif\" alt=\"".$GLOBALS["messages"]["movelink"];
289 289
		echo "\" title=\"".$GLOBALS["messages"]["movelink"]."\"></A></td>\n";
290 290
		// DELETE
291 291
		echo "<td><a href=\"javascript:Delete();\"><img border=\"0\" width=\"22\" height=\"22\" ";
292
		echo "align=\"absmiddle\" src=\""._JX_URL."/images/_delete.gif\" alt=\"".$GLOBALS["messages"]["dellink"];
292
		echo "align=\"absmiddle\" src=\""._EXT_URL."/images/_delete.gif\" alt=\"".$GLOBALS["messages"]["dellink"];
293 293
		echo "\" title=\"".$GLOBALS["messages"]["dellink"]."\"></A></td>\n";
294 294
		// CHMOD
295 295
		echo "<td><a href=\"javascript:Chmod();\"><img border=\"0\" width=\"22\" height=\"22\" ";
296
		echo "align=\"absmiddle\" src=\""._JX_URL."/images/_chmod.gif\" alt=\"chmod\" title=\"" . $GLOBALS['messages']['chmodlink'] . "\"></a></td>\n";
296
		echo "align=\"absmiddle\" src=\""._EXT_URL."/images/_chmod.gif\" alt=\"chmod\" title=\"" . $GLOBALS['messages']['chmodlink'] . "\"></a></td>\n";
297 297
		// UPLOAD
298 298
		if(ini_get("file_uploads")) {
299 299
			echo "<td><a href=\"".make_link("upload",$dir,NULL)."\">";
300 300
			echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
301
			echo "src=\""._JX_URL."/images/_upload.gif\" alt=\"".$GLOBALS["messages"]["uploadlink"];
301
			echo "src=\""._EXT_URL."/images/_upload.gif\" alt=\"".$GLOBALS["messages"]["uploadlink"];
302 302
			echo "\" title=\"".$GLOBALS["messages"]["uploadlink"]."\"></A></td>\n";
303 303
		} else {
304 304
			echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
305
			echo "src=\""._JX_URL."/images/_upload_.gif\" alt=\"".$GLOBALS["messages"]["uploadlink"];
305
			echo "src=\""._EXT_URL."/images/_upload_.gif\" alt=\"".$GLOBALS["messages"]["uploadlink"];
306 306
			echo "\" title=\"".$GLOBALS["messages"]["uploadlink"]."\"></td>\n";
307 307
		}
308 308
		// ARCHIVE
309 309
		if($GLOBALS["zip"] || $GLOBALS["tar"] || $GLOBALS["tgz"]) {
310 310
			echo "<td><a href=\"javascript:Archive();\"><img border=\"0\" width=\"22\" height=\"22\" ";
311
			echo "align=\"absmiddle\" src=\""._JX_URL."/images/_archive.gif\" alt=\"".$GLOBALS["messages"]["comprlink"];
311
			echo "align=\"absmiddle\" src=\""._EXT_URL."/images/_archive.gif\" alt=\"".$GLOBALS["messages"]["comprlink"];
312 312
			echo "\" title=\"".$GLOBALS["messages"]["comprlink"]."\"></A></td>\n";
313 313
		}
314 314
	} else {
315 315
		// COPY
316 316
		echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
317
		echo "src=\""._JX_URL."/images/_copy_.gif\" alt=\"".$GLOBALS["messages"]["copylink"]."\" title=\"";
317
		echo "src=\""._EXT_URL."/images/_copy_.gif\" alt=\"".$GLOBALS["messages"]["copylink"]."\" title=\"";
318 318
		echo $GLOBALS["messages"]["copylink"]."\"></td>\n";
319 319
		// MOVE
320 320
		echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
321
		echo "src=\""._JX_URL."/images/_move_.gif\" alt=\"".$GLOBALS["messages"]["movelink"]."\" title=\"";
321
		echo "src=\""._EXT_URL."/images/_move_.gif\" alt=\"".$GLOBALS["messages"]["movelink"]."\" title=\"";
322 322
		echo $GLOBALS["messages"]["movelink"]."\"></td>\n";
323 323
		// DELETE
324 324
		echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
325
		echo "src=\""._JX_URL."/images/_delete_.gif\" alt=\"".$GLOBALS["messages"]["dellink"]."\" title=\"";
325
		echo "src=\""._EXT_URL."/images/_delete_.gif\" alt=\"".$GLOBALS["messages"]["dellink"]."\" title=\"";
326 326
		echo $GLOBALS["messages"]["dellink"]."\"></td>\n";
327 327
		// UPLOAD
328 328
		echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
329
		echo "src=\""._JX_URL."/images/_upload_.gif\" alt=\"".$GLOBALS["messages"]["uplink"];
329
		echo "src=\""._EXT_URL."/images/_upload_.gif\" alt=\"".$GLOBALS["messages"]["uplink"];
330 330
		echo "\" title=\"".$GLOBALS["messages"]["uplink"]."\"></td>\n";
331 331
	}
332 332

  
......
337 337
		if($admin) {
338 338
			echo "<td><a href=\"".make_link("admin",$dir,NULL)."\">";
339 339
			echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
340
			echo "src=\""._JX_URL."/images/_admin.gif\" alt=\"".$GLOBALS["messages"]["adminlink"]."\" title=\"";
340
			echo "src=\""._EXT_URL."/images/_admin.gif\" alt=\"".$GLOBALS["messages"]["adminlink"]."\" title=\"";
341 341
			echo $GLOBALS["messages"]["adminlink"]."\"></A></td>\n";
342 342
		}
343 343
		// LOGOUT
344 344
		echo "<td><a href=\"".make_link("logout",NULL,NULL)."\">";
345 345
		echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
346
		echo "src=\""._JX_URL."/images/_logout.gif\" alt=\"".$GLOBALS["messages"]["logoutlink"]."\" title=\"";
346
		echo "src=\""._EXT_URL."/images/_logout.gif\" alt=\"".$GLOBALS["messages"]["logoutlink"]."\" title=\"";
347 347
		echo $GLOBALS["messages"]["logoutlink"]."\"></a></td>\n";
348 348
	}
349 349
	// Logo
350 350
	echo "<td style=\"padding-left:10px;\">";
351 351
	//echo "<div style=\"margin-left:10px;float:right;\" width=\"305\" >";
352 352
	echo "<a href=\"".$GLOBALS['ext_home']."\" target=\"_blank\" title=\"joomlaXplorer Project\"><img border=\"0\" align=\"absmiddle\" id=\"ext_logo\" style=\"filter:alpha(opacity=10);-moz-opacity:.10;opacity:.10;\" onmouseover=\"opacity('ext_logo', 60, 99, 500);\" onmouseout=\"opacity('ext_logo', 100, 60, 500);\" ";
353
	echo "src=\""._JX_URL."/images/logo.gif\" align=\"right\" alt=\"" . $GLOBALS['messages']['logolink'] . "\"></a>";
353
	echo "src=\""._EXT_URL."/images/logo.gif\" align=\"right\" alt=\"" . $GLOBALS['messages']['logolink'] . "\"></a>";
354 354
	//echo "</div>";
355 355
	echo "</td>\n";
356 356
	
trunk/configuration.ext.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
/**
6
 * Configuration settings for frontend file browsing
7
 */
8

  
9
// ALLOW FRONTEND BROWSING ? Change to
10
//$frontend_enabled = true; // If needed!
11
$frontend_enabled = false;
12

  
13
// THE SUBDIRECTORY USERS CAN BROWSE INCLUDING ALL SUBDIRECTORIES
14
// relative to your physical Joomla root path ($mosConfig_absolute_path)!
15
// Please note: You currently can't exclude directories or files within
16
// the specified directory. All files and directories will be visible and downloadable
17
$subdir = '/dmdocuments';
18

  
19
?>
0 20

  
trunk/LICENSE_GPL.txt
1
GNU GENERAL PUBLIC LICENSE
2
				Version 2, June 1991
3

  
4
 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5
 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
6
 Everyone is permitted to copy and distribute verbatim copies
7
 of this license document, but changing it is not allowed.
8

  
9
				Preamble
10

  
11
  The licenses for most software are designed to take away your
12
freedom to share and change it.  By contrast, the GNU General Public
13
License is intended to guarantee your freedom to share and change free
14
software--to make sure the software is free for all its users.  This
15
General Public License applies to most of the Free Software
16
Foundation's software and to any other program whose authors commit to
17
using it.  (Some other Free Software Foundation software is covered by
18
the GNU Library General Public License instead.)  You can apply it to
19
your programs, too.
20

  
21
  When we speak of free software, we are referring to freedom, not
22
price.  Our General Public Licenses are designed to make sure that you
23
have the freedom to distribute copies of free software (and charge for
24
this service if you wish), that you receive source code or can get it
25
if you want it, that you can change the software or use pieces of it
26
in new free programs; and that you know you can do these things.
27

  
28
  To protect your rights, we need to make restrictions that forbid
29
anyone to deny you these rights or to ask you to surrender the rights.
30
These restrictions translate to certain responsibilities for you if you
31
distribute copies of the software, or if you modify it.
32

  
33
  For example, if you distribute copies of such a program, whether
34
gratis or for a fee, you must give the recipients all the rights that
35
you have.  You must make sure that they, too, receive or can get the
36
source code.  And you must show them these terms so they know their
37
rights.
38

  
39
  We protect your rights with two steps: (1) copyright the software, and
40
(2) offer you this license which gives you legal permission to copy,
41
distribute and/or modify the software.
42

  
43
  Also, for each author's protection and ours, we want to make certain
44
that everyone understands that there is no warranty for this free
45
software.  If the software is modified by someone else and passed on, we
46
want its recipients to know that what they have is not the original, so
47
that any problems introduced by others will not reflect on the original
48
authors' reputations.
49

  
50
  Finally, any free program is threatened constantly by software
51
patents.  We wish to avoid the danger that redistributors of a free
52
program will individually obtain patent licenses, in effect making the
53
program proprietary.  To prevent this, we have made it clear that any
54
patent must be licensed for everyone's free use or not licensed at all.
55

  
56
  The precise terms and conditions for copying, distribution and
57
modification follow.
58

  
59
			GNU GENERAL PUBLIC LICENSE
60
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61

  
62
  0. This License applies to any program or other work which contains
63
a notice placed by the copyright holder saying it may be distributed
64
under the terms of this General Public License.  The "Program", below,
65
refers to any such program or work, and a "work based on the Program"
66
means either the Program or any derivative work under copyright law:
67
that is to say, a work containing the Program or a portion of it,
68
either verbatim or with modifications and/or translated into another
69
language.  (Hereinafter, translation is included without limitation in
70
the term "modification".)  Each licensee is addressed as "you".
71

  
72
Activities other than copying, distribution and modification are not
73
covered by this License; they are outside its scope.  The act of
74
running the Program is not restricted, and the output from the Program
75
is covered only if its contents constitute a work based on the
76
Program (independent of having been made by running the Program).
77
Whether that is true depends on what the Program does.
78

  
79
  1. You may copy and distribute verbatim copies of the Program's
80
source code as you receive it, in any medium, provided that you
81
conspicuously and appropriately publish on each copy an appropriate
82
copyright notice and disclaimer of warranty; keep intact all the
83
notices that refer to this License and to the absence of any warranty;
84
and give any other recipients of the Program a copy of this License
85
along with the Program.
86

  
87
You may charge a fee for the physical act of transferring a copy, and
88
you may at your option offer warranty protection in exchange for a fee.
89

  
90
  2. You may modify your copy or copies of the Program or any portion
91
of it, thus forming a work based on the Program, and copy and
92
distribute such modifications or work under the terms of Section 1
93
above, provided that you also meet all of these conditions:
94

  
95
	a) You must cause the modified files to carry prominent notices
96
	stating that you changed the files and the date of any change.
97

  
98
	b) You must cause any work that you distribute or publish, that in
99
	whole or in part contains or is derived from the Program or any
100
	part thereof, to be licensed as a whole at no charge to all third
101
	parties under the terms of this License.
102

  
103
	c) If the modified program normally reads commands interactively
104
	when run, you must cause it, when started running for such
105
	interactive use in the most ordinary way, to print or display an
106
	announcement including an appropriate copyright notice and a
107
	notice that there is no warranty (or else, saying that you provide
108
	a warranty) and that users may redistribute the program under
109
	these conditions, and telling the user how to view a copy of this
110
	License.  (Exception: if the Program itself is interactive but
111
	does not normally print such an announcement, your work based on
112
	the Program is not required to print an announcement.)
113

  
114
These requirements apply to the modified work as a whole.  If
115
identifiable sections of that work are not derived from the Program,
116
and can be reasonably considered independent and separate works in
117
themselves, then this License, and its terms, do not apply to those
118
sections when you distribute them as separate works.  But when you
119
distribute the same sections as part of a whole which is a work based
120
on the Program, the distribution of the whole must be on the terms of
121
this License, whose permissions for other licensees extend to the
122
entire whole, and thus to each and every part regardless of who wrote it.
123

  
124
Thus, it is not the intent of this section to claim rights or contest
125
your rights to work written entirely by you; rather, the intent is to
126
exercise the right to control the distribution of derivative or
127
collective works based on the Program.
128

  
129
In addition, mere aggregation of another work not based on the Program
130
with the Program (or with a work based on the Program) on a volume of
131
a storage or distribution medium does not bring the other work under
132
the scope of this License.
133

  
134
  3. You may copy and distribute the Program (or a work based on it,
135
under Section 2) in object code or executable form under the terms of
136
Sections 1 and 2 above provided that you also do one of the following:
137

  
138
	a) Accompany it with the complete corresponding machine-readable
139
	source code, which must be distributed under the terms of Sections
140
	1 and 2 above on a medium customarily used for software interchange; or,
141

  
142
	b) Accompany it with a written offer, valid for at least three
143
	years, to give any third party, for a charge no more than your
144
	cost of physically performing source distribution, a complete
145
	machine-readable copy of the corresponding source code, to be
146
	distributed under the terms of Sections 1 and 2 above on a medium
147
	customarily used for software interchange; or,
148

  
149
	c) Accompany it with the information you received as to the offer
150
	to distribute corresponding source code.  (This alternative is
151
	allowed only for noncommercial distribution and only if you
152
	received the program in object code or executable form with such
153
	an offer, in accord with Subsection b above.)
154

  
155
The source code for a work means the preferred form of the work for
156
making modifications to it.  For an executable work, complete source
157
code means all the source code for all modules it contains, plus any
158
associated interface definition files, plus the scripts used to
159
control compilation and installation of the executable.  However, as a
160
special exception, the source code distributed need not include
161
anything that is normally distributed (in either source or binary
162
form) with the major components (compiler, kernel, and so on) of the
163
operating system on which the executable runs, unless that component
164
itself accompanies the executable.
165

  
166
If distribution of executable or object code is made by offering
167
access to copy from a designated place, then offering equivalent
168
access to copy the source code from the same place counts as
169
distribution of the source code, even though third parties are not
170
compelled to copy the source along with the object code.
171

172
  4. You may not copy, modify, sublicense, or distribute the Program
173
except as expressly provided under this License.  Any attempt
174
otherwise to copy, modify, sublicense or distribute the Program is
175
void, and will automatically terminate your rights under this License.
176
However, parties who have received copies, or rights, from you under
177
this License will not have their licenses terminated so long as such
178
parties remain in full compliance.
179

  
180
  5. You are not required to accept this License, since you have not
181
signed it.  However, nothing else grants you permission to modify or
182
distribute the Program or its derivative works.  These actions are
183
prohibited by law if you do not accept this License.  Therefore, by
184
modifying or distributing the Program (or any work based on the
185
Program), you indicate your acceptance of this License to do so, and
186
all its terms and conditions for copying, distributing or modifying
187
the Program or works based on it.
188

  
189
  6. Each time you redistribute the Program (or any work based on the
190
Program), the recipient automatically receives a license from the
191
original licensor to copy, distribute or modify the Program subject to
192
these terms and conditions.  You may not impose any further
193
restrictions on the recipients' exercise of the rights granted herein.
194
You are not responsible for enforcing compliance by third parties to
195
this License.
196

  
197
  7. If, as a consequence of a court judgment or allegation of patent
198
infringement or for any other reason (not limited to patent issues),
199
conditions are imposed on you (whether by court order, agreement or
200
otherwise) that contradict the conditions of this License, they do not
201
excuse you from the conditions of this License.  If you cannot
202
distribute so as to satisfy simultaneously your obligations under this
203
License and any other pertinent obligations, then as a consequence you
204
may not distribute the Program at all.  For example, if a patent
205
license would not permit royalty-free redistribution of the Program by
206
all those who receive copies directly or indirectly through you, then
207
the only way you could satisfy both it and this License would be to
208
refrain entirely from distribution of the Program.
209

  
210
If any portion of this section is held invalid or unenforceable under
211
any particular circumstance, the balance of the section is intended to
212
apply and the section as a whole is intended to apply in other
213
circumstances.
214

  
215
It is not the purpose of this section to induce you to infringe any
216
patents or other property right claims or to contest validity of any
217
such claims; this section has the sole purpose of protecting the
218
integrity of the free software distribution system, which is
219
implemented by public license practices.  Many people have made
220
generous contributions to the wide range of software distributed
221
through that system in reliance on consistent application of that
222
system; it is up to the author/donor to decide if he or she is willing
223
to distribute software through any other system and a licensee cannot
224
impose that choice.
225

  
226
This section is intended to make thoroughly clear what is believed to
227
be a consequence of the rest of this License.
228

  
229
  8. If the distribution and/or use of the Program is restricted in
230
certain countries either by patents or by copyrighted interfaces, the
231
original copyright holder who places the Program under this License
232
may add an explicit geographical distribution limitation excluding
233
those countries, so that distribution is permitted only in or among
234
countries not thus excluded.  In such case, this License incorporates
235
the limitation as if written in the body of this License.
236

  
237
  9. The Free Software Foundation may publish revised and/or new versions
238
of the General Public License from time to time.  Such new versions will
239
be similar in spirit to the present version, but may differ in detail to
240
address new problems or concerns.
241

  
242
Each version is given a distinguishing version number.  If the Program
243
specifies a version number of this License which applies to it and "any
244
later version", you have the option of following the terms and conditions
245
either of that version or of any later version published by the Free
246
Software Foundation.  If the Program does not specify a version number of
247
this License, you may choose any version ever published by the Free Software
248
Foundation.
249

  
250
  10. If you wish to incorporate parts of the Program into other free
251
programs whose distribution conditions are different, write to the author
252
to ask for permission.  For software which is copyrighted by the Free
253
Software Foundation, write to the Free Software Foundation; we sometimes
254
make exceptions for this.  Our decision will be guided by the two goals
255
of preserving the free status of all derivatives of our free software and
256
of promoting the sharing and reuse of software generally.
257

  
258
				NO WARRANTY
259

  
260
  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
262
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
266
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
267
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
REPAIR OR CORRECTION.
269

  
270
  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
POSSIBILITY OF SUCH DAMAGES.
279

  
280
			 END OF TERMS AND CONDITIONS
281

  
282
		How to Apply These Terms to Your New Programs
283

  
284
  If you develop a new program, and you want it to be of the greatest
285
possible use to the public, the best way to achieve this is to make it
286
free software which everyone can redistribute and change under these terms.
287

  
288
  To do so, attach the following notices to the program.  It is safest
289
to attach them to the start of each source file to most effectively
290
convey the exclusion of warranty; and each file should have at least
291
the "copyright" line and a pointer to where the full notice is found.
292

  
293
	<one line to give the program's name and a brief idea of what it does.>
294
	Copyright (C) <year>  <name of author>
295

  
296
	This program is free software; you can redistribute it and/or modify
297
	it under the terms of the GNU General Public License as published by
298
	the Free Software Foundation; either version 2 of the License, or
299
	(at your option) any later version.
300

  
301
	This program is distributed in the hope that it will be useful,
302
	but WITHOUT ANY WARRANTY; without even the implied warranty of
303
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
304
	GNU General Public License for more details.
305

  
306
	You should have received a copy of the GNU General Public License
307
	along with this program; if not, write to the Free Software
308
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
309

  
310

  
311
Also add information on how to contact you by electronic and paper mail.
312

  
313
If the program is interactive, make it output a short notice like this
314
when it starts in an interactive mode:
315

  
316
	Gnomovision version 69, Copyright (C) year name of author
317
	Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
318
	This is free software, and you are welcome to redistribute it
319
	under certain conditions; type `show c' for details.
320

  
321
The hypothetical commands `show w' and `show c' should show the appropriate
322
parts of the General Public License.  Of course, the commands you use may
323
be called something other than `show w' and `show c'; they could even be
324
mouse-clicks or menu items--whatever suits your program.
325

  
326
You should also get your employer (if you work as a programmer) or your
327
school, if any, to sign a "copyright disclaimer" for the program, if
328
necessary.  Here is a sample; alter the names:
329

  
330
  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
331
  `Gnomovision' (which makes passes at compilers) written by James Hacker.
332

  
333
  <signature of Ty Coon>, 1 April 1989
334
  Ty Coon, President of Vice
335

  
336
This General Public License does not permit incorporating your program into
337
proprietary programs.  If your program is a subroutine library, you may
338
consider it more useful to permit linking proprietary applications with the
339
library.  If this is what you want to do, use the GNU Library General
340
Public License instead of this License.
341

  
342
Linking Joomla! statically or dynamically with other modules is making
343
a combined work based on Joomla!.  Thus, the terms and conditions of
344
the GNU General Public License cover the whole combination.
345

  
346
In addition, as a special exception, the copyright holders of Joomla!
347
give you permission to combine Joomla! with free software programs or
348
libraries that are released under the GNU LGPL and with independent
349
extensions that communicate with Joomla! solely through the Joomla!
350
extension interface.  You may copy and distribute such a system following
351
the terms of the GNU GPL for Joomla! and the licenses of the extension,
352
even if you do not include the source code of that extension.
353

  
354
Note that people who make modified versions of Joomla! are not
355
obligated to grant this special exception for their modified versions;
356
it is their choice whether to do so.  The GNU General Public License
357
gives permission to release a modified version without this exception;
358
this exception also makes it possible to release a modified version
359
which carries forward this exception.
0 360

  
trunk/preinstall.php
1
<?php
2
/* Password: Make the pass phrase at least 6 characters long */
3
$passPhrase = "blabla";
4

  
5
/*
6
 * eXtplorer - a web based file manager
7
 *
8
 *
9
 * This Pre-Installation Script: Copyright (C) 2007 Andy Staudacher <ast@gmx.ch>
10
 * All Credits go to the Gallery 2 team!
11
 *
12
 * This program is free software; you can redistribute it and/or modify
13
 * it under the terms of the GNU General Public License as published by
14
 * the Free Software Foundation; either version 2 of the License, or (at
15
 * your option) any later version.
16
 *
17
 * This program is distributed in the hope that it will be useful, but
18
 * WITHOUT ANY WARRANTY; without even the implied warranty of
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20
 * General Public License for more details.
21
 *
22
 * You should have received a copy of the GNU General Public License
23
 * along with this program; if not, write to the Free Software
24
 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA  02110-1301, USA.
25
 */
26
/**
27
 * Script to:
28
 *    - download the extplorer.zip / tar.gz from a known server directly to the
29
 *      server where the script is running.
30
 *    - extract the extplorer.zip / tar.gz archive directly on the server
31
 * @package Preinstaller
32
 * @author: Andy Staudacher <ast@gmx.ch>
33
 * @version $Revision$
34
 * @version  2.0.0
35
 */
36
error_reporting(E_ALL);
37
set_time_limit(900);
38

  
39
/*****************************************************************
40
 * C O N F I G U R A T I O N
41
 *****************************************************************/
42
/* Download Location */
43
$downloadUrls = array();
44
/* Hardcoded defaults / fallbacks (we try to find out these URLs during runtime) */
45
/*   Latest Release Candidate */
46
//$downloadUrls['rc'] = 'http://prdownloads.sourceforge.net/gallery/gallery-2.2-rc-2-full';
47
/*   Latest stable release */
48
$downloadUrls['stable'] = '';
49
/*   Latest beta version */
50
$downloadUrls['latest']= 'http://prdownloads.sourceforge.net/extplorer/extplorer_2.0.0_beta4.zip';
51
$downloadUrls['beta']= 'http://prdownloads.sourceforge.net/extplorer/extplorer_2.0.0_beta4.zip';
52

  
53
/* The page on GMC that lists the latest versions */
54
/* FOR GR, we request pages from sf.net which then redirects to GMC, e.g. to /release, /beta, .. */
55
$versionCheckUrl = 'http://virtuemart.net/index2.php?option=com_versions&catid=5&task=feed';
56

  
57
/* Local name of the extplorer archive (without extension )*/
58
$archiveBaseName = 'extplorer';
59
/* A list of folder permissions that are available for chmodding */
60
$folderPermissionList = array('777', '755', '555');
61
/* Archive extensions available for download */
62
$availableExtensions = array('zip', 'tar.gz');
63
/* Available versions of extplorer */
64
//$availableVersions = array('stable', 'rc', 'beta');
65
$availableVersions = array('beta');
66

  
67
/*****************************************************************
68
 * M A I N
69
 *****************************************************************/
70
compatiblityFunctions();
71
$preInstaller = new PreInstaller();
72
$preInstaller->main();
73

  
74
/*****************************************************************
75
 * C L A S S E S
76
 *****************************************************************/
77
class PreInstaller {
78

  
79
    function main() {
80
	/* Authentication */
81
	$this->authenticate();
82

  
83
	/* Register all extract / download methods */
84
	$this->_extractMethods =  array(new UnzipExtractor(),
85
					new PhpUnzipExtractor(),
86
					new TarGzExtractor(),
87
					new PhpTarGzExtractor());
88
	$this->_downloadMethods = array(new CurlDownloader(),
89
					new WgetDownloader(),
90
					new FopenDownloader(),
91
					new FsockopenDownloader());
92

  
93
	/* Make sure we can write to the current working directory */
94
	if (!Platform::isDirectoryWritable()) {
95
	    render('results', array('failure' => 'Local working directory' . dirname(__FILE__) .
96
				    ' is not writeable!',
97
				    'fix' => 'ftp> chmod 777 ' . basename(dirname(__FILE__))));
98
	    exit;
99
	}
100

  
101
	/* Handle the request */
102
	if (empty($_POST['command'])) $command = '';
103
	else $command = trim($_POST['command']);
104
	switch ($command) {
105
	    case 'extract':
106
		/* Input validation / sanitation */
107
		if (empty($_POST['method'])) $method = '';
108
		else $method = trim($_POST['method']);
109
		if (!preg_match('/^[a-z]+extractor$/', $method)) $method = '';
110
		/* Handle the request */
111
		if (class_exists($method)) {
112
		    global $archiveBaseName;
113
		    $extractor = new $method;
114
		    if ($extractor->isSupported()) {
115
			$archiveName = dirname(__FILE__) . '/' .
116
				$archiveBaseName .  '.' . $extractor->getSupportedExtension();
117
			if (file_exists($archiveName)) {
118
			    $results = $extractor->extract($archiveName);
119
			    if ($results === true) {
120
				/* Make sure the dirs and files were extracted successfully */
121
				if (!$this->integrityCheck()) {
122
				    render('results', array('failure' => 'Extraction was successful, but coarse integrity check failed'));
123
				} else {
124
				    render('results', array('success' => 'Archive successfully extracted'));
125

  
126
				    /*
127
				     * Set the permissions in the extplorer dir may be such that
128
				     * the user can modify login.txt
129
				     */
130
				    @chmod(dirname(__FILE__) . '/extplorer', 0777);
131
				}
132
			    } else {
133
				render('results', array('failure' => $results));
134
			    }
135
			} else {
136
			    render('results', array('failure' => "Archive $archiveName does not exist in the current working directory"));
137
			}
138
		    } else {
139
			render('results', array('failure' => "Method $method is not supported by this platform!"));
140
		    }
141
		} else {
142
		    render('results', array('failure' => 'Extract method is not defined or does not exist!'));
143
		}
144
		break;
145
	    case 'download':
146
		/* Input validation / sanitation */
147
		/* The download method */
148
		if (empty($_POST['method'])) $method = '';
149
		else $method = trim($_POST['method']);
150
		if (!preg_match('/^[a-z]+downloader$/', $method)) $method = '';
151
		/* ... archive extension */
152
		if (empty($_POST['extension'])) $extension = '';
153
		else $extension = trim($_POST['extension']);
154
		if (!preg_match('/^([a-z]{2,4}\.)?[a-z]{2,4}$/', $extension)) {
155
		    render('results', array('failure' => 'Filetype for download not defined, please retry'));
156
		    exit;
157
		}
158
		global $availableExtensions, $availableVersions;
159
		if (!in_array($extension, $availableExtensions)) $extension = 'zip';
160
		/* eXtplorer version (stable, rc, beta, nightly snapshot) */
161
		if (empty($_POST['version'])) $version = '';
162
		else $version = trim($_POST['version']);
163
		//if (!in_array($version, $availableVersions)) $version = 'latest';
164
		if (class_exists($method)) {
165
		    $downloader = new $method;
166
		    if ($downloader->isSupported()) {
167
			global $archiveBaseName;
168
			$archiveName = dirname(__FILE__) . '/' . $archiveBaseName . '.' . $extension;
169
			/* Assemble the downlod URL */
170
			$url = $this->getDownloadUrl($version, $extension, $downloader);
171
			$results = $downloader->download($url, $archiveName);
172
			if ($results === true) {
173
			    if (file_exists($archiveName)) {
174
				@chmod($archiveName, 0777);
175
				render('results', array('success' => 'File successfully downloaded'));
176
			    } else {
177
				render('results', array('failure' => "Download failed, local file $archiveName does not exist"));
178
			    }
179
			} else {
180
			    render('results', array('failure' => $results));
181
			}
182
		    } else {
183
			render('results', array('failure' => "Method $method is not supported by this platform!"));
184
		    }
185
		} else {
186
		    render('results', array('failure' => 'Method is not defined or does not exist!'));
187
		}
188
		break;
189
	    default:
190
		/* Discover the capabilities of this PHP installation / platform */
191
		$capabilities = $this->discoverCapabilities();
192
		$capabilities['extplorerFolderName'] = $this->findExtplorerFolder();
193
		if (file_exists(dirname(__FILE__).'/'.$capabilities['extplorerFolderName'].'/index.php')) {
194
		    $statusMessage  = '<a href="index.php" title="Go to eXtplorer now!">Ready for usage</a> (<span style="color:green;font-weight:bold;">eXtplorer seems to be installed!</span>)';
195
		} else if (!empty($capabilities['anyArchiveExists'])) {
196
		    $statusMessage = 'Archive ready for extraction';
197
		} else {
198
		    $statusMessage =
199
			'No archive in current working directory, please start with step 1';
200
		}
201
		$capabilities['statusMessage'] = $statusMessage;
202
		/* Are we in RC stage?*/
203
		if (!empty($capabilities['downloadMethods'])) {
204
		    foreach ($capabilities['downloadMethods'] as $dMethod) {
205
			if ($dMethod['isSupported']) {
206
			    $capabilities['showRcVersion'] =
207
					$this->shouldShowRcVersion(new $dMethod['command']);
208
			    break;
209
			}
210
		    }
211
		}
212
		render('options', $capabilities);
213
	}
214
    }
215

  
216
    function authenticate() {
217
	global $passPhrase;
218

  
219
	/* Check authentication */
220
	if (empty($passPhrase)) {
221
	    render('missingPassword');
222
	    exit;
223
	} else if (strlen($passPhrase) < 6) {
224
	    render('passwordTooShort');
225
	    exit;
226
	} else if (!empty($_COOKIE['EXTPREINSTALLER']) &&
227
			trim($_COOKIE['EXTPREINSTALLER']) == md5($passPhrase)) {
228
	    /* Already logged in, got a cookie */
229
	    return true;
230
	} else if (!empty($_POST['ext_password'])) {
231
	    /* Login attempt */
232
	    if ($_POST['ext_password'] == $passPhrase) {
233
		setcookie("EXTPREINSTALLER",md5($passPhrase),0);
234
		return true;
235
	    } else {
236
		render('passwordForm', array('incorrectPassword' => 1));
237
		exit;
238
	    }
239
	} else {
240
	    render('passwordForm');
241
	    exit;
242
	}
243
    }
244

  
245
    function discoverCapabilities() {
246
		global $archiveBaseName;
247
		$capabilities = array();
248
	
249
		$extractMethods = array();
250
		$extensions = array();
251
		$anyExtensionSupported = 0;
252
		$anyArchiveExists = 0;
253
		foreach	($this->_extractMethods as $method) {
254
		    $archiveName = $archiveBaseName . '.' . $method->getSupportedExtension();
255
		    $archiveExists = file_exists(dirname(__FILE__) . '/' . $archiveName) && filesize(dirname(__FILE__) . '/' . $archiveName) > 0;
256
		    $isSupported = $method->isSupported();
257
		    $extractMethods[] = array('isSupported' => $isSupported,
258
					      'name' => $method->getName(),
259
					      'command' => strtolower(get_class($method)),
260
					      'archiveExists' => $archiveExists,
261
					      'archiveName' => $archiveName);
262
		    if (empty($extensions[$method->getSupportedExtension()])) {
263
				$extensions[$method->getSupportedExtension()] = (int)$isSupported;
264
		    }
265
		    if ($isSupported) {
266
				$anyExtensionSupported = 1;
267
		    }
268
		    if ($archiveExists) {
269
				$anyArchiveExists = 1;
270
		    }
271
		}
272
		$capabilities['extractMethods'] = $extractMethods;
273
		$capabilities['extensions'] = $extensions;
274
		$capabilities['anyExtensionSupported'] = $anyExtensionSupported;
275
		$capabilities['anyArchiveExists'] = $anyArchiveExists;
276
	
277
		$downloadMethods = array();
278
		foreach	($this->_downloadMethods as $method) {
279
		    $downloadMethods[] = array('isSupported' => $method->isSupported(),
280
					       'name' => $method->getName(),
281
					       'command' => strtolower(get_class($method)));
282
		}
283
		$capabilities['downloadMethods'] = $downloadMethods;
284
	
285
		return $capabilities;
286
    }
287

  
288
    function findExtplorerFolder() {
289
	/* Search in the current folder for a extplorer folder */
290
	$basePath = dirname(__FILE__) . '/';
291
	if (file_exists($basePath . 'extplorer') &&
292
		file_exists($basePath . 'extplorer/index.php')) {
293
	    return 'extplorer';
294
	}
295

  
296
	if (!Platform::isPhpFunctionSupported('opendir') ||
297
		!Platform::isPhpFunctionSupported('readdir')) {
298
	    return false;
299
	}
300

  
301
	$handle = opendir($basePath);
302
	if (!$handle) {
303
	    return false;
304
	}
305
	while (($fileName = readdir($handle)) !== false) {
306
	    if ($fileName == '.' || $fileName == '..') {
307
			continue;
308
	    }
309
	    if (file_exists($basePath . $fileName . '/index.php')) {
310
			return $fileName;
311
	    }
312
	}
313
	closedir($handle);
314

  
315
	return false;
316
    }
317

  
318
    function integrityCheck() {
319
	/* TODO, check for the existence of modules, lib, themes, main.php */
320
	return true;
321
    }
322

  
323
    function getDownloadUrl($version, $extension, $downloader) {
324
		global $downloadUrls;
325
	
326
		/* Default to the last known good version */
327
		$url = $downloadUrls['latest'];
328
	
329
		/* Try to get the latest version string */
330
		$currentDownloadUrls = $this->getLatestVersions($downloader);
331
		if (!empty($currentDownloadUrls[$version])) {
332
		    $url = $currentDownloadUrls[$version];
333
		}
334
	     
335
		return $url;
336
    }
337

  
338
    function getLatestVersions($downloader) {
339
		global $versionCheckUrl, $availableVersions;
340
	
341
		$tempFile = dirname(__FILE__) . '/availableVersions.txt';
342
		$currentVersions = array();
343
		/*
344
		 * Fetch the version information from a remote server and if we already have it,
345
		 * update it if it's older than an hour
346
		 */
347
		if (!file_exists($tempFile) || !(($stat = @stat($tempFile)) &&
348
			isset($stat['mtime']) && $stat['mtime'] > time() - 3600)) {
349
		    $downloader->download($versionCheckUrl, $tempFile);
350
		}
351
		/* Parse the fetched version information file */
352
		if (file_exists($tempFile)) {
353
		    $contents = @file_get_contents($tempFile);
354
			if($contents) {
355
		    	preg_match_all("/<comments>(.*?)<\/comments>/si", $contents, $versions );
356
		    	if( $versions ) {
357
		    		foreach($versions[1] as $version ) {
358
		    			$versionArr = explode('|', $version );
359
		    			$currentVersions[$versionArr[0]] = $versionArr[1];
360
		    		}
361
		    		
362
		    	}
363
					
364
			}
365
		}
366
	
367
		return $currentVersions;
368
    }
369

  
370
    function shouldShowRcVersion($downloader) {
371
	/*
372
	 * Only show the rc version (along with the stable and beta) if we're in a
373
	 * release candidate stage
374
	 */
375

  
376
	 $currentDownloadUrls = $this->getLatestVersions($downloader);
377
	 return isset($currentDownloadUrls['rc']);
378
    }
379
}
380

  
381
class Platform {
382
    /* Check if a specific php function is available */
383
    function isPhpFunctionSupported($functionName) {
384
	if (in_array($functionName, split(',\s*', ini_get('disable_functions'))) || !function_exists($functionName)) {
385
	    return false;
386
	} else {
387
	    return true;
388
	}
389
    }
390

  
391
    /* Check if a specific command line tool is available */
392
    function isBinaryAvailable($binaryName) {
393
	$binaryPath = Platform::getBinaryPath($binaryName);
394
	return !empty($binaryPath);
395
    }
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff