Modify ShowItem : for a vertical menu you show the selected item

This commit is contained in:
sparkyx 2007-12-13 19:43:01 +00:00
parent a6dbb6ac8a
commit 0cd59106d3

View file

@ -263,9 +263,16 @@ function ShowItem($p_array,$p_dir='V',$class="mtitle",$class_ref="mtitle",$defau
if ( $p_dir == 'V') {
foreach ($p_array as $all=>$href){
$title="";
$set="";
if ( isset ($href[2] ))
$title=$href[2];
$ret.='<TR><TD CLASS="'.$class.'"><A class="'.$class_ref.'" HREF="'.$href[0].'" title="'.$title.'">'.$href[1].'</A></TD></TR>';
if ( isset($href[3] ))
$set=$href[3];
if ( $set == $default )
$ret.='<tr><TD CLASS="selectedcell">'.$href[1].'</TD></tr>';
else
$ret.='<TR><TD CLASS="'.$class.'"><A class="'.$class_ref.'" HREF="'.$href[0].'" title="'.$title.'">'.$href[1].'</A></TD></TR>';
}
}
//direction Horizontal