本文整理汇总了PHP中xtc_db_fetch_array函数的典型用法代码示例。如果您正苦于以下问题:PHP xtc_db_fetch_array函数的具体用法?PHP xtc_db_fetch_array怎么用?PHP xtc_db_fetch_array使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xtc_db_fetch_array函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: proceed
function proceed()
{
parent::proceed();
// Nur laden wenn StyleEdit deaktiviert ist.
if ($_SESSION['style_edit_mode'] != 'edit' && $_SESSION['style_edit_mode'] != 'sos') {
// Gibt es einen aktiven Slider für die Startseite?
$_ceck = xtc_db_query("SELECT\n slider_id,\n slider_parameter\n FROM\n multislider\n WHERE\n slider_position = 'startpage'\n AND\n slider_status = 1");
if (xtc_db_num_rows($_ceck) > 0) {
// die benötigten Scripte einbinden
include_once DIR_FS_CATALOG . 'multislider/js/jquery.easing.1.3.min.js';
include_once DIR_FS_CATALOG . 'multislider/js/jquery.banner-rotator.min.js';
$_s = xtc_db_fetch_array(xtc_db_query("SELECT slider_parameter FROM multislider WHERE slider_position = 'startpage' AND slider_status = 1"));
$_d = unserialize(urldecode($_s['slider_parameter']));
$j = "\$(window).load(function(){ \$('#startpage_slider').bannerRotator({";
foreach ($_d as $key => $val) {
if (is_numeric($val) or $val == 'true' or $val == 'false') {
$j .= $key . ":{$val},";
} else {
$j .= $key . ":'{$val}',";
}
}
$j .= "borderWidth:0,layerOnHover:false });});";
echo $j . "\n";
}
}
}
开发者ID:Marktwert,项目名称:gambio-gx-multislider,代码行数:26,代码来源:Multislider_JSIndexExtender.inc.php
示例2: xtc_get_vpe_name
function xtc_get_vpe_name($vpeID)
{
$vpe_query = "SELECT products_vpe_name FROM " . TABLE_PRODUCTS_VPE . " WHERE language_id='" . xtc_db_input((int) $_SESSION['languages_id']) . "' and products_vpe_id='" . xtc_db_input((int) $vpeID) . "'";
$vpe_query = xtDBquery($vpe_query);
$vpe = xtc_db_fetch_array($vpe_query, true);
return $vpe['products_vpe_name'];
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:7,代码来源:xtc_get_vpe_name.inc.php
示例3: xtc_display_banner
function xtc_display_banner($action, $identifier)
{
if ($action == 'dynamic') {
$banners_query = xtc_db_query("select count(*) as count from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . xtc_db_input($identifier) . "'");
$banners = xtc_db_fetch_array($banners_query);
if ($banners['count'] > 0) {
$banner = xtc_random_select("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . xtc_db_input($identifier) . "'");
} else {
return '<strong>XTC ERROR! (xtc_display_banner(' . $action . ', ' . $identifier . ') -> No banners with group \'' . $identifier . '\' found!</strong>';
}
} elseif ($action == 'static') {
if (is_array($identifier)) {
$banner = $identifier;
} else {
$banner_query = xtc_db_query("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . xtc_db_input($identifier) . "'");
if (xtc_db_num_rows($banner_query)) {
$banner = xtc_db_fetch_array($banner_query);
} else {
return '<strong>XTC ERROR! (xtc_display_banner(' . $action . ', ' . $identifier . ') -> Banner with ID \'' . $identifier . '\' not found, or status inactive</strong>';
}
}
} else {
return '<strong>XTC ERROR! (xtc_display_banner(' . $action . ', ' . $identifier . ') -> Unknown $action parameter value - it must be either \'dynamic\' or \'static\'</strong>';
}
if (xtc_not_null($banner['banners_html_text'])) {
$banner_string = $banner['banners_html_text'];
} else {
$banner_string = '<a href="' . xtc_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" onclick="window.open(this.href); return false;">' . xtc_image(DIR_WS_IMAGES . 'banner/' . $banner['banners_image'], $banner['banners_title']) . '</a>';
}
xtc_update_banner_display_count($banner['banners_id']);
return $banner_string;
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:32,代码来源:xtc_display_banner.inc.php
示例4: chronopost
/**
* class constructor
*/
function chronopost()
{
$this->code = 'chronopost';
$this->title = MODULE_SHIPPING_CHRONOPOST_TEXT_TITLE;
$this->description = MODULE_SHIPPING_CHRONOPOST_TEXT_DESCRIPTION;
$this->sort_order = MODULE_SHIPPING_CHRONOPOST_SORT_ORDER;
$this->icon = DIR_WS_ICONS . 'shipping_chronopost.gif';
$this->tax_class = MODULE_SHIPPING_CHRONOPOST_TAX_CLASS;
$this->enabled = MODULE_SHIPPING_CHRONOPOST_STATUS == 'True' ? true : false;
/**
* CUSTOMIZE THIS SETTING FOR THE NUMBER OF chronopost NEEDED
*/
$this->num_chronopost = 10;
//NBen je remplace 1 par 10
if ($this->enabled == true && (int) MODULE_SHIPPING_CHRONOPOST_ZONE > 0) {
$check_flag = false;
$check_query = xtc_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_CHRONOPOST_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while ($check = xtc_db_fetch_array($check_query)) {
if ($check['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check['zone_id'] == $order->delivery['zone_id']) {
$check_flag = true;
break;
}
}
if ($check_flag == false) {
$this->enabled = false;
}
}
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:34,代码来源:chronopost.php
示例5: xtc_address_format
function xtc_address_format($address_format_id, $address, $html, $boln, $eoln)
{
$address_format_query = xtc_db_query("select address_format as format from " . TABLE_ADDRESS_FORMAT . " where address_format_id = '" . xtc_db_input((int) $address_format_id) . "'");
$address_format = xtc_db_fetch_array($address_format_query);
$company = addslashes($address['company']);
$firstname = addslashes($address['firstname']);
$lastname = addslashes($address['lastname']);
$street = addslashes($address['street_address']);
$suburb = addslashes($address['suburb']);
$city = addslashes($address['city']);
$state = addslashes($address['state']);
$country_id = $address['country_id'];
$zone_id = $address['zone_id'];
$postcode = addslashes($address['postcode']);
$zip = $postcode;
$country = xtc_get_country_name($country_id);
$state = xtc_get_zone_code($country_id, $zone_id, $state);
if ($html) {
// HTML Mode
$HR = '<hr />';
$hr = '<hr />';
if ($boln == '' && $eoln == "\n") {
// Values not specified, use rational defaults
$CR = '<br />';
$cr = '<br />';
$eoln = $cr;
} else {
// Use values supplied
$CR = $eoln . $boln;
$cr = $CR;
}
} else {
// Text Mode
$CR = $eoln;
$cr = $CR;
$HR = '----------------------------------------';
$hr = '----------------------------------------';
}
$statecomma = '';
$streets = $street;
if ($suburb != '') {
$streets = $street . $cr . $suburb;
}
if ($firstname == '') {
$firstname = addslashes($address['name']);
}
if ($country == '') {
$country = addslashes($address['country']);
}
if ($state != '') {
$statecomma = $state . ', ';
}
$fmt = $address_format['format'];
eval("\$address = \"{$fmt}\";");
if (ACCOUNT_COMPANY == 'true' && xtc_not_null($company)) {
$address = $company . $cr . $address;
}
$address = stripslashes($address);
return $address;
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:60,代码来源:xtc_address_format.inc.php
示例6: xtc_get_tax_rate
function xtc_get_tax_rate($class_id, $country_id = -1, $zone_id = -1)
{
if ($country_id == -1 && $zone_id == -1) {
if (!isset($_SESSION['customer_id'])) {
$country_id = STORE_COUNTRY;
$zone_id = STORE_ZONE;
} else {
$country_id = $_SESSION['customer_country_id'];
$zone_id = $_SESSION['customer_zone_id'];
}
} else {
$country_id = $country_id;
$zone_id = $zone_id;
}
$tax_query = xtDBquery("select sum(tax_rate) as tax_rate from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . xtc_db_input((int) $country_id) . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . xtc_db_input((int) $zone_id) . "') and tr.tax_class_id = '" . xtc_db_input((int) $class_id) . "' group by tr.tax_priority");
if (xtc_db_num_rows($tax_query, true)) {
$tax_multiplier = 1.0;
while ($tax = xtc_db_fetch_array($tax_query, true)) {
$tax_multiplier *= 1.0 + $tax['tax_rate'] / 100;
}
return ($tax_multiplier - 1.0) * 100;
} else {
return 0;
}
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:25,代码来源:xtc_get_tax_rate.inc.php
示例7: get_category_tree
function get_category_tree($parent_id = '0', $spacing = '', $exclude = '', $category_tree_array = '', $include_itself = false, $cPath = '')
{
if ($parent_id == 0) {
$cPath = '';
} else {
$cPath .= $parent_id . '_';
}
if (!is_array($category_tree_array)) {
$category_tree_array = array();
}
if (sizeof($category_tree_array) < 1 && $exclude != '0') {
$category_tree_array[] = array('id' => '0', 'text' => TEXT_TOP);
}
if ($include_itself) {
// $category_query = "select cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd where cd.language_id = '" . $_SESSION['languages_id'] . "' and c.categories_status = '1' and cd.categories_id = '" . $parent_id . "'";
$category_query = xtDBquery($category_query);
$category_query = "select cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd where cd.language_id = '" . $_SESSION['languages_id'] . "' and c.categories_status = '1' and cd.categories_id = '" . $parent_id . "' order by cd.categories_name ";
$category = xtc_db_fetch_array($category_query, true);
$category_tree_array[] = array('id' => $parent_id, 'text' => $category['categories_name']);
}
$categories_query = "select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . $_SESSION['languages_id'] . "' and c.parent_id = '" . $parent_id . "' and c.categories_status = '1' order by cd.categories_name";
$categories_query = xtDBquery($categories_query);
while ($categories = xtc_db_fetch_array($categories_query, true)) {
$SEF_link = xtc_href_link(FILENAME_DEFAULT, xtc_category_link($categories['categories_id'], $categories['categories_name']));
if ($exclude != $categories['categories_id']) {
$category_tree_array[] = array('id' => $categories['categories_id'], 'text' => $spacing . $categories['categories_name'], 'link' => $SEF_link);
}
$category_tree_array = get_category_tree($categories['categories_id'], $spacing . ' ', $exclude, $category_tree_array, false, $cPath);
}
return $category_tree_array;
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:31,代码来源:sitemap.php
示例8: chp
/**
* class constructor
*/
function chp()
{
global $order;
$this->code = 'chp';
$this->title = MODULE_SHIPPING_CHP_TEXT_TITLE;
$this->description = MODULE_SHIPPING_CHP_TEXT_DESCRIPTION;
$this->sort_order = MODULE_SHIPPING_CHP_SORT_ORDER;
$this->icon = DIR_WS_ICONS . 'shipping_chp.gif';
$this->tax_class = MODULE_SHIPPING_CHP_TAX_CLASS;
$this->enabled = MODULE_SHIPPING_CHP_STATUS == 'True' ? true : false;
if ($this->enabled == true && (int) MODULE_SHIPPING_CHP_ZONE > 0) {
$check_flag = false;
$check_query = xtc_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_CHP_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while ($check = xtc_db_fetch_array($check_query)) {
if ($check['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check['zone_id'] == $order->delivery['zone_id']) {
$check_flag = true;
break;
}
}
if ($check_flag == false) {
$this->enabled = false;
}
}
$this->types = array('ECO' => 'Economy', 'PRI' => 'Priority', 'URG' => 'Urgent');
/**
* CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED
*/
$this->num_chp = 7;
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:35,代码来源:chp.php
示例9: xtc_address_label
function xtc_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n")
{
$address_query = xtc_db_query("select entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . xtc_db_input((int) $customers_id) . "' and address_book_id = '" . xtc_db_input((int) $address_id) . "'");
$address = xtc_db_fetch_array($address_query);
$format_id = xtc_get_address_format_id($address['country_id']);
return xtc_address_format($format_id, $address, $html, $boln, $eoln);
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:7,代码来源:xtc_address_label.inc.php
示例10: fedexeu
function fedexeu()
{
global $order;
$this->code = 'fedexeu';
$this->title = MODULE_SHIPPING_FEDEXEU_TEXT_TITLE;
$this->description = MODULE_SHIPPING_FEDEXEU_TEXT_DESCRIPTION;
$this->sort_order = MODULE_SHIPPING_FEDEXEU_SORT_ORDER;
$this->icon = DIR_WS_ICONS . 'shipping_fedexeu.gif';
$this->tax_class = MODULE_SHIPPING_FEDEXEU_TAX_CLASS;
$this->enabled = MODULE_SHIPPING_FEDEXEU_STATUS == 'True' ? true : false;
if ($this->enabled == true && (int) MODULE_SHIPPING_FEDEXEU_ZONE > 0) {
$check_flag = false;
$check_query = xtc_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_FEDEXEU_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while ($check = xtc_db_fetch_array($check_query)) {
if ($check['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check['zone_id'] == $order->delivery['zone_id']) {
$check_flag = true;
break;
}
}
if ($check_flag == false) {
$this->enabled = false;
}
}
$this->types = array('ENV' => 'FedEx Envelope', 'PAK' => 'FedEx Pak', 'BOX' => 'FedEx Box');
/**
* CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED
*/
$this->num_fedexeu = 8;
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:32,代码来源:fedexeu.php
示例11: update_status
function update_status()
{
global $order;
$check_order_query = xtc_db_query("select count(*) as count from " . TABLE_ORDERS . " where customers_id = '" . (int) $_SESSION['customer_id'] . "'");
$order_check = xtc_db_fetch_array($check_order_query);
if ($order_check['count'] < MODULE_PAYMENT_INVOICE_MIN_ORDER) {
$check_flag = false;
$this->enabled = false;
} else {
$check_flag = true;
if ($this->enabled == true && (int) MODULE_PAYMENT_INVOICE_ZONE > 0) {
$check_flag = false;
$check_query = xtc_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_INVOICE_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while ($check = xtc_db_fetch_array($check_query)) {
if ($check['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check['zone_id'] == $order->delivery['zone_id']) {
$check_flag = true;
break;
}
}
}
if ($check_flag == false) {
$this->enabled = false;
}
}
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:28,代码来源:invoice.php
示例12: xtc_product_link
function xtc_product_link($pID, $name = '')
{
#Check for current category link
$c_path = $_SERVER['QUERY_STRING'];
if (strpos($c_path, 'cPath') !== false) {
$category_path = substr($c_path, strpos($c_path, '=') + 1);
$categorie_previous = end(explode('_', $category_path));
$cat_children = array();
$cat_children = xtc_get_categories_children($categorie_previous);
foreach ($cat_children as $linked_cat) {
$category_query_check = "select p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = '" . (int) $pID . "' and p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id != 0 and p2c.categories_id = '" . $linked_cat . "'";
$category_query_check = xtDBquery($category_query_check);
if (xtc_db_num_rows($category_query_check, true)) {
$cID = xtc_db_fetch_array($category_query_check)['categories_id'];
break;
}
}
}
#Take default categorie id
if (!isset($cID)) {
$category_query = "select p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = '" . (int) $pID . "' and p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id != 0";
$category_query = xtDBquery($category_query);
if (xtc_db_num_rows($category_query, true)) {
$cID = xtc_db_fetch_array($category_query)['categories_id'];
}
}
#Create category path from category ID
$categories = array();
xtc_get_parent_categories($categories, $cID);
$categories = array_reverse($categories);
$categories[] = $cID;
$cPath = implode('_', $categories);
return 'products_id=' . $pID . '&cPath=' . $cPath;
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:34,代码来源:xtc_product_link.inc.php
示例13: affiliate_insert
function affiliate_insert($sql_data_array, $affiliate_parent = 0)
{
// LOCK TABLES
@mysql_query("LOCK TABLES " . TABLE_AFFILIATE . " WRITE");
if ($affiliate_parent > 0) {
$affiliate_root_query = xtc_db_query("select affiliate_root, affiliate_rgt, affiliate_lft�from " . TABLE_AFFILIATE . " where affiliate_id = '" . $affiliate_parent . "' ");
// Check if we have a parent affiliate
if ($affiliate_root_array = xtc_db_fetch_array($affiliate_root_query)) {
xtc_db_query("update " . TABLE_AFFILIATE . " SET affiliate_lft = affiliate_lft + 2 WHERE affiliate_root = '" . $affiliate_root_array['affiliate_root'] . "' and affiliate_lft > " . $affiliate_root_array['affiliate_rgt'] . " AND affiliate_rgt >= " . $affiliate_root_array['affiliate_rgt'] . " ");
xtc_db_query("update " . TABLE_AFFILIATE . " SET affiliate_rgt = affiliate_rgt + 2 WHERE affiliate_root = '" . $affiliate_root_array['affiliate_root'] . "' and affiliate_rgt >= " . $affiliate_root_array['affiliate_rgt'] . " ");
$sql_data_array['affiliate_root'] = $affiliate_root_array['affiliate_root'];
$sql_data_array['affiliate_lft'] = $affiliate_root_array['affiliate_rgt'];
$sql_data_array['affiliate_rgt'] = $affiliate_root_array['affiliate_rgt'] + 1;
xtc_db_perform(TABLE_AFFILIATE, $sql_data_array);
$affiliate_id = xtc_db_insert_id();
}
// no parent -> new root
} else {
$sql_data_array['affiliate_lft'] = '1';
$sql_data_array['affiliate_rgt'] = '2';
xtc_db_perform(TABLE_AFFILIATE, $sql_data_array);
$affiliate_id = xtc_db_insert_id();
xtc_db_query("update " . TABLE_AFFILIATE . " set affiliate_root = '" . $affiliate_id . "' where affiliate_id = '" . $affiliate_id . "' ");
}
// UNLOCK TABLES
@mysql_query("UNLOCK TABLES");
return $affiliate_id;
}
开发者ID:BackupTheBerlios,项目名称:xtc-affiliate,代码行数:28,代码来源:affiliate_insert.inc.php
示例14: xtc_get_products_image
function xtc_get_products_image($products_id = '')
{
$product_query = "select products_image from " . TABLE_PRODUCTS . " where products_id = '" . xtc_db_input((int) $products_id) . "'";
$product_query = xtDBquery($product_query);
$products_image = xtc_db_fetch_array($product_query, true);
return $products_image['products_image'];
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:7,代码来源:xtc_get_products_image.inc.php
示例15: xtc_get_download
function xtc_get_download($content_id)
{
$content_query = xtc_db_query("SELECT\n\t\t\t\t\tcontent_file,\n\t\t\t\t\tcontent_read\n\t\t\t\t\tFROM " . TABLE_PRODUCTS_CONTENT . "\n\t\t\t\t\tWHERE content_id='" . xtc_db_input((int) $content_id) . "'");
$content_data = xtc_db_fetch_array($content_query);
// update file counter
xtc_db_query("UPDATE \n\t\t\t" . TABLE_PRODUCTS_CONTENT . " \n\t\t\tSET content_read='" . ($content_data['content_read'] + 1) . "'\n\t\t\tWHERE content_id='" . xtc_db_input((int) $content_id) . "'");
// original filename
$filename = DIR_FS_CATALOG . 'media/products/' . $content_data['content_file'];
$backup_filename = DIR_FS_CATALOG . 'media/products/backup/' . $content_data['content_file'];
// create md5 hash id from original file
$orign_hash_id = md5_file($filename);
clearstatcache();
// create new filename with timestamp
$timestamp = str_replace('.', '', microtime());
$timestamp = str_replace(' ', '', $timestamp);
$new_filename = DIR_FS_CATALOG . 'media/products/' . $timestamp . strstr($content_data['content_file'], '.');
// rename file
rename($filename, $new_filename);
if (file_exists($new_filename)) {
header("Content-type: application/force-download");
header("Content-Disposition: attachment; filename=" . $new_filename);
@readfile($new_filename);
// rename file to original name
rename($new_filename, $filename);
$new_hash_id = md5_file($filename);
clearstatcache();
// check hash id of file again, if not same, get backup!
if ($new_hash_id != $orign_hash_id) {
copy($backup_filename, $filename);
}
}
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:32,代码来源:xtc_get_download.inc.php
示例16: checkAttribute
function checkAttribute($current_value_id, $current_pid, $current_product_option_id)
{
global $attr_array, $attr_dl_array;
//web28 - 2012-07-15 - change global variable list to array
$query = "SELECT *\n FROM " . TABLE_PRODUCTS_ATTRIBUTES . "\n WHERE options_values_id = '" . $current_value_id . "'\n AND products_id = ' " . $current_pid . "'\n AND options_id = '" . $current_product_option_id . "'";
$result = xtc_db_query($query);
$isFound = xtc_db_num_rows($result);
$attr_array = array();
$attr_dl_array = array();
if ($isFound) {
while ($line = xtc_db_fetch_array($result)) {
// download function start
$attr_array = $line;
$dl_sql = xtc_db_query("SELECT products_attributes_maxdays,\n products_attributes_filename,\n products_attributes_maxcount\n FROM " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . "\n WHERE products_attributes_id = '" . $line['products_attributes_id'] . "'") or die(mysqli_error(xtc_db_connect()));
$attr_dl_array = xtc_db_fetch_array($dl_sql);
// download function end
//price prefixes
$attr_array['posCheck'] = $line['price_prefix'] == '+' ? ' SELECTED' : '';
$attr_array['negCheck'] = $line['price_prefix'] == '-' ? ' SELECTED' : '';
//weight prefixes
$attr_array['posCheck_weight'] = $line['weight_prefix'] == '+' ? ' SELECTED' : '';
$attr_array['negCheck_weight'] = $line['weight_prefix'] == '-' ? ' SELECTED' : '';
//echo print_r($attr_array).'<br>';
}
return true;
} else {
return false;
}
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:29,代码来源:new_attributes_functions.php
示例17: xtc_get_shop_conf
function xtc_get_shop_conf($configuration_key, $result_type = 'ASSOC')
{
$configuration_values = false;
if ($result_type == 'ASSOC' || $result_type == 'NUMERIC') {
if (is_array($configuration_key)) {
foreach ($configuration_key as $key) {
$configuration_query = xtc_db_query("\n\t\t\t\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\t\t\t\tconfiguration_value\n\t\t\t\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\t\t\t\tshop_configuration\n\t\t\t\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\t\t\t\tconfiguration_key = '" . xtc_db_input($key) . "'\n\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\t\t\t");
if (xtc_db_num_rows($configuration_query) == 1) {
if ($configuration_values == false) {
$configuration_values = array();
}
$configuration_row = xtc_db_fetch_array($configuration_query);
if ($result_type == 'ASSOC') {
$configuration_values[$key] = $configuration_row['configuration_value'];
} else {
$configuration_values[] = $configuration_row['configuration_value'];
}
}
}
} else {
$configuration_query = xtc_db_query("\n\t\t\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\t\t\tconfiguration_value\n\t\t\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\t\t\tshop_configuration\n\t\t\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\t\t\tconfiguration_key = '" . xtc_db_input($configuration_key) . "'\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\t\t");
if (xtc_db_num_rows($configuration_query) == 1) {
if ($configuration_values == false) {
$configuration_values = '';
}
$configuration_row = xtc_db_fetch_array($configuration_query);
$configuration_values = $configuration_row['configuration_value'];
}
}
}
return $configuration_values;
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:32,代码来源:xtc_get_shop_conf.inc.php
示例18: item
function item()
{
global $order;
$this->code = 'item';
$this->title = MODULE_SHIPPING_ITEM_TEXT_TITLE;
$this->description = MODULE_SHIPPING_ITEM_TEXT_DESCRIPTION;
$this->sort_order = MODULE_SHIPPING_ITEM_SORT_ORDER;
$this->icon = '';
$this->tax_class = MODULE_SHIPPING_ITEM_TAX_CLASS;
$this->enabled = MODULE_SHIPPING_ITEM_STATUS == 'True' ? true : false;
if ($this->enabled == true && (int) MODULE_SHIPPING_ITEM_ZONE > 0) {
$check_flag = false;
$check_query = xtc_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_ITEM_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while ($check = xtc_db_fetch_array($check_query)) {
if ($check['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check['zone_id'] == $order->delivery['zone_id']) {
$check_flag = true;
break;
}
}
if ($check_flag == false) {
$this->enabled = false;
}
}
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:27,代码来源:item.php
示例19: xtc_get_products_stock
function xtc_get_products_stock($products_id)
{
$products_id = xtc_get_prid($products_id);
$stock_query = xtc_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . xtc_db_input((int) $products_id) . "'");
$stock_values = xtc_db_fetch_array($stock_query);
return $stock_values['products_quantity'];
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:7,代码来源:xtc_get_products_stock.inc.php
示例20: dhl
/**
* class constructor
*/
function dhl()
{
global $order;
$this->code = 'dhl';
$this->title = MODULE_SHIPPING_DHL_TEXT_TITLE;
$this->description = MODULE_SHIPPING_DHL_TEXT_DESCRIPTION;
$this->sort_order = MODULE_SHIPPING_DHL_SORT_ORDER;
$this->icon = DIR_WS_ICONS . 'shipping_dhl.gif';
$this->tax_class = MODULE_SHIPPING_DHL_TAX_CLASS;
$this->enabled = MODULE_SHIPPING_DHL_STATUS == 'True' ? true : false;
if ($this->enabled == true && (int) MODULE_SHIPPING_DHL_ZONE > 0) {
$check_flag = false;
$check_query = xtc_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_DHL_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while ($check = xtc_db_fetch_array($check_query)) {
if ($check['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check['zone_id'] == $order->delivery['zone_id']) {
$check_flag = true;
break;
}
}
if ($check_flag == false) {
$this->enabled = false;
}
}
$this->types = array('ECX' => 'EU Express Service', 'DOX' => 'Document Express Service', 'SDX' => 'Start Day Express Service', 'MDX' => 'Mid Day Express Service', 'WPX' => 'Waren Express Service');
/**
* CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED
*/
$this->num_dhl = 10;
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:35,代码来源:dhl.php
注:本文中的xtc_db_fetch_array函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论