Changeset 1119 for trunk/include/functions_html.inc.php
- Timestamp:
- Apr 3, 2006, 12:26:19 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_html.inc.php
r1113 r1119 6 6 // +-----------------------------------------------------------------------+ 7 7 // | branch : BSF (Best So Far) 8 // | file : $Id$9 8 // | last update : $Date$ 10 9 // | last modifier : $Author$ … … 496 495 497 496 /** 497 * Returns an HTML list of tags. It can be a multi select field or a list of 498 * checkboxes. 499 * 500 * @param string HTML field name 501 * @param array selected tag ids 502 * @return array 503 */ 504 function get_html_tag_selection( 505 $tags, 506 $fieldname, 507 $selecteds = array(), 508 $forbidden_categories = null 509 ) 510 { 511 global $conf; 512 513 $output = '<ul class="tagSelection">'; 514 foreach ($tags as $tag) 515 { 516 $output.= 517 '<li>' 518 .'<label>' 519 .'<input type="checkbox" name="'.$fieldname.'[]"' 520 .' value="'.$tag['tag_id'].'"' 521 ; 522 523 if (in_array($tag['tag_id'], $selecteds)) 524 { 525 $output.= ' checked="checked"'; 526 } 527 528 $output.= 529 ' />' 530 .' '.$tag['name'] 531 .'</label>' 532 .'</li>' 533 ."\n" 534 ; 535 } 536 $output.= '</ul>'; 537 538 return $output; 539 } 540 541 function name_compare($a, $b) 542 { 543 return strcmp($a['name'], $b['name']); 544 } 545 546 /** 498 547 * exits the current script (either exit or redirect) 499 548 */
Note: See TracChangeset
for help on using the changeset viewer.