[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path Zen Cart 源代码 products.php
<?php
/**
* products class
*
* @package classes
* @copyright Copyright 2003-2013 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version GIT: $Id: Author: DrByte Tue Jan 22 03:36:04 2013 -0500 Modified in v1.5.2 $
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
/**
* products class
* Class used for managing various product information
*
* @package classes
*/
class products extends base {
var $modules, $selected_module;
// class constructor
function products($module = '') {
}
function get_products_in_category($zf_category_id, $zf_recurse=true, $zf_product_ids_only=false) {
global $db;
$za_products_array = array();
// get top level products
$zp_products_query = "select ptc.*, pd.products_name
from " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc
left join " . TABLE_PRODUCTS_DESCRIPTION . " pd
on ptc.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
where ptc.categories_id='" . (int)$zf_category_id . "'
order by pd.products_name";
function products_name($zf_product_id) {
global $db;
$zp_product_name_query = "select products_name from " . TABLE_PRODUCTS_DESCRIPTION . "
where language_id = '" . $_SESSION['languages_id'] . "'
and products_id = '" . (int)$zf_product_id . "'";
$zp_product_name = $db->Execute($zp_product_name_query);
$zp_product_name = $zp_product_name->fields['products_name'];
return $zp_product_name;
}
function get_admin_handler($type) {
return $this->get_handler($type) . '.php';
}
function get_handler($type) {
global $db;
// this is a fallback safety to protect against damaged (inaccessible) data caused by incorrect code in custom product types
if ((int)$type == 0) $type = 1;