<?php
	$project_name = "PHP Traverser";
	$keywords     = 'php,traverse,traverser,dir,directory,browse,subdir,subdirectory,password,protection,'.
		'phptraverse,download,list,tree,index,jabba,jabba laci,code,recursive,recursively,autolink,'.
		'password protection,session,traverse,file traverse,download button,mass download';
	$version      = "0.8.2.2";
   $action = 'traverse.php';

	# for the navigation panel
	$ref1 = "http://www.hotscripts.com/Detailed/16749.html";
	$ref2 = "http://webloria.loria.fr/~szathmar/off/projects/php/phptraverse2/index.php";

 	$lastmod = preg_replace("/ /","&nbsp;","Last modified: " . date ("Y.m.d, H:i, M., D", getlastmod()));

?>
<html>
<head>
<title><?php print $project_name; ?></title>
<meta name="keywords" content="<?php print $keywords; ?>">
<link rel="stylesheet" type="text/css" href="assets/css_js/stylesheet_index.css">
<script language="JavaScript" src="assets/css_js/open_win.js"></script>
</head>
<body bgcolor="#EAF1FD">
<a name="top"></a>
<table width="100%" border="0" cellpadding="10">
   <tr> 
      <td width="33%" align="left"><img src="assets/pics/jabba_logo.gif" alt="a nice photo of my face :D"></td>
      <td align="center" width="34%"> 
		<table>
			<tr>
				<td align="center"><h1><?php print $project_name; ?></h1>
				</td>
			</tr>
			<tr><td align="center">Latest version: <?php print $version; ?><p>
				</td>
			</tr>
			<tr><td align="center">
               <font color="green">&gt;&gt;&gt;</font>
               <a href="<?php print $action; ?>">Instant action (online demo)</a>
               <font color="green">&lt;&lt;&lt;</font><br />
				</td>
			</tr>
		</table>
      </td>
      <td align="right" width="33%"> 
			<?php
				include("assets/navigation.inc.php");
			?>
		</td>
   </tr>
</table>
<br>
<hr>
<p> 
<p>Quick jump: [ <a href="traverse.php?dir=.&sitemap=1">GraphViz Sitemap example</a> ]</p>
<table border="0">
   <tr> 
      <td><img src="assets/pics/whatsnew.gif" width="55" height="55" border="0" alt="What's new?"></td>
      <td>&nbsp;&nbsp;&nbsp;</td>
      <td> 
			<font color="red">Smarty template engine: </font><br />
         The script's HTML output is generated with the Smarty template engine. Now it's much easier
         to customize the output to your needs.<p />
      </td>
   </tr>
</table>
<p></p>
<table width="100%" border="0">
   <tr> 
      <td align="left"> 
         <ol type="1">
            <li><a href="#description">Short description</a></li>
            <li><a href="#why">What it is good for</a></li>
            <li><a href="#online_demo">Online demo</a></li>
            <li><a href="#download">Download</a></li>
            <li><a href="#install">Install</a></li>
            <li><a href="#modules">Modules</a></li>
            <li><a href="#plugins">Plugins</a></li>
            <li><a href="#ideas">Ideas/To do</a>
            <li><a href="#related">Related works</a>
            <li><a href="#history">Version history</a></li>
            <li><a href="#bugs">Known bugs</a></li>
            <li><a href="#tips">Tips</a></li>
            <li><a href="#todo">To do</a></li>
            <li><a href="#credits">Credits</a></li>
            <li><a href="#sites">Sites/pages where this script is used</a></li>
            <li><a href="#contact">Contact</a></li>
         </ol>
      </td>
      <td align="right"> 
         <!------ Start of HTML Code ------->
         <form action="http://www.hotscripts.com/cgi-bin/rate.cgi" method="POST">
            <input type="hidden" name="ID" value="16749">
            <table BORDER="0" CELLSPACING="0" bgcolor="#800000">
               <tr> 
                  <td align="center"> 
                     <table border="0" cellspacing="0" width="100%" bgcolor="#EFEFEF">
                        <tr> 
                           <td align="center" bgcolor="#BAD1AF" colspan="2"><font face="arial, verdana" size="2"><b>Rate 
                              My Program</b></font></td>
                        </tr>
                        <tr> 
                           <td align="center" bgcolor="#FDEEB3" colspan="2"><a href="http://www.hotscripts.com" style="text-decoration: none"> 
                              <font face="verdana, arial" size="1"><b>@ HotScripts.com</b></font></a> 
                              <table border="0" cellspacing="0" width="100%" bgcolor="#EFEFEF">
                                 <tr> 
                                    <td> 
                                       <input type="radio" value="5" name="ex_rate">
                                    </td>
                                    <td> <font face="arial, verdana" size="2">Excellent!</font></td>
                                 </tr>
                                 <tr> 
                                    <td> 
                                       <input type="radio" value="4" name="ex_rate">
                                    </td>
                                    <td> <font face="arial, verdana" size="2">Very 
                                       Good</font></td>
                                 </tr>
                                 <tr> 
                                    <td> 
                                       <input type="radio" value="3" name="ex_rate">
                                    </td>
                                    <td> <font face="arial, verdana" size="2">Good</font></td>
                                 </tr>
                                 <tr> 
                                    <td> 
                                       <input type="radio" value="2" name="ex_rate">
                                    </td>
                                    <td> <font face="arial, verdana" size="2">Fair</font></td>
                                 </tr>
                                 <tr> 
                                    <td> 
                                       <input type="radio" value="1" name="ex_rate">
                                    </td>
                                    <td> <font face="arial, verdana" size="2">Poor</font></td>
                                 </tr>
                                 <tr> 
                                    <td align="center" colspan="2"> 
                                       <input type="submit" value="Cast My Vote!">
                                    </td>
                                 </tr>
                              </table>
                           </td>
                        </tr>
                     </table>
                  </td>
               </tr>
            </table>
         </form>
         <!------- End of HTML Code ------->
      </td>
   </tr>
