• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP vam_db_fetch_array函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中vam_db_fetch_array函数的典型用法代码示例。如果您正苦于以下问题:PHP vam_db_fetch_array函数的具体用法?PHP vam_db_fetch_array怎么用?PHP vam_db_fetch_array使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了vam_db_fetch_array函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: freeamount

 function freeamount()
 {
     global $order;
     $this->code = 'freeamount';
     $this->title = MODULE_SHIPPING_FREEAMOUNT_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_FREEAMOUNT_TEXT_DESCRIPTION;
     $this->icon = '';
     // change $this->icon =  DIR_WS_ICONS . 'shipping_ups.gif'; to some freeshipping icon
     $this->tax_class = MODULE_SHIPPING_FREEAMOUNT_TAX_CLASS;
     $this->sort_order = MODULE_SHIPPING_FREEAMOUNT_SORT_ORDER;
     $this->enabled = MODULE_SHIPPING_FREEAMOUNT_STATUS == 'True' ? true : false;
     if ($this->enabled == true && (int) MODULE_SHIPPING_FREEAMOUNT_ZONE > 0) {
         $check_flag = false;
         $check_query = vam_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_FREEAMOUNT_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
         while ($check = vam_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:nomadcomanche,项目名称:zdorov_shop,代码行数:28,代码来源:freeamount.php


示例2: vam_get_download

function vam_get_download($content_id)
{
    $content_query = vam_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='" . $content_id . "'");
    $content_data = vam_db_fetch_array($content_query);
    // update file counter
    vam_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='" . $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:nomadcomanche,项目名称:zdorov_shop,代码行数:32,代码来源:vam_get_download.inc.php


示例3: 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 = vam_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 = vam_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:nomadcomanche,项目名称:zdorov_shop,代码行数:27,代码来源:item.php


示例4: ship2pay

function ship2pay()
{
    global $order;
    $shipping = $_SESSION['shipping'];
    $shipping_module = substr($shipping['id'], 0, strpos($shipping['id'], '_')) . '.php';
    $q_ship2pay = vamDBquery("SELECT payments_allowed, zones_id FROM " . TABLE_SHIP2PAY . " where shipment = '" . $shipping_module . "' and status=1");
    $check_flag = false;
    while ($mods = vam_db_fetch_array($q_ship2pay, true)) {
        if ($mods['zones_id'] > 0) {
            $check_query = vamDBquery("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . $mods['zones_id'] . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
            while ($check = vam_db_fetch_array($check_query, true)) {
                if ($check['zone_id'] < 1) {
                    $check_flag = true;
                    break 2;
                } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
                    $check_flag = true;
                    break 2;
                }
            }
        } else {
            $check_flag = true;
            break;
        }
    }
    if ($check_flag) {
        $modules = $mods['payments_allowed'];
    } else {
        $modules = MODULE_PAYMENT_INSTALLED;
    }
    $modules = explode(';', $modules);
    return $modules;
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:32,代码来源:ship2pay.php


示例5: 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


示例6: 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 = vam_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 = vam_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:nomadcomanche,项目名称:zdorov_shop,代码行数:35,代码来源:dhl.php


示例7: 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 = vam_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 = vam_db_fetch_array($affiliate_root_query)) {
            vam_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'] . " ");
            vam_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;
            vam_db_perform(TABLE_AFFILIATE, $sql_data_array);
            $affiliate_id = vam_db_insert_id();
        }
        // no parent -> new root
    } else {
        $sql_data_array['affiliate_lft'] = '1';
        $sql_data_array['affiliate_rgt'] = '2';
        vam_db_perform(TABLE_AFFILIATE, $sql_data_array);
        $affiliate_id = vam_db_insert_id();
        vam_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:nomadcomanche,项目名称:zdorov_shop,代码行数:28,代码来源:affiliate_insert.inc.php


示例8: updateBill

function updateBill($login, $password, $txn, $status)
{
    //обработка возможных ошибок авторизации
    if ($login != MODULE_PAYMENT_QIWI_ID) {
        return 150;
    }
    if (!empty($password) && $password != strtoupper(md5($txn . strtoupper(md5(MODULE_PAYMENT_QIWI_SECRET_KEY))))) {
        return 150;
    }
    // получаем номер заказа
    $transaction = intval($txn);
    // проверяем, есть ли такой заказ в базе
    $order_query = vam_db_query("select count(*) as total from " . TABLE_ORDERS . " where orders_id = '" . (int) $transaction . "'");
    $order_exists = vam_db_fetch_array($order_query);
    if ($order_exists['total'] <= 0) {
        return 210;
    }
    // меняем статус заказа при условии оплаты счёта
    if ($status == 60) {
        $sql_data_array = array('orders_status' => MODULE_PAYMENT_QIWI_ORDER_STATUS_ID);
        vam_db_perform('orders', $sql_data_array, 'update', "orders_id='" . $transaction . "'");
        $sql_data_arrax = array('orders_id' => $transaction, 'orders_status_id' => MODULE_PAYMENT_QIWI_ORDER_STATUS_ID, 'date_added' => 'now()', 'customer_notified' => '0', 'comments' => 'QIWI accepted this order payment');
        vam_db_perform('orders_status_history', $sql_data_arrax);
        // Отправляем письмо клиенту и админу о смене статуса заказа
        require_once DIR_WS_CLASSES . 'order.php';
        $order = new order($transaction);
        $vamTemplate = new vamTemplate();
        // assign language to template for caching
        $vamTemplate->assign('language', $_SESSION['language']);
        $vamTemplate->caching = false;
        $vamTemplate->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
        $vamTemplate->assign('logo_path', HTTP_SERVER . DIR_WS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/img/');
        $vamTemplate->assign('NAME', $order->customer['firstname'] . ' ' . $order->customer['lastname']);
        $vamTemplate->assign('ORDER_NR', $transaction);
        $vamTemplate->assign('ORDER_LINK', vam_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $transaction, 'SSL'));
        $vamTemplate->assign('ORDER_DATE', vam_date_long($order->info['date_purchased']));
        $lang_query = vam_db_query("select languages_id from " . TABLE_LANGUAGES . " where directory = '" . $_SESSION['language'] . "'");
        $lang = vam_db_fetch_array($lang_query);
        $lang = $lang['languages_id'];
        if (!isset($lang)) {
            $lang = $_SESSION['languages_id'];
        }
        $orders_status_array = array();
        $orders_status_query = vam_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . $lang . "'");
        while ($orders_status = vam_db_fetch_array($orders_status_query)) {
            $orders_statuses[] = array('id' => $orders_status['orders_status_id'], 'text' => $orders_status['orders_status_name']);
            $orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name'];
        }
        $vamTemplate->assign('ORDER_STATUS', $orders_status_array[MODULE_PAYMENT_QIWI_ORDER_STATUS_ID]);
        $html_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/admin/mail/' . $_SESSION['language'] . '/change_order_mail.html');
        $txt_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/admin/mail/' . $_SESSION['language'] . '/change_order_mail.txt');
        include_once DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/qiwi.php';
        // create subject
        $order_subject = str_replace('{$nr}', $transaction, MODULE_PAYMENT_QIWI_EMAIL_SUBJECT);
        // send mail to admin
        vam_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, EMAIL_BILLING_ADDRESS, STORE_NAME, EMAIL_BILLING_FORWARDING_STRING, $order->customer['email_address'], $order->customer['firstname'], '', '', $order_subject, $html_mail, $txt_mail);
        // send mail to customer
        vam_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, $order->customer['email_address'], $order->customer['firstname'] . ' ' . $order->customer['lastname'], '', EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME, '', '', $order_subject, $html_mail, $txt_mail);
    }
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:60,代码来源:qiwi.php


示例9: splitPageResults

 function splitPageResults(&$current_page_number, $max_rows_per_page, &$sql_query, &$query_num_rows)
 {
     if (empty($current_page_number)) {
         $current_page_number = 1;
     }
     $pos_to = strlen($sql_query);
     $pos_from = strpos($sql_query, ' from', 0);
     $pos_group_by = strpos($sql_query, ' group by', $pos_from);
     if ($pos_group_by < $pos_to && $pos_group_by != false) {
         $pos_to = $pos_group_by;
     }
     $pos_having = strpos($sql_query, ' having', $pos_from);
     if ($pos_having < $pos_to && $pos_having != false) {
         $pos_to = $pos_having;
     }
     $pos_order_by = strpos($sql_query, ' order by', $pos_from);
     if ($pos_order_by < $pos_to && $pos_order_by != false) {
         $pos_to = $pos_order_by;
     }
     $reviews_count_query = vam_db_query("select count(*) as total " . substr($sql_query, $pos_from, $pos_to - $pos_from));
     $reviews_count = vam_db_fetch_array($reviews_count_query);
     $query_num_rows = $reviews_count['total'];
     $num_pages = ceil($query_num_rows / $max_rows_per_page);
     if ($current_page_number > $num_pages) {
         $current_page_number = $num_pages;
     }
     $offset = $max_rows_per_page * ($current_page_number - 1);
     if ($offset < 0) {
         $offset = 0;
     }
     $sql_query .= " limit " . $offset . ", " . $max_rows_per_page;
 }
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:32,代码来源:split_page_results.php


示例10: 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 = vamDBquery($category_query);
        $category = vam_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 c.sort_order, cd.categories_name";
    $categories_query = vamDBquery($categories_query);
    while ($categories = vam_db_fetch_array($categories_query, true)) {
        $SEF_link = vam_href_link(FILENAME_DEFAULT, vam_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 . '&nbsp;&nbsp;&nbsp;', $exclude, $category_tree_array, false, $cPath);
    }
    return $category_tree_array;
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:30,代码来源:sitemap.php


示例11: 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 = vam_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 = vam_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:nomadcomanche,项目名称:zdorov_shop,代码行数:32,代码来源:fedexeu.php


示例12: vam_address_label

function vam_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n")
{
    $address_query = vam_db_query("select entry_firstname as firstname, entry_secondname as secondname, 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 = '" . $customers_id . "' and address_book_id = '" . $address_id . "'");
    $address = vam_db_fetch_array($address_query);
    $format_id = vam_get_address_format_id($address['country_id']);
    return vam_address_format($format_id, $address, $html, $boln, $eoln);
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:7,代码来源:vam_address_label.inc.php


示例13: vam_get_products_image

function vam_get_products_image($products_id = '')
{
    $product_query = "select products_image from " . TABLE_PRODUCTS . " where products_id = '" . $products_id . "'";
    $product_query = vamDBquery($product_query);
    $products_image = vam_db_fetch_array($product_query, true);
    return $products_image['products_image'];
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:7,代码来源:vam_get_products_image.inc.php


示例14: 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


示例15: vam_get_products_stock

function vam_get_products_stock($products_id)
{
    $products_id = vam_get_prid($products_id);
    $stock_query = vam_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . $products_id . "'");
    $stock_values = vam_db_fetch_array($stock_query);
    return $stock_values['products_quantity'];
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:7,代码来源:vam_get_products_stock.inc.php


示例16: vam_get_vpe_name

function vam_get_vpe_name($vpeID)
{
    $vpe_query = "SELECT products_vpe_name FROM " . TABLE_PRODUCTS_VPE . " WHERE language_id='" . (int) $_SESSION['languages_id'] . "' and products_vpe_id='" . $vpeID . "'";
    $vpe_query = vamDBquery($vpe_query);
    $vpe = vam_db_fetch_array($vpe_query, true);
    return $vpe['products_vpe_name'];
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:7,代码来源:vam_get_vpe_name.inc.php


示例17: vam_oe_customer_infos

function vam_oe_customer_infos($customers_id)
{
    $customer_query = vam_db_query("select a.entry_country_id, a.entry_zone_id from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " a where c.customers_id  = '" . $customers_id . "' and c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id");
    $customer = vam_db_fetch_array($customer_query);
    $customer_info_array = array('country_id' => $customer['entry_country_id'], 'zone_id' => $customer['entry_zone_id']);
    return $customer_info_array;
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:7,代码来源:vam_oe_customer_infos.inc.php


示例18: vam_get_path

function vam_get_path($current_category_id = '')
{
    global $cPath_array;
    if (vam_not_null($current_category_id)) {
        $cp_size = sizeof($cPath_array);
        if ($cp_size == 0) {
            $cPath_new = $current_category_id;
        } else {
            $cPath_new = '';
            $last_category_query = "select parent_id from " . TABLE_CATEGORIES . " where categories_id = '" . $cPath_array[$cp_size - 1] . "'";
            $last_category_query = vamDBquery($last_category_query);
            $last_category = vam_db_fetch_array($last_category_query, true);
            $current_category_query = "select parent_id from " . TABLE_CATEGORIES . " where categories_id = '" . $current_category_id . "'";
            $current_category_query = vamDBquery($current_category_query);
            $current_category = vam_db_fetch_array($current_category_query, true);
            if ($last_category['parent_id'] == $current_category['parent_id']) {
                for ($i = 0; $i < $cp_size - 1; $i++) {
                    $cPath_new .= '_' . $cPath_array[$i];
                }
            } else {
                for ($i = 0; $i < $cp_size; $i++) {
                    $cPath_new .= '_' . $cPath_array[$i];
                }
            }
            $cPath_new .= '_' . $current_category_id;
            if (substr($cPath_new, 0, 1) == '_') {
                $cPath_new = substr($cPath_new, 1);
            }
        }
    } else {
        $cPath_new = vam_not_null($cPath_array) ? implode('_', $cPath_array) : '';
    }
    return 'cPath=' . $cPath_new;
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:34,代码来源:vam_get_path.inc.php


示例19: update_status

 function update_status()
 {
     global $order;
     $check_order_query = vam_db_query("select count(*) as count from " . TABLE_ORDERS . " where customers_id = '" . (int) $_SESSION['customer_id'] . "'");
     $order_check = vam_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 = vam_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 = vam_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:nomadcomanche,项目名称:zdorov_shop,代码行数:28,代码来源:invoice.php


示例20: ups

 function ups()
 {
     global $order;
     $this->code = 'ups';
     $this->title = MODULE_SHIPPING_UPS_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_UPS_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_UPS_SORT_ORDER;
     $this->icon = DIR_WS_ICONS . 'shipping_ups.gif';
     $this->tax_class = MODULE_SHIPPING_UPS_TAX_CLASS;
     $this->free = MODULE_SHIPPING_UPS_TEXT_FREE;
     $this->enabled = MODULE_SHIPPING_UPS_STATUS == 'True' ? true : false;
     if ($this->enabled == true && (int) MODULE_SHIPPING_UPS_ZONE > 0) {
         $check_flag = false;
         $check_query = vam_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_UPS_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
         while ($check = vam_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;
         }
     }
     /**
      * CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED
      */
     $this->num_ups = 7;
 }
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:32,代码来源:ups.php



注:本文中的vam_db_fetch_array函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP vam_db_input函数代码示例发布时间:2022-05-23
下一篇:
PHP vam_date_short函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap