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


PHP zen_get_country_name函数代码示例

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


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

示例1: zen_get_country_list

 function zen_get_country_list($name, $selected = '', $parameters = '')
 {
     $countriesAtTopOfList = array();
     $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
     $countries = zen_get_countries();
     // Set some default entries at top of list:
     if (STORE_COUNTRY != SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY) {
         $countriesAtTopOfList[] = SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY;
     }
     $countriesAtTopOfList[] = STORE_COUNTRY;
     // IF YOU WANT TO ADD MORE DEFAULTS TO THE TOP OF THIS LIST, SIMPLY ENTER THEIR NUMBERS HERE.
     // Duplicate more lines as needed
     // Example: Canada is 108, so use 108 as shown:
     //$countriesAtTopOfList[] = 108;
     //process array of top-of-list entries:
     foreach ($countriesAtTopOfList as $key => $val) {
         $countries_array[] = array('id' => $val, 'text' => zen_get_country_name($val));
     }
     // now add anything not in the defaults list:
     foreach ($countries as $country) {
         $alreadyInList = FALSE;
         foreach ($countriesAtTopOfList as $key => $val) {
             if ($country['id'] == $val) {
                 // If you don't want to exclude entries already at the top of the list, comment out this next line:
                 $alreadyInList = TRUE;
                 continue;
             }
         }
         if (!$alreadyInList) {
             $countries_array[] = $country;
         }
     }
     return zen_draw_pull_down_menu($name, $countries_array, $selected, $parameters);
 }
开发者ID:bislewl,项目名称:super_edit_orders_with_ty,代码行数:34,代码来源:edit_orders_functions.php

示例2: zen_address_format

function zen_address_format($address_format_id, $address, $html, $boln, $eoln)
{
    global $db;
    $address_format_query = "select address_format as format\n                             from " . TABLE_ADDRESS_FORMAT . "\n                             where address_format_id = '" . (int) $address_format_id . "'";
    $address_format = $db->Execute($address_format_query);
    //$company = zen_output_string_protected($address['company']);
    if (isset($address['firstname']) && zen_not_null($address['firstname'])) {
        $firstname = zen_output_string_protected($address['firstname']);
        $lastname = zen_output_string_protected($address['lastname']);
    } elseif (isset($address['name']) && zen_not_null($address['name'])) {
        $firstname = zen_output_string_protected($address['name']);
        $lastname = '';
    } else {
        $firstname = '';
        $lastname = '';
    }
    $street = zen_output_string_protected($address['street_address']);
    $suburb = zen_output_string_protected($address['suburb']);
    $city = zen_output_string_protected($address['city']);
    $state = zen_output_string_protected($address['state']);
    $phone = ENTRY_PHONE_NUMBER . zen_output_string_protected($address['phone']);
    if (isset($address['country_id']) && zen_not_null($address['country_id'])) {
        $country = zen_get_country_name($address['country_id']);
        if (isset($address['zone_id']) && zen_not_null($address['zone_id'])) {
            $state = zen_get_zone_code($address['country_id'], $address['zone_id'], $state);
        }
    } elseif (isset($address['country']) && zen_not_null($address['country'])) {
        if (is_array($address['country'])) {
            $country = zen_output_string_protected($address['country']['countries_name']);
        } else {
            $country = zen_output_string_protected($address['country']);
        }
    } else {
        $country = '';
    }
    $postcode = zen_output_string_protected($address['postcode']);
    $zip = $postcode;
    if ($html) {
        // HTML Mode
        $HR = '<hr />';
        $hr = '<hr />';
        if ($boln == '' && $eoln == "\n") {
            // Values not specified, use rational defaults
            $CR = '<br />';
            $cr = '<br />';
            $eoln = $cr;
        } else {
            // Use values supplied
            $CR = $eoln . $boln;
            $cr = $CR;
        }
    } else {
        // Text Mode
        $CR = $eoln;
        $cr = $CR;
        $HR = '----------------------------------------';
        $hr = '----------------------------------------';
    }
    $statecomma = '';
    $streets = $street;
    if ($suburb != '') {
        $streets = $street . ',' . $suburb;
    }
    if ($country == '') {
        if (is_array($address['country'])) {
            $country = zen_output_string_protected($address['country']['countries_name']);
        } else {
            $country = zen_output_string_protected($address['country']);
        }
    }
    if ($state != '') {
        $statecomma = $state . ', ';
    }
    $fmt = $address_format->fields['format'];
    eval("\$address_out = \"{$fmt}\";");
    return $address_out;
}
开发者ID:happyxlq,项目名称:lt_svn,代码行数:77,代码来源:functions_customers.php

