Beispiel #1
0
 if ($_SESSION['site_shop_ordertype'] == 1) {
     $query .= "\n\t\t\tORDER BY is_preferred DESC, category_name, parent, lang\n\t\t";
 }
 //ha egyedi sorrend szerint rendezzuk
 if ($_SESSION['site_shop_ordertype'] == 2) {
     $query .= "\n\t\t\tORDER BY is_preferred DESC, sortorder, parent, lang\n\t\t";
 }
 $result = $mdb2->query($query);
 if ($result->numRows() > 0) {
     $tpl->assign('category', $result->fetchAll());
 }
 //termekek listaja
 if (isset($cid)) {
     //breadcrumb
     include_once $include_dir . '/function.shop.php';
     $category = get_breadcrumb_category($cid);
     $cat1 = explode(";", $category);
     $cat2 = array();
     foreach ($cat1 as $key => $value) {
         if (!empty($value)) {
             $robbant = explode("#@#", $value);
             $cat2[$robbant[0]] = $robbant[1];
         }
     }
     $cat_array = array_reverse($cat2, true);
     foreach ($cat_array as $key => $value) {
         if (!empty($_SESSION['site_shop_is_breadcrumb'])) {
             $shop_breadcrumb->add($value, 'index.php?p=' . $module_name . '&act=lst&cid=' . $key);
         }
     }
     $category_name = $value;
Beispiel #2
0
/**
 * get_breadcrumb_category - Rekurz�v men�k�r�s - visszafele
 * 
 * @param int $parent 
 * @access public
 * @return void
 */
function get_breadcrumb_category($parent)
{
    global $mdb2;
    $ret = "";
    $query = "\n\t\tSELECT category_id, parent, category_name \n\t\tFROM iShark_Shop_Category \n\t\tWHERE category_id = {$parent} AND category_id != 0\n\t";
    $result =& $mdb2->query($query);
    while ($row = $result->fetchRow()) {
        $ret .= '' . $row['category_id'] . '#@#' . htmlspecialchars($row['category_name']) . ';';
        $ret .= get_breadcrumb_category($row['parent']);
    }
    return $ret;
}