$cInfo_array = array_merge($aCategories, $category_childs, $category_products);
            $cInfo = new objectInfo($cInfo_array);
        }
        if (isset($cInfo) && is_object($cInfo) && $aCategories['categories_id'] == $cInfo->categories_id) {
            echo '              <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['categories'], oos_get_path($aCategories['categories_id'])) . '\'">' . "\n";
        } else {
            echo '              <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['categories'], 'categories=' . $categories . '&cID=' . $aCategories['categories_id']) . '\'">' . "\n";
        }
        ?>
                <td class="dataTableContent"><?php 
        echo '<a href="' . oos_href_link_admin($aFilename['categories'], oos_get_path($aCategories['categories_id'])) . '">' . oos_image(OOS_IMAGES . 'icons/folder.gif', ICON_FOLDER) . '</a>&nbsp;<b>' . ' #' . $aCategories['categories_id'] . ' ' . $aCategories['categories_name'] . '</b>';
        ?>
</td>
                <td class="dataTableContent" align="center">&nbsp;</td>
                <td class="dataTableContent" align="center">&nbsp;<?php 
        echo oos_get_customer_status_name($aCategories['access']);
        ?>
&nbsp;</td>
                <td class="dataTableContent" align="center">
 <?php 
        if ($aCategories['categories_status'] == '1') {
            echo '<a href="' . oos_href_link_admin($aFilename['categories'], 'action=setflag&flag=0&cID=' . $aCategories['categories_id'] . '&categories=' . $categories) . '">' . oos_image(OOS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>';
        } else {
            echo '<a href="' . oos_href_link_admin($aFilename['categories'], 'action=setflag&flag=1&cID=' . $aCategories['categories_id'] . '&categories=' . $categories) . '">' . oos_image(OOS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a>';
        }
        ?>
</td>
                <td class="dataTableContent" align="center">&nbsp;<?php 
        echo $aCategories['sort_order'];
        ?>
&nbsp;</td>
        $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_CUSTOMERS_STATUS . '</b>');
        $contents = array('form' => oos_draw_form('status', $aFilename['customers_status'], 'page=' . $_GET['page'] . '&cID=' . $cInfo->customers_status_id . '&action=deleteconfirm'));
        $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
        $contents[] = array('text' => '<br /><b>' . $cInfo->customers_status_name . '</b>');
        if ($remove_status) {
            $contents[] = array('align' => 'center', 'text' => '<br />' . oos_image_swap_submits('delete', 'delete_off.gif', IMAGE_DELETE) . ' <a href="' . oos_href_link_admin($aFilename['customers_status'], 'page=' . $_GET['page'] . '&cID=' . $cInfo->customers_status_id) . '">' . oos_image_swap_button('cancel', 'cancel_off.gif', IMAGE_CANCEL) . '</a>');
        }
        break;
    default:
        if (isset($cInfo) && is_object($cInfo)) {
            $heading[] = array('text' => '<b>' . $cInfo->customers_status_name . '</b>');
            $contents[] = array('align' => 'center', 'text' => '<a href="' . oos_href_link_admin($aFilename['customers_status'], 'page=' . $_GET['page'] . '&cID=' . $cInfo->customers_status_id . '&action=edit') . '">' . oos_image_swap_button('edit', 'edit_off.gif', IMAGE_EDIT) . '</a> <a href="' . oos_href_link_admin($aFilename['customers_status'], 'page=' . $_GET['page'] . '&cID=' . $cInfo->customers_status_id . '&action=delete') . '">' . oos_image_swap_button('delete', 'delete_off.gif', IMAGE_DELETE) . '</a>');
            $customers_status_inputs_string = '';
            $languages = oos_get_languages();
            for ($i = 0, $n = count($languages); $i < $n; $i++) {
                $customers_status_inputs_string .= '<br />' . oos_image(OOS_SHOP_IMAGES . 'flags/' . $languages[$i]['iso_639_2'] . '.gif', $languages[$i]['name']) . '&nbsp;' . oos_get_customer_status_name($cInfo->customers_status_id, $languages[$i]['id']);
            }
            $contents[] = array('text' => $customers_status_inputs_string);
            $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_DISCOUNT_PRICE_INTRO . '<br /><b>' . TEXT_INFO_CUSTOMERS_STATUS_DISCOUNT_PRICE . ' ' . $cInfo->customers_status_discount . '%</b>');
            $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_DISCOUNT_OT_XMEMBER_INTRO . '<br /><b>' . ENTRY_OT_XMEMBER . ' ' . $customers_status_ot_discount_flag_array[$cInfo->customers_status_ot_discount_flag]['text'] . ' (' . $cInfo->customers_status_ot_discount_flag . ')' . '</b><br />' . ENTRY_MINIMUM_AMOUNT_OT_XMEMBER . ':<br /><b>' . $currencies->format($cInfo->customers_status_ot_minimum) . ' - ' . $cInfo->customers_status_ot_discount . '%</b>');
            $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_STAFFELPREIS_INTRO . '<br /><b>' . ENTRY_STAFFELPREIS . ' ' . $customers_status_qty_discounts_array[$cInfo->customers_status_qty_discounts]['text'] . ' (' . $cInfo->customers_status_qty_discounts . ')</b>');
            $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_PAYMENT_INTRO . '<br /><b>' . ENTRY_CUSTOMERS_STATUS_PAYMENT . '</b>');
            $contents[] = array('text' => '<br />' . oos_customers_payment($cInfo->customers_status_payment));
        }
        break;
}
if (!empty($heading) && !empty($contents)) {
    echo '            <td width="25%" valign="top">' . "\n";
    $box = new box();
    echo $box->infoBox($heading, $contents);
    echo '            </td>' . "\n";
        $category_childs = array('childs_count' => oos_childs_in_category_count($aCategories['categories_id']));
        $category_products = array('products_count' => oos_products_in_category_count($aCategories['categories_id']));

        $cInfo_array = array_merge($aCategories, $category_childs, $category_products);
        $cInfo = new objectInfo($cInfo_array);
      }

      if (isset($cInfo) && is_object($cInfo) && ($aCategories['categories_id'] == $cInfo->categories_id) ) {
        echo '              <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['categories'], oos_get_path($aCategories['categories_id'])) . '\'">' . "\n";
      } else {
        echo '              <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['categories'], 'categories=' . $categories . '&cID=' . $aCategories['categories_id']) . '\'">' . "\n";
      }