示例3: elseif

    } elseif ($free_shipping == 1) {
        echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER));
    } else {
        ?>
<table width="100%" border="1" cellpadding="2" cellspacing="2">
<?php 
        if ($_SESSION['customer_id'] < 1) {
            ?>
    <tr>
			<td colspan="2" class="seDisplayedAddressLabel">
        <?php 
            echo CART_SHIPPING_QUOTE_CRITERIA;
            ?>
<br />
        <?php 
            echo '<span class="seDisplayedAddressInfo">' . zen_get_zone_name($selected_country, $state_zone_id, '') . ($selectedState != '' ? ' ' . $selectedState : '') . ' ' . $order->delivery['postcode'] . ' ' . zen_get_country_name($order->delivery['country_id']) . '</span>';
            ?>
      </td>
		</tr>
<?php 
        }
        ?>
     <tr>
			<th scope="col" id="seProductsHeading"><?php 
        echo CART_SHIPPING_METHOD_TEXT;
        ?>
</th>
			<th scope="col" id="seTotalHeading"><?php 
        echo CART_SHIPPING_METHOD_RATES;
        ?>
</th>
开发者ID:wwxgitcat,项目名称:zencart_v1.0,代码行数:31,代码来源:tpl_modules_shipping_estimator.php

示例4: handleMobileOutputBuffering

function handleMobileOutputBuffering($buffer)
{
    $mobile = createMobileObject();
    mb_http_output("Shift_JIS");
    $buffer = replaceTableToDiv($buffer);
    $buffer = scriptCancel($buffer);
    //  $buffer = convertCharsetSJIS($buffer);
    $buffer = replaceType("password", "text", $buffer);
    //   $buffer = imgAddBorder($buffer);
    $buffer = selectToInput('country', zen_get_country_name(SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY), $buffer);
    $buffer = selectToInput('state', $_POST['state'], $buffer);
    $buffer = replaceInputTypeImage($buffer);
    $buffer = replaceHtagToBtag($buffer);
    $buffer = preg_replace('/<noscript>.*?(<img src=.*?>).*?<\\/noscript>/si', '$1', $buffer);
    header("Content-type:text/html; charset=Shift_JIS");
    $buffer = replaceSpecialPriceSale($buffer);
    $buffer = mb_convert_encoding($buffer, 'SJIS', 'EUC-JP');
    $buffer = mb_convert_kana($buffer, 'k', 'SJIS');
    $buffer = mb_convert_kana($buffer, 'a', 'SJIS');
    // convert <form> tag
    $buffer = preg_replace_callback('#(<form.*?>)#', 'queryStringToHiddenField', $buffer);
    $buffer = preg_replace_callback('#(<form.*?>[\\s\\S]*?</form>)#', 'addHideSessionIDInsideForm', $buffer);
    // convert <input> tag (type=text
    $buffer = preg_replace_callback('#(<input.*?type="text".*?/>)#', 'addIStyleOrMode', $buffer);
    // convert <input> tag (type=password
    $buffer = preg_replace_callback('#(<input.*?type="password".*?/>)#', 'addIStyleOrMode', $buffer);
    // convert <a> tag
    $buffer = preg_replace_callback('#(<a.*?>)#', 'addSessionID', $buffer);
    // convert <img> tag
    $buffer = preg_replace_callback('#(<img.*?>)#', 'replaceImageForMobile', $buffer);
    $buffer = mobileEmojiConverter($buffer);
    if (!MOBILE_CSS_CONF) {
        $buffer = voidableCss($buffer);
    }
    if (MOBILE_SLIM_SIZE) {
        $buffer = slimSize($buffer);
    }
    $buffer = deleteInvalidTag($buffer);
    return $buffer;
}
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:40,代码来源:Mobile.php

示例5: zen_address_format

function zen_address_format($address_format_id, $address, $html, $boln, $eoln)
{
    global $db;
    $address_format = $db->Execute("select address_format as format\n                             from " . TABLE_ADDRESS_FORMAT . "\n                             where address_format_id = '" . (int) $address_format_id . "'");
    $company = zen_output_string_protected($address['company']);
    if (isset($address['firstname']) && zen_not_null($address['firstname'])) {
        $firstname = zen_output_string_protected($address['firstname']);
        $lastname = zen_output_string_protected($address['lastname']);
    } elseif (isset($address['name']) && zen_not_null($address['name'])) {
        $firstname = zen_output_string_protected($address['name']);
        $lastname = '';
    } else {
        $firstname = '';
        $lastname = '';
    }
    $street = zen_output_string_protected($address['street_address']);
    $suburb = zen_output_string_protected($address['suburb']);
    $city = zen_output_string_protected($address['city']);
    $state = zen_output_string_protected($address['state']);
    $telephone = zen_output_string_protected($address['telephone']);
    $fax = zen_output_string_protected($address['fax']);
    if (isset($address['country_id']) && zen_not_null($address['country_id'])) {
        $country = zen_get_country_name($address['country_id']);
        if (isset($address['zone_id']) && zen_not_null($address['zone_id'])) {
            $state = zen_get_zone_code($address['country_id'], $address['zone_id'], $state);
        }
    } elseif (isset($address['country']) && zen_not_null($address['country'])) {
        $country = zen_output_string_protected($address['country']);
    } else {
        $country = '';
    }
    $postcode = zen_output_string_protected($address['postcode']);
    $zip = $postcode;
    if ($html) {
        // HTML Mode
        $HR = '<hr>';
        $hr = '<hr>';
        if ($boln == '' && $eoln == "\n") {
            // Values not specified, use rational defaults
            $CR = '<br>';
            $cr = '<br>';
            $eoln = $cr;
        } else {
            // Use values supplied
            $CR = $eoln . $boln;
            $cr = $CR;
        }
    } else {
        // Text Mode
        $CR = $eoln;
        $cr = $CR;
        $HR = '----------------------------------------';
        $hr = '----------------------------------------';
    }
    $statecomma = '';
    $streets = $street;
    $state = zen_convert_to_zone_name_m17n($state) . ' ';
    if ($suburb != '') {
        $streets = $street . $cr . $suburb;
    }
    if ($country == '') {
        $country = zen_output_string_protected($address['country']);
    }
    if ($state != '') {
        $statecomma = $state . ', ';
    }
    if ($telephone != '') {
        $telephone = ENTRY_TELEPHONE_NUMBER . $telephone;
    }
    if ($fax != '') {
        $fax = ENTRY_FAX_NUMBER . $fax;
    }
    $fmt = $address_format->fields['format'];
    eval("\$address = \"{$fmt}\";");
    if (ACCOUNT_COMPANY == 'true' && zen_not_null($company)) {
        $address = $company . $cr . $address;
    }
    return $address;
}
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:79,代码来源:general.php

示例6: zen_draw_pull_down_menu

         </tr>
<?php 
    }
    ?>
          <tr>
            <td class="main"><?php 
    echo ENTRY_COUNTRY;
    ?>
