当前位置: 首页>>代码示例>>PHP>>正文


PHP olc_db_input函数代码示例

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


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

示例1: query

 function query($order_id)
 {
     $order_query = olc_db_query("\n\t\tselect\n\t\tcustomers_name,\n\t\tcustomers_cid,\n\t\tcustomers_id,\n\t\tcustomers_company,\n\t\tcustomers_street_address,\n\t\tcustomers_suburb,\n\t\tcustomers_city,\n\t\tcustomers_postcode,\n\t\tcustomers_state,\n\t\tcustomers_country,\n\t\tcustomers_telephone,\n\t\tcustomers_email_address,\n\t\tcustomers_address_format_id,\n\t\tdelivery_name,\n\t\tdelivery_company,\n\t\tdelivery_street_address,\n\t\tdelivery_suburb,\n\t\tdelivery_city,\n\t\tdelivery_postcode,\n\t\tdelivery_state,\n\t\tdelivery_country,\n\t\tdelivery_address_format_id,\n\t\tbilling_name,\n\t\tbilling_company,\n\t\tbilling_street_address,\n\t\tbilling_suburb,\n\t\tbilling_city,\n\t\tbilling_postcode,\n\t\tbilling_state,\n\t\tbilling_country,\n\t\tbilling_address_format_id,\n\t\tbilling_invoice_number,\n\t\tpayment_method,\n\t\tcc_type,\n\t\tcc_owner,\n\t\tcc_number,\n\t\tcc_expires,\n\t\tcomments,\n\t\tcurrency,\n\t\tcurrency_value,\n\t\tdate_purchased,\n\t\torders_status,\n\t\torders_trackcode,\n\t\tlast_modified,\n\t\tpayment_id,\n\t\tcustomers_status,\n\t\tcustomers_status_name,\n\t\tcustomers_status_image,\n\t\tcustomers_ip,\n\t\tlanguage,\n\t\tcustomers_status_discount\n\t\tfrom " . TABLE_ORDERS . " where\n\t\torders_id = '" . olc_db_input($order_id) . APOS);
     $order = olc_db_fetch_array($order_query);
     $totals_query = olc_db_query("select title, text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . olc_db_input($order_id) . "' order by sort_order");
     while ($totals = olc_db_fetch_array($totals_query)) {
         $this->totals[] = array('title' => $totals['title'], 'text' => $totals['text']);
     }
     $this->info = array('order_id' => $order_id, 'currency' => $order['currency'], 'currency_value' => $order['currency_value'], 'payment_method' => $order['payment_method'], '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'], 'comments' => $order['comments'], 'language' => $order['language'], 'date_purchased' => $order['date_purchased'], 'payment_id' => $order['payment_id'], 'orders_status' => $order['orders_status'], 'orders_trackcode' => $order['orders_trackcode'], 'last_modified' => $order['last_modified']);
     $this->customer = array('name' => $order['customers_name'], 'id' => $order['customers_id'], 'company' => $order['customers_company'], 'csID' => $order['customers_cid'], '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']);
     $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'], 'billing_invoice_number' => $order['billing_invoice_number']);
     $index = 0;
     $orders_products_query = olc_db_query("\n\t\t\tselect\n\t\t\torders_products_id,\n\t\t\tproducts_name,\n\t\t\tproducts_id,\n\t\t\tproducts_model,\n\t\t\tproducts_price,\n\t\t\tproducts_tax,\n\t\t\tproducts_quantity,\n\t\t\tfinal_price,\n\t\t\tallow_tax,\n\t\t\tproducts_discount_made\n\t\t\tfrom " . TABLE_ORDERS_PRODUCTS . "\n\t\t\twhere\n\t\t\torders_id ='" . olc_db_input($order_id) . APOS);
     while ($orders_products = olc_db_fetch_array($orders_products_query)) {
         $this->products[$index] = array('id' => $orders_products['products_id'], 'orders_products_id' => $orders_products['orders_products_id'], 'qty' => $orders_products['products_quantity'], 'name' => $orders_products['products_name'], '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'], 'auctionid' => $orders_products['auctionid']);
         $subindex = 0;
         $attributes_query = olc_db_query("\n\t\t\t\tselect\n\t\t\t\tproducts_options,\n\t\t\t\tproducts_options_values,\n\t\t\t\tproducts_options_id,\n\t\t\t\tproducts_options_values_id,\n\t\t\t\toptions_values_price,\n\t\t\t\tprice_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . olc_db_input($order_id) . "' and orders_products_id = '" . $orders_products['orders_products_id'] . APOS);
         if (olc_db_num_rows($attributes_query)) {
             while ($attributes = olc_db_fetch_array($attributes_query)) {
                 $this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'], 'value' => $attributes['products_options_values'], 'option_id' => $attributes['products_options_id'], 'value_id' => $attributes['products_options_values_id'], 'prefix' => $attributes['price_prefix'], 'price' => $attributes['options_values_price']);
                 $subindex++;
             }
         }
         $index++;
     }
 }
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:27,代码来源:order.php