</table>
<p>
<hr>
<p>
<a name="description"></a> <strong>Description</strong><font size="-1"> ( <a href="#top">Top</a> 
)</font><br>
PHP Traverser is a script that makes a directory browsable recursively, i.e. with 
this script it is possible to browse a whole directory structure, where the root 
of this tree is the directory where the script was placed.<br>
Other features: download list of all the files in the current dir (for the fans of 
mass download), GraphViz sitemap visualisation, Search function (basic and 
advanced (regular expressions)), image and mp3 browser plugins, session-based 
shopping cart to easily collect files you want among directories.
 <a name="why"></a> 
<p><strong>What it is good for</strong><font size="-1"> ( <a href="#top">Top</a> 
   )</font><br>
   It is <u>ideal</u> if you want to share some stuff with your friends. You just 
   make a directory, place the script there and then you can drop in any files -- 
   the script will autolink everything. It's enough to send one link to your friends, 
   which points to the script.<br>
   I wrote it because on the webserver in my university the automatic <code>index.html</code> 
   generation in a requested directory was disabled (as well as CGI). First I wrote 
   a Perl script that made an HTML page, but it was static. Whenever the content 
   of the directory changed I had to rerun the script. So it was not very good. 
   Then I had the idea to write it in PHP. It's enough to put the script in a directory, 
   and voil: everything in this dir. and in every subdir. is available dynamically. 
   From the root point (where it is placed) it makes no link back, so you can be 
   sure that users will stay in the directory that you wanted to show them, except 
   if the parent of the root point also contains a copy of the script: in this case it will 
   join to the parent, and that will become the new root-point. This feature from now on 
   is disabled in default (you can enable it in the config file).

<a name="online_demo"></a>
<p><strong>Online demo</strong><font size="-1"> ( <a href="#top">Top</a> )</font></p>
   The <font color="red">etalon</font> is <a href="traverse.php">here</a>.<br>
<p>There are several more versions here; the only difference is the icon set, nothing 
   more, the rest of the code is the same. They may not be the latest version, they
	just demonstrate the icon sets. If you want to test the current version, try
	the etalon above.
<ul>
   <li><a href="demos/simple_default/traverse.php">simple, default icon set</a></li>
   <li><a href="demos/complex_hwsw/traverse.php">complex icon set (but still quite simple), 
      taken from www.hwsw.hu</a></li>
   <li><a href="demos/complex_kde_32/traverse.php">complex icon set, KDE style, 32 x 32 pixels</a> (for blind people :))</li>
   <li><a href="demos/complex_kde_26/traverse.php">complex icon set, KDE style, 26 x 26 pixels 
      (the same as above but a bit smaller)</a></li>
   <li><a href="demos/complex_kde_16/traverse.php">complex icon set, KDE style, 16 x 16 pixels 
		(the same as above but even smaller)</a></li>
</ul>
<p>An online demo of the <font color="red">password protected</font> version is 
   available <a href="demos/pwd_protected/traverse.php">here</a>. The code is: <code><strong>http://www.doug-long.com/szilard.htm</strong></code> 
   (just copy-paste the text in bold)<br>
   (The source of all these versions is the same, only one variable is changed ). 
<p> Note that this password protection is done by sessions. Its feature is that 
   it is joined to your browser. Once you enter the correct code, it'll always let 
   you in, so while testing don't be surprised that it asks the password only once. 
   To close the session you can kill it by calling this script: 
   <a href="kill_session.php">kill_session.php</a>.
<!-- separator -->
<a name="download"></a> 
<p><strong>Download</strong><font size="-1"> ( <a href="#top">Top</a> )</font><br>
   You can download the source and its components <a href="phptraverse.tar.gz">here</a>.<p>
   <a href="http://www.loria.fr/~szathmar/off/projects/php/old_versions/traverse.php">Older versions</a> are also available.
