[ Index ] |
PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09) |
[Summary view] [Print] [Text view]
1 <?php 2 3 4 5 $content['all'] .= LF.buildNavi().LF.str_repeat('<br />', 20); 6 7 $block['custom_htmlhead'][] = ' 8 <style type="text/css"> 9 /* ================================================================ 10 This copyright notice must be untouched at all times. 11 12 The original version of this stylesheet and the associated (x)html 13 is available at http://www.cssplay.co.uk/menus/simple_vertical.html 14 Copyright (c) 2005-2007 Stu Nicholls. All rights reserved. 15 This stylesheet and the associated (x)html may be modified in any 16 way to fit your requirements. 17 =================================================================== */ 18 19 /* Add a margin - for this demo only - and a relative position with a high z-index to make it appear over any element below */ 20 #menu_container { 21 margin: 0; 22 position: relative; 23 height: 25px; 24 z-index: 100; 25 } 26 27 /* Get rid of the margin, padding and bullets in the unordered lists */ 28 #pmenu, 29 #pmenu ul { 30 padding: 0; 31 margin: 0; 32 list-style-type: none; 33 } 34 35 /* Set up the link size, color and borders */ 36 #pmenu a, 37 #pmenu a:visited { 38 display: block; 39 width: 120px; 40 font-size: 11px; 41 color: #575757; 42 height: 25px; 43 line-height: 24px; 44 text-decoration: none; 45 text-indent: 5px; 46 border: 1px solid #000; 47 border-width: 1px 0 1px 1px; 48 } 49 50 /* Set up the sub level borders */ 51 #pmenu li ul li a, 52 #pmenu li ul li a:visited { 53 border-width: 0 1px 1px 1px; 54 } 55 #pmenu li a.enclose, 56 #pmenu li a.enclose:visited { 57 border-width: 1px; 58 } 59 60 /* Set up the list items */ 61 #pmenu li { 62 float: left; 63 background: #dddddd; 64 } 65 #pmenu li ul li { 66 background: #bbbbbb; 67 } 68 69 /* For Non-IE browsers and IE7 */ 70 #pmenu li:hover { 71 position: relative; 72 } 73 /* Make the hovered list color persist */ 74 #pmenu li:hover > a, 75 #pmenu li:hover li > a { 76 background: #acacac; 77 color: #ffffff; 78 } 79 /* Set up the sublevel lists with a position absolute for flyouts and overrun padding. The transparent gif is for IE to work */ 80 #pmenu li ul { 81 display: none; 82 } 83 /* For Non-IE and IE7 make the sublevels visible on list hover. This is all it needs */ 84 #pmenu li:hover > ul { 85 display: block; 86 position: absolute; 87 top: -10px; 88 left: 106px; 89 padding: 10px 15px 15px 15px; 90 background: transparent url(img/leer.gif); 91 width: 120px; 92 } 93 /* Position the first sub level beneath the top level liinks */ 94 #pmenu > li:hover > ul { 95 left: -15px; 96 top: 16px; 97 } 98 99 /* get rid of the table */ 100 #pmenu table { 101 position: absolute; 102 border-collapse: collapse; 103 top: 0; 104 left: 0; 105 z-index: 100; 106 font-size: 1em; 107 } 108 109 /* For IE5.5 and IE6 give the hovered links a position relative and a change of background and foreground color. This is needed to trigger IE to show the sub levels */ 110 * html #pmenu li a:hover { 111 position: relative; 112 background: #acacac; 113 color: #ffffff; 114 } 115 116 /* For accessibility of the top level menu when tabbing */ 117 #pmenu li a:active, 118 #pmenu li a:focus { 119 background: #dfd7ca; 120 color: #c00; 121 } 122 123 /* Set up the pointers for the sub level indication */ 124 #pmenu li.fly { 125 background: #dddddd url(http://www.cssplay.co.uk/menus/fly.gif) no-repeat right center; 126 } 127 #pmenu li.drop { 128 background: #dddddd url(http://www.cssplay.co.uk/menus/drop.gif) no-repeat right center; 129 } 130 131 132 /* This lot is for IE5.5 and IE6 ONLY and is necessary to make the sublevels appear */ 133 134 /* change the drop down levels from display:none; to visibility:hidden; */ 135 * html #pmenu li ul { 136 visibility: hidden; 137 display: block; 138 position: absolute; 139 top: -11px; 140 left: 105px; 141 padding: 10px 15px 15px 15px; 142 background: transparent url(img/leer.gif); 143 } 144 145 /* keep the third level+ hidden when you hover on first level link */ 146 #pmenu li a:hover ul ul { 147 visibility: hidden; 148 } 149 /* keep the fourth level+ hidden when you hover on second level link */ 150 #pmenu li a:hover ul a:hover ul ul { 151 visibility: hidden; 152 } 153 /* keep the fifth level hidden when you hover on third level link */ 154 #pmenu li a:hover ul a:hover ul a:hover ul ul { 155 visibility: hidden; 156 } 157 /* keep the sixth level hidden when you hover on fourth level link */ 158 #pmenu li a:hover ul a:hover ul a:hover ul a:hover ul ul { 159 visibility: hidden; 160 } 161 162 /* make the second level visible when hover on first level link and position it */ 163 #pmenu li a:hover ul { 164 visibility: visible; 165 left: -15px; 166 top: 14px; 167 lef\t: -16px; 168 to\p: 15px; 169 } 170 171 /* make the third level visible when you hover over second level link and position it and all further levels */ 172 #pmenu li a:hover ul a:hover ul { 173 visibility: visible; 174 top: -11px; 175 left: 105px; 176 } 177 /* make the fourth level visible when you hover over third level link */ 178 #pmenu li a:hover ul a:hover ul a:hover ul { 179 visibility: visible; 180 } 181 /* make the fifth level visible when you hover over fourth level link */ 182 #pmenu li a:hover ul a:hover ul a:hover ul a:hover ul { 183 visibility: visible; 184 } 185 /* make the sixth level visible when you hover over fifth level link */ 186 #pmenu li a:hover ul a:hover ul a:hover ul a:hover ul a:hover ul { 187 visibility: visible; 188 } 189 /* If you can see the pattern in the above IE5.5 and IE6 style then you can add as many sub levels as you like */ 190 191 </style> 192 '; 193 194 195 196 function buildNavi($start=0, $counter=0) { 197 198 $t = array(); 199 200 $struct = getStructureChildData($start); 201 202 if($counter == 0) { 203 $last = count($struct) - 1; 204 } else { 205 $last = 0; 206 } 207 208 $x = 0; 209 210 foreach($struct as $value) { 211 212 //if( isset($GLOBALS['LEVEL_KEY'][ $value['acat_id'] ]) ) { 213 214 /* $p1 = ' path'; 215 } else { 216 $s = ''; 217 $p1 = ''; 218 } 219 220 if($GLOBALS['content']['cat_id'] == $value['acat_id']) { 221 $a1 = ' active'; 222 $a3 = 'active'; 223 } else { 224 $a1 = $p1; 225 $a3 = ''; 226 } 227 */ 228 $s = buildNavi($value['acat_id'], $counter+1); 229 if($s) { 230 $g = '<!--[if IE 7]><!--></a><!--<![endif]-->'; 231 $g .= $s; 232 $g .= LF . str_repeat(' ', $counter); 233 234 $class = $counter ? ' class="fly"' : ' class="drop"'; 235 236 $close_li = str_repeat(' ', $counter+1); 237 238 } else { 239 $g = '</a>'; 240 $class = ''; 241 $close_li = ''; 242 } 243 244 if( $last && $last == $x ) { 245 $enclose = ' class="enclose"'; 246 } elseif( $x || ($counter == 0 && $x == 0) ) { 247 $enclose = ''; 248 } else { 249 $enclose = ' class="enclose"'; 250 } 251 252 $l = str_repeat(' ', $counter+1) . '<li'. $class . '>'; 253 $l .= get_level_ahref($value['acat_id'], $enclose) . html_specialchars($value['acat_name']); 254 $l .= $g; 255 256 257 258 $l .= $close_li . '</li>'; 259 260 $t[] = $l; 261 262 $x++; 263 264 } 265 266 if($counter) { 267 $A = LF . str_repeat(' ', $counter) . '<!--[if lte IE 6]><table><tr><td><![endif]-->'; 268 $B = LF . str_repeat(' ', $counter) . '<!--[if lte IE 6]></td></tr></table></a><![endif]-->'; 269 } else { 270 $A = ''; 271 $B = ''; 272 } 273 274 275 $t = implode(LF, $t); 276 if($t) { 277 $t = $A . LF . str_repeat(' ', $counter) . '<ul'.($counter?'':' id="pmenu"').'>' . LF . $t . LF . str_repeat(' ', $counter) . '</ul>'. $B ; 278 } 279 280 return $t; 281 282 } 283 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Dec 30 05:55:15 2009 | Cross-referenced by PHPXref 0.7 |