function convert_product_attributes_result($attributes_values, $load_option_name = true, $can_operate = false)
 {
     if ($load_option_name) {
         $attributes_values->fields['products_options_name'] = zen_options_name($attributes_values->fields['options_id']);
         $attributes_values->fields['products_options_values_name'] = zen_values_name($attributes_values->fields['options_values_id']);
     }
     $attributes_values->fields['products_display_price'] = $attributes_values->fields['price_prefix'] . $attributes_values->fields['options_values_price'];
     $attributes_values->fields['products_attributes_display_weight'] = $attributes_values->fields['products_attributes_weight_prefix'] . $attributes_values->fields['products_attributes_weight'];
     require_once DIR_WS_CLASSES . 'currencies.php';
     $currencies = new currencies();
     $attributes_price_final = zen_get_attributes_price_final($attributes_values->fields["products_attributes_id"], 1, $attributes_values, 'false');
     $attributes_price_final_value = $attributes_price_final;
     $attributes_price_final = $currencies->display_price($attributes_price_final, zen_get_tax_rate(1), 1);
     $attributes_price_final_onetime = zen_get_attributes_price_final_onetime($attributes_values->fields["products_attributes_id"], 1, $attributes_values);
     $attributes_price_final_onetime = $currencies->display_price($attributes_price_final_onetime, zen_get_tax_rate(1), 1);
     $new_attributes_price = '';
     if ($attributes_values->fields["attributes_discounted"]) {
         $new_attributes_price = zen_get_attributes_price_final($attributes_values->fields["products_attributes_id"], 1, '', 'false');
         $new_attributes_price = zen_get_discount_calc($attributes_values->fields['products_id'], true, $new_attributes_price);
         if ($new_attributes_price != $attributes_price_final_value) {
             $new_attributes_price = '|' . $currencies->display_price($new_attributes_price, zen_get_tax_rate(1), 1);
         } else {
             $new_attributes_price = '';
         }
     }
     $attributes_values->fields['attributes_display_price_final'] = $attributes_price_final . $new_attributes_price . ' ' . $attributes_price_final_onetime;
     // status
     $attributes_values->fields['products_status'] = "";
     foreach ($this->statuses as $type => $icon_info) {
         $attributes_values->fields['products_status'] .= self::make_status_link($attributes_values->fields, $type, $icon_info['color'], $icon_info['alt'], $can_operate);
     }
     return $attributes_values->fields;
 }
示例#2
0
    function process_button($transactionID = 0, $key= "") {
		global $order, $currencies, $currency;

		$my_currency = strtoupper(BASE_CURRENCY);

		if (!in_array($my_currency, $this->paypal_allowed_currencies)) {
			$my_currency = 'USD';
		}
		$currencyObject = new currencies();
		$process_button_string = tep_draw_hidden_field('cmd', '_xclick') .
					 tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) .
					 tep_draw_hidden_field('item_name', gettext('Payment for ').STORE_NAME) .
					 tep_draw_hidden_field('rm', '2') .
//					 tep_draw_hidden_field('bn', 'Credits_BuyNow_WPS_'.substr($order->customer['country'],0,2)) .
//					 tep_draw_hidden_field('country', substr($order->customer['country'],0,2)) .
					 tep_draw_hidden_field('lc', LANG) .
					 tep_draw_hidden_field('charset', 'UTF-8') .
					 tep_draw_hidden_field('email', $order->customer['email_address']) .
					 tep_draw_hidden_field('no_shipping', '1') .
					 tep_draw_hidden_field('PHPSESSID', session_id()) .
					 tep_draw_hidden_field('amount', number_format($order->info['total'], $currencyObject->get_decimal_places($my_currency))) .
//					 tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencyObject->get_value($my_currency), $currencyObject->get_decimal_places($my_currency))) .
					 tep_draw_hidden_field('currency_code', $my_currency) .
					 tep_draw_hidden_field('notify_url', tep_href_link("checkout_process.php?transactionID=".$transactionID."&sess_id=".session_id()."&key=".$key, '', 'SSL')) .
					 tep_draw_hidden_field('return', tep_href_link("userinfo.php", '', 'SSL')) .
					 tep_draw_hidden_field('cbt', gettext('Return to ').STORE_NAME) .
					 tep_draw_hidden_field('cancel_return', tep_href_link("userinfo.php", '', 'SSL'));

		return $process_button_string;
    }
示例#3
0
 public function process_button($transactionID = 0, $key = "")
 {
     global $order, $currencies, $currency;
     $my_currency = strtoupper($GLOBALS['A2B']->config['global']['base_currency']);
     if (!in_array($my_currency, $this->paypal_allowed_currencies)) {
         $my_currency = 'USD';
     }
     $currencyObject = new currencies();
     $process_button_string = tep_draw_hidden_field('cmd', '_xclick') . tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) . tep_draw_hidden_field('item_name', STORE_NAME) . tep_draw_hidden_field('rm', '2') . tep_draw_hidden_field('LC', 'US') . tep_draw_hidden_field('country', 'USA') . tep_draw_hidden_field('no_shipping', '1') . tep_draw_hidden_field('PHPSESSID', session_id()) . tep_draw_hidden_field('amount', number_format($order->info['total'], $currencyObject->get_decimal_places($my_currency))) . tep_draw_hidden_field('currency_code', $my_currency) . tep_draw_hidden_field('notify_url', tep_href_link("checkout_process.php?transactionID=" . $transactionID . "&sess_id=" . session_id() . "&key=" . $key, '', 'SSL')) . tep_draw_hidden_field('return', tep_href_link("userinfo.php", '', 'SSL')) . tep_draw_hidden_field('cancel_return', tep_href_link("userinfo.php", '', 'SSL'));
     return $process_button_string;
 }
