本文整理汇总了PHP中vam_db_num_rows函数的典型用法代码示例。如果您正苦于以下问题:PHP vam_db_num_rows函数的具体用法?PHP vam_db_num_rows怎么用?PHP vam_db_num_rows使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vam_db_num_rows函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: vam_get_tax_description
function vam_get_tax_description($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 = vamDBquery("select tax_description 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 = '" . $country_id . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . $zone_id . "') and tr.tax_class_id = '" . $class_id . "' order by tr.tax_priority");
if (vam_db_num_rows($tax_query, true)) {
$tax_description = '';
while ($tax = vam_db_fetch_array($tax_query, true)) {
$tax_description .= $tax['tax_description'] . ' + ';
}
$tax_description = substr($tax_description, 0, -3);
return $tax_description;
} else {
return TEXT_UNKNOWN_TAX_RATE;
}
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:26,代码来源:vam_get_tax_description.inc.php
示例2: permissions_check_for_install
function permissions_check_for_install()
{
foreach ($this->req as $id => $require) {
if (strtolower($require) == 'jos_commerce') {
if (!$this->isJoscom()) {
$this->error('This CIP is only for Jos-Commerce environment!');
return $this->error;
}
continue;
}
if (strtolower($require) == 'os_commerce') {
if ($this->isJoscom()) {
$this->error('This CIP is only for OSCommerce environment!');
return $this->error;
}
continue;
}
$query = 'select * from ' . TABLE_CIP . ' where cip_ident="' . $require . '"' . ($this->ver[$id] != NULL ? ' and cip_version="' . $this->ver[$id] . '"' : '') . ' and cip_installed=1';
$result = cip_db_query($query, 'return');
if (vam_db_num_rows($result) == 0) {
//required CIP not installed
$this->error('CIP ' . $require . ' is not installed and is required !');
return $this->error;
}
}
return $this->error;
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:27,代码来源:ci_tag_requirements.class.php
示例3: get_data_from_xml_parser
function get_data_from_xml_parser($xml_data = '')
{
$this->data['cip_ident'] = $this->getTagText($xml_data, 'cip', 0);
$this->data['cip_version'] = $this->getTagAttr($xml_data, 'cip', 0, 'version');
$active = false;
if ($this->data['cip_ident'] == 'jos_commerce') {
if ($this->isJoscom()) {
$active = true;
}
} else {
$query = 'select * from ' . TABLE_CIP . ' where cip_ident="' . $this->data['cip_ident'] . '"' . ($this->data['cip_version'] == NULL ? '' : ' and cip_version="' . $this->data['cip_version'] . '"') . ' and cip_installed=1';
$result = cip_db_query($query, 'return');
$active = vam_db_num_rows($result) > 0;
}
if ($active) {
//if cip installed
$obj = $xml_data->getElementsByTagName('active');
if (is_object($obj)) {
$mtag = $obj->item(0);
}
} else {
$obj = $xml_data->getElementsByTagName('inactive');
if (is_object($obj)) {
$mtag = $obj->item(0);
}
}
if (is_object($mtag)) {
$this->getSubTags($mtag);
}
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:30,代码来源:ci_tag_depend.class.php
示例4: vam_display_banner
function vam_display_banner($action, $identifier)
{
if ($action == 'dynamic') {
$banners_query = vam_db_query("select count(*) as count from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'");
$banners = vam_db_fetch_array($banners_query);
if ($banners['count'] > 0) {
$banner = vam_random_select("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'");
} else {
return '<b>VaM Shop ERROR! (vam_display_banner(' . $action . ', ' . $identifier . ') -> No banners with group \'' . $identifier . '\' found!</b>';
}
} elseif ($action == 'static') {
if (is_array($identifier)) {
$banner = $identifier;
} else {
$banner_query = vam_db_query("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . $identifier . "'");
if (vam_db_num_rows($banner_query)) {
$banner = vam_db_fetch_array($banner_query);
} else {
return '<b>VaM Shop ERROR! (vam_display_banner(' . $action . ', ' . $identifier . ') -> Banner with ID \'' . $identifier . '\' not found, or status inactive</b>';
}
}
} else {
return '<b>VaM Shop ERROR! (vam_display_banner(' . $action . ', ' . $identifier . ') -> Unknown $action parameter value - it must be either \'dynamic\' or \'static\'</b>';
}
if (vam_not_null($banner['banners_html_text'])) {
$banner_string = $banner['banners_html_text'];
} else {
$banner_string = '<a href="' . vam_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" onclick="window.open(this.href); return false;">' . vam_image(DIR_WS_IMAGES . 'banner/' . $banner['banners_image'], $banner['banners_title']) . '</a>';
}
vam_update_banner_display_count($banner['banners_id']);
return $banner_string;
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:32,代码来源:vam_display_banner.inc.php
示例5: query
function query($order_id)
{
$order_query = vam_db_query("select customers_name,\n customers_cid,\n customers_id,\n customers_vat_id,\n customers_company,\n customers_street_address,\n customers_suburb,\n customers_city,\n customers_postcode,\n customers_state,\n customers_country,\n customers_telephone,\n customers_email_address,\n customers_address_format_id,\n delivery_name,\n delivery_company,\n delivery_street_address,\n delivery_suburb,\n delivery_city,\n delivery_postcode,\n delivery_state,\n delivery_country,\n delivery_address_format_id,\n billing_name,\n billing_company,\n billing_street_address,\n billing_suburb,\n billing_city,\n billing_postcode,\n billing_state,\n billing_country,\n billing_address_format_id,\n payment_method,\n payment_class,\n\t\t\t\t shipping_class,\n\t\t\t\t cc_type,\n cc_owner,\n cc_number,\n cc_expires,\n cc_cvv,\n comments,\n currency,\n currency_value,\n date_purchased,\n orders_status,\n last_modified,\n orig_reference, \n login_reference,\n customers_status,\n customers_status_name,\n customers_status_image,\n customers_ip,\n language,\n customers_status_discount\n from " . TABLE_ORDERS . " where\n orders_id = '" . vam_db_input($order_id) . "'");
$order = vam_db_fetch_array($order_query);
$totals_query = vam_db_query("select title, text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . vam_db_input($order_id) . "' order by sort_order");
while ($totals = vam_db_fetch_array($totals_query)) {
$this->totals[] = array('title' => $totals['title'], 'text' => $totals['text']);
}
$this->info = array('currency' => $order['currency'], 'currency_value' => $order['currency_value'], 'payment_method' => $order['payment_method'], 'payment_class' => $order['payment_class'], 'shipping_class' => $order['shipping_class'], 'status' => $order['customers_status'], 'status_name' => $order['customers_status_name'], 'status_image' => $order['customers_status_image'], 'status_discount' => $order['customers_status_discount'], 'cc_type' => $order['cc_type'], 'cc_owner' => $order['cc_owner'], 'cc_number' => $order['cc_number'], 'cc_expires' => $order['cc_expires'], 'cc_cvv' => $order['cc_cvv'], 'comments' => $order['comments'], 'language' => $order['language'], 'date_purchased' => $order['date_purchased'], 'orders_status' => $order['orders_status'], 'last_modified' => $order['last_modified']);
$this->customer = array('name' => $order['customers_name'], 'company' => $order['customers_company'], 'csID' => $order['customers_cid'], 'vat_id' => $order['customers_vat_id'], 'shop_id' => $order['shop_id'], 'ID' => $order['customers_id'], 'cIP' => $order['customers_ip'], 'street_address' => $order['customers_street_address'], 'suburb' => $order['customers_suburb'], 'city' => $order['customers_city'], 'postcode' => $order['customers_postcode'], 'state' => $order['customers_state'], 'country' => $order['customers_country'], 'format_id' => $order['customers_address_format_id'], 'telephone' => $order['customers_telephone'], 'email_address' => $order['customers_email_address'], 'orig_reference' => $order['orig_reference'], 'login_reference' => $order['login_reference']);
$this->delivery = array('name' => $order['delivery_name'], 'company' => $order['delivery_company'], 'street_address' => $order['delivery_street_address'], 'suburb' => $order['delivery_suburb'], 'city' => $order['delivery_city'], 'postcode' => $order['delivery_postcode'], 'state' => $order['delivery_state'], 'country' => $order['delivery_country'], 'format_id' => $order['delivery_address_format_id']);
$this->billing = array('name' => $order['billing_name'], 'company' => $order['billing_company'], 'street_address' => $order['billing_street_address'], 'suburb' => $order['billing_suburb'], 'city' => $order['billing_city'], 'postcode' => $order['billing_postcode'], 'state' => $order['billing_state'], 'country' => $order['billing_country'], 'format_id' => $order['billing_address_format_id']);
$index = 0;
$orders_products_query = vam_db_query("select\n orders_products_id,products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price,allow_tax, products_discount_made\n from\n " . TABLE_ORDERS_PRODUCTS . "\n where\n orders_id ='" . vam_db_input($order_id) . "'");
while ($orders_products = vam_db_fetch_array($orders_products_query)) {
$this->products[$index] = array('qty' => $orders_products['products_quantity'], 'name' => $orders_products['products_name'], 'id' => $orders_products['products_id'], 'opid' => $orders_products['orders_products_id'], 'model' => $orders_products['products_model'], 'tax' => $orders_products['products_tax'], 'price' => $orders_products['products_price'], 'discount' => $orders_products['products_discount_made'], 'final_price' => $orders_products['final_price'], 'allow_tax' => $orders_products['allow_tax']);
$subindex = 0;
$attributes_query = vam_db_query("select products_options, products_options_values, options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . vam_db_input($order_id) . "' and orders_products_id = '" . $orders_products['orders_products_id'] . "'");
if (vam_db_num_rows($attributes_query)) {
while ($attributes = vam_db_fetch_array($attributes_query)) {
$this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'], 'value' => $attributes['products_options_values'], 'prefix' => $attributes['price_prefix'], 'price' => $attributes['options_values_price']);
$subindex++;
}
}
$index++;
}
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:27,代码来源:order.php
示例6: vam_get_tax_rate
function vam_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 = vamDBquery("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 = '" . $country_id . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . $zone_id . "') and tr.tax_class_id = '" . $class_id . "' group by tr.tax_priority");
if (vam_db_num_rows($tax_query, true)) {
$tax_multiplier = 1.0;
while ($tax = vam_db_fetch_array($tax_query, true)) {
$tax_multiplier *= 1.0 + $tax['tax_rate'] / 100;
}
return ($tax_multiplier - 1.0) * 100;
} else {
return 0;
}
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:25,代码来源:vam_get_tax_rate.inc.php
示例7: check
function check()
{
if (!isset($this->_check)) {
$check_query = vam_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_TOTAL_STATUS'");
$this->_check = vam_db_num_rows($check_query);
}
return $this->_check;
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:8,代码来源:ot_total.php
示例8: vam_expire_specials
function vam_expire_specials()
{
$specials_query = vam_db_query("select specials_id from " . TABLE_SPECIALS . " where status = '1' and now() >= expires_date and expires_date > 0");
if (vam_db_num_rows($specials_query)) {
while ($specials = vam_db_fetch_array($specials_query)) {
vam_set_specials_status($specials['specials_id'], '0');
}
}
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:9,代码来源:vam_expire_specials.inc.php
示例9: vam_get_address_format_id
function vam_get_address_format_id($country_id)
{
$address_format_query = vam_db_query("select address_format_id as format_id from " . TABLE_COUNTRIES . " where countries_id = '" . $country_id . "'");
if (vam_db_num_rows($address_format_query)) {
$address_format = vam_db_fetch_array($address_format_query);
return $address_format['format_id'];
} else {
return '1';
}
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:10,代码来源:vam_get_address_format_id.inc.php
示例10: db_query
function db_query($blz)
{
$blz_query = vam_db_query("SELECT * from " . TABLE_BANKTRANSFER . " WHERE blz = '" . $blz . "'");
if (vam_db_num_rows($blz_query)) {
$data = vam_db_fetch_array($blz_query);
} else {
$data = -1;
}
return $data;
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:10,代码来源:banktransfer_validation.php
示例11: vam_get_zone_name
function vam_get_zone_name($country_id, $zone_id, $default_zone)
{
$zone_query = vam_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . $country_id . "' and zone_id = '" . $zone_id . "'");
if (vam_db_num_rows($zone_query)) {
$zone = vam_db_fetch_array($zone_query);
return $zone['zone_name'];
} else {
return $default_zone;
}
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:10,代码来源:vam_get_zone_name.inc.php
示例12: query
function query($order_id)
{
global $shipping;
$order_query = vam_db_query("select * from " . TABLE_ORDERS . " where orders_id = '" . (int) $order_id . "'");
$order = vam_db_fetch_array($order_query);
$totals_query = vam_db_query("select * from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int) $order_id . "' order by sort_order");
while ($totals = vam_db_fetch_array($totals_query)) {
$this->totals[] = array('title' => $totals['title'], 'text' => $totals['text'], 'class' => $totals['class'], 'value' => $totals['value'], 'sort_order' => $totals['sort_order'], 'orders_total_id' => $totals['orders_total_id']);
}
$this->info = array('currency' => $order['currency'], 'currency_value' => $order['currency_value'], 'payment_method' => $order['payment_method'], 'payment_class' => $order['payment_class'], 'shipping_class' => $order['shipping_class'], 'status' => $order['customers_status'], 'status_name' => $order['customers_status_name'], 'status_image' => $order['customers_status_image'], 'status_discount' => $order['customers_status_discount'], 'cc_type' => $order['cc_type'], 'cc_owner' => $order['cc_owner'], 'cc_number' => $order['cc_number'], 'cc_expires' => $order['cc_expires'], 'cc_cvv' => $order['cc_cvv'], 'comments' => $order['comments'], 'language' => $order['language'], 'date_purchased' => $order['date_purchased'], 'orders_status' => $order['orders_status'], 'last_modified' => $order['last_modified'], 'shipping_method' => $shipping['title'], 'shipping_cost' => $shipping['cost'], 'shipping_id' => $order['shipping_module'], 'subtotal' => 0, 'tax' => 0, 'tax_groups' => array());
$this->customer = array('name' => $order['customers_name'], 'company' => $order['customers_company'], 'csID' => $order['customers_cid'], 'vat_id' => $order['customers_vat_id'], 'shop_id' => $order['shop_id'], 'ID' => $order['customers_id'], 'cIP' => $order['customers_ip'], 'street_address' => $order['customers_street_address'], 'suburb' => $order['customers_suburb'], 'city' => $order['customers_city'], 'postcode' => $order['customers_postcode'], 'state' => $order['customers_state'], 'country' => $order['customers_country'], 'country_id' => oe_get_country_id($order['customers_country']), 'zone_id' => oe_get_zone_id(oe_get_country_id($order['customers_country']), $order['customers_state']), 'format_id' => $order['customers_address_format_id'], 'telephone' => $order['customers_telephone'], 'email_address' => $order['customers_email_address'], 'orig_reference' => $order['orig_reference'], 'login_reference' => $order['login_reference']);
$this->delivery = array('name' => $order['delivery_name'], 'company' => $order['delivery_company'], 'street_address' => $order['delivery_street_address'], 'suburb' => $order['delivery_suburb'], 'city' => $order['delivery_city'], 'postcode' => $order['delivery_postcode'], 'state' => $order['delivery_state'], 'country' => $order['delivery_country'], 'country_id' => oe_get_country_id($order['delivery_country']), 'zone_id' => oe_get_zone_id(oe_get_country_id($order['delivery_country']), $order['delivery_state']), 'format_id' => $order['delivery_address_format_id']);
$this->billing = array('name' => $order['billing_name'], 'company' => $order['billing_company'], 'street_address' => $order['billing_street_address'], 'suburb' => $order['billing_suburb'], 'city' => $order['billing_city'], 'postcode' => $order['billing_postcode'], 'state' => $order['billing_state'], 'country' => $order['billing_country'], 'country_id' => oe_get_country_id($order['billing_country']), 'zone_id' => oe_get_zone_id(oe_get_country_id($order['billing_country']), $order['billing_state']), 'format_id' => $order['billing_address_format_id']);
$index = 0;
$orders_products_query = vam_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int) $order_id . "' order by orders_products_id");
while ($orders_products = vam_db_fetch_array($orders_products_query)) {
$orders_products_tax_query = vam_db_query("select products_tax_class_id from " . TABLE_PRODUCTS . " where products_id = " . $orders_products['products_id'] . "");
$orders_products_tax = vam_db_fetch_array($orders_products_tax_query);
$this->products[$index] = array('qty' => $orders_products['products_quantity'], 'name' => $orders_products['products_name'], 'model' => $orders_products['products_model'], 'tax' => $orders_products['products_tax'], 'tax_description' => vam_get_tax_description($orders_products_tax['products_tax_class_id'], $this->delivery["country_id"], $this->delivery["zone_id"]), 'price' => $orders_products['products_price'], 'final_price' => $orders_products['products_price'] * $orders_products['products_quantity'], 'products_id' => $orders_products['products_id'], 'orders_products_id' => $orders_products['orders_products_id']);
$subindex = 0;
$attributes_query = vam_db_query("select products_options, products_options_values, options_values_price, price_prefix, orders_products_attributes_id from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int) $order_id . "' and orders_products_id = '" . (int) $orders_products['orders_products_id'] . "'");
if (vam_db_num_rows($attributes_query)) {
while ($attributes = vam_db_fetch_array($attributes_query)) {
$this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'], 'value' => $attributes['products_options_values'], 'prefix' => $attributes['price_prefix'], 'price' => $attributes['options_values_price'], 'orders_products_attributes_id' => $attributes['orders_products_attributes_id']);
$subindex++;
}
}
$shown_price = vam_add_tax($this->products[$index]['price'], $this->products[$index]['tax']) * $this->products[$index]['qty'];
$this->info['subtotal'] += $shown_price;
$products_tax = $this->products[$index]['tax'];
$products_tax_description = $this->products[$index]['tax_description'];
if (DISPLAY_PRICE_WITH_TAX == 'true') {
$this->info['tax'] += $shown_price - $shown_price / ($products_tax < 10 ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax));
if (isset($this->info['tax_groups']["{$products_tax_description}"])) {
$this->info['tax_groups']["{$products_tax_description}"] += $shown_price - $shown_price / ($products_tax < 10 ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax));
} else {
$this->info['tax_groups']["{$products_tax_description}"] = $shown_price - $shown_price / ($products_tax < 10 ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax));
}
} else {
$this->info['tax'] += $products_tax / 100 * $shown_price;
if (isset($this->info['tax_groups']["{$products_tax_description}"])) {
$this->info['tax_groups']["{$products_tax_description}"] += $products_tax / 100 * $shown_price;
} else {
$this->info['tax_groups']["{$products_tax_description}"] = $products_tax / 100 * $shown_price;
}
}
$index++;
}
if (DISPLAY_PRICE_WITH_TAX == 'true') {
$this->info['total'] = $this->info['subtotal'] + $this->info['shipping_cost'];
} else {
$this->info['total'] = $this->info['subtotal'] + $this->info['tax'] + $this->info['shipping_cost'];
}
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:54,代码来源:order.php
示例13: vam_get_tax_class_rate
function vam_get_tax_class_rate($tax_class_id)
{
$tax_multiplier = 0;
$tax_query = vam_db_query("select SUM(tax_rate) as tax_rate from " . TABLE_TAX_RATES . " WHERE tax_class_id = '" . $tax_class_id . "' GROUP BY tax_priority");
if (vam_db_num_rows($tax_query)) {
while ($tax = vam_db_fetch_array($tax_query)) {
$tax_multiplier += $tax['tax_rate'];
}
}
return $tax_multiplier;
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:11,代码来源:easypopulate_functions.php
示例14: vam_get_spsr_zone_id
function vam_get_spsr_zone_id($zone_id)
{
$spsr_zone_query = vam_db_query("select spsr_zone_id from " . TABLE_SPSR_ZONES . " where zone_id = '" . $zone_id . "'");
if (vam_db_num_rows($spsr_zone_query)) {
$spsr_zone = vam_db_fetch_array($spsr_zone_query);
$spsr_zone_id = $spsr_zone['spsr_zone_id'];
return $spsr_zone_id;
} else {
return false;
}
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:11,代码来源:vam_get_spsr_zone_id.inc.php
示例15: vam_activate_banners
function vam_activate_banners()
{
$banners_query = vam_db_query("select banners_id, date_scheduled from " . TABLE_BANNERS . " where date_scheduled != ''");
if (vam_db_num_rows($banners_query)) {
while ($banners = vam_db_fetch_array($banners_query)) {
if (date('Y-m-d H:i:s') >= $banners['date_scheduled']) {
vam_set_banner_status($banners['banners_id'], '1');
}
}
}
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:11,代码来源:vam_activate_banners.inc.php
示例16: checkAttribute
function checkAttribute($current_value_id, $current_pid, $current_product_option_id)
{
global $attribute_value_price, $sortorder, $attribute_value_weight, $attribute_value_weight_prefix, $attribute_value_prefix, $attribute_value_model, $products_attributes_is_pin, $attribute_value_stock, $posCheck, $negCheck, $posCheck_weight, $negCheck_weight, $attribute_value_download_count, $attribute_value_download_expire, $attribute_value_download_filename;
$query = "SELECT * FROM " . TABLE_PRODUCTS_ATTRIBUTES . " where options_values_id = '" . $current_value_id . "' AND products_id = ' " . $current_pid . "' AND options_id = '" . $current_product_option_id . "'";
$result = vam_db_query($query);
$isFound = vam_db_num_rows($result);
if ($isFound) {
while ($line = vam_db_fetch_array($result)) {
// download function start
$dl_sql = vam_db_query("SELECT products_attributes_maxdays, products_attributes_filename, products_attributes_maxcount, products_attributes_is_pin FROM " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " WHERE products_attributes_id = '" . $line['products_attributes_id'] . "'") or die(mysql_error());
$dl_res = vam_db_fetch_array($dl_sql);
$attribute_value_download_filename = $dl_res['products_attributes_filename'];
$attribute_value_download_count = $dl_res['products_attributes_maxcount'];
$attribute_value_download_expire = $dl_res['products_attributes_maxdays'];
$products_attributes_is_pin = $dl_res['products_attributes_is_pin'];
// download function end
$attribute_value_price = $line['options_values_price'];
$sortorder = $line['sortorder'];
$attribute_value_prefix = $line['price_prefix'];
$attribute_value_weight_prefix = $line['weight_prefix'];
$attribute_value_model = $line['attributes_model'];
$attribute_value_stock = $line['attributes_stock'];
$attribute_value_weight = $line['options_values_weight'];
if ($attribute_value_prefix == '+') {
$posCheck = ' SELECTED';
$negCheck = '';
} else {
$posCheck = '';
$negCheck = ' SELECTED';
}
if ($attribute_value_weight_prefix == '+') {
$posCheck_weight = ' SELECTED';
$negCheck_weight = '';
} else {
$posCheck_weight = '';
$negCheck_weight = ' SELECTED';
}
}
return true;
} else {
$attribute_value_price = '';
$sortorder = '';
$attribute_value_weight = '';
$attribute_value_prefix = '';
$attribute_value_weight_prefix = '';
$attribute_value_model = '';
$attribute_value_stock = '';
$posCheck = '';
$negCheck = '';
$posCheck_weight = '';
$negCheck_weight = '';
return false;
}
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:54,代码来源:new_attributes_functions.php
示例17: vam_get_languages_directory
function vam_get_languages_directory($code)
{
$language_query = vam_db_query("select languages_id, directory from " . TABLE_LANGUAGES . " where code = '" . $code . "'");
if (vam_db_num_rows($language_query)) {
$lang = vam_db_fetch_array($language_query);
$_SESSION['languages_id'] = $lang['languages_id'];
return $lang['directory'];
} else {
return false;
}
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:11,代码来源:languages.php
示例18: vam_random_select
function vam_random_select($query)
{
$random_product = '';
$random_query = vam_db_query($query);
$num_rows = vam_db_num_rows($random_query);
if ($num_rows > 0) {
$random_row = vam_rand(0, $num_rows - 1);
vam_db_data_seek($random_query, $random_row);
$random_product = vam_db_fetch_array($random_query);
}
return $random_product;
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:12,代码来源:vam_random_select.inc.php
示例19: vam_get_affiliate_tax_rate
function vam_get_affiliate_tax_rate($class_id, $country_id, $zone_id)
{
$tax_query = vam_db_query("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 = '" . $country_id . "') AND (za.zone_id IS NULL OR za.zone_id = '0' OR za.zone_id = '" . $zone_id . "') AND tr.tax_class_id = '" . $class_id . "' GROUP BY tr.tax_priority");
if (vam_db_num_rows($tax_query)) {
$tax_multiplier = 0;
while ($tax = vam_db_fetch_array($tax_query)) {
$tax_multiplier += $tax['tax_rate'];
}
return $tax_multiplier;
} else {
return 0;
}
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:13,代码来源:affiliate_functions.php
示例20: vam_findTitle
function vam_findTitle($current_pid, $languageFilter)
{
$query = "SELECT * FROM " . TABLE_PRODUCTS_DESCRIPTION . " where language_id = '" . $_SESSION['languages_id'] . "' AND products_id = '" . $current_pid . "'";
$result = vam_db_query($query);
$matches = vam_db_num_rows($result);
if ($matches) {
while ($line = vam_db_fetch_array($result)) {
$productName = $line['products_name'];
}
return $productName;
} else {
return "Something isn't right....";
}
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:14,代码来源:vam_findTitle.inc.php
注:本文中的vam_db_num_rows函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论