ÿØÿà JFIF ÿÛ „ ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/thietkewebvumi.com/smarty/plugins/ |
<?php //------------------------------------------------------------------------------ // SmartyMenu version 1.1 // http://www.phpinsider.com/php/code/SmartyMenu/ // // SmartyMenu is an implementation of the Suckerfish Dropdowns // by Patrick Griffiths and Dan Webb. // http://htmldog.com/articles/suckerfish/dropdowns/ // // Copyright(c) 2004-2005 New Digital Group, Inc.. All rights reserved. // // This library is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 2.1 of the License, or (at // your option) any later version. // // This library is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public // License for more details. //------------------------------------------------------------------------------ // number of chars to indent unordered list level define('SMARTYMENU_INDENT', 3); function smarty_function_menu_render_element($element,$level) { $_output = ''; if(isset($element['link'])) $_text = "<a href=\"" . htmlspecialchars($element['link']) . "\">" . htmlspecialchars($element['text']) . "</a>"; else $_text = '<span class="nolink">' . htmlspecialchars($element['text']). '</span>'; if(isset($element['submenu'])) { $_class = isset($element['class']) ? $element['class'] : 'nav_parent'; $_output .= str_repeat(' ', $level * SMARTYMENU_INDENT) . "<li class=\"$_class\">" . $_text . "\n"; $_output .= str_repeat(' ', $level * SMARTYMENU_INDENT) . "<ul>\n"; foreach($element['submenu'] as $_submenu) { $_output .= smarty_function_menu_render_element($_submenu, $level + 1); } $_output .= str_repeat(' ', $level * SMARTYMENU_INDENT) . "</ul>\n"; $_output .= str_repeat(' ', $level * SMARTYMENU_INDENT) . "</li>\n"; } else { $_class = isset($element['class']) ? $element['class'] : 'nav_child'; $_output .= str_repeat(' ', $level * SMARTYMENU_INDENT) . "<li class=\"$_class\">" . $_text . "</li>\n"; } return $_output; } /* * Smarty plugin * ------------------------------------------------------------- * Type: function * Name: menu * Purpose: generate menu * ------------------------------------------------------------- */ function smarty_function_menu($params, &$smarty) { if(empty($params['data'])) { $smarty->trigger_error("menu_init: missing 'data' parameter"); return false; } $_id = isset($params['id']) ? $params['id'] : 'nav'; $_output = "<ul id=\"$_id\">\n"; if(!empty($params) and !empty($params['data'])){ foreach($params['data'] as $_element) { $_output .= smarty_function_menu_render_element($_element, 1); } } $_output .= "</ul>\n"; return $_output; } /* vim: set expandtab: */ ?>