</td>
            <td class="main">
<?php 
    if ($error == true) {
        if ($entry_country_error == true) {
            echo zen_draw_pull_down_menu('entry_country_id', zen_get_countries(), $cInfo->entry_country_id) . '&nbsp;' . ENTRY_COUNTRY_ERROR;
        } else {
            echo zen_get_country_name($cInfo->entry_country_id) . zen_draw_hidden_field('entry_country_id');
        }
    } else {
        echo zen_draw_pull_down_menu('entry_country_id', zen_get_countries(), $cInfo->entry_country_id);
    }
    ?>
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php 
    echo zen_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
      </tr>
开发者ID:kirkbauer2,项目名称:kirkzc,代码行数:31,代码来源:customers.php

示例7: _getQuote


//.........这里部分代码省略.........
             // prepare request for debug log
             $this->request_display = $request;
         }
         $request = 'API=RateV4&XML=' . urlencode($request);
     } else {
         // INTERNATIONAL destinations
         // build extra services for international
         // Some Extra Services cannot work with others
         $extra_service_international = $this->extra_service();
         $intl_gxg_requested = 0;
         foreach ($this->typeCheckboxesSelected as $requested_type) {
             if (!is_numeric($requested_type) && preg_match('#(GXG)#i', $requested_type)) {
                 $intl_gxg_requested++;
             }
         }
         // rudimentary dimensions, since they cannot be passed as blanks
         if ($intl_gxg_requested) {
             $width = MODULE_SHIPPING_USPS_WIDTH_INTL;
             $length = MODULE_SHIPPING_USPS_LENGTH_INTL;
             $height = MODULE_SHIPPING_USPS_HEIGHT_INTL;
             $girth = 0;
         } else {
             $width = MODULE_SHIPPING_USPS_WIDTH;
             $length = MODULE_SHIPPING_USPS_LENGTH;
             $height = MODULE_SHIPPING_USPS_HEIGHT;
             $girth = 0;
         }
         // adjust <ValueOfContents> to not exceed $2499 per box
         global $shipping_num_boxes;
         $max_usps_allowed_price = $order->subtotal > 0 ? $order->subtotal + $order->getField('tax', 0) : (!empty($_SESSION['cart']) ? $_SESSION['cart']->total : 0);
         $max_usps_allowed_price = $max_usps_allowed_price / $shipping_num_boxes;
         $extraservices = $extra_service_international;
         $submission_value = $insurable_value > $max_usps_allowed_price ? $max_usps_allowed_price : $insurable_value;
         $request = '<IntlRateV2Request USERID="' . MODULE_SHIPPING_USPS_USERID . '">' . '<Revision>2</Revision>' . '<Package ID="0">' . '<Pounds>' . $this->pounds . '</Pounds>' . '<Ounces>' . $this->ounces . '</Ounces>' . '<MailType>All</MailType>' . '<GXG>' . '  <POBoxFlag>N</POBoxFlag>' . '  <GiftFlag>N</GiftFlag>' . '</GXG>' . '<ValueOfContents>' . number_format($submission_value, 2, '.', '') . '</ValueOfContents>' . '<Country>' . (empty($this->countries[$order->delivery['country']['countries_iso_code_2']]) ? zen_get_country_name($order->delivery['country']['countries_id']) : $this->countries[$order->delivery['country']['countries_iso_code_2']]) . '</Country>' . '<Container>RECTANGULAR</Container>' . '<Size>REGULAR</Size>' . '<Width>' . $width . '</Width>' . '<Length>' . $length . '</Length>' . '<Height>' . $height . '</Height>' . '<Girth>' . $girth . '</Girth>' . '<OriginZip>' . SHIPPING_ORIGIN_ZIP . '</OriginZip>' . '<CommercialFlag>Y</CommercialFlag>' . $extraservices . '</Package>' . '</IntlRateV2Request>';
         if ($this->getTransitTime) {
             $transreq[$requested_type] = '';
         }
         if (MODULE_SHIPPING_USPS_DEBUG_MODE != 'Off') {
             // prepare request for display
             $this->request_display = preg_replace(array('/<\\//', '/></', '/>  </', '/</', '/>/', '/&gt;  &lt;/', '/&gt;&lt;/'), array('&lt;/', '&gt;&lt;', '&gt;  &lt;', '&lt;', '&gt;', '&gt;<br>  &lt;', '&gt;<br>&lt;'), htmlspecialchars_decode($request));
             if (false && $_GET['main_page'] == 'popup_shipping_estimator' && MODULE_SHIPPING_USPS_DEBUG_MODE != 'Off') {
                 echo '<br />USPS INTERNATIONAL $request: <br />' . 'API=IntlRateV2&XML=' . $this->request_display . '<br />';
             }
             // prepare request for debug log
             $this->request_display = $request;
         }
         $request = 'API=IntlRateV2&XML=' . urlencode($request);
     }
     switch (MODULE_SHIPPING_USPS_SERVER) {
         case 'production':
             $usps_server = 'http://production.shippingapis.com';
             $api_dll = 'shippingapi.dll';
             break;
         case 'test':
         default:
             $usps_server = 'http://stg-production.shippingapis.com';
             $api_dll = 'ShippingApi.dll';
             break;
     }
     $body = '';
     // Send quote request via CURL
     global $request_type;
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_URL, $usps_server . '/' . $api_dll);
     curl_setopt($ch, CURLOPT_REFERER, $request_type == 'SSL' ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG);
     curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
