Changeset 68 for trunk/admin/include
- Timestamp:
- Sep 7, 2003, 12:14:33 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions.php
r61 r68 386 386 } 387 387 388 function display_categories( $categories, $indent ) 388 function display_categories( $categories, $indent, 389 $selected = -1, $forbidden = -1 ) 389 390 { 390 391 global $vtp,$sub; 391 392 392 393 foreach ( $categories as $category ) { 393 $vtp->addSession( $sub, 'associate_cat' ); 394 $vtp->setVar( $sub, 'associate_cat.value', $category['id'] ); 395 $content = $indent.'- '.$category['name']; 396 $vtp->setVar( $sub, 'associate_cat.content', $content ); 397 $vtp->closeSession( $sub, 'associate_cat' ); 398 display_categories( $category['subcats'], $indent.str_repeat(' ',3) ); 394 if ( $category['id'] != $forbidden ) 395 { 396 $vtp->addSession( $sub, 'associate_cat' ); 397 $vtp->setVar( $sub, 'associate_cat.value', $category['id'] ); 398 $content = $indent.'- '.$category['name']; 399 $vtp->setVar( $sub, 'associate_cat.content', $content ); 400 if ( $category['id'] == $selected ) 401 $vtp->setVar( $sub, 'associate_cat.selected', ' selected="selected"' ); 402 $vtp->closeSession( $sub, 'associate_cat' ); 403 display_categories( $category['subcats'], $indent.str_repeat(' ',3), 404 $selected, $forbidden ); 405 } 399 406 } 400 407 }
Note: See TracChangeset
for help on using the changeset viewer.