示例2: query

 function query($txn_id)
 {
     $transaction_id = olc_db_prepare_input($txn_id);
     $info = array('txn_type', 'reason_code', 'payment_type', 'payment_status', 'pending_reason', 'invoice', 'payment_date', 'payment_time_zone', 'business', 'receiver_email', 'receiver_id', 'txn_id', 'parent_txn_id', 'notify_version', 'last_modified', 'date_added', 'for_auction', 'auction_closing_date');
     $txn = array('num_cart_items', 'mc_currency', 'mc_gross', 'mc_fee', 'payment_gross', 'payment_fee', 'settle_amount', 'settle_currency', 'exchange_rate');
     $customer = array('first_name', 'last_name', 'payer_business_name', 'address_name', 'address_street', 'address_city', 'address_state', 'address_zip', 'address_country', 'address_status', 'payer_email', 'payer_id', 'auction_buyer_id', 'payer_status', 'memo');
     $ipn_query = olc_db_query("select " . implode(',', array_merge($info, $txn, $customer)) . " from " . olc_db_input($this->paymentTableName) . " where txn_id = '" . olc_db_input($transaction_id) . APOS);
     if (olc_db_num_rows($ipn_query)) {
         $ipn = olc_db_fetch_array($ipn_query);
         $this->info = $this->getSQLDataElements($ipn, $info);
         $this->txn = $this->getSQLDataElements($ipn, $txn);
         $this->customer = $this->getSQLDataElements($ipn, $customer);
     }
 }
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:14,代码来源:TransactionDetails.class.php

示例3: olc_db_perform