<!-- separator -->
<a name="install"></a> 
<p><strong>Install</strong><font size="-1"> ( <a href="#top">Top</a> )</font><br>
   Just download the compressed file and unpack it (under Linux: <code>tar xvzf 
   phptraverse.tar.gz</code> , under Windows use <a href="http://www.rarlab.com/">WinRAR</a>). 
   Put the <font face="Courier New, Courier, mono" size="-1">assets</font> directory 
   somewhere in your web page, and modify the script's code a bit: change the variable 
   <font face="Courier New, Courier, mono"> <font size="-1">$BASE</font></font> 
   and <font face="Courier New, Courier, mono" size="-1">$BASE_URL</font>. Both 
   of them will have to point to your <font face="Courier New, Courier, mono" size="-1">assets</font> 
   directory, but while <font face="Courier New, Courier, mono" size="-1">$BASE</font> 
   must be an absolute path, <font face="Courier New, Courier, mono" size="-1">$BASE_URL</font> 
   is a URL to the assets directory. This directory contains the necessary icons, 
   JavaScript and CSS files. <img src="assets/pics/new.gif" width="31" height="12">The configuration part
	is separated from the code, so all you have to do is to set up the variables properly according
	to your system, and you can copy traverse.php to more places -- just don't forget to 
	change the include path of the config file. 
	<p>If you want to use <strong><font color="red">password protection</font></strong>: 
   the installation process is almost the same, the only difference is that now 
   we need a password file which contains the encoded password. To generate this 
   file you should run the <font face="Courier New, Courier, mono" size="-1">passgen.php</font> 
   script that is located in the <font face="Courier New, Courier, mono" size="-1">assets/pass_gen</font> 
   directory (<font face="Courier New, Courier, mono" size="-1">./assets/pass_gen/passgen.php</font>). 
   Just type in the password and encode it, then copy-paste the encoded string to the password
	file (<font face="Courier New, Courier, mono" size="-1">traverse.pwd</font>). 
   You can rename the file, but then don't forget to change it in the config file  
   too!!! Security tip: place the password file <u>outside</u> of the directory 
   where <font face="Courier New, Courier, mono" size="-1">traverse.php</font> is, 
   and in the config file use absolute path to the pasword file. Another tip: change
	the name of the password file too (a hacker will first try to download the default filename).
	If you want password protection you only have to change one 
   variable (documented in the config file).<br>
   <br>
   There are 3 possibilities now to set password protection: 
<ol>
   <li>OFF: no password protection at all</li>
   <li>ON: password protection is always switched on, i.e. the dir. where the script 
      is placed and every subdirectory is protected. Simply: everything is protected.</li>
   <li>OPTIONAL: only those directories are protected where a password file exists. 
      When to use it? When you don't want to protect all the directories just some 
      of them. (Note: you may use different password files, but then the script 
      will always ask for the new password when you try to access for the first time).
	</li>
</ol>
<p></p>
<p>If you want to use <strong><font color="red">directory descriptions</font></strong>: 
   make a <code>traverse.nfo</code> file in the given directory (this is its default 
   name which can be changed, but don't forget to modify the source code too!), 
   and write your description into it. I have included a simple Perl script that 
   generates a template file with the subdirectory and file names of the directory 
   where you run it. You can find it in the <font face="Courier New, Courier, mono" size="-1">./assets/description_gen/</font> 
   directory, its default name is <code>description_gen.pl</code>. Usage: <code>./description_gen.pl 
   > traverse.nfo</code>. After this you only have to add your descriptions. It 
   is possible that you included a file in <font face="Courier New, Courier, mono" size="-1">traverse.nfo</font>, 
   but <font face="Courier New, Courier, mono" size="-1">traverse.php</font> doesn't 
   show it. Why? It may have several reasons: <b>1)</b>&nbsp;<font face="Courier New, Courier, mono" size="-1">traverse.php</font> 
   has no rights to read this dir/file. <b>2)</b> maybe in the config file 
   you disabled this dir/file. Check the <font face="Courier New, Courier, mono" size="-1">$dontShowArray</font>! 
   Be sure that <font face="Courier New, Courier, mono" size="-1">traverse.nfo</font> 
   is readable (Linux: <code>chmod 644 traverse.nfo</code>). Important! <font face="Courier New, Courier, mono" size="-1">$dontShowArray</font> 
   is global, it is set for each directory, while <font face="Courier New, Courier, mono" size="-1">traverse.ex</font> 
   is local, i.e. it is applied only for the dir. where it is placed.</p>
<p><strong><font color="red">Mimetypes: </font></strong>at last they are here. All 
   you have to do is to change the <code>$mimetypesConfigArray</code> variable in 
   the config file (instructions included there). The icons are in the <code>assets</code> 
   directory. If you want to use your own icons, read the instructions in the <code>assets/mimetypes_20021111.php</code> 
   file. In the <a href="#online_demo">online demo</a> section you can check the 
   available icon sets. </p>
