Ejemplo n.º 1
0
    function nav_sub_section($type,$sort) {
	   $finder= new Section(AMP_Registry::getDbcon());
		if(isset($sort) && $sort){
        	$finder_source = &$finder->getSearchSource();
        	$finder_source->addSort($sort);
		}
    	$sections = $finder->find(array('parent'=>$type,'displayable'=>'1'));
        if (!$sections) return;
        $html = '<ul>';
    	foreach($sections as $section) {
	       		$html .= '<li><a href="section.php?id='.$section->id.'">'.$section->getName().'</a><img src="img/spacer.gif" height="4" width="3" align="left"> </li>'; 
	   }
    	$html .= '</ul>'; 
	   return $html;
    }
Ejemplo n.º 2
0
 function nav_sub_section($type, $sort)
 {
     $finder = new Section(AMP_Registry::getDbcon());
     if (isset($sort) && $sort) {
         $finder_source =& $finder->getSearchSource();
         $finder_source->addSort($sort);
     }
     $sections = $finder->find(array('parent' => $type, 'displayable' => '1'));
     if (!$sections) {
         return;
     }
     $html = '<ul>';
     foreach ($sections as $section) {
         if (AMP_CONTENT_HUMANIZE_URLS) {
             $sectionURL = AMP_url_update('section.php', array('id' => $section->id));
         } else {
             $sectionURL = 'section.php?id=' . $section->id;
         }
         $html .= '<li><a href="' . $sectionURL . '">' . $section->getName() . '</a><img src="img/spacer.gif" height="4" width="3" align="left"> </li>';
     }
     $html .= '</ul>';
     return $html;
 }