<?php
/**
 @licence GPL 2005-2009  The osCSS developers - osCSS Open Source E-commerce
  @package oscss-2 <www http://www.oscss.org>
  @version Rc-3
  @date  03/04/10, 09:55
  @author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr>
   @encode UTF-8
*/
 ?>
<!-- body //-->
<!-- body_text //-->
<h3><?php echo $titre_h3; ?></h3>
<!--  box_left_eof -->

<?php
/**
        GESTION  DES PERMISSION DES GROUPES
*/

 if (isset($_GET['gPath'])) {
    $group_name_query = tep_db_query("SELECT admin_groups_name FROM " . TABLE_ADMIN_GROUPS . " WHERE FIND_IN_SET( '" . $_GET['gPath']. "', admin_groups_id) ");
        $group_name = tep_db_fetch_array($group_name_query);

        if ($_GET['gPath'] == 1) {
        echo tep_draw_form('defineForm', FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gPath']);
        } elseif ($_GET['gPath'] != 1) {
        echo tep_draw_form('defineForm', FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gPath'] . '&amp;action=group_define', 'post', 'enctype="multipart/form-data"');
        echo tep_draw_hidden_field('admin_groups_id', '', $_GET['gPath']);
} ?>
  <div class="button_nav">
          <?php if ($_GET['gPath'] != 1) { echo  '<a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gPath']) . '">' . IMAGE_CANCEL . '</a> ' . tep_image_submit('button_save.gif', IMAGE_RESET); } else { echo tep_image_submit('button_back.gif', IMAGE_BACK); } ?>
  </div>
<div class="box_left">
  <table  style="width:100%">
    <thead>
      <tr>
        <th colspan=2 ><?php echo TABLE_HEADING_GROUPS_DEFINE; ?></th>
      </tr>
    </thead>
    <tbody>
        <?php
       $menu=menu::getInstance();
        $hierac_menu=$menu->cstr_return(array('for_user'=>$_GET['gPath']));
        $menu=$hierac_menu;
        $file_count = 0;
      while ($fils = each($menu)) {
	$file_count++;
        $group_boxes=$fils['value'];
        $group_boxes['admin_boxes_id']=$fils['value']['admin_files_id'];
        $group_boxes['admin_boxes_name']=$fils['value']['admin_files_name'];

	$groupsArray=array();

        if (_test_bool($group_boxes['etat'])) {
            $del_boxes = array($_GET['gPath']);
            $groupsArray[]=$_GET['gPath'];
            $result = array_diff ($groupsArray, $del_boxes);
            sort($result);
            $checkedBox = $group_boxes['admin_boxes_id'];
            $uncheckedBox = implode (",", $result);
            $checked = true;
        } else {
            $add_boxes = array($_GET['gPath']);
            $result = array_merge ($add_boxes, $groupsArray);
            sort($result);
            $checkedBox = implode (",", $result);
            $uncheckedBox = $group_boxes['admin_boxes_id'];
            $checked = false;
        }
            ?>
    <tr class="dataTableRowBoxes" id="afi_<?php echo $group_boxes['admin_boxes_id'] ?>">
      <td width="40"><?php echo status_flag($checked,'action=setflag&amp;gPath='.$_GET['gPath'].'&amp;admin_boxes_id='.$group_boxes['file']); ?></td>
      <td><b><?php echo ucwords($group_boxes['admin_boxes_name']) . ' ' . tep_draw_hidden_field('checked_' . $group_boxes['admin_boxes_id'], '', $checkedBox) . tep_draw_hidden_field('unchecked_' . $group_boxes['admin_boxes_id'], '', $uncheckedBox); ?></b></td>
    </tr>
      <tr class="dataTableRow">
          <td>&nbsp;</td>
          <td>
          <?php
          if (!function_exists('list_hierac')){
          function list_hierac($menu,$class_fils=''){
        global $group_boxes;

        while ($fils = each($menu)) {
          $group_boxes_files=$fils['value'];
          $group_boxes_files['admin_boxes_id']=$group_boxes_files['admin_files_id'];
          $group_boxes_files['admin_boxes_name']=$group_boxes_files['admin_files_name'];
          $groupsArray =array();

          if ($group_boxes_files['etat'] ==true) {
                  $del_boxes = array($_GET['gPath']);
                  $groupsArray[]=$_GET['gPath'];
                  $result = array_diff ($groupsArray, $del_boxes);
                  sort($result);
                  $checkedBox = $group_boxes_files['admin_boxes_id'];;
                  $uncheckedBox = implode (",", $result);
                  $checked = true;
          } else {
                  $add_boxes = array($_GET['gPath']);
                  $result = array_merge ($add_boxes, $groupsArray);
                  sort($result);
                  $checkedBox = implode (",", $result);
                  $uncheckedBox = '';
                  $checked = false;
          }
          preg_match("#(.*)[?](.*)#i",$group_boxes_files['admin_files_name'],$regi);
          $page_box=(empty($regi[1])) ? $group_boxes_files['admin_files_name'] : $regi[1] ;
          ?>
          <p  style="clear:both; padding:0 1em;" class="view parent dataTableRow" >
                  <span style="width:40px" class="fleft"><?php echo status_flag($checked,'action=setflag&amp;gPath='.$_GET['gPath'].'&amp;admin_files_id='.$group_boxes_files['admin_files_id'],'#afi_'.$group_boxes['admin_boxes_id']); //tep_draw_checkbox_field('groups_to_boxes[]', 'ubgroups_' . $group_boxes['admin_boxes_id'], $group_boxes_files['admin_files_id'], $checked, '', 'onclick="checkSub(this)"') ?></span>
                  <span class="fleft"><?php echo $group_boxes_files['admin_files_name'] ?></span>
              <?php echo  tep_draw_hidden_field('menu_id_' . $group_boxes_files['admin_files_id'], '', $group_boxes_files['admin_files_id']) . tep_draw_hidden_field('unchecked_' . $group_boxes_files['admin_files_id'], '', $uncheckedBox);?>
          <span class="view fils fright">
          </span>
          </p>
          <?php   /*} */

              if (isset($group_boxes_files['fils']) && is_array($group_boxes_files['fils'])) list_hierac($group_boxes_files['fils'],'hierac_enfant');
          } /* Fin de while*/
        }
      }/* Fin de function */

      list_hierac($group_boxes['fils']);
          ?>
      </td>
    </tr>
  <?php } ?>
    </tbody>
  </table>

</form>

<?php } elseif (isset($_GET['gID'])) {  /** GESTION  DES GROUPS */ ?>
<div class="box_left">
  <table style="width:100%" class="dataTable">
    <thead>
      <tr>
        <th><?php echo TABLE_HEADING_GROUPS_NAME; ?></th>
        <th class="tright"><?php echo TABLE_HEADING_ACTION; ?></th>
      </tr>
    </thead>
    <tfoot>
      <tr>
	<td colspan="2"><?php echo TEXT_COUNT_GROUPS . $count_groups; ?></td>
      </tr>
    </tfoot>
    <tbody>
      <?php foreach($list_g as $groups){  ?>
	<tr class="view parent dataTableRow <?php if(isset($_GET['gID']) && $_GET['gID'] == $groups['admin_groups_id']) echo "Selected"; ?>" >
	  <td><strong><?php echo $groups['admin_groups_name']; ?></strong></td>
	  <td class="tright">
	    <span class="view fils fleft">
	    <?php echo ' <a class="buttonimg" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $groups['admin_groups_id'] . '&amp;action=edit_group') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT ). '</a> <a  class="buttonimg" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $groups['admin_groups_id'] . '&amp;action=del_group') . '">' . tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE).'</a>&nbsp;&nbsp;&nbsp;'; ?>
	    </span>
	    <span class="fright">
	      <?php  if ( isset($gInfo) && (is_object($gInfo)) && ($groups['admin_groups_id'] == $gInfo->admin_groups_id) ) { echo tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif'); }
	      else { echo '<a href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $groups['admin_groups_id']) . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>
	    </span>
	  </td>
	</tr>
      <?php } ?>
      </tbody>
  </table>

<?php
 } else {

/**
        GESTION  DES USERS
*/
?>

<div class="box_left">
  <div class="button_nav">
          <?php echo '<a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=groups') . '">' .  IMAGE_GROUPS . '</a>'; echo ' <a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&amp;mID=' . $mInfo->admin_id . '&amp;action=new_member') . '">' .tep_image(DIR_WS_ICONS . 'icon_add_new.png',IMAGE_NEW_MEMBER). IMAGE_NEW_MEMBER . '</a>'; ?>
  </div>
  <table width="100%" class="dataTable">
      <thead>
        <tr>
          <th><?php echo TABLE_HEADING_NAME.tep_link_sort_by(FILENAME_COUNTRIES,'admin_firstname'); ?></th>
          <th><?php echo TABLE_HEADING_EMAIL.tep_link_sort_by(FILENAME_COUNTRIES,'admin_email_address'); ?></th>
          <th class="tcenter"><?php echo TABLE_HEADING_GROUPS.tep_link_sort_by(FILENAME_COUNTRIES,'admin_groups_name'); ?></th>
          <th class="tcenter"><?php echo TABLE_HEADING_LOGNUM.tep_link_sort_by(FILENAME_COUNTRIES,'admin_lognum'); ?></th>
          <th class="row_action"><?php echo TABLE_HEADING_ACTION; ?></th>
        </tr>
      </thead>
      <tfoot>
	<tr>
	  <td colspan="2"><?php echo $db_admin_split->display_count($db_admin_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $page, TEXT_DISPLAY_NUMBER_OF_MEMBERS); ?></td>
	  <td colspan="2"><?php echo $db_admin_split->display_links($db_admin_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $page); ?></td>
	</tr>
      </tfoot>
      <tbody>
	<?php foreach($list_m as $admin){  ?>
	  <tr class="view parent dataTableRow <?php if ((!isset($_GET['mID'])) || ($_GET['mID'] == $admin['admin_id']) ) echo "Selected"; ?>" >
	    <td><?php echo $admin['admin_firstname'].' '.$admin['admin_lastname']; ?></td>
	    <td><?php echo $admin['admin_email_address']; ?></td>
	    <td class="tcenter"><?php echo $admin['admin_groups_name']; ?></td>
	    <td class="tcenter"><?php echo $admin['admin_lognum']; ?></td>
	    <td class="row_action">
		<span class="view fils fleft">
		<?php
		    echo ' <a class="buttonimg" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&amp;mID=' . $admin['admin_id'] . '&amp;action=edit_member') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT ). '</a> <a  class="buttonimg" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&amp;mID=' . $admin['admin_id'] . '&amp;action=del_member') . '">' . tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE).'</a>&nbsp;&nbsp;&nbsp;'; ?>
		</span>
		<span class="fright">
		    <?php if ( isset($mInfo) && (is_object($mInfo)) && ($admin['admin_id'] == $mInfo->admin_id) ) { echo tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif'); }
		    else { echo '<a href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&amp;mID=' . $admin['admin_id']) . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>
		</span>
	    </td>
	  </tr>
	<?php } ?>
    </tbody>
  </table>