开发者ID:bitweaver,项目名称:commerce,代码行数:67,代码来源:usps.php

示例8: zen_address_format

function zen_address_format($address_format_id, $address, $html, $boln, $eoln)
{
    global $gBitDb;
    $address_format_query = "select `address_format` as `format`\n                             from " . TABLE_ADDRESS_FORMAT . "\n                             where `address_format_id` = '" . (int) $address_format_id . "'";
    $address_format = $gBitDb->query($address_format_query);
    $company = zen_output_string_protected($address['company']);
    if (!empty($address['firstname'])) {
        $firstname = zen_output_string_protected($address['firstname']);
        $lastname = zen_output_string_protected($address['lastname']);
    } elseif (!empty($address['name'])) {
        $firstname = zen_output_string_protected($address['name']);
        $lastname = '';
    } else {
        $firstname = '';
        $lastname = '';
    }
    $street = zen_output_string_protected($address['street_address']);
    $suburb = zen_output_string_protected($address['suburb']);
    $city = zen_output_string_protected($address['city']);
    $state = zen_output_string_protected($address['state']);
    $telephone = isset($address['telephone']) ? zen_output_string_protected($address['telephone']) : NULL;
    if (!empty($address['country_id'])) {
        $country = zen_get_country_name($address['country_id']);
        if (!empty($address['zone_id'])) {
            $state = zen_get_zone_code($address['country_id'], $address['zone_id'], $state);
        }
    } elseif (!empty($address['country'])) {
        if (is_array($address['country'])) {
            $country = zen_output_string_protected($address['country']['countries_name']);
        } else {
            $country = zen_output_string_protected($address['country']);
        }
    } else {
        $country = '';
    }
    $postcode = zen_output_string_protected($address['postcode']);
    $zip = $postcode;
    if ($html) {
        // HTML Mode
        $HR = '<hr />';
        $hr = '<hr />';
        if (empty($boln) && $eoln == "\n") {
            // Values not specified, use rational defaults
            $CR = '<br />';
            $cr = '<br />';
            $eoln = $cr;
        } else {
            // Use values supplied
            $CR = $eoln . $boln;
            $cr = $CR;
        }
    } else {
        // Text Mode
        $CR = $eoln;
        $cr = $CR;
        $HR = '----------------------------------------';
        $hr = '----------------------------------------';
    }
    $statecomma = '';
    $streets = $street;
    if ($suburb != '') {
        $streets = $street . $cr . $suburb;
    }
    if (empty($country)) {
        if (is_array($address['country'])) {
            $country = zen_output_string_protected($address['country']['countries_name']);
        } else {
            $country = zen_output_string_protected($address['country']);
        }
    }
    if ($state != '') {
        $statecomma = $state . ', ';
    }
    $fmt = $address_format->fields['format'];
    eval("\$address_out = \"{$fmt}\";");
    if (!empty($telephone)) {
        $address_out .= $cr . $telephone;
    }
    if (ACCOUNT_COMPANY == 'true' && zen_not_null($company)) {
        $address_out = $company . $cr . $address_out;
    }
    return $address_out;
}
开发者ID:bitweaver,项目名称:commerce,代码行数:83,代码来源:common_inc.php

