本文整理汇总了PHP中BitBase::getParameter方法的典型用法代码示例。如果您正苦于以下问题:PHP BitBase::getParameter方法的具体用法?PHP BitBase::getParameter怎么用?PHP BitBase::getParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BitBase
的用法示例。
在下文中一共展示了BitBase::getParameter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: verifyPayment
function verifyPayment(&$pPaymentParameters, &$pOrder)
{
global $gCommerceSystem;
unset($_SESSION[$this->code . '_error']);
if (!empty($pPaymentParameters['cc_ref_id'])) {
// reference transation
$this->cc_ref_id = $pPaymentParameters['cc_ref_id'];
} elseif (empty($pPaymentParameters['cc_number'])) {
$this->mErrors['number'] = tra('Please enter a credit card number.');
} elseif ($this->verifyCreditCard($pPaymentParameters['cc_number'], $pPaymentParameters['cc_expires_month'], $pPaymentParameters['cc_expires_year'], $pPaymentParameters['cc_cvv'])) {
if (empty($pPaymentParameters['cc_owner'])) {
$this->mErrors['owner'] = tra('Please enter the name card holders name as it is written on the card.');
} else {
$this->cc_owner = $pPaymentParameters['cc_owner'];
}
if (preg_match('/^37/', $pPaymentParameters['cc_number']) && BitBase::getParameter($pOrder->info, 'currency', $gCommerceSystem->getConfig('DEFAULT_CURRENCY')) != 'USD') {
$this->mErrors['number'] = tra('American Express cannot process transactions in currencies other than USD. Change the currency in your cart, or use a different card.');
}
}
$this->saveSessionDetails();
if ($this->mErrors) {
$_SESSION[$this->code . '_error'] = $this->mErrors;
}
return count($this->mErrors) === 0;
}
示例2: currency_yahoo_quote
function currency_yahoo_quote($code, $base = DEFAULT_CURRENCY)
{
global $gYahooCurrencies;
$ret = FALSE;
if (empty($gYahooCurrencies)) {
currency_yahoo_load($base);
}
return BitBase::getParameter($gYahooCurrencies, strtoupper($base . $code));
}
示例3: getCustomerActivity
function getCustomerActivity(&$pParamHash, $pRetained = TRUE)
{
$sortMode = '';
if (!empty($pParamHash['sort_mode'])) {
switch ($pParamHash['sort_mode']) {
case 'orders_asc':
$sortMode = 'COUNT(`orders_id`) ASC, ';
break;
case 'orders_desc':
$sortMode = 'COUNT(`orders_id`) DESC, ';
break;
case 'first_purchase_asc':
$sortMode = 'MIN(co.`date_purchased`) ASC, ';
break;
case 'first_purchase_desc':
$sortMode = 'MIN(co.`date_purchased`) DESC, ';
break;
case 'age_asc':
$sortMode = 'MAX(co.`date_purchased`) - MIN(co.`date_purchased`) ASC, ';
break;
case 'age_desc':
$sortMode = 'MAX(co.`date_purchased`) - MIN(co.`date_purchased`) DESC, ';
break;
case 'last_purchase_asc':
$sortMode = 'MAX(co.`date_purchased`) ASC, ';
break;
case 'last_purchase_desc':
$sortMode = 'MAX(co.`date_purchased`) DESC, ';
break;
case 'revenue_asc':
$sortMode = 'SUM(co.`order_total`) DESC, ';
break;
}
} else {
$pParamHash['sort_mode'] = 'revenue_desc';
}
$interval = BitBase::getParameter($pParamHash, 'interval', '2 years');
$bindVars[] = $interval;
$bindVars[] = $interval;
$bindVars[] = $interval;
$comparison = $pRetained ? '<' : '>';
$sortMode .= 'SUM(co.`order_total`) DESC';
BitBase::prepGetList($pParamHash);
$sql = "SELECT uu.`user_id`,uu.`real_name`, uu.`login`,SUM(order_total) AS `revenue`, COUNT(orders_id) AS `orders`, MIN(`date_purchased`) AS `first_purchase`, MIN(`orders_id`) AS `first_orders_id`, MAX(date_purchased) AS `last_purchase`, MAX(`orders_id`) AS `last_orders_id`, MAX(date_purchased) - MIN(date_purchased) AS `age`\n\t\t\t\tFROM com_orders co \n\t\t\t\t\tINNER JOIN users_users uu ON(co.customers_id=uu.user_id) \n\t\t\t\tWHERE NOW() - uu.registration_date::int::abstime::timestamptz > ? \n\t\t\t\tGROUP BY uu.`user_id`,uu.`real_name`, uu.`login`\n\t\t\t\tHAVING NOW() - MIN(co.date_purchased) > ? AND NOW() - MAX(co.date_purchased) " . $comparison . " ? ORDER BY {$sortMode}";
if ($rs = $this->mDb->query($sql, $bindVars)) {
while ($row = $rs->fetchRow()) {
$ret['customers'][$row['user_id']] = $row;
@($ret['totals']['orders'] += $row['orders']);
@($ret['totals']['revenue'] += $row['revenue']);
@$ret['totals']['customers']++;
}
}
return $ret;
}
示例4: switch
// | 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$
//
require 'includes/application_top.php';
require_once DIR_WS_FUNCTIONS . 'localization.php';
global $currencies;
$activeCurrency = FALSE;
if ($activeCode = BitBase::getParameter($_REQUEST, 'code')) {
$activeCurrency = BitBase::getParameter($currencies->currencies, $activeCode);
}
if ($action = BitBase::getParameter($_GET, 'action')) {
if (zen_not_null($action)) {
switch ($action) {
case 'insert':
case 'save':
$currencies->store($_REQUEST);
if (isset($_POST['default']) && $_POST['default'] == 'on') {
$gCommerceSystem->storeConfig('DEFAULT_CURRENCY', $code);
}
zen_redirect(zen_href_link_admin(FILENAME_CURRENCIES, 'action=edit&code=' . $activeCode));
break;
case 'deleteconfirm':
if (!$currencies->expungeCurrency($activeCode)) {
$messageStack->add(ERROR_REMOVE_DEFAULT_CURRENCY, 'error');
}
zen_redirect(zen_href_link_admin(FILENAME_CURRENCIES, 'page=' . $_GET['page']));
示例5: verifyPayment
function verifyPayment(&$pPaymentParameters, &$pOrder)
{
if (empty($pPaymentParameters['cc_number'])) {
$error = tra('Please enter a credit card number.');
} elseif ($this->verifyCreditCard($pPaymentParameters['cc_number'], $pPaymentParameters['cc_expires_month'], $pPaymentParameters['cc_expires_year'], $pPaymentParameters['cc_cvv'])) {
$ret = TRUE;
} else {
foreach (array('cc_owner', 'cc_number', 'cc_expires_month', 'cc_expires_year', 'cc_cvv') as $key) {
$_SESSION[$key] = BitBase::getParameter($pPaymentParameters, $key);
}
$_SESSION['pfp_error'] = $this->mErrors;
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, NULL, 'SSL', true, false));
}
return $ret;
}
示例6: liberty_mime_get_source_file
function liberty_mime_get_source_file($pParamHash)
{
$fileName = BitBase::getParameter($pParamHash, 'file_name');
if (empty($pParamHash['package'])) {
$pParamHash['package'] = liberty_mime_get_storage_sub_dir_name(array('mime_type' => BitBase::getParameter($pParamHash, 'mime_type'), 'name' => $fileName));
}
if (empty($pParamHash['sub_dir'])) {
$pParamHash['sub_dir'] = BitBase::getParameter($pParamHash, 'attachment_id');
}
$defaultFileName = liberty_mime_get_default_file_name($fileName, $pParamHash['mime_type']);
$ret = STORAGE_PKG_PATH . liberty_mime_get_storage_branch($pParamHash) . $defaultFileName;
if (!file_exists($ret)) {
$ret = STORAGE_PKG_PATH . liberty_mime_get_storage_branch($pParamHash) . basename(BitBase::getParameter($pParamHash, 'file_name'));
}
return $ret;
}
示例7: defined
<?php
require_once '../../../kernel/setup_inc.php';
require_once BITCOMMERCE_PKG_PATH . 'includes/bitcommerce_start_inc.php';
require_once BITCOMMERCE_PKG_PATH . 'includes/functions/html_output.php';
if (empty($entry)) {
$entry = $_REQUEST;
}
if (empty($entry['country_id'])) {
$entry['country_id'] = defined('STORE_COUNTRY') ? STORE_COUNTRY : NULL;
}
if (!empty($entry['country_id'])) {
if (!($stateInput = zen_get_country_zone_list('state', $entry['country_id'], !empty($entry['entry_zone_id']) ? $entry['entry_zone_id'] : ''))) {
$stateInput = zen_draw_input_field('state', zen_get_zone_name($entry['country_id'], BitBase::getParameter($entry, 'entry_zone_id'), BitBase::getParameter($entry, 'entry_state')));
}
} else {
$stateInput = zen_draw_input_field('state');
}
print $stateInput;
示例8: liberty_mime_get_source_file
function liberty_mime_get_source_file($pParamHash)
{
if (empty($pParamHash['package'])) {
$pParamHash['package'] = liberty_mime_get_storage_sub_dir_name(array('type' => BitBase::getParameter($pParamHash, 'mime_type'), 'name' => BitBase::getParameter($pParamHash, 'file_name')));
}
if (empty($pParamHash['sub_dir'])) {
$pParamHash['sub_dir'] = BitBase::getParameter($pParamHash, 'attachment_id');
}
return STORAGE_PKG_PATH . liberty_mime_get_storage_branch($pParamHash) . basename(BitBase::getParameter($pParamHash, 'file_name'));
}
示例9: zen_get_country_name
$saveAddress[$addressType . '_street_address'] = $_REQUEST['street_address'];
$saveAddress[$addressType . '_suburb'] = $_REQUEST['suburb'];
$saveAddress[$addressType . '_city'] = $_REQUEST['city'];
$saveAddress[$addressType . '_state'] = $_REQUEST['state'];
$saveAddress[$addressType . '_postcode'] = $_REQUEST['postcode'];
$saveAddress[$addressType . '_country'] = zen_get_country_name($_REQUEST['country_id']);
$saveAddress[$addressType . '_telephone'] = $_REQUEST['telephone'];
$gBitDb->StartTrans();
$gBitDb->associateUpdate(TABLE_ORDERS, $saveAddress, array('orders_id' => $_REQUEST['oID']));
$gBitDb->CompleteTrans();
bit_redirect($_SERVER['SCRIPT_NAME'] . '?oID=' . $_REQUEST['oID']);
exit;
break;
case 'update_order':
if (!empty($_REQUEST['charge_amount']) && !empty($_REQUEST['charge_amount'])) {
$formatCharge = $currencies->format($_REQUEST['charge_amount'], FALSE, BitBase::getParameter($_REQUEST, 'charge_currency'));
$_REQUEST['cc_ref_id'] = $order->info['cc_ref_id'];
if ($paymentModule = $order->getPaymentModule()) {
if ($paymentModule->processPayment($_REQUEST, $order)) {
$statusMsg = tra('A payment adjustment has been made to this order for the following amount:') . "\n" . $formatCharge . ' ' . tra('Transaction ID:') . "\n" . $paymentModule->getTransactionReference();
$_REQUEST['comments'] = (!empty($_REQUEST['comments']) ? $_REQUEST['comments'] . "\n\n" : '') . $statusMsg;
} else {
$statusMsg = tra('Additional charge could not be made:') . ' ' . $formatCharge . '<br/>' . implode($paymentModule->mErrors, '<br/>');
$hasError = TRUE;
$messageStack->add_session($statusMsg, 'error');
$order->updateStatus(array('comments' => $statusMsg));
}
}
}
if (empty($hasError)) {
if ($order->updateStatus($_REQUEST)) {
示例10: processPayment
function processPayment(&$pPaymentParameters, &$pOrder)
{
global $gCommerceSystem, $messageStack, $response, $gBitDb, $gBitUser, $currencies;
$postFields = array();
$responseHash = array();
$this->result = NULL;
if (!self::verifyPayment($pPaymentParameters, $pOrder)) {
// verify basics failed
} elseif (!empty($pPaymentParameters['cc_ref_id']) && empty($pPaymentParameters['charge_amount'])) {
$this->mErrors['charge_amount'] = 'Invalid amount';
} elseif (!($orderTotal = number_format($pOrder->info['total'], 2, '.', ''))) {
$this->mErrors['charge_amount'] = 'Invalid amount';
} else {
if (!empty($pPaymentParameters['cc_ref_id'])) {
// reference transaction
$this->paymentOrderId = $pOrder->mOrdersId;
$paymentCurrency = BitBase::getParameter($pPaymentParameters, 'charge_currency', DEFAULT_CURRENCY);
$paymentLocalized = $pPaymentParameters['charge_amount'];
$paymentNative = $paymentCurrency != DEFAULT_CURRENCY ? $paymentLocalized / $pPaymentParameters['charge_currency_value'] : $paymentLocalized;
// completed orders have a single joined 'name' field
$pOrder->billing['firstname'] = substr($pOrder->billing['name'], 0, strpos($pOrder->billing['name'], ' '));
$pOrder->billing['lastname'] = substr($pOrder->billing['name'], strpos($pOrder->billing['name'], ' ') + 1);
$pOrder->delivery['firstname'] = substr($pOrder->billing['name'], 0, strpos($pOrder->billing['name'], ' '));
$pOrder->delivery['lastname'] = substr($pOrder->billing['name'], strpos($pOrder->billing['name'], ' ') + 1);
} else {
$pOrder->info['cc_number'] = $this->cc_number;
$pOrder->info['cc_expires'] = $this->cc_expires;
$pOrder->info['cc_type'] = $this->cc_type;
$pOrder->info['cc_owner'] = $this->cc_owner;
$pOrder->info['cc_cvv'] = $this->cc_cvv;
// Calculate the next expected order id
$this->paymentOrderId = $pOrder->getNextOrderId();
// orderTotal is in the system DEFAULT_CURRENCY. orderTotal * currency_value = localizedPayment
$paymentCurrency = BitBase::getParameter($pOrder->info, 'currency', DEFAULT_CURRENCY);
$paymentNative = $orderTotal;
$paymentLocalized = $paymentCurrency != DEFAULT_CURRENCY ? $paymentNative * $pOrder->getField('currency_value') : $paymentNative;
}
$paymentEmail = BitBase::getParameter($pOrder->customer, 'email_address', $gBitUser->getField('email'));
$paymentUserId = BitBase::getParameter($pOrder->customer, 'user_id', $gBitUser->getField('user_id'));
$paymentDecimal = $currencies->get_decimal_places($paymentCurrency);
/* === Core Credit Card Parameters ===
All credit card processors accept the basic parameters described in the following table* with one exception: the PayPal processor does not support SWIPE*.
TENDER (Required) The method of payment. Values are:
- A = Automated clearinghouse (ACH)
- C = Credit card
- D = Pinless debit
- K = Telecheck
- P = PayPal
Note: If your processor accepts non-decimal currencies, such as, Japanese Yen, include a decimal in the amount you pass to Payflow (use 100.00 not 100). Payflow removes the decimal portion before sending the value to the processor.
// Not implemented
RECURRING (Optional) Identifies the transaction as recurring. It is one of the following values: - Y - Identifies the transaction as recurring. - N - Does not identify the transaction as recurring (default).
SWIPE (Required for card-present transactions only) Used to pass the Track 1 or Track 2 data (card's magnetic stripe information) for card-present transactions. Include either Track 1 or Track 2 data, not both. If Track 1 is physically damaged, the point-of-sale (POS) application can send Track 2 data instead.
ORDERID (Optional) Checks for a duplicate order. If you pass ORDERID in a request and pass it again in the future, the response returns DUPLICATE=2 along with the ORDERID. Note: Do not use ORDERID to catch duplicate orders processed within seconds of each other. Use ORDERID with Request ID to prevent duplicates as a result of processing or communication errors. * bitcommerce note - this cannot be paymentOrderId as a failed process will block any future transactions
*/
$postFields = array('PWD' => MODULE_PAYMENT_PAYFLOWPRO_PWD, 'USER' => MODULE_PAYMENT_PAYFLOWPRO_LOGIN, 'VENDOR' => MODULE_PAYMENT_PAYFLOWPRO_VENDOR, 'PARTNER' => MODULE_PAYMENT_PAYFLOWPRO_PARTNER, 'VERBOSITY' => 'HIGH', 'TENDER' => 'C', 'REQUEST_ID' => time(), 'STREET' => $pOrder->billing['street_address'], 'ZIP' => $pOrder->billing['postcode'], 'COMMENT1' => 'OrderID: ' . $this->paymentOrderId . ' ' . $paymentEmail . ' (' . $paymentUserId . ')', 'EMAIL' => $paymentEmail, 'NAME' => BitBase::getParameter($pOrder->info, 'cc_owner'), 'BILLTOFIRSTNAME' => $pOrder->billing['firstname'], 'BILLTOLASTNAME' => $pOrder->billing['lastname'], 'BILLTOSTREET' => $pOrder->billing['street_address'], 'BILLTOSTREET2' => $pOrder->billing['suburb'], 'BILLTOCITY' => $pOrder->billing['city'], 'BILLTOSTATE' => $pOrder->billing['state'], 'BILLTOZIP' => $pOrder->billing['postcode'], 'BILLTOCOUNTRY' => $pOrder->billing['country']['countries_iso_code_2'], 'BILLTOPHONENUM' => $pOrder->billing['telephone'], 'SHIPTOFIRSTNAME' => $pOrder->delivery['firstname'], 'SHIPTOLASTNAME' => $pOrder->delivery['lastname'], 'SHIPTOSTREET' => $pOrder->delivery['street_address'], 'SHIPTOCITY' => $pOrder->delivery['city'], 'SHIPTOSTATE' => $pOrder->delivery['state'], 'SHIPTOZIP' => $pOrder->delivery['postcode'], 'SHIPTOCOUNTRY' => $pOrder->delivery['country']['countries_iso_code_2']);
if ($paymentUserId != $gBitUser->mUserId) {
$postFields['COMMENT1'] .= ' / ' . $gBitUser->getField('login') . ' (' . $gBitUser->mUserId . ')';
}
if (!empty($pPaymentParameters['cc_ref_id'])) {
$postFields['ORIGID'] = $pPaymentParameters['cc_ref_id'];
$postFields['COMMENT2'] = 'Reference Trans for ' . $postFields['ORIGID'];
// (Optional) Merchant-defined value for reporting and auditing purposes. Limitations: 128 alphanumeric characters
} else {
$postFields['ACCT'] = $pOrder->info['cc_number'];
// (Required for credit cards) Credit card or purchase card number. For example, ACCT=5555555555554444. For the pinless debit TENDER type, ACCT can be the bank account number.
$postFields['CVV2'] = $pOrder->getField('cc_cvv');
// (Optional) A code printed (not imprinted) on the back of a credit card. Used as partial assurance that the card is in the buyer's possession. Limitations: 3 or 4 digits
$postFields['EXPDATE'] = $pOrder->info['cc_expires'];
// (Required) Expiration date of the credit card. For example, 1215 represents December 2015.
$postFields['INVNUM'] = $this->paymentOrderId;
// (Optional) Your own unique invoice or tracking number.
$postFields['FREIGHTAMT'] = $pOrder->info['shipping_cost'];
// (Optional) Total shipping costs for this order. Nine numeric characters plus decimal.
}
/*
TRXTYPE (Required) Indicates the type of transaction to perform. Values are:
- A = Authorization
- B = Balance Inquiry
- C = Credit (Refund)
- D = Delayed Capture
- F = Voice Authorization
- I = Inquiry
- K = Rate Lookup
- L = Data Upload
- N = Duplicate Transaction Note: A type N transaction represents a duplicate transaction (version 4 SDK or HTTPS interface only) with a PNREF that is the same as the original. It appears only in the PayPal Manager user interface and never settles.
- S = Sale
- V = Void
*/
// Assume we are charging the native amount in the default currency. Some gateways support multiple currencies, check for that shortly
if (DEFAULT_CURRENCY != $this->getProcessorCurrency() && $paymentCurrency == DEFAULT_CURRENCY) {
global $currencies;
// weird situtation where payflow currency default is different from the site. Need to convert site native to processor native
$paymentNative = $currencies->convert($paymentNative, $this->getProcessorCurrency(), $paymentCurrency);
bit_error_email('PAYMENT WARNING on ' . php_uname('n') . ': mismatch Payflow currency ' . $this->getProcessorCurrency() . ' != Default Currency ' . DEFAULT_CURRENCY, bit_error_string(), array());
}
$paymentAmount = $paymentNative;
//.........这里部分代码省略.........
示例11: array
if (!empty($adUrl['query'])) {
$adParams = array();
parse_str($adUrl['query'], $adParams);
foreach ($adParams as $key => $value) {
computeStats($aggregateStats, $k, $key, $value, $revenue, $referers[$k][$r]);
}
} else {
$key = 'Paid';
$value = $adUrl['path'];
computeStats($aggregateStats, $k, $key, $value, $revenue, $referers[$k][$r]);
}
} else {
// bing paid query
foreach (array('pq' => 'Paid', 'q' => 'Organic', 'p' => 'Organic', 'unknown' => 'Unknown') as $key => $title) {
if ($key == 'unknown' || isset($urlParams[$key])) {
$value = BitBase::getParameter($urlParams, $key, 'unknown');
computeStats($aggregateStats, $k, $title, $value, $revenue, $referers[$k][$r]);
break;
}
}
}
}
if (!empty($revenue['total_orders'])) {
@($aggregateStats[$k]['revenue'] += $revenue['total_revenue']);
@($aggregateStats[$k]['orders'] += $revenue['total_orders']);
}
}
}
function computeStats(&$aggregateStats, $k, $key, $value, $revenue, $userHash)
{
if (!empty($revenue['total_orders'])) {
示例12: getFormattedAddress
function getFormattedAddress($pAddressHash, $pBreak = '<br>')
{
$ret = '';
if ($this->isValid()) {
$ret = zen_address_format(BitBase::getParameter($this->{$pAddressHash}, 'format_id', 2), $this->{$pAddressHash}, 1, '', $pBreak);
}
return $ret;
}
示例13: zen_get_buy_now_button
$lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']);
break;
case 'PRODUCT_LIST_QUANTITY':
$lc_align = 'right';
$lc_text = ' ' . $listing->fields['products_quantity'] . ' ';
break;
case 'PRODUCT_LIST_WEIGHT':
$lc_align = 'right';
$lc_text = ' ' . $listing->fields['products_weight'] . ' ';
break;
case 'PRODUCT_LIST_IMAGE':
$lc_align = 'center';
if (isset($_GET['manufacturers_id'])) {
$lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'manufacturers_id=' . $_GET['manufacturers_id'] . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(CommerceProduct::getImageUrlFromHash($listing->fields['products_id'], 'avatar'), $listing->fields['products_name']) . '</a>';
} else {
$typeClass = BitBase::getParameter($listing->fields, 'type_class', 'CommerceProduct');
if (!empty($listing->fields['type_class_file']) && file_exists(BIT_ROOT_PATH . $listing->fields['type_class_file'])) {
require_once BIT_ROOT_PATH . $listing->fields['type_class_file'];
}
if ($thumbnail = $typeClass::getImageUrlFromHash($listing->fields['products_id'], 'avatar')) {
$lc_text = '<a href="' . CommerceProduct::getDisplayUrlFromId($listing->fields['products_id']) . '">' . zen_image($thumbnail, $listing->fields['products_name']) . '</a>';
}
}
break;
}
$list_box_contents[$rows][$col] = array('align' => $lc_align, 'params' => 'class="data"', 'text' => $lc_text);
}
$listing->MoveNext();
}
$error_categories = false;
} else {
示例14: getStoragePath
function getStoragePath($pParamHash, $pRootDir = NULL)
{
$pParamHash['sub_dir'] = liberty_mime_get_storage_sub_dir_name(array('type' => BitBase::getParameter($pParamHash, 'mime_type', $this->getField('mime_type')), 'name' => BitBase::getParameter($pParamHash, 'file_name', $this->getField('file_name'))));
$pParamHash['user_id'] = $this->getParameter($pParamHash, 'user_id', $this->getField('user_id'));
return parent::getStoragePath($pParamHash) . $this->getParameter($pParamHash, 'attachment_id', $this->getField('attachment_id')) . '/';
}
示例15: foreach
$statsByOption = $stats->getRevenueByOption($_REQUEST);
foreach ($statsByOption as $stat) {
@($statsByOptionTotalUnits[$stat['products_options_id']] += $stat['total_units']);
}
$gBitSmarty->assign('statsByOption', $statsByOption);
$gBitSmarty->assign('statsByOptionTotalUnits', $statsByOptionTotalUnits);
$gBitSmarty->assign('statsCustomers', $stats->getCustomerConversions($_REQUEST));
$gBitSmarty->assign('valuableInterests', $stats->getMostValuableInterests($_REQUEST));
$gBitSmarty->assign('valuableCustomers', $stats->getMostValuableCustomers($_REQUEST));
$gBitSystem->display('bitpackage:bitcommerce/admin_revenue_timeframe.tpl', 'Revenue By Timeframe', array('display_mode' => 'admin'));
} else {
$listHash['max_records'] = -1;
$revStats = $stats->getAggregateRevenue($listHash);
$gBitSmarty->assign('stats', $revStats);
if (BitBase::getParameter($_REQUEST, 'display') == 'matrix') {
switch (BitBase::getParameter($_REQUEST, 'period')) {
case 'Y-':
$headers = array('');
break;
case 'Y-\\QQ':
$headers = array('Q1', 'Q2', 'Q3', 'Q4');
break;
case 'Y-m':
$headers = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
break;
case 'Y-\\WeekW':
default:
for ($i = 1; $i <= 53; $i++) {
$headers[] = 'Week' . str_pad($i, 2, '0', STR_PAD_LEFT);
}
break;