<a name="logging"></a> 
<p><strong><font color="red">Logging: </font></strong>completely new feature. With this you can monitor
which file how many times has been clicked on. For more info see the config file, look for the
<code>$log_click</code> array. !!! If you want to use this feature, allow it in the config file !!!
The script will write to a log file whose default name is
<code>traverse_clk.log</code>. On our university webserver I use 755 rights to directories and 644 for files. In
this environment the script has no rights to create a new file, but giving write permissions for the
directories is to be avoided too, as others have shell access to this server. So my idea is: let's create
empty log files in every directory and make them readable/writeable (chmod 646). Thus the script can manipulate
the log files. So I have written a simple bash script (in the <code>assets/empty_logfile_gen</code> dir.),
called <code>empty_logfile_gen.sh</code>. Copy it to the dir. where the script is located, and run it there. 
It'll touch the log file (create it if not yet exists) and set its rights. Then delete the bash script from there. 
Whenever you add some new subdirectories, you should rerun this script to create the empty log files. It won't
do any harm to already existing log files. Under Windows I think you can also run the bash script using the 
<a href="http://www.cygwin.com/">Cygwin</a> environment, but first try the traverser script, maybe it can create
log files (at home it worked for me).<br /><br />
Maybe it's not the nicest solution, but if you have a better idea, tell me :)
</p>
<!-- -->
<a name="modules"></a> 
<p><strong>Modules</strong><font size="-1"> 
   ( <a href="#top">Top</a> )</font></p>
<u>Dynamic GraphViz Sitemap:</u><br>
With this module you can easily
visualize the structure of your <i>whole</i> site! The module will explore recursively your site
from the point where you placed the traverse.php script, it will generate dynamically a tree of
your directory structure, and it adds an imagemap to this too, so <i>each node</i> in the graph <i>is
clickable</i>. This permits an extra-fast jumping among directories (paticulary useful if you have
a big website with lots of directories). 
<i><a href="traverse.php?dir=.&sitemap=1">example graph</a></i></p>

<p><i>History:</i> let me tell you the story of this module. A few months ago I had the idea to add some kind
of visualisation stuff to the project which would permit to see all the subdirectories. At that time I didn't know
about the <a href="http://www.research.att.com/sw/tools/graphviz/download.html">GraphViz</a> project, so I wanted to draw everything "by hand". After a short thinking phase I gave it up
saying it's too difficult :-). Later I tried <a href="http://www.w3.org/2001/11/IsaViz/">IsaViz</a> (an RDF visualisation tool), which also uses GraphViz, but
I didn't realize I could also use it. Then last week (October 2003) I found a project, which is almost what I 
wanted (<a href="http://urlgreyhot.com/graphviz/">http://urlgreyhot.com/graphviz/</a>). The main problem for me
with this project was that you have to send a formatted text file and you get a gif. But I needed something which
generates images on the fly on <i>my</i> webserver with an imagemap. (That project was not GPL at that time, but
changing some e-mails with its author he changed his mind). But this script was good to make me discover the
incredible <a href="http://www.research.att.com/sw/tools/graphviz/download.html">GraphViz</a> tool. Oh my, why
didn't I find it a few years ago? :-). This tool contains a graph-drawing software, called <i>dot</i>, to which
you send the description of a graph in plain text format (in its own language), and it sends back the graph
in the format you want. I found one more useful thing, the <a href="http://pear.php.net/package-info.php?package=Image_GraphViz">
Image_GraphViz</a> class in PHP's <a href="http://pear.php.net/">PEAR repository</a>. I modified this class
a bit to my needs.</p>

<p><i>Installation:</i> to make the sitemap work you need to install the <a href="http://www.research.att.com/sw/tools/graphviz/download.html">
GraphViz</a> software. From this we'll only use the programs <i>dot</i> and <i>neato</i>. Set the path to them
in Traverser's config file. We'll also need to write temporary files, its location must be set too (in default
under Unix you can use the /tmp directory). After this you should try <i>dot</i> from console first! 
Make a file (in.dot) with the next content:
<pre>
digraph G {
   node [fontsize=9];
   A [URL="http://host/a.html"];
   B [URL="http://host/b.html"];
   C [URL="http://host/c.html"];
   A -&gt; B;
   A -&gt; C;
}

</pre>
<table>
<tr>
<td>Then try to make a gif file of this:</td>
<td valign="bottom"><code>&nbsp;dot -Tgif  in.dot &gt; in.gif</code></td>
</tr>
<tr>
<td>Try also if the imagemap works:</td>
<td valign="bottom"><code>&nbsp;dot -Tcmap in.dot &gt; in.cmap</code></td>
</tr>
</table>
If everything was fine, you can try the sitemap in your browser.</p>

<p><u>Search:</u><br>
Now you can perform a search on the site where the script is placed. 
Both basic (exact string-match and substring-match) and advanced 
(Perl-like regular expressions) search are supported. For more info
click on the "Help" link in the search module's window, there you can find 
a longer description (see the online demo).

<p><img src="assets/pics/new.gif" width="31" height="12"><u>Basket:</u><br>
While browsing among directories now you can drop files into a shopping basket :-), 
and then get a download list at the end. Easy, ain't it? If enabled in the config file,
you'll have a coloumn 'Basket', where there is a link 'Add', that'll add the file to
the basket. On the top right hand corner you'll find a link to the basket manager (it also
shows the number of items in the cart).
<!-- -->
<a name="plugins"></a> 
<p><strong>Plugins</strong><font size="-1"> 
   ( <a href="#top">Top</a> )</font><br>
   To different mimetypes you can assign different plugins. 
   You can start a plugin by clicking on an icon on the left side. If something 
   is assigned to this extension then the plugin will start in a new window. If 
   you want to write your own plugin, you have to know that a plugin gets 3 information 
   as GET parameters:<br>
   <b>1)</b> the URL of the directory of the file on which you clicked<br>
   <b>2)</b> the directory of the file you clicked on <br>
   <b>3)</b> the name of the file you clicked on <br>
   I think they are enough to work with them. I wrote a template for plugins that 
   can be modified easily, it can be found in the <font face="Courier New, Courier, mono" size="-1">assets/plugins</font> 
   directory. Available plugins at the moment: <a name="history"></a> 