示例#4
0
 function process_button()
 {
     global $order, $currencies, $currency;
     $my_currency = MODULE_PAYMENT_PAYPAL_CURRENCY;
     if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) {
         $my_currency = 'USD';
     }
     $currencyObject = new currencies();
     $process_button_string = tep_draw_hidden_field('cmd', '_xclick') . tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) . tep_draw_hidden_field('item_name', STORE_NAME) . tep_draw_hidden_field('rm', '2') . tep_draw_hidden_field('no_shipping', '1') . tep_draw_hidden_field('PHPSESSID', session_id()) . tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencyObject->get_value($my_currency), $currencyObject->get_decimal_places($my_currency))) . tep_draw_hidden_field('currency_code', $my_currency) . tep_draw_hidden_field('return', tep_href_link("checkout_process.php?sess_id=" . session_id(), '', 'SSL')) . tep_draw_hidden_field('cancel_return', tep_href_link("checkout_payment.php", '', 'SSL'));
     return $process_button_string;
 }
示例#5
0
 function process_button()
 {
     global $order, $currencies, $currency;
     $my_language = MODULE_PAYMENT_MONEYBOOKERS_LANGUAGE;
     $my_currency = MODULE_PAYMENT_MONEYBOOKERS_CURRENCY;
     if (!in_array($my_currency, array('EUR', 'USD', 'GBP', 'HKD', 'SGD', 'JPY', 'CAD', 'AUD', 'CHF', 'DKK', 'SEK', 'NOK', 'ILS', 'MYR', 'NZD', 'TWD', 'THB', 'CZK', 'HUF', 'SKK', 'ISK', 'INR'))) {
         $my_currency = 'USD';
     }
     $currencyObject = new currencies();
     $process_button_string = tep_draw_hidden_field('pay_to_email', MODULE_PAYMENT_MONEYBOOKERS_ID) . tep_draw_hidden_field('language', $my_language) . tep_draw_hidden_field('amount', number_format($order->info['total'] * $currencyObject->get_value($my_currency), $currencyObject->get_decimal_places($my_currency))) . tep_draw_hidden_field('currency', $my_currency) . tep_draw_hidden_field('detail1_description', STORE_NAME) . tep_draw_hidden_field('detail1_text', 'Order - ' . date('d. M Y - H:i')) . tep_draw_hidden_field('firstname', $order->billing['firstname']) . tep_draw_hidden_field('lastname', $order->billing['lastname']) . tep_draw_hidden_field('address', $order->billing['street_address']) . tep_draw_hidden_field('postal_code', $order->billing['postcode']) . tep_draw_hidden_field('city', $order->billing['city']) . tep_draw_hidden_field('country', $order->billing['country']['moneybookers']) . tep_draw_hidden_field('pay_from_email', $order->customer['email_address']) . tep_draw_hidden_field('status_url', tep_href_link("checkout_process.php?sess_id=" . session_id(), '', 'SSL')) . tep_draw_hidden_field('cancel_url', tep_href_link("checkout_payment.php", '', 'SSL'));
     return $process_button_string;
 }
示例#6
0
 function process_button($transactionID = 0, $key = "")
 {
     global $order, $currencies, $currency;
     $my_language = MODULE_PAYMENT_MONEYBOOKERS_LANGUAGE;
     $my_currency = strtoupper($GLOBALS['A2B']->config['global']['base_currency']);
     if (!in_array($my_currency, array('EUR', 'USD', 'GBP', 'HKD', 'SGD', 'JPY', 'CAD', 'AUD', 'CHF', 'DKK', 'SEK', 'NOK', 'ILS', 'MYR', 'NZD', 'TWD', 'THB', 'CZK', 'HUF', 'SKK', 'ISK', 'INR'))) {
         $my_currency = 'USD';
     }
     $currencyObject = new currencies();
     $amount_toprocess = number_format($order->info['total'], $currencyObject->get_decimal_places($my_currency));
     $amount_toprocess = str_replace(',', '.', $amount_toprocess);
     $process_button_string = tep_draw_hidden_field('pay_to_email', MODULE_PAYMENT_MONEYBOOKERS_ID) . tep_draw_hidden_field('language', $my_language) . tep_draw_hidden_field('amount', $amount_toprocess) . tep_draw_hidden_field('currency', $my_currency) . tep_draw_hidden_field('detail1_description', STORE_NAME) . tep_draw_hidden_field('detail1_text', 'Order - ' . date('d. M Y - H:i')) . tep_draw_hidden_field('firstname', $order->billing['firstname']) . tep_draw_hidden_field('lastname', $order->billing['lastname']) . tep_draw_hidden_field('address', $order->billing['street_address']) . tep_draw_hidden_field('postal_code', $order->billing['postcode']) . tep_draw_hidden_field('city', $order->billing['city']) . tep_draw_hidden_field('country', $order->billing['country']['moneybookers']) . tep_draw_hidden_field('pay_from_email', $order->customer['email_address']);
     if ($transactionID != 0) {
         $process_button_string .= tep_draw_hidden_field('transaction_id', $transactionID);
     }
     $process_button_string .= tep_draw_hidden_field('status_url', tep_href_link("checkout_process.php?sess_id=" . session_id() . "&transactionID=" . $transactionID . "&key=" . $key, '', 'SSL')) . tep_draw_hidden_field('return_url', tep_href_link("userinfo.php", '', 'SSL')) . tep_draw_hidden_field('cancel_url', tep_href_link("checkout_payment.php", '', 'SSL'));
     return $process_button_string;
 }
