Exemplo n.º 1
0
        <li><span class="smalltext">2002-11-15 minor patches (XL2.0.1).</span></li>
        <li><span class="smalltext">2002-11-14 Major Update (1.1.0/XL2.0) based 
          on TreeMenu 1.1.0.</span></li>
        <li><span class="smalltext">2002-11-08 Update (1.1a) Smarter path handling 
          on includes. Change image dirnames.</span></li>
        <li><span class="smalltext">2002-11-07 New Release (1.1). Add ListboxMenus 
          and property list interface. Added expansion and highlighting of selected 
          branches, image size control and style sheet overrides.</span></li>
        <li><span class="smalltext">2002-11-02 TreeMenuXL Initial Release (1.0), 
          based on TreeMenu 1.0.4</span></li>
      </ul>
      <?php 
$nodeProperties = array();
$pgmenu = new HTML_TreeMenuXL();
$pgmenuTop = new HTML_TreeNodeXL("TreeMenuXL Page Contents", "#", $nodeProperties);
$pgmenu->addItem($pgmenuTop);
$nx =& $pgmenuTop->addItem(new HTML_TreeNodeXL("Introduction to HTML_TreeMenuXL", "#intro", $nodeProperties));
$nx =& $pgmenuTop->addItem(new HTML_TreeNodeXL("Using HTML_TreeMenuXL", "#chips_version", $nodeProperties));
$nx->addItem(new HTML_TreeNodeXL("Basic TreeMenus", "#basic", $nodeProperties));
$nx->addItem(new HTML_TreeNodeXL("TreeMenus With Style", "#style", $nodeProperties));
$nx->addItem(new HTML_TreeNodeXL("TreeMenus Without Icons", "#noicons", $nodeProperties));
$nx->addItem(new HTML_TreeNodeXL("Rigid and Expanded TreeMenus", "#rigid", $nodeProperties));
$nx->addItem(new HTML_TreeNodeXL("Controlling Indenting and Vertical Spacing", "#advanced_spacing", $nodeProperties));
$nx->addItem(new HTML_TreeNodeXL("LinkSelect, User Images and User Styles", "#advanced_linkselect", $nodeProperties));
$nx->addItem(new HTML_TreeNodeXL("Listbox Menus", "#listbox", $nodeProperties));
$nx =& $pgmenuTop->addItem(new HTML_TreeNodeXL("History of TreeMenuXL", "#history", $nodeProperties));
$nx->addItem(new HTML_TreeNodeXL("TreeMenuXL 1.1", "#xl11", $nodeProperties));
$nx->addItem(new HTML_TreeNodeXL("TreeMenuXL 1.2", "#xl12", $nodeProperties));
$nx->addItem(new HTML_TreeNodeXL("Summary of New Features in TreeMenuXL", "#summary_of_new_features", $nodeProperties));
$pgmenuTop->addItem(new HTML_TreeNodeXL("HTML_TreeMenu Reference", "#reference", $nodeProperties));
$pgmenuTop->addItem(new HTML_TreeNodeXL("Things To Do", "#thingstodo", $nodeProperties));
    ${$var} =& $node1->addItem(new HTML_TreeNodeXL("{$yr['yr']}[{$yrRow[0]['COUNT(id)']}]", "", $nodeProperties));
    #category nodes under the main node with the tottal number of articles for each categroy
    $catSQL = "SELECT c.value,c.id,COUNT(cs.id) FROM  sionapros_pubs AS cs";
    $catSQL .= " INNER JOIN sionapros_categories AS c ON cs.category = c.id";
    $catSQL .= " WHERE EXTRACT(YEAR FROM cs.pub_date) = '{$yr['yr']}' GROUP BY cs.category";
    $catRes = $db->execute($catSQL);
    foreach ($catRes as $catRow) {
        #create the nodes for the current year
        $var = "node_" . $i;
        ${$var}->addItem(new HTML_TreeNodeXL("{$catRow['value']}[{$catRow['COUNT(cs.id)']}]", "index.php?prgm=sionapros-files&category={$catRow['id']}&year={$yr['yr']}", $nodeProperties));
    }
    #$yr--;
    $i++;
}
#add node to the tree
$menu01->addItem($node1);
#create presentation object
$arcTreeMenu =& new HTML_TreeMenu_DHTMLXL($menu01, array("images" => "./tree/TMimages"));
#assign objects
$smarty->assign_by_ref('arcTreeMenu', $arcTreeMenu);
#end of code for building the menu#
#generating content for template##
#formulate where clause of search query
$searchSpec = "";
if ($_REQUEST['category']) {
    $searchSpec .= "AND category = '{$_REQUEST['category']}' ";
}
if ($_REQUEST['year']) {
    $searchSpec .= "AND EXTRACT(YEAR FROM pub_date) = '{$_REQUEST['year']}' ";
}
#store where clause in the session
Exemplo n.º 3
0
 function initNivelesInvestigadores($nivel = "0")
 {
     $menu = new HTML_TreeMenuXL();
     $this->nodeProperties = array("icon" => "nodo.png");
     $sql = sprintf("SELECT PK1, NOMBRE,DESCRIPCION, PADRE,DISPONIBLE,FECHA_R,ORDEN FROM JERARQUIAS WHERE PADRE = '{$nivel}' ORDER BY ORDEN");
     $rows = database::getRows($sql);
     $i = 1;
     foreach ($rows as $row) {
         $nodo = 'nodo' . $i;
         ${$nodo} = new HTML_TreeNodeXL("<input type='radio' name='jerarquia' value='" . $row['PK1'] . "' />&nbsp;" . htmlentities($row['NOMBRE'], ENT_QUOTES, "ISO-8859-1"), "", $this->nodeProperties);
         $this->initSubNivelesInvestigadores($row['PK1'], ${$nodo});
         $menu->addItem(${$nodo});
     }
     $arbol = new HTML_TreeMenu_DHTMLXL($menu, array("images" => "libs/tree/TMimages"));
     $nodos = $arbol->toHTML();
     return $nodos;
 }