示例9: header

    $messageStack->add('header', TEXT_EZPAGES_STATUS_HEADER_ADMIN, 'caution');
}
if (EZPAGES_STATUS_FOOTER == '2' && strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])) {
    $messageStack->add('header', TEXT_EZPAGES_STATUS_FOOTER_ADMIN, 'caution');
}
if (EZPAGES_STATUS_SIDEBOX == '2' && strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])) {
    $messageStack->add('header', TEXT_EZPAGES_STATUS_SIDEBOX_ADMIN, 'caution');
}
if (defined('STRICT_ERROR_REPORTING') && STRICT_ERROR_REPORTING == true) {
    $messageStack->add('header', 'STRICT ERROR REPORTING IS ON', 'warning');
}
// if down for maintenance, prevent indexing
if (DOWN_FOR_MAINTENANCE == 'true' && !strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])) {
    header("HTTP/1.1 503 Service Unavailable");
}
/* Check for invalid countries in customer's address book.
 * If a customer is logged in, check to see that the customers' address(es) still contain valid countries.
* If not, redirect to the address-book page for changes.
*/
if ($_SESSION['customer_id'] && $_GET['main_page'] != FILENAME_ADDRESS_BOOK_PROCESS && $_GET['main_page'] != FILENAME_LOGOFF) {
    $addresses_query = "SELECT address_book_id, entry_country_id as country_id, entry_firstname as firstname, entry_lastname as lastname\n                      FROM   " . TABLE_ADDRESS_BOOK . "\n                      WHERE  customers_id = :customersID\n                      ORDER BY firstname, lastname";
    $addresses_query = $db->bindVars($addresses_query, ':customersID', $_SESSION['customer_id'], 'integer');
    $addresses = $db->Execute($addresses_query);
    while (!$addresses->EOF) {
        if (zen_get_country_name($addresses->fields['country_id'], TRUE) == '') {
            $messageStack->add_session('addressbook', sprintf(ERROR_TEXT_COUNTRY_DISABLED_PLEASE_CHANGE, zen_get_country_name($addresses->fields['country_id'], FALSE)), 'error');
            zen_redirect(zen_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'edit=' . $addresses->fields['address_book_id'], 'SSL'));
        }
        $addresses->MoveNext();
    }
}
开发者ID:R-Future,项目名称:zencart,代码行数:31,代码来源:init_header.php

