function queue_action($patient_id = "") { $messages = $this->_tpl_vars['messages']; $queue_files = array(); //see if the repository exists and it is a directory else error if (file_exists($this->_config['repository']) && is_dir($this->_config['repository'])) { $dir = opendir($this->_config['repository']); //read each entry in the directory while (($file = readdir($dir)) !== false) { //concat the filename and path $file = $this->_config['repository'] . $file; $file_info = array(); //if the filename is a file get its info and put into a tmp array if (is_file($file) && strpos(basename($file), ".") !== 0) { $file_info['filename'] = basename($file); $file_info['mtime'] = date("m/d/Y H:i:s", filemtime($file)); $d = Document::document_factory_url("file://" . $file); preg_match("/^([0-9]+)_/", basename($file), $patient_match); $file_info['patient_id'] = $patient_match[1]; $file_info['document_id'] = $d->get_id(); $file_info['web_path'] = $this->_link("retrieve", true) . "document_id=" . $d->get_id() . "&"; //merge the tmp array into the larger array $queue_files[] = $file_info; } } closedir($dir); } else { $messages .= "The repository directory does not exist, it is not a directory or there are not sufficient permissions to access it. '" . $this->config['repository'] . "'\n"; } $this->assign("queue_files", $queue_files); $this->_last_node = null; $menu = new HTML_TreeMenu(); //pass an empty array because we don't want the documents for each category showing up in this list box $rnode = $this->_array_recurse($this->tree->tree, array()); $menu->addItem($rnode); $treeMenu_listbox = new HTML_TreeMenu_Listbox($menu, array()); $this->assign("tree_html_listbox", $treeMenu_listbox->toHTML()); $this->assign("messages", nl2br($messages)); return $this->fetch($GLOBALS['template_dir'] . "documents/" . $this->template_mod . "_queue.html"); }
require_once '../TreeMenu.php'; $icon = 'folder.gif'; $expandedIcon = 'folder-expanded.gif'; $menu = new HTML_TreeMenu(); $node1 = new HTML_TreeNode(array('text' => "First level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'expanded' => true), array('onclick' => "alert('foo'); return false", 'onexpand' => "alert('Expanded')")); $node1_1 =& $node1->addItem(new HTML_TreeNode(array('text' => "Second level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); $node1_1_1 =& $node1_1->addItem(new HTML_TreeNode(array('text' => "Third level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); $node1_1_1_1 =& $node1_1_1->addItem(new HTML_TreeNode(array('text' => "Fourth level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); $node1_1_1_1->addItem(new HTML_TreeNode(array('text' => "Fifth level", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'cssClass' => 'treeMenuBold'))); $node1->addItem(new HTML_TreeNode(array('text' => "Second level, item 2", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); $node1->addItem(new HTML_TreeNode(array('text' => "Second level, item 3", 'link' => "test.php", 'icon' => $icon, 'expandedIcon' => $expandedIcon))); $menu->addItem($node1); $menu->addItem($node1); // Create the presentation class $treeMenu = new HTML_TreeMenu_DHTML($menu, array('images' => '../images', 'defaultClass' => 'treeMenuDefault')); $listBox = new HTML_TreeMenu_Listbox($menu, array('linkTarget' => '_self')); //$treeMenuStatic = new HTML_TreeMenu_staticHTML($menu, array('images' => '../images', 'defaultClass' => 'treeMenuDefault', 'noTopLevelImages' => true)); ?> <html> <head> <style type="text/css"> body { font-family: Georgia; font-size: 11pt; } .treeMenuDefault { font-style: italic; } .treeMenuBold {