<p>&nbsp; 
<table width="100%" border="1">
   <tr bgcolor="#7ccee2"> 
      <th width="17%"> 
         <div align="center">Name of the plugin</div>
      </th>
      <th width="15%">Assigned extension(s)</th>
      <th width="38%">Origin</th>
      <th width="30%">Remark</th>
   </tr>
   <tr> 
      <td width="17%"> 
         <div align="center">MP3_ID 1.0</div>
      </td>
      <td width="15%" align="center">mp3</td>
      <td width="38%">Originally written by Sandy McArthur, now part of the <a href="http://pear.php.net/package/MP3_ID">PEAR</a> 
      </td>
      <td width="30%">MP3 tag reader/writer class.</td>
   </tr>
   <tr> 
      <td width="17%"> 
         <div align="center">PHPSlideShow v0.6.2</div>
      </td>
      <td width="15%" align="center">.gif, .jpg, .jpeg, .png</td>
      <td width="38%"> Greg Lawler, <a href="http://www.zinkwazi.com/pages.php?page_name=scripts">http://www.zinkwazi.com/pages.php?page_name=scripts</a> 
      </td>
      <td width="30%">The script was originally written by Greg, I have done some 
         modifications to make it &quot;pluggable&quot;.</td>
   </tr>
</table>
<p>How can you add your own plugin? First you have to register it in the config file (look for <code>$pluginsArray</code>).
   Write your plugin and put 
   it in the <font face="Courier New, Courier, mono" size="-1">assets/plugins/</font> 
   directory. These things have to match in the <font face="Courier New, Courier, mono" size="-1">traverse.php</font> 
   and in your plugin script: <b>a)</b> where the script is placed (I recommend 
   the default directory) <b>b)</b> the assigned extensions. <br>
   You don't have to write a plugin from scratch, first analyze the <font size="-1" face="Courier New, Courier, mono">template.class.php</font> 
   file and add your modifications. <br />
	Last step: don't forget to send me your excellent 
   plugins! :) I'll put them here. </p>