示例10: bit_redirect

     $newOption['orders_id'] = $_REQUEST['oID'];
     $newOption['orders_products_id'] = $_REQUEST['orders_products_id'];
     $gBitDb->associateInsert(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $newOption);
     $order->updateStatus(array('comments' => 'Added Product Option: ' . $newOption['products_options'] . ' => ' . $newOption['products_options_values'] . ' (' . $_REQUEST['newOrderOptionValue'] . ')'));
     bit_redirect(BITCOMMERCE_PKG_URL . 'admin/orders.php?oID=' . $_REQUEST['oID'] . '&action=edit');
     break;
 case 'save_address':
     $addressType = $_REQUEST['address_type'];
     $saveAddress[$addressType . '_name'] = $_REQUEST['name'];
     $saveAddress[$addressType . '_company'] = $_REQUEST['company'];
     $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;
开发者ID:bitweaver,项目名称:commerce,代码行数:31,代码来源:orders.php

示例11: array

 if ($status < 1) {
     break;
 }
 $order_updated = false;
 $sql_data_array = array('customers_name' => zen_db_prepare_input($_POST['update_customer_name']), 'customers_company' => zen_db_prepare_input($_POST['update_customer_company']), 'customers_street_address' => zen_db_prepare_input($_POST['update_customer_street_address']), 'customers_suburb' => zen_db_prepare_input($_POST['update_customer_suburb']), 'customers_city' => zen_db_prepare_input($_POST['update_customer_city']), 'customers_state' => zen_db_prepare_input($_POST['update_customer_state']), 'customers_postcode' => zen_db_prepare_input($_POST['update_customer_postcode']), 'customers_country' => zen_db_prepare_input($_POST['update_customer_country']), 'customers_telephone' => zen_db_prepare_input($_POST['update_customer_telephone']), 'customers_email_address' => zen_db_prepare_input($_POST['update_customer_email_address']), 'last_modified' => 'now()', 'billing_name' => zen_db_prepare_input($_POST['update_billing_name']), 'billing_company' => zen_db_prepare_input($_POST['update_billing_company']), 'billing_street_address' => zen_db_prepare_input($_POST['update_billing_street_address']), 'billing_suburb' => zen_db_prepare_input($_POST['update_billing_suburb']), 'billing_city' => zen_db_prepare_input($_POST['update_billing_city']), 'billing_state' => zen_db_prepare_input($_POST['update_billing_state']), 'billing_postcode' => zen_db_prepare_input($_POST['update_billing_postcode']), 'billing_country' => zen_db_prepare_input($_POST['update_billing_country']), 'delivery_name' => zen_db_prepare_input($_POST['update_delivery_name']), 'delivery_company' => zen_db_prepare_input($_POST['update_delivery_company']), 'delivery_street_address' => zen_db_prepare_input($_POST['update_delivery_street_address']), 'delivery_suburb' => zen_db_prepare_input($_POST['update_delivery_suburb']), 'delivery_city' => zen_db_prepare_input($_POST['update_delivery_city']), 'delivery_state' => zen_db_prepare_input($_POST['update_delivery_state']), 'delivery_postcode' => zen_db_prepare_input($_POST['update_delivery_postcode']), 'delivery_country' => zen_db_prepare_input($_POST['update_delivery_country']), 'payment_method' => zen_db_prepare_input($_POST['update_info_payment_method']), 'cc_type' => zen_db_prepare_input($_POST['update_info_cc_type']), 'cc_owner' => zen_db_prepare_input($_POST['update_info_cc_owner']), 'cc_expires' => zen_db_prepare_input($_POST['update_info_cc_expires']));
 // If the country was passed as an id, change it to the country name for
 // storing in the database. This is done in case a country is removed in
 // the future, so the country name is still associated with the order.
 if (is_numeric($sql_data_array['customers_country'])) {
     $sql_data_array['customers_country'] = zen_get_country_name((int) $sql_data_array['customers_country']);
 }
 if (is_numeric($sql_data_array['billing_country'])) {
     $sql_data_array['billing_country'] = zen_get_country_name((int) $sql_data_array['billing_country']);
 }
 if (is_numeric($sql_data_array['delivery_country'])) {
     $sql_data_array['delivery_country'] = zen_get_country_name((int) $sql_data_array['delivery_country']);
 }
 // For PA-DSS Compliance, we no longer store the Credit Card number in
 // the database. While inconvenient, this saves us in the event of an audit.
 if (array_key_exists('update_info_cc_number', $_POST)) {
     $update_info_cc_number = zen_db_prepare_input($_POST['update_info_cc_number']);
     // If the number is not already obscufated, we use the same method
     // as the authorize.net module to obscufate the entered CC number
     if (is_numeric($update_info_cc_number)) {
         $update_info_cc_number = str_pad(substr($_POST['update_info_cc_number'], -4), strlen($_POST['update_info_cc_number']), "X", STR_PAD_LEFT);
     }
     $sql_data_array['cc_number'] = $update_info_cc_number;
     unset($_POST['update_info_cc_number']);
 }
 zen_db_perform(TABLE_ORDERS, $sql_data_array, 'update', 'orders_id = \'' . (int) $oID . '\'');
 // BEGIN TY TRACKER 1 - READ FROM POST
开发者ID:bislewl,项目名称:super_edit_orders_with_ty,代码行数:31,代码来源:edit_orders.php


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