Current Path : /var/www/html/clients/kampol.e-nk.ru/OLD/components/com_rd_sitemap/ |
Current File : /var/www/html/clients/kampol.e-nk.ru/OLD/components/com_rd_sitemap/rd_sitemap.html.php |
<?php /** * Presentaion layer for sitemap * @version $Id: rd_sitemap.html.php,v 1.9 2005/11/10 11:42:42 deutz Exp $ * @package RD_Sitemap * @copyright Copyright (C) 2005 run-digital run-digital.com * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * * This is free software **/ defined( '_VALID_MOS' ) or die ( 'Direct Access to this location is not allowed.' ); class HTML_rd_sitemap { function showComponentHead($title,$divclass) { if ($divclass) {$divclass = ' class="'.$divclass.'" ';} echo "<div".$divclass."> <table class=\"contentpaneopen\" width=100%> <tr> <td class=\"contentheading\" width=\"100%\" style=\"border-bottom:1px solid white;\"> Êàðòà ñàéòà </td> </tr> </table>"; } function showComponentFooter() { echo "<p style=\"text-align:center;font-size:80%;\"><span lang=\"en\" style=\"float:right\" xml:lang=\"en\"><a target=\"_blank\" href=\"http://www.run-digital.com\" class=pathway>Run Digital</a> </span></p>"; echo "</div>"; } function showMenu($t,$r,$mode) { $z=0;$e=0;$max=count($r); echo $t ? "<span class=\"contentheading\" style=\"color:#A9D6FF\">$t</span>" : ''; if ($max) { echo $mode ? '<ul class="sitemapebene0">' : '<ul>'; $close= ""; HTML_rd_sitemap::showTree($r,$e,$z,$max,$mode,$close); echo "\n</li></ul>"; } } function showTree($r,$e,$z,$max,$mode,$close) { if ($z < $max) { $elm = $r[$z]; $akebene = $elm->ebene; if ( $akebene == $e ) { $p =& new mosParameters( $elm->params ); $lang = $p->get('language_code'); $txt=$elm->name; if ( $lang ) { $txt = '<span lang="'.$lang.'" xml:lang="'.$lang.'">'.$elm->name.'</span>'; } if ($mode) { $linkclass = ' class="sitemap" '; $spanclass= ' class="unsichtbar" '; } else { $linkclass = ''; $spanclass= ' style="display:none;" '; } $elm->link = ampReplace( $elm->link ); echo $close . "<li><a" . $linkclass . " title=\"$elm->name\" href=\"" . sefRelToAbs( $elm->link . "&Itemid=" . $elm->id) . "\">". $txt."</a><span".$spanclass .">. </span>\n"; $z++; $close="</li>"; HTML_rd_sitemap::showTree($r,$e,$z,$max,$mode,$close); } else { if ($akebene > $e) { echo $mode ? "<ul class=\"sitemapebene$akebene\">" : "<ul>"; $close =""; HTML_rd_sitemap::showTree($r,$akebene,$z,$max,$mode,$close); } else { $diff = $e - $akebene; for ($i=1; $i <= $diff; $i++) { echo "</li></ul>"; } HTML_rd_sitemap::showTree($r,$akebene,$z,$max,$mode,$close); } } return true; } else { for ($i=1; $i <= $e; $i++) { echo "</li></ul>"; } } } function showContent ($t,$r,$ssn,$scn,$mode) { global $mainframe, $database; echo "<span class=\"contentheading\" style=\"color:#A9D6FF\">$t</span>"; $section='';$category = '';$close= ''; if ($mode) { $ul= '<ul class="sitemapcontent">'; $linkclass = ' class="sitemap" '; $spanclass= ' class="unsichtbar" '; } else { $ul='<ul>'; $linkclass = ''; $spanclass= ' style="display:none;" '; } foreach ($r as $elm) { $nsection = $elm->section; $ncategory = $elm->category; if ($nsection != $section) { echo $close; echo $scn ? "<span class=\"contentheading\" style=\"color:#A9D6FF\">$ncategory</span> $ul" : "$ul"; $close = "</ul>"; } else { if ($ncategory != $category) { echo $close; echo $scn ? "<span class=\"contentheading\" style=\"color:#A9D6FF\">$ncategory</span> $ul" : "$ul"; $close = "</ul>"; } } $section = $nsection; $category = $ncategory; // if a content item link in menu get the itemid from the menu item $contentid = $elm->id; $query = "select id from #__menu where type = 'content_item_link' and componentid='$contentid';"; $database->setQuery( $query ); $Itemid = $database->loadresult(); if (!$Itemid) { // needed to reduce queries used by getItemid $bs = $mainframe->getBlogSectionCount(); $bc = $mainframe->getBlogCategoryCount(); $gbs = $mainframe->getGlobalBlogSectionCount(); // get Itemid $Itemid = $mainframe->getItemid( $elm->id, 0, 0, $bs, $bc, $gbs ); } // Blank itemid checker for SEF if ($Itemid == NULL) { $Itemid = ''; } else { $Itemid = '&Itemid='. $Itemid; } echo "<li><a$linkclass title=\"$elm->title\" href=\"" . sefRelToAbs( "index.php?option=com_content&task=view&id=". $elm->id .$Itemid ) . "\">". $elm->title."</a><span".$spanclass.">. </span></li>\n"; } // foreach echo $close; return true; } } /** EOF **/ ?>