<p><strong>Version history</strong><font size="-1"> ( <a href="#top">Top</a> )</font><br>
<table border="1" cellpadding="3" color="black">
   <tr bgcolor="#7ccee2"> 
      <th>Version</th>
      <th>Date</th>
      <th>Remark</th>
   <tr> 
      <td><font class="tgversion">v0.8.2.2</font></td>
		<td>July 2005</td>
		<td>Oh God, I haven't touched my dear script for more than a year! At last 
      I integrated Christian Folini's https protocol patch. Sorry for the delay.</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.8.2.1</font></td>
		<td>June 2004</td>
		<td>Pagetime (time in milliseconds needed to generate the page) is added to the end of pages
      in HTML comment.</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.8.2</font></td>
		<td>March 2004</td>
		<td>In features it's the same as the previous 0.8.0 version. The only difference is that
      the HTML output is generated completely with the Smarty template engine, so the customization
      of the script has become much easier!</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.8.0</font></td>
		<td>Nov. 2003</td>
		<td>This is a milestone release with several new features. First: plugins are not independent PHP files
      any more but classes <u>in</u> traverse.php, thus within a plugin you can call functions located in
      Traverser. This way a plugin can also see just those files that are visible to Traverser (before 
      there was a bug that a plugin could read hidden files too, now it's over). New plugin added: mp3 
      browser. It gives lots of useful information about a song (like in Winamp). New feature: shopping basket.
      Now you can drop in any file anywhere in the filesystem. When you finished you can easily get a 
      download list of the selected files. This shopping cart is also integrated in the plugins, so
      if you like a song or an image, just click on 'Add'.</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.7.9.1</font></td>
		<td>Oct. 2003</td>
		<td>a bug fixed in the slideshow plugin</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.7.9</font></td>
		<td>Oct. 2003</td>
		<td>Search module is added, the GraphViz sitemap button works under IE too</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.7.8</font></td>
		<td>Oct. 2003</td>
		<td>Dynamic GraphViz Sitemap module is added.</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.7.5.1</font></td>
		<td>Oct. 2003</td>
		<td>Minor fix: joining to the parent script is now optional (default: no), so now you can rename traverse.php
			 to index.php safely. I got some feedback that the script behaves strangely when it is called index.php,
			 now I found out why :)</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.7.5</font></td>
		<td>Sept. 2003</td>
		<td>The data structure of the script until now was a big mass. Now I rewrote the inner structure completely, 
		    I think it became much easier to modify.</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.7.1</font></td>
		<td>19 Sept. 2003</td>
		<td>the script now allows <a href="#logging">logging</a> how many times a file has been clicked on</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.7.0.1</font></td>
		<td>11 Sept. 2003</td>
		<td>a little bug with special characters like in Portuguese is corrected</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.7.0</font></td>
		<td>26 June 2003</td>
		<td>bug in optional password protection corrected (thanks Paul), code simplified, beautified :). Config part got separated in another file.</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.6.2.1</font></td>
		<td>19 February 2003</td>
		<td>new KDE icon set (16x16), fast-jump thingie</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.6.2</font></td>
      <td>22 January 2003</td>
      <td>corrected KDE icons (thanks to Joel)</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.6.1</font></td>
      <td>15 January 2003</td>
      <td>several minor fixes</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.6.0</font></td>
      <td>25 Decembre 2002</td>
      <td>plugin support</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.5.0</font></td>
      <td>11&nbsp;Novembre&nbsp;2002</td>
      <td>different icons for different mimetypes</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.4.1</font></td>
      <td>10&nbsp;Novembre&nbsp;2002</td>
      <td>optional password protection for some (selected) subdirectories</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.4.0</font></td>
      <td>09&nbsp;Novembre&nbsp;2002</td>
      <td>in each directory you can select which files/dirs you want to hide</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.3.9.1</font></td>
      <td>04&nbsp;Novembre&nbsp;2002</td>
      <td>the parent dir. got a new image (thanks to Brandon)</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.3.9</font></td>
      <td>29 Octobre 2002</td>
      <td>now you can click on the gray line <u>anywhere</u>, it will follow the 
         link (thanks to Kim)</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.3.8</font></td>
      <td>26 Octobre 2002</td>
      <td>ALL the elements in the given directory can be described</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.3.7</font></td>
      <td>23 Octobre 2002</td>
      <td>source code completely restructured. CSS and JavaScript codes are <u>separated</u> 
         again. The code of PHP and of the generated HTML is much more readable.</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.3.6</font></td>
      <td>13 Octobre 2002</td>
      <td>directories are shown first, then files (like in Norton Commander clones)</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.3.5</font></td>
      <td>23 September 2002</td>
      <td>the download button can be switched off by changing a variable</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.3.4</font></td>
      <td>22 September 2002</td>
      <td>description can be added to the directories</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.3.3</font></td>
      <td>21 September 2002</td>
      <td>bug fix of the lattest feature (dir. names with spaces)</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.3.2</font></td>
      <td>20 September 2002</td>
      <td>bug fix, now the script can handle directories whose name contains spaces</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.3.1</font></td>
      <td>19 September 2002</td>
      <td>minor bug fixes</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.3.0</font></td>
      <td>15 September 2002</td>
      <td>download-list can be generated, the CSS definition is placed in the body 
         of the script, not separated any more</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.2.9</font></td>
      <td>28 July 2002</td>
      <td>password protection is added</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.2.2</font></td>
      <td>27 July 2002</td>
      <td>better customization, DHTML support can be switched off (for Opera), looks 
         nice again in Netscape 4.x</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.2.1</font></td>
      <td>18 July 2002</td>
      <td>a serious bug corrected thanks to Ly0n (users could browse in parent directories)</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.2.0</font></td>
      <td>17 July 2002</td>
      <td>bug fixed with pointer to parent directory when it also contained traverse.php; 
         CSS support added</td>
   </tr>
   <tr> 
      <td><font class="tgversion">v0.1.0</font></td>
      <td>May 2002</td>
      <td>first implementation</td>
   </tr>