示例#7
0
if (SESSION_CHECK_IP_ADDRESS == 'True') {
    if (!isset($_SESSION['SESSION_IP_ADDRESS'])) {
        $_SESSION['SESSION_IP_ADDRESS'] = tep_get_ip_address();
    }
    if ($_SESSION['SESSION_IP_ADDRESS'] != tep_get_ip_address()) {
        tep_session_destroy();
        OSCOM::redirect('login.php');
    }
}
// create the shopping cart
if (!isset($_SESSION['cart']) || !is_object($_SESSION['cart']) || get_class($_SESSION['cart']) != 'shoppingCart') {
    $_SESSION['cart'] = new shoppingCart();
}
// include currencies class and create an instance
require 'includes/classes/currencies.php';
$currencies = new currencies();
// include the mail classes
require 'includes/classes/mime.php';
require 'includes/classes/email.php';
// set the language
if (!isset($_SESSION['language']) || isset($_GET['language'])) {
    include 'includes/classes/language.php';
    $lng = new language();
    if (isset($_GET['language']) && !empty($_GET['language'])) {
        $lng->set_language($_GET['language']);
    } else {
        $lng->get_browser_language();
    }
    $_SESSION['language'] = $lng->language['directory'];
    $_SESSION['languages_id'] = $lng->language['id'];
}
示例#8
0
   File: currencies.php,v 1.45 2002/11/18 20:50:50 dgw_
   ----------------------------------------------------------------------
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com

   Copyright (c) 2003 osCommerce
   ----------------------------------------------------------------------
   Released under the GNU General Public License
   ---------------------------------------------------------------------- */
