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

PHP oos_db_input函数代码示例

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

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



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

示例1: create_plugin_instance

 function create_plugin_instance()
 {
     // Get database information
     $dbconn =& oosDBGetConn();
     $oostable =& oosDBGetTables();
     if (isset($_SESSION['customer_id'])) {
         $wo_customer_id = $_SESSION['customer_id'];
         $wo_full_name = addslashes($_SESSION['customer_first_name'] . ' ' . $_SESSION['customer_lastname']);
     } else {
         $wo_customer_id = '';
         $wo_full_name = 'Guest';
     }
     $wo_session_id = oos_session_id();
     $wo_ip_address = $_SESSION['session_ip_address'];
     $wo_last_page_url = addslashes(oos_server_get_var('REQUEST_URI'));
     $current_time = time();
     $xx_mins_ago = $current_time - 900;
     // remove entries that have expired
     $whos_onlinetable = $oostable['whos_online'];
     $dbconn->Execute("DELETE FROM {$whos_onlinetable}\n                        WHERE time_last_click < '" . oos_db_input($xx_mins_ago) . "'");
     $whos_onlinetable = $oostable['whos_online'];
     $query = "SELECT COUNT(*) AS total\n                FROM {$whos_onlinetable}\n                WHERE session_id = '" . oos_db_input($wo_session_id) . "'";
     $stored_customer = $dbconn->Execute($query);
     if ($stored_customer->fields['total'] > 0) {
         $whos_onlinetable = $oostable['whos_online'];
         $query = "UPDATE {$whos_onlinetable}" . " SET customer_id = ?, full_name = ?, ip_address = ?, time_last_click = ?, last_page_url = ?" . " WHERE session_id = ?";
         $result =& $dbconn->Execute($query, array((string) $wo_customer_id, (string) $wo_full_name, (string) $wo_ip_address, (string) $current_time, (string) $wo_last_page_url, (string) $wo_session_id));
     } else {
         $whos_onlinetable = $oostable['whos_online'];
         $dbconn->Execute("INSERT INTO " . $whos_onlinetable . "\n                     (customer_id,\n                      full_name,\n                      session_id,\n                      ip_address,\n                      time_entry,\n                      time_last_click,\n                      last_page_url) VALUES ('" . oos_db_input($wo_customer_id) . "',\n                                             '" . oos_db_input($wo_full_name) . "',\n                                             '" . oos_db_input($wo_session_id) . "',\n                                             '" . oos_db_input($wo_ip_address) . "',\n                                             '" . oos_db_input($current_time) . "',\n                                             '" . oos_db_input($current_time) . "',\n                                             '" . oos_db_input($wo_last_page_url) . "')");
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:33,代码来源:oos_event_whos_online.php


示例2: oos_set_featured_status

/**
 * Sets the status of a featured product
 */
function oos_set_featured_status($nFeaturedId, $status)
{
    // Get database information
    $dbconn =& oosDBGetConn();
    $oostable =& oosDBGetTables();
    $featuredtable = $oostable['featured'];
    return $dbconn->Execute("UPDATE {$featuredtable}\n                             SET status = '" . oos_db_input($status) . "',\n                                 date_status_change = '" . date("Y-m-d H:i:s", time()) . "'\n                             WHERE featured_id = '" . intval($nFeaturedId) . "'");
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:11,代码来源:function_featured.php


示例3: create_plugin_instance

 function create_plugin_instance()
 {
     $aFilename = oos_get_filename();
     $aModules = oos_get_modules();
     if ($_GET['file'] != $aFilename['login'] && !isset($_SESSION['customer_id'])) {
         $cookie_url_array = parse_url((ENABLE_SSL == true ? OOS_HTTPS_SERVER : OOS_HTTP_SERVER) . substr(OOS_SHOP, 0, -1));
         $cookie_path = $cookie_url_array['path'];
         if (isset($_COOKIE['email_address']) && isset($_COOKIE['password'])) {
             // Get database information
             $dbconn =& oosDBGetConn();
             $oostable =& oosDBGetTables();
             $customerstable = $oostable['customers'];
             $sql = "SELECT customers_id, customers_gender, customers_firstname, customers_lastname,\n                         customers_password, customers_wishlist_link_id, customers_language,\n                         customers_vat_id_status, customers_email_address, customers_default_address_id,\n                         customers_max_order\n                  FROM {$customerstable}\n                  WHERE customers_login = '1'\n                  AND customers_email_address = '" . oos_db_input($_COOKIE['email_address']) . "'";
             $check_customer_result = $dbconn->Execute($sql);
             if ($check_customer_result->RecordCount()) {
                 $check_customer = $check_customer_result->fields;
                 if (oos_validate_password($_COOKIE['password'], $check_customer['customers_password'])) {
                     $address_booktable = $oostable['address_book'];
                     $sql = "SELECT entry_country_id, entry_zone_id\n                      FROM {$address_booktable}\n                      WHERE customers_id = '" . $check_customer['customers_id'] . "'\n                        AND address_book_id = '1'";
                     $check_country = $dbconn->GetRow($sql);
                     if ($check_customer['customers_language'] == '') {
                         $sLanguage = oos_var_prep_for_os($_SESSION['language']);
                         $customerstable = $oostable['customers'];
                         $dbconn->Execute("UPDATE {$customerstable}\n                                  SET customers_language = '" . oos_db_input($sLanguage) . "'\n                                  WHERE customers_id = '" . intval($check_customer['customers_id']) . "'");
                     }
                     $_SESSION['customer_wishlist_link_id'] = $check_customer['customers_wishlist_link_id'];
                     $_SESSION['customer_id'] = $check_customer['customers_id'];
                     $_SESSION['customer_default_address_id'] = $check_customer['customers_default_address_id'];
                     if (ACCOUNT_GENDER == '1') {
                         $_SESSION['customer_gender'] = $check_customer['customers_gender'];
                     }
                     $_SESSION['customer_first_name'] = $check_customer['customers_firstname'];
                     $_SESSION['customer_lastname'] = $check_customer['customers_lastname'];
                     $_SESSION['customer_max_order'] = $check_customer['customers_max_order'];
                     $_SESSION['customer_country_id'] = $check_country['entry_country_id'];
                     $_SESSION['customer_zone_id'] = $check_country['entry_zone_id'];
                     if (ACCOUNT_VAT_ID == '1') {
                         $_SESSION['customers_vat_id_status'] = $check_customer['customers_vat_id_status'];
                     }
                     $_SESSION['member']->restore_group();
                     setcookie('email_address', $email_address, time() + 365 * 24 * 3600, $cookie_path, '', getenv('HTTPS') == 'on' ? 1 : 0);
                     setcookie('password', $check_customer['customers_password'], time() + 365 * 24 * 3600, $cookie_path, '', getenv('HTTPS') == 'on' ? 1 : 0);
                     $customers_infotable = $oostable['customers_info'];
                     $dbconn->Execute("UPDATE {$customers_infotable}\n                                SET customers_info_date_of_last_logon = '" . date("Y-m-d H:i:s", time()) . "',\n                                    customers_info_number_of_logons = customers_info_number_of_logons+1\n                                WHERE customers_info_id = '" . intval($_SESSION['customer_id']) . "'");
                     $_SESSION['cart']->restore_contents();
                     // restore cart contents
                 }
             }
         }
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:52,代码来源:oos_event_autologon.php


示例4: oos_set_specials_status

/**
 * Sets the status of a special product
 *
 * @param $specials_id
 * @param $status
 */
function oos_set_specials_status($nSpecialsId, $status)
{

    // Get database information
    $dbconn =& oosDBGetConn();
    $oostable =& oosDBGetTables();

    $specialstable = $oostable['specials'];
    return $dbconn->Execute("UPDATE $specialstable
                             SET status = '" . oos_db_input($status) . "',
                                 date_status_change = '" . date("Y-m-d H:i:s", time()) . "'
                              WHERE specials_id = '" . intval($nSpecialsId) . "'");
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:19,代码来源:function_spezials.php


示例5: oos_get_languages_id

function oos_get_languages_id($iso_639_2)
{
    $dbconn =& oosDBGetConn();
    $oostable =& oosDBGetTables();
    $languagestable = $oostable['languages'];
    $languages_result = $dbconn->Execute("SELECT languages_id, iso_639_2 FROM {$languagestable} WHERE iso_639_2 = '" . oos_db_input($iso_639_2) . "'");
    if (!$languages_result->RecordCount()) {
        $LangID = $_SESSION['language_id'];
    } else {
        $LangID = $languages_result->fields['languages_id'];
    }
    return $LangID;
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:13,代码来源:orders.php


示例6: query

 function query($order_id)
 {
     // Get database information
     $dbconn =& oosDBGetConn();
     $oostable =& oosDBGetTables();
     $lable_query = "SELECT customers_name, customers_company, customers_street_address, customers_suburb,\n                             customers_city, customers_postcode, customers_state, customers_country,\n                             customers_telephone, customers_email_address, customers_address_format_id,\n                             delivery_name, delivery_company, delivery_street_address, delivery_suburb,\n                             delivery_city, delivery_postcode, delivery_state, delivery_country,\n                             delivery_address_format_id, billing_name, billing_company, billing_street_address,\n                             billing_suburb, billing_city, billing_postcode, billing_state, billing_country,\n                             billing_address_format_id, payment_method, cc_type, cc_owner, cc_number,\n                             cc_expires, currency, currency_value, date_purchased, orders_status, last_modified\n                     FROM " . $oostable['orders'] . " \n                     WHERE orders_id = '" . oos_db_input($order_id) . "'";
     $lable_result =& $dbconn->Execute($lable_query);
     $lable = $lable_result->fields;
     $totals_query = "SELECT title, text \n                       FROM " . $oostable['orders_total'] . " \n                       WHERE orders_id = '" . oos_db_input($order_id) . "'\n                       ORDER BY sort_order";
     $totals_result =& $dbconn->Execute($totals_query);
     while ($totals = $totals_result->fields) {
         $this->totals[] = array('title' => $totals['title'], 'text' => $totals['text']);
         // Move that ADOdb pointer!
         $totals_result->MoveNext();
     }
     $this->info = array('currency' => $lable['currency'], 'currency_value' => $lable['currency_value'], 'payment_method' => $lable['payment_method'], 'cc_type' => $lable['cc_type'], 'cc_owner' => $lable['cc_owner'], 'cc_number' => $lable['cc_number'], 'cc_expires' => $lable['cc_expires'], 'date_purchased' => $lable['date_purchased'], 'orders_status' => $lable['orders_status'], 'last_modified' => $lable['last_modified']);
     $this->customer = array('name' => $lable['customers_name'], 'company' => $lable['customers_company'], 'street_address' => $lable['customers_street_address'], 'suburb' => $lable['customers_suburb'], 'city' => $lable['customers_city'], 'postcode' => $lable['customers_postcode'], 'state' => $lable['customers_state'], 'country' => $lable['customers_country'], 'format_id' => $lable['customers_address_format_id'], 'telephone' => $lable['customers_telephone'], 'email_address' => $lable['customers_email_address']);
     $this->delivery = array('name' => $lable['delivery_name'], 'company' => $lable['delivery_company'], 'street_address' => $lable['delivery_street_address'], 'suburb' => $lable['delivery_suburb'], 'city' => $lable['delivery_city'], 'postcode' => $lable['delivery_postcode'], 'state' => $lable['delivery_state'], 'country' => $lable['delivery_country'], 'format_id' => $lable['delivery_address_format_id']);
     $this->billing = array('name' => $lable['billing_name'], 'company' => $lable['billing_company'], 'street_address' => $lable['billing_street_address'], 'suburb' => $lable['billing_suburb'], 'city' => $lable['billing_city'], 'postcode' => $lable['billing_postcode'], 'state' => $lable['billing_state'], 'country' => $lable['billing_country'], 'format_id' => $lable['billing_address_format_id']);
     $index = 0;
     $lables_products_query = "SELECT o.orders_products_id, o.products_id, o.products_name, o.products_model,\n                                       o.products_price, o.products_tax, o.products_quantity, o.final_price,\n                                       p.products_id, p.products_weight\n                                FROM " . $oostable['orders_products'] . " o,\n                                     " . $oostable['products'] . " p\n                                WHERE o.products_id = p.products_id &&\n                                      o.orders_id = '" . oos_db_input($order_id) . "'";
     $lables_products_result =& $dbconn->Execute($lables_products_query);
     while ($lables_products = $lables_products_result->fields) {
         $this->products[$index] = array('qty' => $lables_products['products_quantity'], 'name' => $lables_products['products_name'], 'model' => $lables_products['products_model'], 'tax' => $lables_products['products_tax'], 'price' => $lables_products['products_price'], 'weight' => $lables_products['products_weight'], 'final_price' => $lables_products['final_price']);
         $subindex = 0;
         $attributes_query = "SELECT products_options, products_options_values, options_values_price, price_prefix\n                             FROM " . $oostable['orders_products_attributes'] . "\n                             WHERE orders_id = '" . oos_db_input($order_id) . "'\n                               AND orders_products_id = '" . $orders_products['orders_products_id'] . "'";
         $attributes_result =& $dbconn->Execute($attributes_query);
         if ($attributes_result->RecordCount()) {
             while ($attributes = $attributes_result->fields) {
                 $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++;
                 // Move that ADOdb pointer!
                 $attributes_result->MoveNext();
             }
         }
         $index++;
         // Move that ADOdb pointer!
         $lables_products_result->MoveNext();
     }
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:40,代码来源:class_lable.php


示例7: oos_db_input

            $dbconn->Execute("DELETE FROM {$manufacturerstable} WHERE manufacturers_id = '" . oos_db_input($manufacturers_id) . "'");
            $manufacturers_infotable = $oostable['manufacturers_info'];
            $dbconn->Execute("DELETE FROM {$manufacturers_infotable} WHERE manufacturers_id = '" . oos_db_input($manufacturers_id) . "'");
            if (isset($_POST['delete_products']) && $_POST['delete_products'] == 'on') {
                $productstable = $oostable['products'];
                $products_result = $dbconn->Execute("SELECT products_id FROM {$productstable} WHERE manufacturers_id = '" . oos_db_input($manufacturers_id) . "'");
                while ($products = $products_result->fields) {
                    oos_remove_product($products['products_id']);
                    // Move that ADOdb pointer!
                    $products_result->MoveNext();
                }
                // Close result set
                $products_result->Close();
            } else {
                $productstable = $oostable['products'];
                $dbconn->Execute("UPDATE {$productstable} SET manufacturers_id = '' WHERE manufacturers_id = '" . oos_db_input($manufacturers_id) . "'");
            }
            oos_redirect_admin(oos_href_link_admin($aFilename['manufacturers'], 'page=' . $_GET['page']));
            break;
    }
}
require 'includes/oos_header.php';
?>
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
    <td width="<?php 
echo BOX_WIDTH;
?>
" valign="top"><table border="0" width="<?php 
echo BOX_WIDTH;
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:manufacturers.php


示例8: date

                $rate = $quote_function($currency['code']);
                if (empty($rate) && oos_is_not_null(CURRENCY_SERVER_BACKUP)) {
                    $quote_function = 'quote_' . CURRENCY_SERVER_BACKUP . '_currency';
                    $rate = $quote_function($currency['code']);
                }
                if (oos_is_not_null($rate)) {
                    $dbconn->Execute("UPDATE " . $oostable['currencies'] . " SET value = '" . $rate . "', last_updated = '" . date("Y-m-d H:i:s", time()) . "' WHERE currencies_id = '" . $currency['currencies_id'] . "'");
                }
                // Move that ADOdb pointer!
                $currency_result->MoveNext();
            }
            oos_redirect_admin(oos_href_link_admin($aFilename['currencies'], 'page=' . $_GET['page'] . '&cID=' . $_GET['cID']));
            break;
        case 'delete':
            $currencies_id = oos_db_prepare_input($_GET['cID']);
            $currency_result = $dbconn->Execute("SELECT code FROM " . $oostable['currencies'] . " WHERE currencies_id = '" . oos_db_input($currencies_id) . "'");
            $currency = $currency_result->fields;
            $remove_currency = true;
            if ($currency['code'] == DEFAULT_CURRENCY) {
                $remove_currency = false;
                $messageStack->add(ERROR_REMOVE_DEFAULT_CURRENCY, 'error');
            }
            break;
    }
}
require 'includes/oos_header.php';
?>
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
    <td width="<?php 
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:currencies.php


示例9: oos_db_input

    }
    $customerstable = $oostable['customers'];
    $sql = "SELECT customers_firstname, customers_lastname, customers_id\n            FROM {$customerstable}\n            WHERE customers_email_address = '" . oos_db_input($email_address) . "'";
    $check_customer_result = $dbconn->Execute($sql);
    if ($check_customer_result->RecordCount()) {
        $check_customer = $check_customer_result->fields;
        $customerstable = $oostable['customers'];
        $dbconn->Execute("UPDATE {$customerstable}\n                      SET customers_newsletter = '0'\n                      WHERE customers_id = '" . $check_customer['customers_id'] . "'");
        MyOOS_CoreApi::redirect(oos_href_link($aPages['newsletters_unsubscribe_success']));
    } else {
        $maillisttable = $oostable['maillist'];
        $sql = "SELECT customers_firstname\n                FROM {$maillisttable}\n                WHERE customers_email_address = '" . oos_db_input($email_address) . "'";
        $check_mail_customer_result = $dbconn->Execute($sql);
        if ($check_mail_customer_result->RecordCount()) {
            $maillisttable = $oostable['maillist'];
            $dbconn->Execute("UPDATE {$maillisttable}\n                             SET customers_newsletter = '0'\n                             WHERE customers_email_address = '" . oos_db_input($email_address) . "'");
            MyOOS_CoreApi::redirect(oos_href_link($aPages['newsletters_unsubscribe_success']));
        }
    }
    MyOOS_CoreApi::redirect(oos_href_link($aPages['subscription_center'], 'email=nonexistent', 'SSL'));
} else {
    $oBreadcrumb->add($aLang['navbar_title'], oos_href_link($aPages['newsletters']), bookmark);
    $aOption['template_main'] = $sTheme . '/modules/subscription_center.html';
    $aOption['page_heading'] = $sTheme . '/heading/page_heading.html';
    $aOption['breadcrumb'] = 'default/system/breadcrumb.html';
    $nPageType = OOS_PAGE_TYPE_SERVICE;
    require 'includes/oos_system.php';
    if (!isset($option)) {
        require 'includes/info_message.php';
        require 'includes/oos_blocks.php';
    }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:subscription_center.php


示例10: oos_db_input

</td>
                <td class="dataTableHeadingContent" align="center"><?php 
        echo COUPON_CODE;
        ?>
</td>
                <td class="dataTableHeadingContent" align="right"><?php 
        echo TABLE_HEADING_ACTION;
        ?>
&nbsp;</td>
              </tr>
<?php 
        if (isset($_GET['page']) && $_GET['page'] > 1) {
            $rows = $_GET['page'] * 20 - 20;
        }
        if ($status != '*') {
            $cc_result_raw = "SELECT\n                           coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,\n                           coupon_expire_date, uses_per_user, uses_per_coupon, restrict_to_products,\n                           restrict_to_categories, date_created,date_modified\n                       FROM\n                           " . $oostable['coupons'] . "\n                       WHERE\n                           coupon_active='" . oos_db_input($status) . "' AND\n                           coupon_type != 'G'";
        } else {
            $cc_result_raw = "SELECT\n                           coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,\n                           coupon_expire_date, uses_per_user, uses_per_coupon, restrict_to_products,\n                           restrict_to_categories, date_created,date_modified\n                       FROM\n                           " . $oostable['coupons'] . "\n                       WHERE\n                           coupon_type != 'G'";
        }
        $cc_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $cc_result_raw, $cc_result_numrows);
        $cc_result = $dbconn->Execute($cc_result_raw);
        while ($cc_list = $cc_result->fields) {
            $rows++;
            if (strlen($rows) < 2) {
                $rows = '0' . $rows;
            }
            if ((!isset($_GET['cID']) || isset($_GET['cID']) && $_GET['cID'] == $cc_list['coupon_id']) && !isset($cInfo)) {
                $cInfo = new objectInfo($cc_list);
            }
            if (isset($cInfo) && is_object($cInfo) && $cc_list['coupon_id'] == $cInfo->coupon_id) {
                echo '          <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['coupon_admin'], oos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->coupon_id . '&action=edit') . '\'">' . "\n";
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:coupon_admin.php


示例11: oos_get_all_get_parameters

     MyOOS_CoreApi::redirect(oos_href_link($goto_file, oos_get_all_get_parameters($parameters)));
     break;
 case 'cust_wishlist_add_product':
     if (isset($_SESSION['customer_id']) && isset($_POST['products_id'])) {
         if (isset($_POST['cart_quantity']) && is_numeric($_POST['cart_quantity'])) {
             $cart_qty = $_SESSION['cart']->get_quantity(oos_get_uprid($_POST['products_id'], $_POST['id']));
             $news_qty = $cart_qty + $cart_quantity;
             $products_order_min = oos_get_products_quantity_order_min($_POST['products_id']);
             $products_order_units = oos_get_products_quantity_order_units($_POST['products_id']);
             $customers_wishlisttable = $oostable['customers_wishlist'];
             $customers_wishlist_attributestable = $oostable['customers_wishlist_attributes'];
             if ($cart_quantity >= $products_order_min or $cart_qty >= $products_order_min) {
                 if ($cart_quantity % $products_order_units == 0 and $news_qty >= $products_order_min) {
                     $_SESSION['cart']->add_cart($_POST['products_id'], intval($news_qty), $_POST['id']);
                     $dbconn->Execute("DELETE FROM {$customers_wishlisttable} WHERE customers_id = '" . intval($_SESSION['customer_id']) . "'  AND products_id = '" . oos_db_input($wl_products_id) . "'");
                     $dbconn->Execute("DELETE FROM {$customers_wishlist_attributestable} WHERE customers_id = '" . intval($_SESSION['customer_id']) . "'  AND products_id = '" . oos_db_input($wl_products_id) . "'");
                 } else {
                     $_SESSION['error_cart_msg'] = $aLang['error_products_quantity_order_min_text'] . $aLang['error_products_units_invalid'] . $cart_quantity . ' - ' . $aLang['products_order_qty_unit_text_info'] . ' ' . $products_order_units;
                 }
             } else {
                 $_SESSION['error_cart_msg'] = $aLang['error_products_quantity_order_min_text'] . $aLang['error_products_quantity_invalid'] . $cart_quantity . ' - ' . $aLang['products_order_qty_min_text_info'] . ' ' . $products_order_min;
             }
         }
         if ($_SESSION['error_cart_msg'] == '') {
             MyOOS_CoreApi::redirect(oos_href_link($goto_file, oos_get_all_get_parameters($parameters), 'NONSSL'));
         } else {
             MyOOS_CoreApi::redirect(oos_href_link($aPages['product_info'], 'products_id=' . $_POST['products_id']));
         }
     }
     break;
 case 'frend_wishlist_add_product':
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:oos_cart_actions.php


示例12: oos_remove_product

  function oos_remove_product($product_id) {

    // Get database information
    $dbconn =& oosDBGetConn();
    $oostable =& oosDBGetTables();

    $productstable = $oostable['products'];
    $product_image_query = "SELECT products_image
                            FROM $productstable
                            WHERE products_id = '" . oos_db_input($product_id) . "'";
    $product_image_result =& $dbconn->Execute($product_image_query);
    $product_image = $product_image_result->fields;

    // Close result set
    $product_image_result->Close();

    $productstable = $oostable['products'];
    $duplicate_query = "SELECT COUNT(*) AS total
                        FROM $productstable
                        WHERE products_image = '" . oos_db_input($product_image['products_image']) . "'";
    $duplicate_result =& $dbconn->Execute($duplicate_query);

    if ($duplicate_result->fields['total'] < 2) {
      if (file_exists(OOS_ABSOLUTE_PATH . OOS_IMAGES . $product_image['products_image'])) {
        @unlink(OOS_ABSOLUTE_PATH . OOS_IMAGES . $product_image['products_image']);
      }
      if (file_exists(OOS_ABSOLUTE_PATH . OOS_IMAGES . OOS_POPUP_IMAGES . $product_image['products_image'])) {
        @unlink(OOS_ABSOLUTE_PATH . OOS_IMAGES . OOS_POPUP_IMAGES . $product_image['products_image']);
      }
    }

    // Close result set
    $duplicate_result->Close();

    $dbconn->Execute("DELETE FROM " . $oostable['specials'] . " WHERE products_id = '" . oos_db_input($product_id) . "'");
    $dbconn->Execute("DELETE FROM " . $oostable['products'] . " WHERE products_id = '" . oos_db_input($product_id) . "'");
    $dbconn->Execute("DELETE FROM " . $oostable['products_to_categories'] . " WHERE products_id = '" . oos_db_input($product_id) . "'");
    $dbconn->Execute("DELETE FROM " . $oostable['products_description'] . " WHERE products_id = '" . oos_db_input($product_id) . "'");
    $dbconn->Execute("DELETE FROM " . $oostable['products_attributes'] . " WHERE products_id = '" . oos_db_input($product_id) . "'");
    $dbconn->Execute("DELETE FROM " . $oostable['customers_basket'] . " WHERE products_id = '" . oos_db_input($product_id) . "'");
    $dbconn->Execute("DELETE FROM " . $oostable['customers_basket_attributes'] . " WHERE products_id = '" . oos_db_input($product_id) . "'");
    $dbconn->Execute("DELETE FROM " . $oostable['customers_wishlist'] . " WHERE products_id = '" . oos_db_input($product_id) . "'");
    $dbconn->Execute("DELETE FROM " . $oostable['customers_wishlist_attributes'] . " WHERE products_id = '" . oos_db_input($product_id) . "'");
    $dbconn->Execute("DELETE FROM " . $oostable['products_to_master'] . " WHERE master_id = '" . oos_db_input($product_id) . "' OR slave_id = '" . oos_db_input($product_id) . "'");

    $reviewstable = $oostable['reviews'];
    $reviews_query = "SELECT reviews_id
                      FROM $reviewstable
                      WHERE products_id = '" . oos_db_input($product_id) . "'";
    $reviews_result =& $dbconn->Execute($reviews_query);

    while ($product_reviews = $reviews_result->fields) {
      $dbconn->Execute("DELETE FROM " . $oostable['reviews_description'] . " WHERE reviews_id = '" . $product_reviews['reviews_id'] . "'");

      // Move that ADOdb pointer!
      $reviews_result->MoveNext();
    }

    // Close result set
    $reviews_result->Close();

    $dbconn->Execute("DELETE FROM " . $oostable['reviews'] . " WHERE products_id = '" . oos_db_input($product_id) . "'");

  }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:64,代码来源:function_kernel.php


示例13: intval

                                 $products_attributestable pa
                            WHERE pa.products_id = '" . intval($products_id) . "'
                              AND pa.options_id = popt.products_options_id
                              AND pa.options_id = '" . oos_db_input($option) . "'
                              AND popt.products_options_languages_id = '" . intval($nLanguageID) . "'";
                } else {
                    $sql = "SELECT popt.products_options_name,
                                   poval.products_options_values_name,
                                   pa.options_values_price, pa.price_prefix
                            FROM $products_optionstable popt,
                                 $products_options_valuestable poval,
                                 $products_attributestable pa
                            WHERE pa.products_id = '" . intval($products_id) . "'
                              AND pa.options_id = '" . oos_db_input($option) . "'
                              AND pa.options_id = popt.products_options_id
                              AND pa.options_values_id = '" . oos_db_input($value) . "'
                              AND pa.options_values_id = poval.products_options_values_id
                              AND popt.products_options_languages_id = '" . intval($nLanguageID) . "'
                              AND poval.products_options_values_languages_id = '" .  intval($nLanguageID) . "'";
                }

                $attributes_values = $dbconn->GetRow($sql);

                if ($value == PRODUCTS_OPTIONS_VALUE_TEXT_ID) {
                    $hidden_field .=  oos_draw_hidden_field('id[' . $products[$i]['id'] . '][' . TEXT_PREFIX . $option . ']',$products[$i]['attributes_values'][$option]);
                    $attr_value = $products[$i]['attributes_values'][$option];
                } else {
                    $hidden_field .= oos_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);
                    $attr_value = $attributes_values['products_options_values_name'];
                }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:30,代码来源:shopping_cart.php


示例14: oos_currency_exits

/**
 * Checks to see if the currency code exists as a currency
 */
function oos_currency_exits($code)
{

    // Get database information
    $dbconn =& oosDBGetConn();
    $oostable =& oosDBGetTables();

    $currenciestable = $oostable['currencies'];
    $query = "SELECT currencies_id
              FROM $currenciestable
              WHERE code = '" . oos_db_input($code) . "'";
    $result =& $dbconn->Execute($query);

    if ($result->RecordCount() > 0) {
        return $code;
    } else {
        return false;
    }
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:22,代码来源:function_kernel.php


示例15: oos_get_tax_rate

 if ($wishlist_special_price = oos_get_products_special_price($wl_products_id)) {
     $wishlist_product_special_price = $oCurrencies->display_price($wishlist_special_price, oos_get_tax_rate($wishlist_product['products_tax_class_id']));
 } else {
     $wishlist_product_discount = min($wishlist_product['products_discount_allowed'], $_SESSION['member']->group['discount']);
     if ($wishlist_product_discount != 0) {
         $wishlist_special_price = $wishlist_product['products_price'] * (100 - $wishlist_product_discount) / 100;
         $wishlist_product_discount_price = $oCurrencies->display_price($wishlist_special_price, oos_get_tax_rate($wishlist_product['products_tax_class_id']));
     }
 }
 if ($wishlist_product['products_base_price'] != 1) {
     $wishlist_base_product_price = $oCurrencies->display_price($wishlist_product['products_price'] * $wishlist_product['products_base_price'], oos_get_tax_rate($wishlist_product['products_tax_class_id']));
     if ($wishlist_special_price != '') {
         $wishlist_base_product_special_price = $oCurrencies->display_price($wishlist_special_price * $wishlist_product['products_base_price'], oos_get_tax_rate($wishlist_product['products_tax_class_id']));
     }
 }
 $sql = "SELECT products_options_id, products_options_value_id\n            FROM " . $oostable['customers_wishlist_attributes'] . "\n            WHERE customers_wishlist_link_id = '" . oos_db_input($wlid) . "'\n              AND products_id = '" . $wishlist['products_id'] . "'";
 $attributes_result = $dbconn->Execute($sql);
 $attributes_print = '';
 while ($attributes = $attributes_result->fields) {
     $attributes_print .= oos_draw_hidden_field('id[' . $attributes['products_options_id'] . ']', $attributes['products_options_value_id']);
     $attributes_print .= '                   <tr>';
     $sql = "SELECT popt.products_options_name,\n                       poval.products_options_values_name,\n                       pa.options_values_price, pa.price_prefix\n                FROM " . $oostable['products_options'] . " popt,\n                     " . $oostable['products_options_values'] . " poval,\n                     " . $oostable['products_attributes'] . " pa\n                WHERE pa.products_id = '" . intval($wl_products_id) . "'\n                  AND pa.options_id = '" . $attributes['products_options_id'] . "'\n                  AND pa.options_id = popt.products_options_id\n                  AND pa.options_values_id = '" . $attributes['products_options_value_id'] . "'\n                  AND pa.options_values_id = poval.products_options_values_id\n                  AND popt.products_options_languages_id = '" . intval($nLanguageID) . "'\n                  AND poval.products_options_values_languages_id = '" . intval($nLanguageID) . "'";
     $option = $dbconn->Execute($sql);
     $option_values = $option->fields;
     $attributes_print .= '<td><br /><small><i> - ' . $option_values['products_options_name'] . ' ' . $option_values['products_options_values_name'] . '</i></small></td>';
     if ($option_values['options_values_price'] != 0) {
         $attributes_print .= '<td align="right"><small><i>' . $option_values['price_prefix'] . $oCurrencies->display_price($option_values['options_values_price'], oos_get_tax_rate($wishlist_product['products_tax_class_id'])) . '</i></small></td>';
     } else {
         $attributes_print .= '<td><small><i>&nbsp;</i></small></td>';
     }
     $attributes_print .= '                   </tr>';
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:main_wishlist.php


示例16: oos_draw_separator

echo HEADING_TITLE;
?>
</td>
            <td class="pageHeading" align="right"><?php 
echo oos_draw_separator('trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT);
?>
</td>
          </tr>
        </table></td>
      </tr>
<?php 
if ($action == 'edit') {
    $rID = oos_db_prepare_input($_GET['rID']);
    $reviewstable = $oostable['reviews'];
    $reviews_descriptiontable = $oostable['reviews_description'];
    $reviews_result = $dbconn->Execute("SELECT r.reviews_id, r.products_id, r.customers_name, r.date_added, r.last_modified, r.reviews_read, rd.reviews_text, r.reviews_rating FROM {$reviewstable} r, {$reviews_descriptiontable} rd WHERE r.reviews_id = '" . oos_db_input($rID) . "' AND r.reviews_id = rd.reviews_id");
    $reviews = $reviews_result->fields;
    $productstable = $oostable['products'];
    $products_result = $dbconn->Execute("SELECT products_image FROM {$productstable} WHERE products_id = '" . $reviews['products_id'] . "'");
    $products = $products_result->fields;
    $products_descriptiontable = $oostable['products_description'];
    $products_name_result = $dbconn->Execute("SELECT products_name FROM {$products_descriptiontable} WHERE products_id = '" . $reviews['products_id'] . "' AND products_languages_id = '" . intval($_SESSION['language_id']) . "'");
    $products_name = $products_name_result->fields;
    $rInfo_array = array_merge($reviews, $products, $products_name);
    $rInfo = new objectInfo($rInfo_array);
    ?>
      <tr><?php 
    echo oos_draw_form('review', $aFilename['reviews'], 'page=' . $_GET['page'] . '&rID=' . $_GET['rID'] . '&action=preview');
    ?>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:reviews.php


示例17: oos_redirect_admin

        }

        oos_redirect_admin(oos_href_link_admin($aFilename['ticket_reply'], 'page=' . $_GET['page'] . '&oID=' . $ticket_reply_id));
        break;

      case 'deleteconfirm':
        $oID = oos_db_prepare_input($_GET['oID']);

        $configurationtable = $oostable['configuration'];
        $ticket_reply_result = $dbconn->Execute("SELECT configuration_value FROM $configurationtable WHERE configuration_key = 'TICKET_DEFAULT_REPLY_ID'");
        $ticket_reply = $ticket_reply_result->fields;
        if ($ticket_reply['configuration_value'] == $oID) {
          $dbconn->Execute("UPDATE " . $oostable['configuration'] . " SET configuration_value = '' WHERE configuration_key = 'TICKET_DEFAULT_REPLY_ID'");
        }

        $dbconn->Execute("DELETE FROM " . $oostable['ticket_reply'] . " WHERE ticket_reply_id = '" . oos_db_input($oID) . "'");

        oos_redirect_admin(oos_href_link_admin($aFilename['ticket_reply'], 'page=' . $_GET['page']));
        break;
    }
  }
  require 'includes/oos_header.php';
?>
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<?php require 'includes/oos_blocks.php'; ?>
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top" 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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