</table>
<!-- -->
<a name="bugs"></a> 
<p><strong>Known bugs</strong><font size="-1"> ( <a href="#top">Top</a> )</font><br>
Don't use the search module if your password protection is optional. At the moment the script will
also show the files in these directories too. I want to correct it in a future version. Solution at the 
moment: if you have optional password protection, switch off the search option.<p>
<!-- -->
<a name="tips"></a> 
<p><strong>Tips</strong><font size="-1"> ( <a href="#top">Top</a> )</font><br>
   Here are some tips that may not be completely evident: 
<ul>
	<li>Performance tuning: if you have lots of files in a directory, then it can be a good
		 idea to switch dhtml and on_click effects off in the config file, they produce lots of
		 html output taking the bandwidth. You can also play with the 'coloumns' array in the config file
		 what to show/hide to reduce the size of the html result.
   <li>I'm trying to document the source code as well, so if something is not clear 
      here, read the comments of the source too! 
   <li>When you move the mouse over a line, a gray rectangle highlights the row. 
      You can click <i>anywhere</i> in this rectangle to follow the link! 
   <li>If you want to see an image, click on the icon on the left! Thus an image 
      viewer plugin will start. 
   <li>If you want to download everything in a given directory, time to explore 
      the "Download" button! Then save the generated list (for ex. <code>list.txt</code>) 
      and simply pass it to a download manager (<code>wget -i list.txt</code>). Don't worry
		if in the browser the generated list seems a mess (I mean that filenames are together,
		not each in a new line). It is because it's a text file, not HTML. But when you save it,
		it'll be correct.
</ul>
<a name="ideas"></a> 
<p><strong>Ideas / To do</strong><font size="-1"> ( <a href="#top">Top</a> )</font><br>
Some future ideas that should/could be implemented <b><i><font color="#FF0000">as 
   plugins</font></i></b>: 
<table width="100%" border="1" cellpadding="3">
   <tr bgcolor="#7ccee2"> 
      <th> 
         <div align="center">Assigned extension(s)</div>
      </th>
      <th> 
         <div align="center">Idea&nbsp;from</div>
      </th>
      <th>Description</th>
   </tr>
   <tr> 
      <td> 
         <div align="center">.zip, .rar, etc.</div>
      </td>
      <td> 
         <div align="center">Max&nbsp;Headroom</div>
      </td>
      <td>content reader :) Yeah, that would be nice! Any idea how to do that? A 
         very simple solution: get a list using the appropriate packer (run it in 
         a process) and show the output. If there's already a PHP modul for this, 
         let me know.</td>
   </tr>
</table>
<p><i><font color="#FF0000"><b>Other</b></font></i> ideas:<br>
<table width="100%" border="1" cellpadding="3">
   <tr bgcolor="#7ccee2"> 
      <th> 
         <div align="center">Idea&nbsp;from</div>
      </th>
      <th>Description</th>
   </tr>
   <tr> 
      <td> 
         <div align="center">&nbsp;</div>
      </td>
      <td>the order of file list should be changable (ascending/descending by type 
         -- file or dir., and by size)</td>
   </tr>
   <tr> 
      <td> 
         <div align="center">Celso</div>
      </td>
      <td>create a list with the recent updates</td>
   </tr>
   <tr> 
      <td> 
         <div align="center">Celso</div>
      </td>
      <td>create a list of the most downloaded files</td>
   </tr>
</table>
<p>Otherwise I'm getting to run out of ideas, so let me know what you would like 
   to see in the script...</p>
<!-- -->
<a name="related"></a> 
<p><strong>Related works</strong><font size="-1"> ( <a href="#top">Top</a> )</font><br>
I agree that open source softwares should link to each other more, offering the public
a greater range of choice. Here I'll collect other projects that are related to this
in some sense.
<ul>
<li><a href="http://pathalizer.bzzt.net/">Pathalizer</a> is a tool to visualize the paths most users take when browsing a website. 
This information can then be used to decide how to improve the navigation of the site, 
and which parts are most worth improving and keeping up to date. In short, pathalizer generates a directed, 
weighed graph from an apache log (but it's easy to modify the first part of the process to use 
pathalizer for lists of other events). <a href="http://pathalizer.bzzt.net/example/wiki-access.logs.png">View a screenshot</a>.
<li>The goal of the <a href="http://autoindex.sourceforge.net/">Autoindex</a>
project is to create a "Windows Explorer" that can be used to browse through
folders on websites. In its function this project is very similar to PHP
Traverser. Autoindex also supports file upload.
</ul>
<!-- -->
<a name="credits"></a> 
<p><strong>Credits</strong><font size="-1"> ( <a href="#top">Top</a> )</font><br>
I am very grateful for every remark. Without your ideas/support I would have 
   stopped around version 0.3.0.<br>
   The following people have contributed code snippets, bug fixes, ideas: Ly0n, 
   Jeff, Aaron, Robert, tom, Kim (sun818@TekGems), Max&nbsp;Headroom, Brandon, Joel, Paul Richmond,
	Celso Rodrigues, Antonio Nereu, Leknor, Glenn, Martin Carlsson, Christian Folini,
   Pete Ebeid
   <a name="sites"></a> 
