Файл: adultscript-2.0.3-pro/files/templates/defboot/extend/plugins/menu_footer_second.plugin.php
Строк: 60
<?php
defined('_VALID') or die('Restricted Access!');
function template_plugin_menu_footer_second()
{
$db = VF::factory('database');
$cache = VF::factory('cache');
if (!$links = $cache->get('main_links', 0)) {
$db->query("SELECT l.name, l.title, l.link, l.type, l.target, l.lang, l.current
FROM #__menu_links AS l, #__menu AS m
WHERE m.name = 'footer_second'
AND l.menu_id = m.menu_id
AND l.status = '1'
ORDER BY l.pos ASC");
if ($db->affected_rows()) {
$links = $db->fetch_rows();
$cache->store('footer_first_links', $links, 0);
} else {
$links = array();
}
}
$lang = VLanguage::get('language');
$menu = array();
$menu[] = '<ul class="list-inline text-center">';
foreach ($links as $link) {
$url = ($link['type'] == 'int') ? REL_URL.$link['link'] : $link['link'];
$target = ($link['target'] != 'none') ? ' target="_'.$link['target'].'"' : '';
$title = ($link['title'] != '') ? ' title="'.htmlspecialchars($link['title'], ENT_QUOTES, 'UTF-8', false).'"' : '';
$name = ($lang == 'en-US') ? $link['name'] : __($link['lang']);
$menu[] = '<li><a href="'.$url.'"'.$title.$target.'>'.htmlspecialchars($name, ENT_QUOTES, 'UTF-8', false).'</a></li>';
}
$menu[] = '</ul>';
return implode("n", $menu);
}