define('OOS_VALID_MOD', 'yes');
require 'includes/oos_main.php';
// define our localization functions
require 'includes/functions/function_localization.php';
require 'includes/classes/class_currencies.php';
$currencies = new currencies();
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (!empty($action)) {
    switch ($action) {
        case 'insert':
        case 'save':
            $currency_id = oos_db_prepare_input($_GET['cID']);
            $sql_data_array = array('title' => $title, 'code' => $code, 'symbol_left' => $symbol_left, 'symbol_right' => $symbol_right, 'decimal_point' => $decimal_point, 'thousands_point' => $thousands_point, 'decimal_places' => $decimal_places, 'value' => $currency_value);
            if ($action == 'insert') {
                oos_db_perform($oostable['currencies'], $sql_data_array);
                $currency_id = $dbconn->Insert_ID();
            } elseif ($action == 'save') {
                oos_db_perform($oostable['currencies'], $sql_data_array, 'update', "currencies_id = '" . oos_db_input($currency_id) . "'");
            }
            if (isset($_POST['default']) && $_POST['default'] == 'on') {
                $dbconn->Execute("UPDATE " . $oostable['configuration'] . " SET configuration_value = '" . oos_db_input($code) . "' WHERE configuration_key = 'DEFAULT_CURRENCY'");
            $so->delete_all_data();
            zen_redirect(zen_href_link(FILENAME_SUPER_ORDERS, zen_get_all_get_params(array('oID', 'action')), $request_type));
            break;
    }
}
if ($action == 'edit' && isset($_GET['oID'])) {
    $orders = $db->Execute("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . $oID . "'");
    $order_exists = true;
    if ($orders->RecordCount() <= 0) {
        $order_exists = false;
        $messageStack->add(sprintf(ERROR_ORDER_DOES_NOT_EXIST, $oID), 'error');
        zen_redirect(zen_href_link(FILENAME_SUPER_ORDERS, zen_get_all_get_params(array('oID', 'action')), $request_type));
    }
}
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
$orders_statuses = array();
$orders_status_array = array();
$orders_status = $db->Execute("select orders_status_id, orders_status_name\r\n                                 from " . TABLE_ORDERS_STATUS . "\r\n                                 where language_id = '" . (int) $_SESSION['languages_id'] . "' order by orders_status_id");
while (!$orders_status->EOF) {
    $orders_statuses[] = array('id' => $orders_status->fields['orders_status_id'], 'text' => $orders_status->fields['orders_status_name'] . ' [' . $orders_status->fields['orders_status_id'] . ']');
    $orders_status_array[$orders_status->fields['orders_status_id']] = $orders_status->fields['orders_status_name'];
    $orders_status->MoveNext();
}
require DIR_WS_CLASSES . 'order.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html <?php 
echo HTML_PARAMS;
?>
>
示例#10
0
   Based on:

   File: gv_mail.php,v 1.3.2.4 2003/05/12 22:54:01 wilt
   ----------------------------------------------------------------------
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com

   Copyright (c) 2002 osCommerce
   ----------------------------------------------------------------------
   Released under the GNU General Public License
   ---------------------------------------------------------------------- */
define('OOS_VALID_MOD', 'yes');
require 'includes/oos_main.php';
require 'includes/functions/function_coupon.php';
require 'includes/classes/class_currencies.php';
$currencies = new currencies();
$action = isset($_GET['action']) ? $_GET['action'] : '';
if ($action == 'send_email_to_user' && ($_POST['customers_email_address'] || $_POST['email_to']) && !$_POST['back_x']) {
    switch ($_POST['customers_email_address']) {
        case '***':
            $customerstable = $oostable['customers'];
            $mail_result = $dbconn->Execute("SELECT customers_firstname, customers_lastname, customers_email_address FROM {$customerstable}");
            $mail_sent_to = TEXT_ALL_CUSTOMERS;
            break;
        case '**D':
            $customerstable = $oostable['customers'];
            $mail_result = $dbconn->Execute("SELECT customers_firstname, customers_lastname, customers_email_address FROM {$customerstable} WHERE customers_newsletter = '1'");
            $mail_sent_to = TEXT_NEWSLETTER_CUSTOMERS;
            break;
        default:
            $customers_email_address = oos_db_prepare_input($_POST['customers_email_address']);
//  Released under the GNU General Public License       		//
//  available at www.zen-cart.com/license/2_0.txt       		//
//  or see "license.txt" in the downloaded zip          		//
//////////////////////////////////////////////////////////////////////////
//  DESCRIPTION:   Report that displays all income for the given date	//
//  range.  Report results come solely from the Super Orders payment	//
//  system.								//
//////////////////////////////////////////////////////////////////////////
// $Id: super_batch_forms.php v 2010-10-24 $
*/
require 'includes/application_top.php';
$target = isset($_GET['target']) ? $_GET['target'] : false;
$is_for_display = $_GET['print_format'] == 1 ? false : true;
if ($target) {
    require DIR_WS_CLASSES . 'currencies.php';
    $currencies = new currencies();
    require DIR_WS_CLASSES . 'super_order.php';
    $sd = zen_date_raw(!isset($_GET['start_date']) ? date("m-d-Y", time()) : $_GET['start_date']);
    $ed = zen_date_raw(!isset($_GET['end_date']) ? date("m-d-Y", time()) : $_GET['end_date']);
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo CHARSET;
?>
">
        $SESSION_IP_ADDRESS = $ip_address;
        tep_session_register('SESSION_IP_ADDRESS');
    }
    if ($SESSION_IP_ADDRESS != $ip_address) {
        tep_session_destroy();
        tep_redirect(tep_href_link(FILENAME_LOGIN));
    }
}
// create the shopping cart
if (!tep_session_is_registered('cart') || !is_object($cart)) {
    tep_session_register('cart');
    $cart = new shoppingCart();
}
// include currencies class and create an instance
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
// include the mail classes
require DIR_WS_CLASSES . 'mime.php';
require DIR_WS_CLASSES . 'email.php';
// set the language
if (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {
    if (!tep_session_is_registered('language')) {
        tep_session_register('language');
        tep_session_register('languages_id');
    }
    include DIR_WS_CLASSES . 'language.php';
    $lng = new language();
    if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {
        $lng->set_language($HTTP_GET_VARS['language']);
    } else {
        $lng->get_browser_language();
示例#13
0
// |                                                                      |
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | license@zen-cart.com so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
//  $Id: store_credit.php 4 2008-10-25 23:24:35Z numinix $
//
require 'includes/application_top.php';
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
require_once DIR_FS_CATALOG . 'includes/classes/store_credit.php';
$store_credit = new storeCredit();
$store_credit->store_pending_rewards();
$action = isset($_GET['action']) ? $_GET['action'] : '';
$error = false;
$processed = false;
if (zen_not_null($action)) {
    switch ($action) {
        case 'update':
            $customers_id = zen_db_prepare_input($_GET['cID']);
            $amount = zen_db_prepare_input($_POST['customers_balance']);
            $sql_data_array = array('customers_id' => $customers_id, 'amount' => $amount);
            $check = $db->execute('select count(*) as count from ' . TABLE_STORE_CREDIT . ' WHERE customers_id=' . (int) $customers_id);
            if ($check->fields['count'] == 0) {
                zen_db_perform(TABLE_STORE_CREDIT, $sql_data_array, 'insert', '');
示例#14
0
<?php

require 'includes/application_top.php';
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
$orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int) $oID . "'");
include DIR_WS_CLASSES . 'order.php';
$order = new order($oID);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html<?php 
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo CHARSET;
?>
">
<title><?php 
echo PAGE_TITLE;
?>
</title>
<style type="text/css">
body, div, span, p, th, td {
  font-family: Verdana, Arial, sans-serif;
  font-size: 11px;
}

.headerdata {
示例#15
0
   File: categories.php,v 1.146 2003/07/11 14:40:27 hpdl
         categories.php,v 1.138 2002/11/18 21:38:22 dgw_
   ----------------------------------------------------------------------
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com

   Copyright (c) 2003 osCommerce
   ----------------------------------------------------------------------
   Released under the GNU General Public License
   ---------------------------------------------------------------------- */
define('OOS_VALID_MOD', 'yes');
require 'includes/oos_main.php';
require 'includes/functions/function_categories.php';
require 'includes/functions/function_image_resize.php';
require 'includes/classes/class_currencies.php';
$currencies = new currencies();
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (!empty($action)) {
    switch ($action) {
        case 'insert_product':
        case 'update_product':
            $_POST['products_price'] = str_replace(',', '.', $_POST['products_price']);
            $_POST['products_price_list'] = str_replace(',', '.', $_POST['products_price_list']);
            $_POST['products_discount1'] = str_replace(',', '.', $_POST['products_discount1']);
            $_POST['products_discount2'] = str_replace(',', '.', $_POST['products_discount2']);
            $_POST['products_discount3'] = str_replace(',', '.', $_POST['products_discount3']);
            $_POST['products_discount4'] = str_replace(',', '.', $_POST['products_discount4']);
            $sProductsQuantity = oos_db_prepare_input($_POST['products_quantity']);
            $sProductsStatus = oos_db_prepare_input($_POST['products_status']);
            if (STOCK_CHECK == '1') {
                if ($sProductsQuantity <= 0) {
示例#16
0
<?php

/*
$Id$

  osCmax e-Commerce
  http://www.oscmax.com

  Copyright 2000 - 2011 osCmax

  Released under the GNU General Public License
*/
require 'includes/application_top.php';
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
$action = isset($_GET['action']) ? $_GET['action'] : '';
if ($action == 'confirmrelease' && isset($_GET['gid'])) {
    $gv_query = tep_db_query("select release_flag from " . TABLE_COUPON_GV_QUEUE . " where unique_id='" . $_GET['gid'] . "'");
    $gv_result = tep_db_fetch_array($gv_query);
    if ($gv_result['release_flag'] == 'N') {
        $gv_query = tep_db_query("select customer_id, amount from " . TABLE_COUPON_GV_QUEUE . " where unique_id='" . $_GET['gid'] . "'");
        if ($gv_resulta = tep_db_fetch_array($gv_query)) {
            $gv_amount = $gv_resulta['amount'];
            //Let's build a message object using the email class
            $mail_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . $gv_resulta['customer_id'] . "'");
            $mail = tep_db_fetch_array($mail_query);
            $message = TEXT_REDEEM_COUPON_MESSAGE_HEADER;
            $message .= sprintf(TEXT_REDEEM_COUPON_MESSAGE_AMOUNT, $currencies->format($gv_amount));
            $message .= TEXT_REDEEM_COUPON_MESSAGE_BODY;
            $message .= TEXT_REDEEM_COUPON_MESSAGE_FOOTER;
            $mimemessage = new email(array('X-Mailer: osCmax Mailer'));
示例#17
0
<?php

/**
 * @package linkpoint_api_payment_module
 * @copyright Copyright 2003-2011 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: linkpoint_review.php 18695 2011-05-04 05:24:19Z drbyte $
 */
require 'includes/application_top.php';
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (isset($_GET['cID'])) {
    $_GET['cID'] = (int) $_GET['cID'];
}
if (substr($_GET['search'], 0, 3) == '%23' or substr($_GET['search'], 0, 1) == '#') {
    if (substr($_GET['search'], 0, 3) == '%23') {
        $search = '#' . substr($_GET['search'], 2);
    } else {
        $search = '#' . substr($_GET['search'], 1);
    }
}
$error = false;
$processed = false;
if (zen_not_null($action)) {
    switch ($action) {
        case 'status_OFF':
            if ($_GET['current'] == CUSTOMERS_APPROVAL_AUTHORIZATION) {
                $sql = "update " . TABLE_CUSTOMERS . " set customers_authorization=0 where customers_id='" . $_GET['cID'] . "'";
            } else {
示例#18
0
/*
$Id$

  osCmax e-Commerce
  http://www.osCmax.com

  Copyright 2000 - 2011 osCmax

  Released under the GNU General Public License
*/
require 'includes/application_top.php';
require DIR_WS_CLASSES . 'currencies.php';
$action = isset($_GET['action']) ? $_GET['action'] : '';
link_post_variable('custid');
// fix to allow turning off register_globals in php
$currencies = new currencies();
// Delete Entry Begin
if ($action == 'delete') {
    $reset_query_raw = "delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id=" . $_GET[customer_id];
    tep_db_query($reset_query_raw);
    $reset_query_raw2 = "delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id=" . $_GET[customer_id];
    tep_db_query($reset_query_raw2);
    tep_redirect(tep_href_link(FILENAME_RECOVER_CART_SALES, 'delete=1&customer_id=' . $_GET['customer_id'] . '&tdate=' . $_GET['tdate'] . '&sdate=' . $_GET['sdate']));
}
if (isset($_GET['delete'])) {
    $messageStack->add(MESSAGE_STACK_CUSTOMER_ID . $_GET['customer_id'] . MESSAGE_STACK_DELETE_SUCCESS, 'success');
}
// Delete Entry End
$tdate = '';
if (isset($_POST['tdate'])) {
    $tdate = $_POST['tdate'];
示例#19
0
   File: coupon_admin.php,v 1.1.2.24 2003/05/10 21:45:20 wilt
   ----------------------------------------------------------------------
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com

   Copyright (c) 2003 osCommerce
   ----------------------------------------------------------------------
   Released under the GNU General Public License
   ---------------------------------------------------------------------- */
define('OOS_VALID_MOD', 'yes');
require 'includes/oos_main.php';
// define our coupon functions
require 'includes/functions/function_coupon.php';
require 'includes/classes/class_currencies.php';
$currencies = new currencies();
if (isset($_GET['selected_box'])) {
    $_GET['action'] = '';
    $_GET['old_action'] = '';
}
$action = isset($_GET['action']) ? $_GET['action'] : '';
if ($action == 'send_email_to_user' && $_POST['customers_email_address'] && !$_POST['back_x']) {
    switch ($_POST['customers_email_address']) {
        case '***':
            $mail_result = $dbconn->Execute("SELECT customers_firstname, customers_lastname, customers_email_address\n                                   FROM" . $oostable['customers']);
            $mail_sent_to = TEXT_ALL_CUSTOMERS;
            break;
        case '**D':
            $mail_result = $dbconn->Execute("SELECT customers_firstname, customers_lastname, customers_email_address\n                                  FROM " . $oostable['customers'] . "\n                                  WHERE customers_newsletter = '1'");
            $mail_sent_to = TEXT_NEWSLETTER_CUSTOMERS;
            break;
    $postpone_cart = new shoppingCart('postpone');
}
// create the foreign shopping cart & fix the cart if necesary
if (tep_session_is_registered('foreign_cart') && is_object($foreign_cart)) {
    if (PHP_VERSION < 4) {
        $broken_cart = $foreign_cart;
        $foreign_cart = new shoppingCart('foreign');
        $foreign_cart->unserialize($broken_cart);
    }
} else {
    tep_session_register('foreign_cart');
    $foreign_cart = new shoppingCart('foreign');
}
// include currencies class and create an instance
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
// include the mail classes
require DIR_WS_CLASSES . 'mime.php';
require DIR_WS_CLASSES . 'email.php';
require DIR_WS_CLASSES . 'class.phpmailer.php';
$lang_query = tep_db_query("select languages_id, code from " . TABLE_LANGUAGES . " where default_status = '1'");
$lang = tep_db_fetch_array($lang_query);
define('DEFAULT_LANGUAGE', $lang['code']);
if (DOMAIN_ZONE == 'org' || strpos(HTTP_SERVER, 'owl') || strpos(HTTP_SERVER, 'insell')) {
    $default_language_id = 1;
} else {
    $default_language_id = $lang['languages_id'];
}
define('DEFAULT_LANGUAGE_ID', $default_language_id);
// set the language
if (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {
   based on:
   (c) 2003 OSC-Affiliate (affiliate_statistics.php, v 1.9 2003/07/13);
   http://oscaffiliate.sourceforge.net/

   Contribution based on:

   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com

   Copyright (c) 2002 - 2003 osCommerce

   Released under the GNU General Public License
   ---------------------------------------------------------------------------*/
require 'includes/application_top.php';
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
$affiliate_banner_history_raw = "select sum(affiliate_banners_shown) as count from " . TABLE_AFFILIATE_BANNERS_HISTORY . " where affiliate_banners_affiliate_id  = '" . $_GET['acID'] . "'";
$affiliate_banner_history_query = vam_db_query($affiliate_banner_history_raw);
$affiliate_banner_history = vam_db_fetch_array($affiliate_banner_history_query);
$affiliate_impressions = $affiliate_banner_history['count'];
if ($affiliate_impressions == 0) {
    $affiliate_impressions = "n/a";
}
$affiliate_query = vam_db_query("select * from " . TABLE_AFFILIATE . " where affiliate_id ='" . $_GET['acID'] . "'");
$affiliate = vam_db_fetch_array($affiliate_query);
$affiliate_percent = 0;
$affiliate_percent = $affiliate['affiliate_commission_percent'];
if ($affiliate_percent < AFFILIATE_PERCENT) {
    $affiliate_percent = AFFILIATE_PERCENT;
}
$affiliate_clickthroughs_raw = "select count(*) as count from " . TABLE_AFFILIATE_CLICKTHROUGHS . " where affiliate_id = '" . $_GET['acID'] . "'";
示例#22
0
 define('PRODUCT_TABLE_BOTTOM_MARGIN', '2');
 // Tiny indent right before the product name, again more like
 // the cell padding effect
 define('PRODUCT_TABLE_LEFT_MARGIN', '2');
 // Height of the product listing rectangles
 define('PRODUCT_TABLE_ROW_HEIGHT', '11');
 // The column sizes are where the product listing columns start on the
 // PDF page, if you make the TABLE HEADER FONT SIZE any larger you will
 // need to tweak these values to prevent text from clashing together
 define('PRODUCTS_COLUMN_SIZE', '450');
 define('PRODUCT_LISTING_BKGD_COLOR', GREY);
 define('MODEL_COLUMN_SIZE', '37');
 define('PRICING_COLUMN_SIZES', '67');
 $vilains = array("&#224;", "&#225;", "&#226;", "&#227;", "&#228;", "&#229;", "&#230;", "&#231;", "&#232;", "&#233;", "&#234;", "&#235;", "&#236;", "&#237;", "&#238;", "&#239;", "&#240;", "&#241;", "&#242;", "&#243;", "&#244;", "&#245;", "&#246;", "&#247;", "&#248;", "&#249;", "&#250;", "&#251;", "&#252;", "&#253;", "&#254;", "&#255;", "&#223;", "&#39;", "&nbsp;", "&agrave;", "&aacute;", "&atilde;", "&auml;", "&Arond;", "&egrave;", "&aelig;", "&ecirc;", "&euml;", "&igrave;", "&iacute;", "&Iacute;", "&icirc;", "&iuml;", "&ograve;", "&oacute;", "&ocirc;", "&otilde;", "&ouml;", "&oslash;", "&ugrave;", "&uacute;", "&ucirc;", "&uuml;", "&ntilde;", "&ccedil;", "&yacute;", "&lt;", "&gt;", "&amp;");
 $cools = array('à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '÷', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ', 'ÿ', 'ß', '\'', ' ', 'à', 'á', 'ã', 'ä', 'å', 'è', 'æ', 'ê', 'ë', 'ì', 'í', 'î', 'Î', 'ï', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ñ', 'ç', 'ý', '<', '>', '&');
 $currencies = new currencies();
 //$pdf->setPreferences(array("HideToolbar" => 'false', "HideWindowUI" => 'false'));
 $pdf->selectFont(BATCH_PDF_DIR . 'Helvetica.afm');
 $pdf->setFontFamily(BATCH_PDF_DIR . 'Helvetica.afm');
 // company name and details pulled from the my store address and phone number
 // in admin configuration mystore
 $y = $pdf->ezText(STORE_NAME_ADDRESS, COMPANY_HEADER_FONT_SIZE);
 $y -= 10;
 // logo image  set to right of the above .. change first number to move sideways
 //$pdf->addJpegFromFile(BATCH_PRINT_INC . 'templates/' . 'invoicelogo.jpg',365,730,85,85);
 // extra info boxs to be used by staff
 $pdf->setStrokeColor(0, 0, 0);
 $pdf->setLineStyle(0.5);
 $pdf->Rectangle(300, 745, 250, 70);
 $pdf->addText(310, 785, GENERAL_FONT_SIZE, TEXT_PACKED_BY);
 $pdf->addText(310, 760, GENERAL_FONT_SIZE, TEXT_VERIFIED_BY);
require_once DIR_WS_CLASSES . 'super_order.php';
require_once DIR_WS_CLASSES . 'order.php';
// AJB 2012-05-31 - start (1)
// if(isset($_GET['oID']))
// $oID = zen_db_prepare_input($_GET['oID']);
if (isset($_GET['oID'])) {
    $oID = zen_db_prepare_input($_GET['oID']);
    $batched = false;
    $batch_item = 0;
} else {
    $batched = true;
}
// AJB 2012-05-31 - end (1)
$order = new order($oID);
$so = new super_order($oID);
$currencies = new currencies();
$display_tax = TAX_ID_NUMBER == '' ? true : false;
// Find any comments entered at checkout
// and display on invoice if they exist
// prepare order-status pulldown list
$orders_statuses = array();
$orders_status_array = array();
$orders_status = $db->Execute("select orders_status_id, orders_status_name\n                                 from " . TABLE_ORDERS_STATUS . "\n                                 where language_id = '" . (int) $_SESSION['languages_id'] . "'");
while (!$orders_status->EOF) {
    $orders_statuses[] = array('id' => $orders_status->fields['orders_status_id'], 'text' => $orders_status->fields['orders_status_name'] . ' [' . $orders_status->fields['orders_status_id'] . ']');
    $orders_status_array[$orders_status->fields['orders_status_id']] = $orders_status->fields['orders_status_name'];
    $orders_status->MoveNext();
}
?>

<?php 
   Customers Status v3.x  (c) 2002-2003 Copyright Elari elari@free.fr | www.unlockgsm.com/dload-osc/ | CVS : http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/elari/?sortby=date#dirlist

   Released under the GNU General Public License
   --------------------------------------------------------------*/
require 'includes/application_top.php';
require_once DIR_FS_INC . 'xtc_validate_vatid_status.inc.php';
require_once DIR_FS_INC . 'xtc_get_geo_zone_code.inc.php';
require_once DIR_FS_INC . 'xtc_encrypt_password.inc.php';
require_once DIR_FS_INC . 'xtc_js_lang.php';
//split page results
if (!defined('MAX_DISPLAY_LIST_CUSTOMERS')) {
    define('MAX_DISPLAY_LIST_CUSTOMERS', 100);
}
// BOF - JUNG GESTALTEN - 27.11.2008 - KUNDENUMSÄTZE
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
// EOF - JUNG GESTALTEN - 27.11.2008 - KUNDENUMSÄTZE
$customers_statuses_array = xtc_get_customers_statuses();
//BOC web28 2011-10-31 - FIX customer groups
$customers_statuses_id_array = array();
for ($i = 0; $n = sizeof($customers_statuses_array), $i < $n; $i++) {
    $customers_statuses_id_array[$customers_statuses_array[$i]['id']] = $customers_statuses_array[$i];
}
//changes all $customers_statuses_array[xx] to $customers_statuses_id_array[xx]  in html section
//EOC web28 2011-10-31 - FIX customer groups
$processed = false;
$error = false;
$entry_vat_error_text = '';
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (isset($_GET['special']) && $_GET['special'] == 'remove_memo') {
    $mID = xtc_db_prepare_input($_GET['mID']);
  (c) Ivler / Ideas From the Deep / osCommerce
  
  Released under the GNU General Public License

 Modifed by Aalst (recover_cart_sales.php,v 1.2 .. 1.36)
 aalst@aalst.com

 Modified by Lane Roathe (recover_cart_sales.php,v 1.4d .. v2.11)
 lane@ifd.com www.osc-modsquad.com / www.ifd.com

 Optimized for use with OOS by Vexoid (vexoid@gmail.com)
*/
define('OOS_VALID_MOD', 'yes');
require 'includes/oos_main.php';
require 'includes/classes/class_currencies.php';
$currencies = new currencies();
function oos_date_order_stat($raw_date)
{
    if ($raw_date == '') {
        return false;
    }
    $year = substr($raw_date, 2, 2);
    $month = (int) substr($raw_date, 4, 2);
    $day = (int) substr($raw_date, 6, 2);
    return date(DATE_FORMAT, mktime('', '', '', $month, $day, $year));
}
function seadate($day)
{
    $ts = date("U");
    $rawtime = strtotime("-" . $day . " days", $ts);
    $ndate = date("Ymd", $rawtime);
示例#26
0
    }
}
// create the shopping cart & fix the cart if necesary
if (tep_session_is_registered('cart') && is_object($cart)) {
    if (PHP_VERSION < 4) {
        $broken_cart = $cart;
        $cart = new shoppingCart();
        $cart->unserialize($broken_cart);
    }
} else {
    tep_session_register('cart');
    $cart = new shoppingCart();
}
// include currencies class and create an instance
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
// include the mail classes
require DIR_WS_CLASSES . 'mime.php';
require DIR_WS_CLASSES . 'email.php';
// set the language
if (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {
    if (!tep_session_is_registered('language')) {
        tep_session_register('language');
        tep_session_register('languages_id');
    }
    include DIR_WS_CLASSES . 'language.php';
    $lng = new language();
    if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {
        $lng->set_language($HTTP_GET_VARS['language']);
    } else {
        $lng->get_browser_language();
示例#27
0
<?php

/**
 * @package admin
 * @copyright Copyright 2003-2011 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: invoice.php 19136 2011-07-18 16:56:18Z wilt $
*/
require 'includes/application_top.php';
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
$oID = zen_db_prepare_input($_GET['oID']);
include DIR_WS_CLASSES . 'order.php';
$order = new order($oID);
// prepare order-status pulldown list
$orders_statuses = array();
$orders_status_array = array();
$orders_status = $db->Execute("select orders_status_id, orders_status_name\n                                 from " . TABLE_ORDERS_STATUS . "\n                                 where language_id = '" . (int) $_SESSION['languages_id'] . "'");
while (!$orders_status->EOF) {
    $orders_statuses[] = array('id' => $orders_status->fields['orders_status_id'], 'text' => $orders_status->fields['orders_status_name'] . ' [' . $orders_status->fields['orders_status_id'] . ']');
    $orders_status_array[$orders_status->fields['orders_status_id']] = $orders_status->fields['orders_status_name'];
    $orders_status->MoveNext();
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
}
// check for damaged database, caused by users indiscriminately deleting table data
$ary = array();
$chk_option_values = $db->Execute("select * from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id=" . (int) PRODUCTS_OPTIONS_VALUES_TEXT_ID);
while (!$chk_option_values->EOF) {
    $ary[] = $chk_option_values->fields['language_id'];
    $chk_option_values->MoveNext();
}
$languages = zen_get_languages();
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
    if ((int) $languages[$i]['id'] > 0 && !in_array((int) $languages[$i]['id'], $ary)) {
        $db->Execute("INSERT INTO " . TABLE_PRODUCTS_OPTIONS_VALUES . " (products_options_values_id, language_id, products_options_values_name) VALUES (" . (int) PRODUCTS_OPTIONS_VALUES_TEXT_ID . ", " . (int) $languages[$i]['id'] . ", 'TEXT')");
    }
}
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
$action = isset($_GET['action']) ? $_GET['action'] : '';
$_GET['products_filter'] = $products_filter = isset($_GET['products_filter']) ? (int) $_GET['products_filter'] : (int) $products_filter;
$_GET['attributes_id'] = isset($_GET['attributes_id']) ? (int) $_GET['attributes_id'] : 0;
$_GET['current_category_id'] = $current_category_id = isset($_GET['current_category_id']) ? (int) $_GET['current_category_id'] : (int) $current_category_id;
if (isset($_POST['products_filter'])) {
    $_POST['products_filter'] = (int) $_POST['products_filter'];
}
if (isset($_POST['current_category_id'])) {
    $_POST['current_category_id'] = (int) $_POST['current_category_id'];
}
if (isset($_POST['products_options_id_all'])) {
    $_POST['products_options_id_all'] = (int) $_POST['products_options_id_all'];
}
if (isset($_POST['current_category_id'])) {
    $_POST['current_category_id'] = (int) $_POST['current_category_id'];
            } else {
                return zen_image(DIR_WS_IMAGES . 'icon_status_green.gif');
            }
            break;
    }
}
// time since last click
function zen_check_minutes($the_time_last_click)
{
    $the_seconds = time() - $the_time_last_click;
    $the_time_since = gmdate('H:i:s', $the_seconds);
    return $the_time_since;
}
require 'includes/application_top.php';
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
// same time_entry as time_last_click for 600 seconds = 10 minutes assumed to have left immediately
$xx_mins_ago_dead = time() - WHOIS_TIMER_DEAD;
// remove after how many seconds? default= 1200 = 20 minutes
$xx_mins_ago = time() - WHOIS_TIMER_REMOVE;
// remove entries that have expired
$db->Execute("delete from " . TABLE_WHOS_ONLINE . "\r\n                where time_last_click < '" . $xx_mins_ago . "'\r\n                or (time_entry=time_last_click\r\n                and time_last_click < '" . $xx_mins_ago_dead . "')");
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo CHARSET;
示例#30
0
<?php

/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2007 osCommerce

  Released under the GNU General Public License
*/
require 'includes/application_top.php';
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
$orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int) $oID . "'");
include DIR_WS_CLASSES . 'order.php';
$order = new order($oID);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo CHARSET;
?>
">
<title><?php