GetRow("SELECT id,menutype,name,ordering FROM #__menu WHERE menutype='mainmenu' ORDER BY ordering ASC",1); $home=trim($rsar['name']); $path=''; $home = ''. $home .''; if($Itemid){ $rs=$conn->Execute("SELECT id,name,link,link_type,componentid FROM #__menu WHERE id=$Itemid"); $rsa=$rs->GetArray(); $rsar=$rsa[0]; switch($rsar['link_type']) { case "cs" : { switch($task){ case "view": { $row=$conn->GetRow("SELECT name FROM #__sections WHERE id=".$rsar['componentid']); add_path($row['name'],"index.php?option=content&task=section&id=".$rsar['componentid'],$Itemid); $row=$conn->GetRow("SELECT name FROM #__categories WHERE id=$catid"); add_path($row['name'],"index.php?option=content&task=category&id=".$catid,$Itemid); $row=$conn->GetRow("SELECT title FROM #__content WHERE id=$id"); add_path($row['title']); break; } case "category": { $row=$conn->GetRow("SELECT name FROM #__sections WHERE id=".$rsar['componentid']); add_path($row['name'],"index.php?option=content&task=section&id=".$rsar['componentid'],$Itemid); $row=$conn->GetRow("SELECT name FROM #__categories WHERE id=$id"); add_path($row['name']); break; } default: { $row=$conn->GetRow("SELECT name FROM #__sections WHERE id=".$rsar['componentid']); add_path($row['name']); break; } } break; } case "ci" : { $row=$conn->GetRow("SELECT title FROM #__content WHERE id=$id"); add_path($row['title']); break; } case "cc" : { switch($task) { case "view": { $row=$conn->GetRow("SELECT name FROM #__categories WHERE id=".$rsar['componentid']); add_path($row['name'],"index.php?option=content&task=category&id=".$rsar['componentid'],$Itemid); $row=$conn->GetRow("SELECT title FROM #__content WHERE id=$id"); add_path($row['title']); break; } default: { $row=$conn->GetRow("SELECT name FROM #__categories WHERE id=".$rsar['componentid']); add_path($row['name']); break; } break; } } } } if(count($path_arr)>0) { $img = ''; $imgPath = 'templates/'.$lm_template.'/images/arrow.png'; if (file_exists( "$lm_absolute_path/$imgPath" )){ $img = 'arrow'; } else { $imgPath = 'images/M_images/arrow.png'; if (file_exists( $lm_absolute_path . $imgPath )){ $img = 'arrow'; } else { $img = '>'; } } foreach($path_arr as $row) { if(trim($row['name'])=='')continue; if($row['link'] !='' )$path.=" $img ".$row['name'].""; else { $path.=" $img ".$row['name']; $lm_title = $lm_title." - ".$row['name']; } } } global $lm_type; if($lm_type=="html")return "".$home.$path ."\n"; } ?>