Changeset 517 for trunk/xpressme_integration_kit/admin/index.php
- Timestamp:
- Feb 25, 2010, 1:24:08 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/admin/index.php
r511 r517 610 610 } 611 611 } 612 function xpress_group_role_state($is_report = false) 613 { 614 global $xoopsModule; 615 $xoopsDB =& Database::getInstance(); 616 $xp_prefix = $GLOBALS['xoopsModule']->getInfo('dirname'); 617 if ($xp_prefix == 'wordpress'){ 618 $xp_prefix = 'wp'; 619 } 620 $prefix = $xoopsDB->prefix($xp_prefix . '_'); 621 $group_role_tables = $prefix.'group_role'; 622 $sql = "SELECT groupid , name AS xoops_groupe ,group_type, role , login_all FROM ". $group_role_tables; 623 $result = $xoopsDB->query($sql); 624 if ($is_report){ 625 echo "******** " . _AM_XP2_GROUP_ROLE . "********" . "<br />\n"; 626 } else { 627 echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XP2_GROUP_ROLE . "</legend>"; 628 echo "<div style='padding: 8px;'>"; 629 echo '<table width="400" cellspacing="1" cellpadding="1" border="1">'; 630 echo '<tbody>'; 631 echo '<tr>'; 632 echo '<td>GROUP</td>'; 633 echo '<td>GROUPE TYPE</td>'; 634 echo '<td>ROLE</td>'; 635 echo '<td>Allways Check</td>'; 636 echo '</tr>'; 637 } 638 $groupe_list = ''; 639 while ($myrow = $xoopsDB->fetchArray($result)){ 640 $xoops_groupe = $myrow["xoops_groupe"] ; 641 $group_type = empty($myrow["group_type"]) ? "None" : $myrow["group_type"] ; 642 $role = empty($myrow["role"]) ? "inhibit register" : $myrow["role"] ; 643 $login_all = empty($myrow["login_all"]) ? 'No' : 'Yes' ; 644 if (!empty($groupe_list)) $groupe_list .= ','; 645 $groupe_list .= $myrow["groupid"]; 646 if ($is_report){ 647 echo $xoops_groupe . ' : '; 648 echo '(' . $group_type. ') : '; 649 echo $role; 650 echo '(' . $login_all. ') : '; 651 echo '<br />'; 652 } else { 653 echo '<tr>'; 654 echo '<td>' . $xoops_groupe . '</td>'; 655 echo '<td>' . $group_type . '</td>'; 656 echo '<td>' . $role . '</td>'; 657 echo '<td>' . $login_all . '</td>'; 658 echo '</tr>'; 659 } 660 } 661 $group_tables = $xoopsDB->prefix('groups'); 662 $where = ' WHERE groupid NOT IN (' . $groupe_list . ')'; 663 $sql = "SELECT groupid , name AS xoops_groupe ,group_type FROM ". $group_tables . $where; 664 $result = $xoopsDB->query($sql); 665 while ($myrow = $xoopsDB->fetchArray($result)){ 666 $xoops_groupe = $myrow["xoops_groupe"] ; 667 $group_type = empty($myrow["group_type"]) ? 'inhibit(None)' : 'inhibit(' .$myrow["group_type"].')' ; 668 $role = "No set"; 669 $login_all = 'No Set'; 670 if ($is_report){ 671 echo $xoops_groupe . ' : '; 672 echo '[' . $group_type. '] : '; 673 echo $role; 674 echo '(' . $login_all. ') : '; 675 echo '<br />'; 676 } else { 677 echo '<tr>'; 678 echo '<td>' . $xoops_groupe . '</td>'; 679 echo '<td>' . $group_type . '</td>'; 680 echo '<td>' . $role . '</td>'; 681 echo '<td>' . $login_all . '</td>'; 682 echo '</tr>'; 683 } 684 } 685 if ($is_report){ 686 echo "<br />"; 687 } else { 688 echo '</tbody>'; 689 echo '</table>'; 690 echo "</div>"; 691 echo '</legend>'; 692 echo "</fieldset><br />"; 693 } 694 } 612 695 function xpress_block_state($is_report = false) 613 696 { … … 766 849 xpress_block_state($report); 767 850 xpress_block_options($report); 851 xpress_group_role_state($report); 768 852 admin_check_user_meta_prefix($report); 769 853 xpress_state($report);
Note: See TracChangeset
for help on using the changeset viewer.