<p><strong>Sites/pages where this script is used</strong><font size="-1"> ( <a href="#top">Top</a> 
   )</font><br>
   If you use my script in a public location then I would be happy to put a link 
   here to your page! This way others could see the script in action too! :) So 
   far:</p>
<table width="100%" border="1" cellpadding="3">
   <tr bgcolor="#7ccee2"> 
      <th> 
         <div align="center">No.</div>
      </th>
      <th> 
         <div align="center">URL</div>
      </th>
      <th> 
         <div align="center">Maintainer</div>
      </th>
      <th>Remark</th>
   </tr>
   <tr> 
      <td> 
         <div align="center">1.</div>
      </td>
      <td align="right"> 
         <div align="center"><a href="http://www.maxheadroom.nu/files">http://www.maxheadroom.nu/files</a></div>
      </td>
      <td align="right"> 
         <div align="center">Daniel Johansson, a.k.a. Max&nbsp;Headroom</div>
      </td>
      <td>Max sent me very useful ideas, bug reports. v0.6.1. was mainly inspired 
         by his ideas </td>
   </tr>
   <tr> 
      <td> 
         <div align="center">2.</div>
      </td>
      <td align="right"> 
         <div align="center"><a href="http://tekgems.com/dl/">http://tekgems.com/dl/</a></div>
      </td>
      <td align="right"> 
         <div align="center">sun w. kim &lt;sun818@TekGems&gt;</div>
      </td>
      <td>&nbsp;</td>
   </tr>
   <tr> 
      <td> 
         <div align="center">3.</div>
      </td>
      <td align="right"> 
         <div align="center"><a href="http://www.mofra.org.br/cgi-mofra/biblio/arq/Documentos/">http://www.mofra.org.br/cgi-mofra/biblio/arq/Documentos/</a></div>
      </td>
      <td align="right"> 
         <div align="center">Celso Rodrigues</div>
      </td>
      <td>Celso gave me lots of good ideas (for ex. the logging)</td>
   </tr>
   <tr> 
      <td> 
         <div align="center">4.</div>
      </td>
      <td align="right"> 
         <div align="center"><a href="http://weblog.ods.org/ftp.php">http://weblog.ods.org/ftp.php</a></div>
      </td>
      <td align="right"> 
         <div align="center">Liu Yu-sheng</div>
      </td>
      <td>&nbsp;</td>
   </tr>
</table>
<p> <a name="contact"></a> 
<p><strong>How to contact me</strong><font size="-1"> ( <a href="#top">Top</a> )</font><br>
   You can send your ideas/questions to the project's <a href="http://phptraverse.sourceforge.net/forum">forum</a>.
   It is new (started in March, 2004), I hope you'll like it. You can also contact me
   directly if you want at <a href="mailto: szathml@delfin.unideb.hu">szathml@delfin.unideb.hu</a>. I am 
   not great at webdesign, so you can send me advises how to improve the layout 
   of this page and the traverse.php as well. Or if you find some grammatical errors, 
   let me know too :) Enjoy using this useful script! 
<hr>
<table width="100%" border="0" cellpadding="10">
   <tr>
		<td align="left">
			<table border="1" cellpadding="5">
				<tr> 
					<td><font size="-1"><strong>Created by Laszlo Szathmary, alias Jabba Laci, 
						2002--2005</strong></font><br>
					</td>
					<td> <font size=1 color="#EAF1FD"> <a target="_top" href="http://w.extreme-dm.com/?login=jabbala2"> 
						<img name=im src="http://w1.extreme-dm.com/i.gif" height=38
			border=0 width=41 alt=""></a> 
						<script language="javascript"><!--
			an=navigator.appName;d=document;function
			pr(){d.write("<img src=\"http://w0.extreme-dm.com",
			"/0.gif?tag=jabbala2&j=y&srw="+srw+"&srb="+srb+"&",
			"rs="+r+"&l="+escape(d.referrer)+"\" height=1 ",
			"width=1>");}srb="na";srw="na";//-->
			</script>
						<script language="javascript1.2"><!--
			s=screen;srw=s.width;an!="Netscape"?
			srb=s.colorDepth:srb=s.pixelDepth;//-->
			</script>
						<script language="javascript"><!--
			r=41;d.images?r=d.im.width:z=0;pr();//-->
			</script>
						<noscript><img height=1 width=1 alt="" 
			src="http://w0.extreme-dm.com/0.gif?tag=jabbala2&j=n"></noscript> </font> </td>
				</tr>
			</table>
		</td>
		<td align="right">
			<?php
				include("assets/navigation.inc.php");
			?>
		</td>
	</tr>
</table>
<?php print $lastmod; ?>
</body>
</html>
