www.gusucode.com > weenCompany闻名企业网站系统 4.0.0 繁体中英文 UTF8源码程序 > templates/default/categories.php
<?php // +---------------------------------------------+ // | Copyright 2005 - 2007 weenCompany | // | http://www.weentech.com | // | This file may not be redistributed. | // +---------------------------------------------+ if(!defined('IN_WEENCOMPANY')) { die("File not found!"); } if($usehovermenu = $DB->query_first("SELECT categoryid FROM " . TABLE_PREFIX . "categories WHERE parentid != 0 LIMIT 1")) { echo "<script language=\"JavaScript\"> <!-- function wrap_root (text) { /*normal, hover, click*/ return ['<table cellpadding=0 cellspacing=0 border=0 class=width_100><tr><td class=width_100><table cellpadding=0 cellspacing=0 border=0 class=bullet_0><tr><td class=categorydefault> ' + text + ' </td></tr></table></td></tr></table>', '<table cellpadding=0 cellspacing=0 border=0 class=width_100><tr><td class=bullet_1><table cellpadding=0 cellspacing=0 border=0 class=bullet_0><tr><td class=categoryhover> ' + text + ' </td></tr></table></td></tr></table>', '<table cellpadding=0 cellspacing=0 border=0 class=width_100><tr><td class=width_100><table cellpadding=0 cellspacing=0 border=0 class=bullet_0><tr><td class=categorydefault> ' + text + ' </td></tr></table></td></tr></table>' ]; } function wrap_parent (text, icon, hovericon) { /*normal, hover, click*/ return [['<table cellpadding=0 cellspacing=0 border=0 class=bullet_4><tr><td class=width_100><table cellpadding=0 cellspacing=0 border=0 class=bullet_6><tr><td class=a0> ' + text + ' </td></tr></table></td></tr></table>'].join(''), ['<table cellpadding=0 cellspacing=0 border=0 class=bullet_5><tr><td class=width_100><table cellpadding=0 cellspacing=0 border=0 class=bullet_7><tr><td class=a1> ' + text + ' </td></tr></table></td></tr></table>'].join(''), ['<table cellpadding=0 cellspacing=0 border=0 class=bullet_4><tr><td class=width_100><table cellpadding=0 cellspacing=0 border=0 class=bullet_6><tr><td class=a0> ' + text + ' </td></tr></table></td></tr></table>'].join('') ]; } function wrap_child (text, icon, hovericon) { /*normal, hover, click*/ return [['<table cellpadding=0 cellspacing=0 border=0 class=bullet_4><tr><td class=a0> ' + text + ' </td></tr></table>'].join(''), ['<table cellpadding=0 cellspacing=0 border=0 class=bullet_5><tr><td class=a1> ' + text + ' </td></tr></table>'].join(''), ['<table cellpadding=0 cellspacing=0 border=0 class=bullet_4><tr><td class=a0> ' + text + ' </td></tr></table>'].join('') ]; } var MENU_POS =[ // Level 0 block configuration { // Item's height in pixels 'height' : 34, // Item's width in pixels 'width' : 100, // if Block Orientation is vertical 'vertical' : false, // Time Delay in milliseconds before subling block expands // after mouse pointer overs an item 'expd_delay' : 0, // Style class names for the level 'css': { // Block outing table class 'table' : '', // Item outer tag style class for all item states or // classes for [<default state>, <hovered state>, <clicked state>] 'outer' : '', // Item inner tag style class for all item states or // classes for [<default state>, <hovered state>, <clicked state>] 'inner' : '' } }, // Level 1 block configuration { 'width' : 120, 'height' : 28, // Vertical Offset between adjacent levels in pixels 'block_top' : 34, // Horizontal Offset between adjacent levels in pixels 'block_left' : 0, // block behaviour if single frame: // 1 - shift to the edge, 2 - flip relatively to left upper corner 'wise_pos' : 1, 'vertical' : true, // transition effects for the block // [index on expand, duration on expand, index on collapse, duration on collapse] 'transition' : [0, 0.3, 0, 0.3], // Time Delay in milliseconds before menu collapses after mouse // pointer lefts all items 'hide_delay' : 300, 'css' : { 'table' : '', 'outer' : '', 'inner' : '' } }, // Level 2 block configuration { 'block_top' : 0, 'block_left' : 120 } //Subling level configurations are inherited from level 2 ] var MENU_ITEMS = ["; CreateHoverMenu(); echo "]; new menu (MENU_ITEMS, MENU_POS); //--> </script>"; } else { echo '<table border="0" cellpadding="0" cellspacing="0"><tr>'; // use normal category menu for($i = 0; $i < $categoryrows; $i++) { echo '<td class="bullet_2" onMouseOver="this.className=\'bullet_2_hover\'" onMouseOut="this.className=\'bullet_2\'"><a href="'.$categorylink[$i].'" class="weencategory" target="'.$categorytarget[$i].'">'.$categoryname[$i].'</a></td>'; } echo '</tr></table>'; } ?>