Ejemplo n.º 1
0
                      AND ( c.access = '0' OR c.access = '" . intval($nGroupID) . "' )
                      AND c.parent_id = '" . intval($nCurrentCategoryId) . "'
                      AND c.categories_id = cd.categories_id
                      AND cd.categories_languages_id = '" .  intval($nLanguageID) . "'
                      AND p.categories_id = '" . intval($nCurrentCategoryId) . "'
                    ORDER BY c.sort_order, cd.categories_name";
            $categories_result = $dbconn->Execute($sql);
        }

        $rows = 0;
        $categories_box = '';

        while ($categories = $categories_result->fields) {
            $rows++;

            $categories_new = oos_get_path($categories['categories_id'], $categories['parent_id'], $categories['gparent_id']);
            $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';

            $categories_box .= '                <td align="center" class="smallText" style="width: ' . $width . '" valign="top"><a href="' . oos_href_link($aPages['shop'], $categories_new) . '">';

            if (!empty($categories['categories_image'])) {
                $categories_box .= oos_image(OOS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />';
            } else {
                $categories_box .= oos_image(OOS_IMAGES . 'trans.gif', $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT, 'style="border: 3px double black"') . '<br />';
            }
            $categories_box .= $categories['categories_name'] . '</a></td>' . "\n";

            if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $categories_result->RecordCount())) {
              $categories_box .= '              </tr>' . "\n";
              $categories_box .= '              <tr>' . "\n";
            }
Ejemplo n.º 2
0
            $categories = $aCategories['parent_id'];
        }
        if ((!isset($_GET['cID']) && !isset($_GET['pID']) || isset($_GET['cID']) && $_GET['cID'] == $aCategories['categories_id']) && !isset($cInfo) && substr($action, 0, 3) != 'new') {
            $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>';
        }
        ?>