本文整理汇总了PHP中currencies类的典型用法代码示例。如果您正苦于以下问题:PHP currencies类的具体用法?PHP currencies怎么用?PHP currencies使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了currencies类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: convert_product_attributes_result
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: process_button
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: process_button
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: process_button
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: process_button
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: process_button
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: tep_get_ip_address
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: Copyright
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'");
示例9: zen_redirect
$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: Copyright
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']);
示例11: isset
// 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;
?>
">
示例12: tep_session_register
$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: currencies
// | |
// | 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: currencies
<?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: Copyright
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) {