// Joshua Eichorn
Joshua Eichorn jeichorn@phpdoc.org
If you have any problems with phpDocumentor, please visit the website: phpdocu.sourceforge.net and
submit a bug
";
}
// fancy_debug($path,$parent_indexes);
// vdump_par($parent);
if (!isset($parent_indexes[realpath($path)]))
{
$file = readdir($dir);
while ($file !== false) {
if ($file != '.' && $file != '..') {
if (@is_dir(realpath("$path$pd$file"))) {
if (!isset($parent_indexes[realpath($path)])) $parent_indexes[realpath($path)] = true;
$parent[realpath("$path$pd$file")] = &$rnode;
// echo "
adding new ".addslashes(realpath($path.$pd.$file))." to $path
";
$rnode->addItem(new DirNode(addslashes(realpath("$path$pd$file")),"javascript:setHelpVal('".addslashes(realpath($path.$pd.$file))."');",'folder.gif',addslashes(realpath($path.$pd.$file))));
}
}
$file = readdir($dir);
}
}
// go down the tree if possible
if (isset($parent_indexes[realpath($path)]))
{
if ($parenti + 1 > (count($rnode->items)))
{
// no more children, go back up to parent
// echo "$path no more children, go back up to parent ";
$rnode = &$parent[realpath($path)];
$path = $rnode->path;
if (isset($parent_indexes[realpath($path)])) $parenti = $parent_indexes[realpath($path)];
// echo $path." parenti $parenti
";
} else
{
// go to next child
// echo "$path go to next child ";
$parent_indexes[realpath($path)] = $parenti+1;
// debug("set parent ".$rnode->items[$parenti]->path." = ".$rnode->path.'
');
$parent[realpath($rnode->items[$parenti]->path)] = &$rnode;
$rnode = &$rnode->items[$parenti];
$path = $rnode->path;
// echo "$path
";
$parenti = 0;
}
} else
{
// no children, go back up the tree to the next child
// echo "$path no children, go back up to parent ";
$rnode = &$parent[realpath($path)];
$path = $rnode->path;
if (isset($parent_indexes[realpath($path)])) $parenti = $parent_indexes[realpath($path)];
// echo "$path parenti $parenti
";
}
@closedir($dir);
} while ($path && (($parenti < (count($rnode->items))) || ($parent[realpath($path)] !== false)));
}
function vdump_par($tree)
{
foreach($tree as $key => $val)
{
if ($val === false)
debug($key.' -> false
');
else
debug($key.' -> ' .$val->path.'
');
}
debug('
');
}
$menu = new HTML_TreeMenu();
$filename = '';
if (isset($_GET) && isset($_GET['fileName'])) $filename = $_GET['fileName'];
$filename = realpath($filename);
$pd = (substr(PHP_OS, 0, 3) == 'WIN') ? '\\' : '/';
$test = ($pd == '/') ? '/' : 'C:\\';
if (empty($filename) || ($filename == $test))
{
$filename = ($pd == '/') ? '/' : 'C:\\';
$node = false;
getDir($filename,$node);
} else
{
flush();
// if ($pd != '/') $pd = $pd.$pd;
$anode = false;
switchDirTree($filename,$anode);
// recurseDir($filename,$anode);
$node = new HTML_TreeNode(array('text' => "Click to view $filename",'link' => "",'icon' => 'branchtop.gif'));
$node->addItem($anode);
};
$menu->addItem($node);
$DHTMLmenu = &new HTML_TreeMenu_DHTML($menu, array('images' => 'HTML_TreeMenu-1.1.2/images'));
?>
";
echo "Parsing Files ...
";
flush();
echo "\n";
/** phpdoc.inc */
include("phpDocumentor/phpdoc.inc");
echo "
\n";
echo "Operation Completed!!
";
} else
{
?>
phpDocumentor v Web Interface
phpDocumentor written by Joshua Eichorn
Web Interface written by Juan Pablo Morales and enhanced by Greg Beaver
Help
use this to find directories and files which can be used below
printMenu();
?>
Juan Pablo Morales ju-moral@uniandes.edu.co
Gregory Beaver cellog@users.sourceforge.net
Last modified: $Date: 2005/10/17 18:15:16 $
Revision: $Revision: 1.1 $