Changeset 511 for trunk/xpressme_integration_kit/admin/index.php
- Timestamp:
- Feb 13, 2010, 10:28:41 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/admin/index.php
r510 r511 70 70 echo $check_str; 71 71 echo "</div>"; 72 echo "</fieldset>"; 72 echo '</legend>'; 73 echo "</fieldset><br />"; 73 74 } 74 75 … … 156 157 echo get_xpress_active_plugin_list(); 157 158 echo "</div>"; 158 echo "</fieldset>"; 159 echo '</legend>'; 160 echo "</fieldset><br />"; 159 161 } 160 162 } … … 311 313 echo "</text><br />"; 312 314 echo "</div>"; 315 echo '</legend>'; 313 316 echo "</fieldset><br />"; 314 317 } … … 525 528 } 526 529 echo "</div>"; 530 echo '</legend>'; 527 531 echo "</fieldset><br />"; 528 532 } … … 601 605 echo "</text>"; 602 606 echo "</div>"; 607 echo '</legend>'; 603 608 echo "</fieldset>"; 604 609 } … … 622 627 echo $xoops_block_check->get_message(); 623 628 echo "</div>"; 624 echo "</fieldset>"; 629 echo '</legend>'; 630 echo "</fieldset><br />"; 625 631 } 626 632 } 627 633 634 function xpress_block_options($is_report = false) 635 { 636 $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ; 637 638 $module_objs = & get_module_objects($mydirname); 639 $module_obj = $module_objs[0]; 640 $mod_id = $module_obj->getVar('mid', 'n'); 641 $blocks = & get_block_object_orber_num_bymodule_id( $mod_id ); 642 $infos =& $module_obj->getInfo('blocks'); 643 if ($is_report){ 644 echo "******** " . _AM_XP2_BLOCK_OPTIONS . "********" . "<br />\n"; 645 foreach ( $blocks as $block ) 646 { 647 echo $block->getVar('title') . ' : ' . $block->getVar('options') . '<br />'; 648 } 649 echo "<br />\n"; 650 } else { 651 echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XP2_BLOCK_OPTIONS . "</legend>"; 652 echo "<div style='padding: 8px;'>"; 653 echo '<table width="400" cellspacing="1" cellpadding="1" border="1">'; 654 echo '<tbody>'; 655 echo '<tr>'; 656 echo '<td>Title</td>'; 657 echo '<td>Options</td>'; 658 echo '</tr>'; 659 foreach ( $blocks as $block ) 660 { 661 echo '<tr>'; 662 echo '<td>' . $block->getVar('title') . '</td>'; 663 echo '<td>' . $block->getVar('options') . '</td>'; 664 echo '</tr>'; 665 } 666 echo '</tbody>'; 667 echo '</table>'; 668 echo '</div>'; 669 echo '</legend>'; 670 echo "</fieldset><br />"; 671 } 672 673 } 674 //-------------------------------------------------------- 675 // module handler 676 //-------------------------------------------------------- 677 function &get_module_objects($module_dir) 678 { 679 $criteria = new CriteriaCompo(); 680 $criteria->add( new Criteria('isactive', '1', '=') ); 681 $criteria->add( new Criteria('dirname', $module_dir, '=') ); 682 683 $module_handler =& xoops_gethandler('module'); 684 $objs =& $module_handler->getObjects( $criteria ); 685 return $objs; 686 } 687 688 //-------------------------------------------------------- 689 // block handler 690 //-------------------------------------------------------- 691 function &get_block_object_orber_num_bymodule_id( $mid ) 692 { 693 $arr = array(); 694 $objs =& get_block_object_bymodule_id( $mid ); 695 foreach ( $objs as $obj ) 696 { 697 $arr[ $obj->getVar('func_num', 'n') ] = $obj; 698 } 699 return $arr; 700 } 701 702 function &get_block_object_bymodule_id( $mid, $asobject=true ) 703 { 704 if ( defined('ICMS_VERSION_BUILD') && ICMS_VERSION_BUILD > 27 ) { /* ImpressCMS 1.2+ */ 705 $block_handler =& xoops_gethandler ('block'); 706 $objs =& $block_handler->getByModule( $mid, $asobject ); 707 } else { /* legacy support */ 708 $objs =& XoopsBlock::getByModule( $mid, $asobject ) ; /* from class/xoopsblock.php */ 709 } 710 return $objs; 711 } 712 713 714 628 715 $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ; 629 716 $mydirpath = dirname( dirname( __FILE__ ) ) ; … … 678 765 xpress_active_plugin_list($report); 679 766 xpress_block_state($report); 767 xpress_block_options($report); 680 768 admin_check_user_meta_prefix($report); 681 769 xpress_state($report);
Note: See TracChangeset
for help on using the changeset viewer.