'Store Default'"); // if orderby isn't set in the category, grab it from the product if (!$orderby) $orderby = $SC['settings']['Order_Products_By']; // if not set at category OR product, then set it to "Name" if(!$orderby || $orderby == "null") $orderby = "Name"; // grab the settings for ordering products from the category if (!$orderhow) $orderhow = @get_field_val("Categories","Order_Products_How","record_number = $cat_rn AND Order_Products_How <> 'Store Default'"); // if orderhow isn't set in the category, grab it from the product if (!$orderhow) $orderhow = $SC['settings']['Order_Products_How']; if($orderhow) { if ($orderhow == "Ascending") $orderhow = "ASC"; if ($orderhow == "Descending") $orderhow = "DESC"; } else { $orderhow = "ASC"; } // if random is set, then we need to grab a random subset of the existing product records....need to unset limit, grab random records from result of all products, and return that array if ($random && isset($limit)) { $random_limit = str_replace("LIMIT 0,","",$limit) + 1; unset($limit); } // if out of stock items are set to not be displayed in store settings if($SC['inventory_control'] && $SC['out_of_stock_behavior'] == "1") { $products = sc_query( "SELECT prod.record_number, cat.record_number AS Category FROM Products prod INNER JOIN REL_Products__Categories rel_p_c ON rel_p_c.Products_rn = prod.record_number INNER JOIN Categories cat ON rel_p_c.Categories_rn = cat.record_number INNER JOIN REL_Products__Warehouses rel_p_w ON rel_p_w.Products_rn = prod.record_number WHERE cat.record_number = $cat_rn AND rel_p_w.Stock > 0 $exclude GROUP BY rel_p_w.Products_rn ORDER BY prod.$orderby $orderhow $limit", MYSQL_BOTH,1); } else { $products = sc_query( "SELECT prod.record_number, cat.record_number AS Category FROM Categories cat, Products prod, REL_Products__Categories rel_p_c WHERE cat.record_number = rel_p_c.Categories_rn AND prod.record_number = rel_p_c.Products_rn AND cat.record_number = $cat_rn AND prod.Not_For_Sale != 1 $exclude ORDER BY prod.$orderby $orderhow $limit", MYSQL_BOTH,1); } if ($random) { $prod_count = count($products); // if less products are returned then the limit, then use the number of products as the limit for generating random numbers if ($prod_count < $random_limit) $random_limit = $prod_count; $prod_rns = array(); // loop while the number of random prod rns is less than what we need while(count($prod_rns) < $random_limit) { $rand = rand(0,$prod_count-1); if (!in_array($rand,$prod_rns)) $prod_rns[] = $rand; } // grab the products randomly from the original products array foreach($prod_rns as $prod_rn) $random_products[] = $products[$prod_rn]; return $random_products; } return $products; } ?> Query from count_records(): $query
"; } else { $result = mysql_query ($query); if (is_resource($result)) { while ($row = mysql_fetch_array ($result)) { $records[] = $row; } return $records[0][0]; } else { return 0; } } } ?>Query from get_sum(): $qry
"; } else { $result = mysql_query($qry); if (is_resource($result)) { while ($row = mysql_fetch_array ($result)) { $records[] = $row; } return $records[0][0]; } } } ?> and tags // $height - height of popup // $width - width of popup // $scrollbars - set to 'yes' or 'no' // $resizable - set to 'yes' or 'no' // // File modified on 03/08/2005 - bug fix for problems causing the JS Popup function to not appear function Popup_Window($page, $link_content, $width, $height, $scrollbars, $resizable,$class="product_options_details_link"){ return "$link_content"; } ?> Number of elements in array: ".count($array)." Key Value "; foreach(array_keys($array) as $key) { print " $key "; if (is_array($array[$key])) { sc_print_array($array[$key]); } else { print $array[$key]; } print " "; } print ""; } } ?>"; } ?>"; if ($return_var) { return $stylesheet; } else { print $stylesheet; } } ?> $value) { if (is_array($data[$key])) { $data[$key] = urlencode_all($data[$key]); } else { $data[$key] = urlencode($data[$key]); } } return $data; } ?>Powered by Squirrelcart PHP Shopping Cart Software"; } else { $image_tag = @get_image("Cart_Images","powered by sc $logo",0,0,0,"Powered by Squirrelcart PHP Shopping Cart Software"); if (!$image_tag) { // image was uploaded, but never added to the cart images table....add it below $data['Name'] = "powered by sc $logo"; $data['Image'] = "squirrelcart/images/cart/powered_by_sc_".$logo.".gif"; @add_record("Cart_Images",$data); $image_tag = get_image("Cart_Images","powered by sc $logo",0,0,0,"Powered by Squirrelcart PHP Shopping Cart Software"); } $sc_logo = "$image_tag

"; } print $sc_logo; } ?>
Fatal error: Uncaught Error: Call to undefined function dl() in /home/http/websites/scottsongs.com/music/squirrelcart/pre_common.php:284 Stack trace: #0 /home/http/websites/scottsongs.com/music/squirrelcart/pre_storefront.php(39): include() #1 /home/http/websites/scottsongs.com/music/store.php(1): include('/home/http/webs...') #2 {main} thrown in /home/http/websites/scottsongs.com/music/squirrelcart/pre_common.php on line 284