function olc_db_perform($table, $data, $action = 'insert', $parameters = '', $link = 'db_link')
{
    reset($data);
    if ($action == 'insert') {
        $query = INSERT_INTO . $table . LPAREN;
        while (list($columns, ) = each($data)) {
            $query .= $columns . COMMA_BLANK;
        }
        $query = substr($query, 0, -2) . ') values (';
        reset($data);
        while (list($columns, $value) = each($data)) {
            $value = (string) $value;
            switch ($value) {
                case 'now()':
                    $query .= $value;
                    break;
                case 'null':
                    $query .= $value;
                    break;
                default:
                    $query .= APOS . olc_db_input($value) . APOS;
                    break;
            }
            $query .= COMMA_BLANK;
        }
        $query = substr($query, 0, -2) . RPAREN;
    } else {
        $query = SQL_UPDATE . $table . ' set ';
        while (list($columns, $value) = each($data)) {
            $value = (string) $value;
            switch ($value) {
                case 'now()':
                    $l_query = $value;
                    break;
                case 'null':
                    $l_query = $value;
                    break;
                default:
                    $l_query = APOS . olc_db_input($value) . APOS;
                    break;
            }
            $query .= $columns . EQUAL . $l_query . COMMA_BLANK;
        }
        $query = substr($query, 0, -2) . SQL_WHERE . $parameters;
    }
    return olc_db_query($query, $link);
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:47,代码来源:279.php

示例4: paypal_remove_order

function paypal_remove_order($order_id)
{
    include_once PAYPAL_IPN_DIR . 'inc.php';
    $ipn_query = olc_db_query("select payment_id from " . TABLE_ORDERS . " where orders_id = '" . (int) $order_id . APOS);
    if (olc_db_num_rows($ipn_query)) {
        // this is a ipn order (PayPal or StormPay)
        $ipn_order = olc_db_fetch_array($ipn_query);
        $paypal_id = $ipn_order['payment_id'];
        $txn_query = olc_db_query("select txn_id from " . TABLE_PAYPAL . " where paypal_id ='" . (int) $paypal_id . APOS);
        $txn = olc_db_fetch_array($txn_query);
        olc_db_query(DELETE_FROM . TABLE_PAYPAL . " where paypal_id = '" . (int) $paypal_id . APOS);
        olc_db_query(DELETE_FROM . TABLE_PAYPAL . " where parent_txn_id = '" . olc_db_input($txn['txn_id']) . APOS);
        if (defined('TABLE_PAYPAL_AUCTION')) {
            olc_db_query(DELETE_FROM . TABLE_PAYPAL_AUCTION . " where paypal_id = '" . (int) $paypal_id . APOS);
        }
    }
    olc_db_query(DELETE_FROM . TABLE_ORDERS_SESSION_INFO . " where orders_id = '" . (int) $order_id . APOS);
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:18,代码来源:general.func.php

示例5: olc_address_summary

function olc_address_summary($customers_id, $address_id)
{
    $customers_id = olc_db_prepare_input($customers_id);
    $address_id = olc_db_prepare_input($address_id);
    $address_query = olc_db_query("select ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_state, ab.entry_country_id, ab.entry_zone_id, c.countries_name, c.address_format_id from " . TABLE_ADDRESS_BOOK . " ab, " . TABLE_COUNTRIES . " c where ab.address_book_id = '" . olc_db_input($address_id) . "' and ab.customers_id = '" . olc_db_input($customers_id) . "' and ab.entry_country_id = c.countries_id");
    $address = olc_db_fetch_array($address_query);
    $street_address = $address['entry_street_address'];
    $suburb = $address['entry_suburb'];
    $postcode = $address['entry_postcode'];
    $city = $address['entry_city'];
    $state = olc_get_zone_code($address['entry_country_id'], $address['entry_zone_id'], $address['entry_state']);
    $country = $address['countries_name'];
    $address_format_query = olc_db_query("select address_summary from " . TABLE_ADDRESS_FORMAT . " where address_format_id = '" . $address['address_format_id'] . APOS);
    $address_format = olc_db_fetch_array($address_format_query);
    //    eval("\$address = \"{$address_format['address_summary']}\";");
    $address_summary = $address_format['address_summary'];
    eval("\$address = \"{$address_summary}\";");
    return $address;
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:19,代码来源:457.php

示例6: olc_get_categories

function olc_get_categories($categories_array = '', $parent_id = '0', $indent = '')
{
    $parent_id = olc_db_prepare_input($parent_id);
    if (!is_array($categories_array)) {
        $categories_array = array();
    }
    $sql = SELECT . "\n\tc.categories_id,\n\tcd.categories_name,\n\tcd.categories_heading_title,\n\tcd.categories_description\n\tfrom " . TABLE_CATEGORIES . " c,\t" . TABLE_CATEGORIES_DESCRIPTION . " cd\n\twhere\n\tparent_id = '" . olc_db_input($parent_id) . "'\n\tand c.categories_id = cd.categories_id\n\tand c.categories_status != 0\n\tand cd.language_id = '" . SESSION_LANGUAGE_ID . "'\n\torder by sort_order, cd.categories_name";
    $categories_query = olc_db_query($sql);
    $indent_two_nbsp = $indent . HTML_NBSP . HTML_NBSP;
    while ($categories = olc_db_fetch_array($categories_query)) {
        $name = $categories['categories_name'];
        $title = $categories['categories_heading_title'];
        if ($title == EMPTY_STRING) {
            $title = $name;
        }
        $categories_id = $categories['categories_id'];
        $categories_array[] = array('id' => $categories_id, 'text' => $indent . $name, 'title' => $title);
        if ($categories_id != $parent_id) {
            $categories_array = olc_get_categories($categories_array, $categories_id, $indent_two_nbsp);
        }
    }
    return $categories_array;
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:23,代码来源:olc_get_categories.inc.php

示例7: olc_array_merge

             $sql_data_array = olc_array_merge($sql_data_array, $insert_sql_data);
             olc_db_perform(TABLE_MANUFACTURERS_INFO, $sql_data_array);
         } else {
             //if ($action == 'save') {
             olc_db_perform(TABLE_MANUFACTURERS_INFO, $sql_data_array, 'update', $manufacturers_id_sql . " and languages_id = '" . $language_id . APOS);
         }
     }
     if (USE_CACHE == TRUE_STRING_S) {
         olc_reset_cache_block('manufacturers');
     }
     //olc_redirect(olc_href_link(FILENAME_MANUFACTURERS, $page_parameter.'&mID='.$manufacturers_id));
     $mID = $manufacturers_id;
     break;
 case 'deleteconfirm':
     $manufacturers_id = $mID;
     $manufacturers_id_sql = " where manufacturers_id = '" . olc_db_input($manufacturers_id) . APOS;
     if ($_POST['delete_image'] == 'on') {
         $manufacturer_query = olc_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . $manufacturers_id_sql);
         $manufacturer = olc_db_fetch_array($manufacturer_query);
         $image_location = DIR_FS_DOCUMENT_ROOT . DIR_WS_IMAGES . $manufacturer['manufacturers_image'];
         if (file_exists($image_location)) {
             @unlink($image_location);
         }
     }
     olc_db_query(DELETE_FROM . TABLE_MANUFACTURERS . $manufacturers_id_sql);
     olc_db_query(DELETE_FROM . TABLE_MANUFACTURERS_INFO . $manufacturers_id_sql);
     if ($_POST['delete_products'] == 'on') {
         $products_query = olc_db_query("select products_id from " . TABLE_PRODUCTS . $manufacturers_id_sql);
         while ($products = olc_db_fetch_array($products_query)) {
             olc_remove_product($products['products_id']);
         }
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:31,代码来源:manufacturers.php

示例8: getNext

 function getNext()
 {
     switch ($this->mode) {
         // yearly
         case '1':
             $sd = $this->actDate;
             $ed = mktime(0, 0, 0, date("m", $sd), date("d", $sd), date("Y", $sd) + 1);
             break;
             // monthly
         // monthly
         case '2':
             $sd = $this->actDate;
             $ed = mktime(0, 0, 0, date("m", $sd) + 1, 1, date("Y", $sd));
             break;
             // weekly
         // weekly
         case '3':
             $sd = $this->actDate;
             $ed = mktime(0, 0, 0, date("m", $sd), date("d", $sd) + 7, date("Y", $sd));
             break;
             // daily
         // daily
         case '4':
             $sd = $this->actDate;
             $ed = mktime(0, 0, 0, date("m", $sd), date("d", $sd) + 1, date("Y", $sd));
             break;
     }
     if ($ed > $this->endDate) {
         $ed = $this->endDate;
     }
     $filterString = "";
     if ($this->statusFilter > 0) {
         $filterString .= " AND o.orders_status = " . $this->statusFilter . BLANK;
     }
     $rqOrders = olc_db_query($this->queryOrderCnt . " WHERE o.date_purchased >= '" . olc_db_input(date("Y-m-d\\TH:i:s", $sd)) . "' AND o.date_purchased < '" . olc_db_input(date("Y-m-d\\TH:i:s", $ed)) . APOS . $filterString);
     $order = olc_db_fetch_array($rqOrders);
     $rqShipping = olc_db_query($this->queryShipping . " AND o.date_purchased >= '" . olc_db_input(date("Y-m-d\\TH:i:s", $sd)) . "' AND o.date_purchased < '" . olc_db_input(date("Y-m-d\\TH:i:s", $ed)) . APOS . $filterString);
     $shipping = olc_db_fetch_array($rqShipping);
     $rqItems = olc_db_query($this->queryItemCnt . " AND o.date_purchased >= '" . olc_db_input(date("Y-m-d\\TH:i:s", $sd)) . "' AND o.date_purchased < '" . olc_db_input(date("Y-m-d\\TH:i:s", $ed)) . APOS . $filterString . " group by pid " . $this->sortString);
     // set the return values
     $this->actDate = $ed;
     $this->showDate = $sd;
     $this->showDateEnd = $ed - 60 * 60 * 24;
     // execute the query
     $cnt = 0;
     $itemTot = 0;
     $sumTot = 0;
     while ($resp[$cnt] = olc_db_fetch_array($rqItems)) {
         // to avoid rounding differences round for every quantum
         // multiply with the number of items afterwords.
         $price = $resp[$cnt]['psum'] / $resp[$cnt]['pquant'];
         // products_attributes
         // are there any attributes for this order_id ?
         $rqAttr = olc_db_query($this->queryAttr . " AND o.date_purchased >= '" . olc_db_input(date("Y-m-d\\TH:i:s", $sd)) . "' AND o.date_purchased < '" . olc_db_input(date("Y-m-d\\TH:i:s", $ed)) . "' AND op.products_id = " . $resp[$cnt]['pid'] . $filterString . " group by products_options_values order by orders_products_id");
         $i = 0;
         while ($attr[$i] = olc_db_fetch_array($rqAttr)) {
             $i++;
         }
         // values per date
         if ($i > 0) {
             $price2 = 0;
             $price3 = 0;
             $option = array();
             $k = -1;
             $ord_pro_id_old = 0;
             for ($j = 0; $j < $i; $j++) {
                 if ($attr[$j]['price_prefix'] == "-") {
                     $price2 += -1 * $attr[$j]['options_values_price'];
                     $price3 = -1 * $attr[$j]['options_values_price'];
                     $prefix = "-";
                 } else {
                     $price2 += $attr[$j]['options_values_price'];
                     $price3 = $attr[$j]['options_values_price'];
                     $prefix = "+";
                 }
                 $ord_pro_id = $attr[$j]['orders_products_id'];
                 if ($ord_pro_id != $ord_pro_id_old) {
                     $k++;
                     $l = 0;
                     // set values
                     $option[$k]['quant'] = $attr[$j]['attr_cnt'];
                     $option[$k]['options'][0] = $attr[$j]['products_options'];
                     $option[$k]['options_values'][0] = $attr[$j]['products_options_values'];
                     if ($price3 != 0) {
                         //$option[$k]['price'][0] = olc_add_tax($price3, $resp[$cnt]['ptax']);
                         $option[$k]['price'][0] = $price3;
                     } else {
                         $option[$k]['price'][0] = 0;
                     }
                 } else {
                     $l++;
                     // update values
                     $option[$k]['options'][$l] = $attr[$j]['products_options'];
                     $option[$k]['options_values'][$l] = $attr[$j]['products_options_values'];
                     if ($price3 != 0) {
                         //$option[$k]['price'][$l] = olc_add_tax($price3, $resp[$cnt]['ptax']);
                         $option[$k]['price'][$l] = $price3;
                     } else {
                         $option[$k]['price'][$l] = 0;
                     }
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:101,代码来源:sales_report.php

示例9: olc_db_prepare_input

            $address_format_id = olc_db_prepare_input($_POST['address_format_id']);
            olc_db_query(INSERT_INTO . TABLE_COUNTRIES . " (countries_name, countries_iso_code_2, countries_iso_code_3, address_format_id) values ('" . olc_db_input($countries_name) . "', '" . olc_db_input($countries_iso_code_2) . "', '" . olc_db_input($countries_iso_code_3) . "', '" . olc_db_input($address_format_id) . "')");
            olc_redirect(olc_href_link(FILENAME_COUNTRIES));
            break;
        case 'save':
            $countries_id = olc_db_prepare_input($_GET['cID']);
            $countries_name = olc_db_prepare_input($_POST['countries_name']);
            $countries_iso_code_2 = olc_db_prepare_input($_POST['countries_iso_code_2']);
            $countries_iso_code_3 = olc_db_prepare_input($_POST['countries_iso_code_3']);
            $address_format_id = olc_db_prepare_input($_POST['address_format_id']);
            olc_db_query(SQL_UPDATE . TABLE_COUNTRIES . " set countries_name = '" . olc_db_input($countries_name) . "', countries_iso_code_2 = '" . olc_db_input($countries_iso_code_2) . "', countries_iso_code_3 = '" . olc_db_input($countries_iso_code_3) . "', address_format_id = '" . olc_db_input($address_format_id) . "' where countries_id = '" . olc_db_input($countries_id) . APOS);
            olc_redirect(olc_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $countries_id));
            break;
        case 'deleteconfirm':
            $countries_id = olc_db_prepare_input($_GET['cID']);
            olc_db_query(DELETE_FROM . TABLE_COUNTRIES . " where countries_id = '" . olc_db_input($countries_id) . APOS);
            olc_redirect(olc_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page']));
            break;
    }
}
require DIR_WS_INCLUDES . 'header.php';
?>
<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
    <td class="columnLeft2" nowrap="nowrap" valign="top">
    	<table border="0" cellspacing="1" cellpadding="1" class="columnLeft" nowrap="nowrap">
				<!-- left_navigation //-->
				<?php 
require DIR_WS_INCLUDES . 'column_left.php';
?>
				<!-- left_navigation_eof //-->
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:31,代码来源:countries.php

示例10: define

define($filename_affiliate_help_u . '5', $affiliate_help_u . '5.php');
define($filename_affiliate_help_u . '6', $affiliate_help_u . '6.php');
define($filename_affiliate_help_u . '7', $affiliate_help_u . '7.php');
define($filename_affiliate_help_u . '8', $affiliate_help_u . '8.php');
define($filename_affiliate_u . 'INVOICE', $affiliate_u . 'invoice.php');
define($filename_affiliate_u . 'PAYMENT', $affiliate_u . 'payment.php');
define($filename_affiliate_u . 'POPUP_IMAGE', $affiliate_u . 'popup_image.php');
define($filename_affiliate_u . 'SALES', $affiliate_u . 'sales.php');
define($filename_affiliate_u . 'STATISTICS', $affiliate_u . 'statistics.php');
define($filename_affiliate_u . 'SUMMARY', $affiliate_u . 'summary.php');
define($filename_affiliate_u . 'RESET', $affiliate_u . 'reset.php');
define('FILENAME_CATALOG_AFFILIATE_PAYMENT_INFO', FILENAME_AFFILIATE_PAYMENT);
define('FILENAME_CATALOG_PRODUCT_INFO', FILENAME_PRODUCT_INFO);
$affiliate_u = TABLE_PREFIX_INDIVIDUAL . $affiliate_u;
$table_affiliate = 'TABLE_AFFILIATE';
$table_affiliate_u = $table_affiliate . "_";
define($table_affiliate, $affiliate_u . $affiliate);
define($table_affiliate_u . 'BANNERS', $affiliate_u . 'banners');
define($table_affiliate_u . 'BANNERS_HISTORY', TABLE_AFFILIATE_BANNERS . '_history');
define($table_affiliate_u . 'CLICKTHROUGHS', $affiliate_u . 'clickthroughs');
define($table_affiliate_u . 'PAYMENT', $affiliate_u . 'payment');
define($table_affiliate_u . 'PAYMENT_STATUS', TABLE_AFFILIATE_PAYMENT . '_status');
define($table_affiliate_u . 'PAYMENT_STATUS_HISTORY', TABLE_AFFILIATE_PAYMENT_STATUS . '_history');
define($table_affiliate_u . 'SALES', $affiliate_u . 'sales');
// include the language translations
require DIR_FS_LANGUAGES . SESSION_LANGUAGE . '/admin/affiliate_' . SESSION_LANGUAGE . PHP;
// If an order is deleted delete the sale too (optional)
if ($_GET['action'] == 'deleteconfirm' && basename($_SERVER['SCRIPT_FILENAME']) == FILENAME_ORDERS && AFFILIATE_DELETE_ORDERS == TRUE_STRING_S) {
    $affiliate_oID = olc_db_prepare_input($_GET['oID']);
    olc_db_query(DELETE_FROM . TABLE_AFFILIATE_SALES . " where affiliate_orders_id = '" . olc_db_input($affiliate_oID) . "' and affiliate_billing_status != 1");
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:31,代码来源:affiliate_application_top.php

示例11: olc_db_query

         $mail_query = olc_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS);
         $mail_sent_to = TEXT_ALL_CUSTOMERS;
         break;
     case '**D':
         $mail_query = olc_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_newsletter = '1'");
         $mail_sent_to = TEXT_NEWSLETTER_CUSTOMERS;
         break;
     default:
         if (is_numeric($_POST['customers_email_address'])) {
             $mail_query = olc_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_status = " . $_POST['customers_email_address']);
             $sent_to_query = olc_db_query("select customers_status_name from " . TABLE_CUSTOMERS_STATUS . " WHERE customers_status_id = '" . $_POST['customers_email_address'] . "' AND language_id='" . SESSION_LANGUAGE_ID . APOS);
             $sent_to = olc_db_fetch_array($sent_to_query);
             $mail_sent_to = $sent_to['customers_status_name'];
         } else {
             $customers_email_address = olc_db_prepare_input($_POST['customers_email_address']);
             $mail_query = olc_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_email_address = '" . olc_db_input($customers_email_address) . APOS);
             $mail_sent_to = $_POST['customers_email_address'];
         }
         break;
 }
 $from = olc_db_prepare_input($_POST['from']);
 $subject = olc_db_prepare_input($_POST['subject']);
 $message = olc_db_prepare_input($_POST['message']);
 //Let's build a message object using the email class
 $mimemessage = new email(array('X-Mailer: OL-Commerce bulk mailer'));
 // add the message to the object
 $mimemessage->add_text($message);
 $mimemessage->build_message();
 while ($mail = olc_db_fetch_array($mail_query)) {
     $mimemessage->send($mail['customers_firstname'] . BLANK . $mail['customers_lastname'], $mail['customers_email_address'], '', $from, $subject);
 }
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:31,代码来源:mail.php

示例12: olc_db_prepare_input

        $cID = olc_db_prepare_input($_GET['cID']);
        $status_query = olc_db_query("select count(*) as count from " . TABLE_CUSTOMERS . " where customers_status = '" . olc_db_input($cID) . APOS);
        $status = olc_db_fetch_array($status_query);
        $remove_status = true;
        if ($cID == DEFAULT_CUSTOMERS_STATUS_ID || $cID == DEFAULT_CUSTOMERS_STATUS_ID_GUEST || $cID == DEFAULT_CUSTOMERS_STATUS_ID_NEWSLETTER) {
            $remove_status = false;
            $messageStack->add(ERROR_REMOVE_DEFAULT_CUSTOMERS_STATUS, 'error');
        } elseif ($status['count'] > 0) {
            $remove_status = false;
            $messageStack->add(ERROR_STATUS_USED_IN_CUSTOMERS, 'error');
        } else {
            $history_query = olc_db_query("select count(*) as count from " . TABLE_CUSTOMERS_STATUS_HISTORY . " where '" . olc_db_input($cID) . "' in (new_value, old_value)");
            $history = olc_db_fetch_array($history_query);
            if ($history['count'] > 0) {
                // delete from history
                olc_db_query(DELETE_FROM . TABLE_CUSTOMERS_STATUS_HISTORY . "\n                        where '" . olc_db_input($cID) . "' in (new_value, old_value)");
                $remove_status = true;
                // $messageStack->add(ERROR_STATUS_USED_IN_HISTORY, 'error');
            }
        }
        break;
}
require_once DIR_WS_INCLUDES . 'header.php';
?>
<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
    <td class="columnLeft2" nowrap="nowrap" valign="top"><table border="0" cellspacing="1" cellpadding="1" class="columnLeft" nowrap="nowrap">
<!-- left_navigation //-->
<?php 
require DIR_WS_INCLUDES . 'column_left.php';
?>
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:31,代码来源:customers_status.php

示例13: switch

 switch ($_POST['affiliate_email_address']) {
     case '***':
         $mail_query = olc_db_query("select affiliate_firstname, affiliate_lastname, affiliate_email_address from " . TABLE_AFFILIATE . BLANK);
         $mail_sent_to = TEXT_ALL_AFFILIATES;
         break;
         //      case '**D':
         //        $mail_query = olc_db_query("select affiliate_firstname, affiliate_lastname, affiliate_email_address from " . TABLE_AFFILIATE . " where affiliate_newsletter = '1'");
         //        $mail_sent_to = TEXT_NEWSLETTER_AFFILIATE;
         //        break;
     //      case '**D':
     //        $mail_query = olc_db_query("select affiliate_firstname, affiliate_lastname, affiliate_email_address from " . TABLE_AFFILIATE . " where affiliate_newsletter = '1'");
     //        $mail_sent_to = TEXT_NEWSLETTER_AFFILIATE;
     //        break;
     default:
         $affiliate_email_address = olc_db_prepare_input($_POST['affiliate_email_address']);
         $mail_query = olc_db_query("select affiliate_firstname, affiliate_lastname, affiliate_email_address from " . TABLE_AFFILIATE . " where affiliate_email_address = '" . olc_db_input($affiliate_email_address) . APOS);
         $mail_sent_to = $_POST['affiliate_email_address'];
         break;
 }
 $from = olc_db_prepare_input($_POST['from']);
 $subject = olc_db_prepare_input($_POST['subject']);
 $message = olc_db_prepare_input($_POST['message']);
 // Instantiate a new mail object
 $mimemessage = new email(array('X-Mailer: OLC mailer'));
 // Build the text version
 $text = strip_tags($text);
 if (EMAIL_USE_HTML == TRUE_STRING_S) {
     $mimemessage->add_html($message);
 } else {
     $mimemessage->add_text($message);
 }
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:31,代码来源:affiliate_contact.php

示例14: array

    $discount = '0.00';
}
$ip = $_SESSION['CUSTOMERS_IP'];
if (!$ip) {
    $ip = $_SERVER['REMOTE_ADDR'];
}
$customer_email_address = $order->customer['email_address'];
//	W. Kaiser - eMail-type by customer
$sql_data_array = array('customers_id' => $customers_id, 'customers_name' => trim($order->customer['firstname'] . BLANK . $order->customer['lastname']), 'customers_cid' => $order->customer['csID'], 'customers_company' => $order->customer['company'], 'customers_status' => $order->customer['status'], 'customers_status_name' => $_SESSION['customers_status']['customers_status_name'], 'customers_status_image' => $order->customer['status_image'], 'customers_status_discount' => $discount, 'customers_status' => $customer_status_value['customers_status'], 'customers_street_address' => $order->customer['street_address'], 'customers_suburb' => $order->customer['suburb'], 'customers_city' => $order->customer['city'], 'customers_postcode' => $order->customer['postcode'], 'customers_state' => $order->customer['state'], 'customers_country' => $order->customer['country']['title'], 'customers_telephone' => $order->customer['telephone'], 'customers_email_address' => $customer_email_address, 'customers_email_type' => $order->customer['email_type'], 'customers_address_format_id' => $order->customer['format_id'], 'delivery_name' => trim($order->delivery['firstname'] . BLANK . $order->delivery['lastname']), 'delivery_firstname' => $order->delivery['firstname'], 'delivery_lastname' => $order->delivery['lastname'], 'delivery_company' => $order->delivery['company'], 'delivery_street_address' => $order->delivery['street_address'], 'delivery_suburb' => $order->delivery['suburb'], 'delivery_city' => $order->delivery['city'], 'delivery_postcode' => $order->delivery['postcode'], 'delivery_state' => $order->delivery['state'], 'delivery_country' => $order->delivery['country']['title'], 'delivery_country_iso_code_2' => $order->delivery['country']['iso_code_2'], 'delivery_address_format_id' => $order->delivery['format_id'], 'payment_method' => $order->info['payment_method'], 'payment_class' => $order->info['payment_class'], 'shipping_method' => $order->info['shipping_method'], 'shipping_class' => $order->info['shipping_class'], 'cc_type' => $order->info['cc_type'], 'cc_owner' => $order->info['cc_owner'], 'cc_number' => $order->info['cc_number'], 'cc_expires' => $order->info['cc_expires'], 'cc_start' => $order->info['cc_start'], 'cc_cvv' => $order->info['cc_cvv'], 'cc_issue' => $order->info['cc_issue'], 'date_purchased' => 'now()', 'orders_status' => $order->info['order_status'], 'currency' => $order->info['currency'], 'currency_value' => $order->info['currency_value'], 'customers_ip' => $ip, 'language' => $_SESSION['language_name'], 'customers_order_reference' => $order->info['customers_order_reference'], 'orders_discount' => $order->info['orders_discount'], 'comments' => $order->info['comments']);
if ($_SESSION['credit_covers'] != '1') {
    $sql_data_array = array_merge($sql_data_array, array('billing_name' => trim($order->billing['firstname'] . BLANK . $order->billing['lastname']), 'billing_firstname' => $order->billing['firstname'], 'billing_lastname' => $order->billing['lastname'], 'billing_company' => $order->billing['company'], 'billing_street_address' => $order->billing['street_address'], 'billing_suburb' => $order->billing['suburb'], 'billing_city' => $order->billing['city'], 'billing_postcode' => $order->billing['postcode'], 'billing_state' => $order->billing['state'], 'billing_country' => $order->billing['country']['title'], 'billing_country_iso_code_2' => $order->billing['country']['iso_code_2'], 'billing_address_format_id' => $order->billing['format_id']));
}
//	W. Kaiser - eMail-type by customer
$paypal_session_exists = false;
if (isset($_SESSION['PayPal_osC'])) {
    $orders_session_query = olc_db_query("select osi.orders_id, o.payment_id from " . TABLE_ORDERS_SESSION_INFO . " osi left join " . TABLE_ORDERS . " o on osi.orders_id = o.orders_id where osi.txn_signature ='" . olc_db_input($PayPal_osC->txn_signature) . APOS);
    $orders_check = olc_db_fetch_array($orders_session_query);
    //Now check to see whether order session info exists AND that this order
    //does not currently have an IPN.
    $orders_id = (int) $orders_check['orders_id'];
    if ($orders_id > 0) {
        if ($orders_check['payment_id'] == '0') {
            $paypal_session_exists = true;
        }
    }
}
if ($paypal_session_exists) {
    $orders_id_param = "orders_id = '" . $orders_id . APOS;
    $where_orders_id = " where " . $orders_id_param;
    olc_db_perform(TABLE_ORDERS, $sql_data_array, 'update', $orders_id_param);
    olc_db_query(DELETE_FROM . TABLE_ORDERS_TOTAL . $where_orders_id);
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:31,代码来源:checkout_process.php

示例15: tep_db_input

function tep_db_input($x)
{
    return olc_db_input($x);
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:4,代码来源:olc.inc.php


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