<?php  } ?>
</div>
<!--  box_left_eof -->

<!--  box_right -->
<div class="box_right">

<?php
  $heading = array();
  $contents = array();
  switch ($action) {
      case 'new_member':
      $groups_array = array(array('id' => '0', 'text' => TEXT_NONE));
      $groups_query = tep_db_query("select admin_groups_id, admin_groups_name from " . TABLE_ADMIN_GROUPS);
      while ($groups = tep_db_fetch_array($groups_query)) {
          $groups_array[] = array('id' => $groups['admin_groups_id'],
                                  'text' => $groups['admin_groups_name']);
      }

      $heading[] = array('text' => TEXT_INFO_HEADING_NEW );

      $contents = array('form' => tep_draw_form('newmember', FILENAME_ADMIN_MEMBERS, 'action=member_new&amp;page=' . $page . 'mID=' . $_GET['mID'], 'post', 'enctype="multipart/form-data"', ' name="newmember"'));
      if (isset($_GET['error'])) { $contents[] = array('text' => TEXT_INFO_ERROR); }

      $contents[] = array('class' => 'block_input','text' => '<label for="admin_firstname">' . TEXT_INFO_FIRSTNAME . '</label>' . tep_draw_input_field('admin_firstname','','','',true));
      $contents[] = array('class' => 'block_input','text' => '<label for="admin_lastname">' . TEXT_INFO_LASTNAME . '</label>' . tep_draw_input_field('admin_lastname','','','',true));
      $contents[] = array('class' => 'block_input','text' => '<label for="admin_email_address">' . TEXT_INFO_EMAIL . '</label>' . tep_draw_input_field('admin_email_address','','','',true));

      $contents[] = array('class' => 'block_input','text' => '<label for="admin_groups_id">' . TEXT_INFO_GROUP . '</label>' . tep_draw_pull_down_menu('admin_groups_id', $groups_array, '0'));
      $contents[] = array('class' => 'button_nav','text' => tep_image_submit('button_insert.gif', IMAGE_INSERT) . ' <a class="button"  href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&amp;mID=' . $_GET['mID']) . '">' . IMAGE_CANCEL . '</a>');
      break;
    case 'edit_member':
      $heading[] = array('text' => TEXT_INFO_HEADING_NEW );

      $contents = array('form' => tep_draw_form('newmember', FILENAME_ADMIN_MEMBERS, 'action=member_edit&amp;page=' . $page . '&amp;mID=' . $_GET['mID'], 'post', 'enctype="multipart/form-data"', ' name="newmember"'));
      if (isset($_GET['error'])) {
      $contents[] = array('text' => TEXT_INFO_ERROR);
      }
      $contents[] = array('class' => 'block_input','text' => '<label for="admin_firstname">' . TEXT_INFO_FIRSTNAME . '</label>' . tep_draw_input_field('admin_firstname','', $mInfo->admin_firstname) . tep_draw_hidden_field('admin_id', '', $mInfo->admin_id));
      $contents[] = array('class' => 'block_input','text' => '<label for="admin_lastname">' . TEXT_INFO_LASTNAME . '</label>' . tep_draw_input_field('admin_lastname','', $mInfo->admin_lastname));
      $contents[] = array('class' => 'block_input','text' => '<label for="admin_email_address">' . TEXT_INFO_EMAIL . '</label>' . tep_draw_input_field('admin_email_address','', $mInfo->admin_email_address));
      if ($mInfo->admin_id == 1) {
        $contents[] = array('class' => 'block_input','text' => tep_draw_hidden_field('admin_groups_id', '', $mInfo->admin_groups_id));
      } else {
        $groups_array = array(array('id' => '0','class' => 'block_input', 'text' => TEXT_NONE));
        $groups_query = tep_db_query("select admin_groups_id, admin_groups_name from " . TABLE_ADMIN_GROUPS);
        while ($groups = tep_db_fetch_array($groups_query)) {
          $groups_array[] = array('id' => $groups['admin_groups_id'],'class' => 'block_input','text' => $groups['admin_groups_name']);
        }
        $contents[] = array('class' => 'block_input','text' => '<label for="admin_groups_id">' . TEXT_INFO_GROUP . '</label>' . tep_draw_pull_down_menu('admin_groups_id', $groups_array, $mInfo->admin_groups_id));
      }
      $contents[] = array('class' => 'button_nav','text' => tep_image_submit('button_insert.gif', IMAGE_INSERT, 'onclick="validateForm();return document.returnValue"') . ' <a  class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&amp;mID=' . $_GET['mID']) . '">' .  IMAGE_CANCEL . '</a>');
      break;
    case 'del_member':
      $heading[] = array('text' => TEXT_INFO_HEADING_DELETE );
      if ($mInfo->admin_id == 1 || $mInfo->admin_email_address == STORE_OWNER_EMAIL_ADDRESS) {
	$contents[] = array('class' => 'button_nav','text' => '<a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&amp;mID=' . $mInfo->admin_id) . '">' .  IMAGE_BACK . '</a>');
      } else {
	$contents = array('form' => tep_draw_form('edit', FILENAME_ADMIN_MEMBERS, 'action=member_delete&amp;page=' . $page . '&amp;mID=' . $admin['admin_id'], 'post', 'enctype="multipart/form-data"'));
	$contents[] = array('text' => sprintf(TEXT_INFO_DELETE_INTRO, $mInfo->admin_firstname . ' ' . $mInfo->admin_lastname) . tep_draw_hidden_field('admin_id', '', $mInfo->admin_id));
	$contents[] = array('class' => 'button_nav', 'text' => tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a  class="button"  href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&amp;mID=' . $_GET['mID']) . '">' . IMAGE_CANCEL . '</a>');
      }
      break;
    case 'new_group':
      $heading[] = array('text' => TEXT_INFO_HEADING_GROUPS );

      $contents = array('form' => tep_draw_form('new_group', FILENAME_ADMIN_MEMBERS, 'action=group_new', 'post', 'enctype="multipart/form-data"'));
      /* Retour erreur */
        if (isset($_GET['gName']) && $_GET['gName'] == 'false')  $contents[] = array('text' => TEXT_INFO_GROUPS_NAME_FALSE);
        elseif (isset($_GET['gName']) && $_GET['gName'] == 'used')  $contents[] = array('text' => TEXT_INFO_GROUPS_NAME_USED);

        $contents[] = array('class' => 'block_input','text' => '<label for="admin_groups_name">' . TEXT_INFO_GROUPS_NAME . '</label>' . tep_draw_input_field('admin_groups_name') . tep_draw_hidden_field('set_groups_id', '', ''/*substr($add_groups_prepare, 4)*/));
      $contents[] = array('class' => 'button_nav','text' => '<a  class="button"  href="' . tep_href_link(FILENAME_ADMIN_MEMBERS) . '">' .  IMAGE_CANCEL . '</a> ' . tep_image_submit('button_next.gif', IMAGE_NEXT) );
      break;
    case 'edit_group':
      $heading[] = array('text' => TEXT_INFO_HEADING_EDIT_GROUP );

      $contents = array('form' => tep_draw_form('edit_group', FILENAME_ADMIN_MEMBERS, 'action=group_edit&amp;gID=' . $_GET['gID'], 'post', 'enctype="multipart/form-data"'));
      $contents[] = array('class' => 'block_input','text' => '<label for="admin_groups_name">' . TEXT_INFO_EDIT_GROUP_INTRO . '</label>' . tep_draw_input_field('admin_groups_name','', $gInfo->admin_groups_name));
      $contents[] = array('class' => 'button_nav','text' => tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a class="button"  href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $gInfo->admin_groups_id) . '">' .  IMAGE_CANCEL . '</a>');
      break;
    case 'del_group':
      $heading[] = array('text' => TEXT_INFO_HEADING_DELETE_GROUPS );

      $contents = array('form' => tep_draw_form('delete_group', FILENAME_ADMIN_MEMBERS, 'action=group_delete&amp;gID=' . $gInfo->admin_groups_id, 'post', 'enctype="multipart/form-data"'));
      if ($gInfo->admin_groups_id == 1) {
        $contents[] = array('text' => sprintf(TEXT_INFO_DELETE_GROUPS_INTRO_NOT, $gInfo->admin_groups_name));
        $contents[] = array('class' => 'button_nav','text' => '<a  class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gID']) . '">' .  IMAGE_BACK . '</a>');
      } else {
        $contents[] = array('text' => sprintf(TEXT_INFO_DELETE_GROUPS_INTRO, $gInfo->admin_groups_name) . tep_draw_hidden_field('set_groups_id', '', substr($del_groups_prepare, 4)));
        $contents[] = array('class' => 'button_nav','text' => tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a class="button"  href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gID']) . '">' .  IMAGE_CANCEL. '</a>');
      }
      break;
    case 'define_group':
      $heading[] = array('text' => TEXT_INFO_HEADING_DEFINE );

        if ($_GET['gPath'] == 1) {
            $contents[] = array('text' => '<span class="alert">'.sprintf(TEXT_INFO_DEFINE_INTRO_BLOCK, $group_name['admin_groups_name']).'</span>');
            $contents[] = array('text' => TEXT_NOTE_DEFINE_GRP);
            $contents[] = array('class' => 'button_nav','text' => '<a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gPath']) . '">' . IMAGE_CANCEL . '</a>');
        } else {
            $contents[] = array('text' => sprintf(TEXT_INFO_DEFINE_INTRO, $group_name['admin_groups_name']));
        }
      break;
    case 'show_group':
      $heading[] = array('text' => TEXT_INFO_HEADING_EDIT_GROUP );
        $check_email_query = tep_db_query("select admin_email_address from " . TABLE_ADMIN . "");
        //$stored_email[];
        while ($check_email = tep_db_fetch_array($check_email_query)) {
          $stored_email[] = $check_email['admin_email_address'];
        }

        if (in_array($_POST['admin_email_address'], $stored_email)) {
          $checkEmail = "true";
        } else {
          $checkEmail = "false";
        }
      $contents = array('form' => tep_draw_form('show_group', FILENAME_ADMIN_MEMBERS, 'action=show_group&amp;gID=groups', 'post', 'enctype="multipart/form-data"'));
      $contents[] = array('class' => 'block_input','text' => $define_files['admin_files_name'] . tep_draw_input_field('level_edit','', $checkEmail));
      $contents[] = array('class' => 'button_nav','text' => tep_image_submit('button_insert.gif', IMAGE_INSERT) . ' <a href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $gInfo->admin_groups_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
      break;
    default:
      if (isset($mInfo) && is_object($mInfo)) {
        $heading[] = array('text' => TEXT_INFO_HEADING_DEFAULT );
        $contents[] = array('text' => '<strong>' . TEXT_INFO_FULLNAME . '</strong>' . $mInfo->admin_firstname . ' ' . $mInfo->admin_lastname);
        $contents[] = array('text' => '<strong>' . TEXT_INFO_EMAIL . '</strong>' . $mInfo->admin_email_address);
        $contents[] = array('text' => '<strong>' . TEXT_INFO_GROUP . '</strong>' . $mInfo->admin_groups_name);
        $contents[] = array('text' => '<strong>' . TEXT_INFO_CREATED . '</strong>' . $mInfo->admin_created);
        $contents[] = array('text' => '<strong>' . TEXT_INFO_MODIFIED . '</strong>' . $mInfo->admin_modified);
        $contents[] = array('text' => '<strong>' . TEXT_INFO_LOGDATE . '</strong>' . $mInfo->admin_logdate);
        $contents[] = array('text' => '<strong>' . TEXT_INFO_LOGNUM . '</strong>' . $mInfo->admin_lognum);
      } elseif (is_object($gInfo)) {
        $heading[] = array('text' => TEXT_INFO_HEADING_DEFAULT_GROUPS );

        $contents[] = array('class' => 'button_nav','text' => '<a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gPath=' . $gInfo->admin_groups_id . '&amp;action=define_group') . '">' .  IMAGE_FILE_PERMISSION . '</a>'
                           );
//         $contents[] = array('text' => TEXT_INFO_DEFAULT_GROUPS_INTRO);
      }
  }
?>

<?php
  if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
    $box = new box;
    echo $box->infoBox($heading, $contents);
  }
?>
</div>
<!--  box_right_eof -->
<!-- body_text_eof //-->
<!-- body_eof //-->