I got it im giving complete code to allow even expandable file structure hope this helps someone besides my self. as note i changed quite a bit. if you want the java files just ask and i will send them to you
<?php/* Rendering */ function list_dir($path) { $items = get_sorted_entries($path); if (!$items) return; foreach($items as $item) { if ($item->type=='dir') { echo ("<li><img alt='PDF' src='../../../images/Folder.png'>".$item->entry."\n"); echo "<ul>\n";list_dir($item->full_path); } else { echo "<img alt='PDF' src='../../../images/PDF.png'> ".$item->entry."<br/>";} } echo "</ul>"; echo "</li>\n";} /* Finding */ function get_sorted_entries($path) { $dir_handle = @opendir($path) ; $items = array(); while (false !== ($item = readdir($dir_handle))) { $dir =$path.'/'.$item; if ( $item == '.' || $item =='..' ) continue; if(is_dir($dir)) { $items[] = (object) array('type'=>'dir','entry'=>$item, 'full_path'=>$dir); } else { $items[] = (object) array('type'=>'file','entry'=>$item, 'full_path'=>$dir); } } closedir($dir_handle); usort($items,'_sort_entries'); return $items; } /* Sorting */ function _sort_entries($a, $ { return strcmp($a->entry,$b->entry); }?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://forums.xisto.com/no_longer_exists/ xmlns="http://forums.xisto.com/no_longer_exists/; <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/> <title>TITLE</title> <link rel="stylesheet" href="../jquery.treeview.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script> <script src="../lib/jquery.cookie.js" type="text/javascript"></script> <script src="../jquery.treeview.js" type="text/javascript"></script> <script type="text/javascript" src="demo.js"></script> </head> <body> <div id="treecontrol"> <a title="Collapse the entire tree below" href="#"> Collapse All</a> | <a title="Expand the entire tree below" href="#"> Expand All</a> | <a title="Toggle the tree below, opening closed branches, closing open branches" href="#"> Toggle All</a> </div><ul id="red" class="treeview-red"><?php list_dir("directory you want to search"); ?> </ul><hr /> </body></html>
Untitled-1.pdf