?>
                <td class="dataTableContent"><?php echo '<a href="' . oos_href_link_admin($aFilename['categories'], oos_get_path($aCategories['categories_id'])) . '">' . oos_image(OOS_IMAGES . 'icons/folder.gif', ICON_FOLDER) . '</a>&nbsp;<b>' . ' #' . $aCategories['categories_id'] . ' ' . $aCategories['categories_name'] . '</b>'; ?></td>
                <td class="dataTableContent" align="center">&nbsp;</td>
                <td class="dataTableContent" align="center">&nbsp;<?php echo oos_get_customer_status_name($aCategories['access']); ?>&nbsp;</td>
                <td class="dataTableContent" align="center">
 <?php
       if ($aCategories['categories_status'] == '1') {
         echo '<a href="' . oos_href_link_admin($aFilename['categories'], 'action=setflag&flag=0&cID=' . $aCategories['categories_id'] . '&categories=' . $categories) . '">' . oos_image(OOS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>';
       } else {
         echo '<a href="' . oos_href_link_admin($aFilename['categories'], 'action=setflag&flag=1&cID=' . $aCategories['categories_id'] . '&categories=' . $categories) . '">' . oos_image(OOS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a>';
       }
?></td>
                <td class="dataTableContent" align="center">&nbsp;<?php echo $aCategories['sort_order']; ?>&nbsp;</td>
                <td class="dataTableContent" align="right"><?php if (isset($cInfo) && is_object($cInfo) && ($aCategories['categories_id'] == $cInfo->categories_id) ) { echo oos_image(OOS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . oos_href_link_admin($aFilename['categories'], 'categories=' . $categories . '&cID=' . $aCategories['categories_id']) . '">' . oos_image(OOS_IMAGES . 'icon_information.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td>
              </tr>
<?php
      // Move that ADOdb pointer!
      $categories_result->MoveNext();
    }