• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP tep_get_country_name函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: output

 public function output($step = 0)
 {
     global $temp_orders_id;
     $html = '';
     if ($temp_orders_id > 0) {
         $to_query = tep_db_query('SELECT * FROM temp_orders WHERE orders_id = "' . $temp_orders_id . '"');
         if (tep_db_num_rows($to_query) > 0) {
             $to = tep_db_fetch_array($to_query);
             $html .= '<div class="billing_address">';
             $html .= '<h3 class="billing_address_title">' . Translate($this->config['title']) . '</h3>';
             if (!empty($this->config['description'])) {
                 $html .= '<p class="billing_address_description">' . Translate($this->config['description']) . '</p>';
             }
             $html .= '<blockquote>';
             $html .= '<address>';
             //name
             $html .= '<strong>' . $to['billing_name'] . '</strong><br />';
             //street
             $html .= $to['billing_street_address'] . '<br />';
             //city + postcode + country
             $html .= $to['billing_postcode'] . ' ' . $to['billing_city'] . ' ' . tep_get_country_name($to['billing_country']) . '<br />';
             $html .= '</address>';
             $html .= '</blockquote>';
             $html .= '</div>';
             //end billing_address
         }
     }
     return $html;
 }
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:29,代码来源:Billing_address_module.php


示例2: sprintf

        $customer_default_address_id = $address_id;
        $customer_country_id = $country;
        // build the message content
        $name = $firstname . ' ' . $lastname;
        $email_text = sprintf(EMAIL_GREET_NONE, $firstname);
        //CYA - Add new here
        $email_text = sprintf(EMAIL_TEMPLATE_REGISTASION, HTTP_SERVER, HTTP_SERVER, $firstname, HTTP_SERVER . DIR_WS_CATALOG . "login.php", HTTP_SERVER . DIR_WS_CATALOG . "login.php", $email_address, $password, STORE_OWNER_EMAIL_ADDRESS, STORE_OWNER_EMAIL_ADDRESS);
        tep_mail_new($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
        // admin email notification
        $admin_email_text .= ADMIN_EMAIL_WELCOME . ADMIN_EMAIL_TEXT;
        // . EMAIL_WARNING;
        $row = tep_db_fetch_array(tep_db_query("select group_name from customers_groups where group_id={$group}"));
        if (isset($referral_other) && $referral_other != "") {
            $opt = ' (' . $referral_other . ')';
        }
        $admin_email_text .= "\nCustomer's info:\n" . "Name: {$firstname} {$lastname}\n" . "Company: " . $company . "\n" . "Title/Position: " . $title . "\n" . "Email: " . $email_address . "\n" . "Website: " . $website . "\n" . "Group: " . $row['group_name'] . "\n" . "Sales Territory: " . $st . "\n" . "Country: " . tep_get_country_name($country) . "\n" . "City: " . $city . "\n" . "Street Address: " . $street_address . "\n" . "Post Code: " . $postcode . "\n" . "State: " . $state . "\n" . "Telephone: {$telephone}\n" . "Telephone ext: {$customers_telephone_ext}\n" . "Fax: " . $fax . "\n" . "IP Address: " . $_SERVER['REMOTE_ADDR'] . "\n" . '<a href="http://www.ip2location.com/">http://www.ip2location.com/</a>' . "\n" . "Referral: " . $referral . $opt . "\n\n" . "Click to approve: " . HTTP_SERVER . DIR_WS_HTTP_CATALOG . "admin/members.php\n\n";
        //        tep_mail(STORE_OWNER, "[email protected]", EMAIL_SUBJECT, nl2br($admin_email_text), "", STORE_OWNER_EMAIL_ADDRESS);
        tep_mail(STORE_OWNER, "[email protected]", EMAIL_SUBJECT, nl2br($admin_email_text), "", STORE_OWNER_EMAIL_ADDRESS);
        //tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
        $response['type'] = 1;
        $response['content'] = tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL');
    } else {
        $response['type'] = 0;
        $response['message'] = $arrayErrors;
    }
    print json_encode($response);
    exit;
}
$response['type'] = 0;
$response['content'] = "Error. Please try later!";
print json_encode($response);
开发者ID:rongandat,项目名称:scalaprj,代码行数:31,代码来源:cya_ajax.php


示例3: die

// make a new ship request
if ($action == 'ship') {
    if (!$order) {
        die(ERROR_NO_ORDER_NUMBER);
    }
    include DIR_WS_INCLUDES . 'abbreviate.php';
    // used to abbreviate state & country names
    require DIR_WS_INCLUDES . 'fedexdc.php';
    // array of characters we don't want in phone numbers
    $unwanted = array('(', ')', '-', '.', ' ');
    $transaction_code = 21;
    // 21 is a ship request
    // get the country we're shipping from
    $country_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'STORE_COUNTRY'");
    $country_value = tep_db_fetch_array($country_query);
    $country = tep_get_country_name($country_value['configuration_value']);
    // abbreviate it for fedex (United States = US etc.)
    $senders_country = abbreviate_country($country);
    // get sender's fedex info from configuration table
    // (requires installation & configuration of FedEx RealTime Quotes)
    $fedex_vars = array(10 => 'MODULE_SHIPPING_FEDEX1_ACCOUNT', 498 => 'MODULE_SHIPPING_FEDEX1_METER', 75 => 'MODULE_SHIPPING_FEDEX1_WEIGHT', 4 => 'STORE_NAME', 5 => 'MODULE_SHIPPING_FEDEX1_ADDRESS_1', 6 => 'MODULE_SHIPPING_FEDEX1_ADDRESS_2', 7 => 'MODULE_SHIPPING_FEDEX1_CITY', 8 => 'MODULE_SHIPPING_FEDEX1_STATE', 9 => 'MODULE_SHIPPING_FEDEX1_POSTAL', 183 => 'MODULE_SHIPPING_FEDEX1_PHONE', 68 => 'DEFAULT_CURRENCY');
    $i = 0;
    $fedex_keys = array_keys($fedex_vars);
    foreach ($fedex_vars as $var) {
        $value_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = '" . $var . "'");
        $value = tep_db_fetch_array($value_query);
        $value = $value['configuration_value'];
        if ($var == 'MODULE_SHIPPING_FEDEX1_ACCOUNT' && !$value) {
            die(ERROR_FEDEX_QUOTES_NOT_INSTALLED);
        }
        // get rid of dashes, parentheses and periods in shipper's telephone number
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:ship_fedex.php


示例4: put_all_data_in_db

 private function put_all_data_in_db($orders_id)
 {
     global $currency, $currencies;
     //fill orders table
     if (extension_loaded('apc') && ini_get('apc.enabled')) {
         apc_delete('temp_orders_' . $orders_id);
         apc_delete('temp_orders_products_' . $orders_id);
         apc_delete('temp_orders_status_history_' . $orders_id);
         apc_delete('temp_orders_total_' . $orders_id);
     }
     $this->get_all_data_from_temp_db($orders_id);
     $orders = $this->temp_data[$orders_id]['orders'];
     unset($orders['orders_id']);
     unset($orders['delivery_address_id']);
     unset($orders['billing_address_id']);
     unset($orders['coupon_id']);
     unset($orders['payment_method_extra']);
     unset($orders['shipping_method_extra']);
     unset($orders['processed_order_id']);
     $orders['abo_status'] = '0';
     $orders['date_purchased'] = $orders['last_modified'] = date("Y-m-d H:m:s");
     $orders['currency'] = $currency;
     $orders['currency_value'] = $currencies->currencies[$currency]['value'];
     $orders['customers_address_format_id'] = tep_get_address_format_id($orders['customers_country']);
     $orders['customers_country'] = tep_get_country_name($orders['customers_country']);
     $orders['billing_address_format_id'] = tep_get_address_format_id($orders['billing_country']);
     $orders['billing_country'] = tep_get_country_name($orders['billing_country']);
     $orders['delivery_address_format_id'] = tep_get_address_format_id($orders['delivery_country']);
     $orders['delivery_country'] = tep_get_country_name($orders['delivery_country']);
     tep_db_perform('orders', $orders, 'insert');
     $new_orders_id = tep_db_insert_id();
     //add order id to temp orders table
     tep_db_query('UPDATE temp_orders SET processed_order_id = "' . $new_orders_id . '" WHERE orders_id = "' . $orders_id . '"');
     //fill orders_products table
     $orders_products = $this->temp_data[$orders_id]['orders_products'];
     //fill orders_products_attributes
     $orders_products_attributes = $this->temp_data[$orders_id]['orders_products_attributes'];
     if (is_array($orders_products)) {
         foreach ($orders_products as $products_order_id => $data) {
             unset($orders_products[$products_order_id]['orders_products_id']);
             unset($orders_products[$products_order_id]['products_weight']);
             $orders_products[$products_order_id]['orders_id'] = $new_orders_id;
             tep_db_perform('orders_products', $orders_products[$products_order_id], 'insert');
             $orders_products_id = tep_db_insert_id();
             if (is_array($orders_products_attributes)) {
                 foreach ($orders_products_attributes[$products_order_id] as $key => $value) {
                     unset($orders_products_attributes[$products_order_id][$key]['orders_products_attributes_id']);
                     $orders_products_attributes[$products_order_id][$key]['orders_id'] = $new_orders_id;
                     $orders_products_attributes[$products_order_id][$key]['orders_products_id'] = $orders_products_id;
                     tep_db_perform('orders_products_attributes', $orders_products_attributes[$products_order_id][$key], 'insert');
                 }
             }
         }
     }
     //fill orders_products_status_history table
     $orders_status_history = $this->temp_data[$orders_id]['orders_status_history'];
     if (is_array($orders_status_history)) {
         foreach ($orders_status_history as $key => $value) {
             unset($orders_status_history[$key]['orders_status_history_id']);
             $orders_status_history[$key]['orders_id'] = $new_orders_id;
             $orders_status_history[$key]['orders_status_id'] = $orders['orders_status'];
             tep_db_perform('orders_status_history', $orders_status_history[$key], 'insert');
         }
     }
     //fill orders_total table
     $orders_total = $this->temp_data[$orders_id]['orders_total'];
     if (is_array($orders_total)) {
         foreach ($orders_total as $key => $data) {
             unset($orders_total[$key]['orders_total_id']);
             $orders_total[$key]['orders_id'] = $new_orders_id;
             tep_db_perform('orders_total', $orders_total[$key], 'insert');
         }
     }
     return $new_orders_id;
 }
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:75,代码来源:Checkout.php


示例5: tep_address_format

function tep_address_format($address_format_id, $address, $html, $boln, $eoln)
{
    global $osC_Database;
    $Qformat = $osC_Database->query('select address_format from :table_address_format where address_format_id = :address_format_id');
    $Qformat->bindTable(':table_address_format', TABLE_ADDRESS_FORMAT);
    $Qformat->bindInt(':address_format_id', $address_format_id);
    $Qformat->execute();
    $company = tep_output_string_protected($address['company']);
    if (isset($address['firstname']) && tep_not_null($address['firstname'])) {
        $firstname = tep_output_string_protected($address['firstname']);
        $lastname = tep_output_string_protected($address['lastname']);
    } elseif (isset($address['name']) && tep_not_null($address['name'])) {
        $firstname = tep_output_string_protected($address['name']);
        $lastname = '';
    } else {
        $firstname = '';
        $lastname = '';
    }
    $street = tep_output_string_protected($address['street_address']);
    $suburb = tep_output_string_protected($address['suburb']);
    $city = tep_output_string_protected($address['city']);
    $state = tep_output_string_protected($address['state']);
    if (isset($address['country_id']) && tep_not_null($address['country_id'])) {
        $country = tep_get_country_name($address['country_id']);
        if (isset($address['zone_id']) && tep_not_null($address['zone_id'])) {
            $state = tep_get_zone_code($address['country_id'], $address['zone_id'], $state);
        }
    } elseif (isset($address['country']) && tep_not_null($address['country'])) {
        $country = tep_output_string_protected($address['country']);
    } else {
        $country = '';
    }
    $postcode = tep_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 . $cr . $suburb;
    }
    if ($country == '') {
        $country = tep_output_string_protected($address['country']);
    }
    if ($state != '') {
        $statecomma = $state . ', ';
    }
    $fmt = $Qformat->value('address_format');
    eval("\$address = \"{$fmt}\";");
    if (ACCOUNT_COMPANY == 'true' && tep_not_null($company)) {
        $address = $company . $cr . $address;
    }
    return $address;
}
开发者ID:itnovator,项目名称:oscommerce_cvs,代码行数:73,代码来源:general.php


示例6: tep_get_country_name

</td>
             </tr>
<?php 
}
?>
             <tr>
               <td class="main">&nbsp;<?php 
echo ENTRY_COUNTRY;
?>
</td>
               <td class="main">&nbsp;
<?php 
if ($is_read_only) {
    echo tep_get_country_name($address['entry_country_id']);
} else {
    echo tep_draw_input_field('country', tep_get_country_name($address['entry_country_id'])) . '&nbsp; <font color="#FF0000">*</font>';
}
?>

<?php 
tep_draw_hidden_field('step', '3');
?>

</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td class="formAreaTitle"><br><?php 
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:create_order_details.php


示例7: tep_get_countries

         </tr>
<?php 
    }
    ?>
          <tr>
            <td class="main"><?php 
    echo OSCOM::getDef('entry_country');
    ?>
</td>
            <td class="main">
<?php 
    if ($error == true) {
        if ($entry_country_error == true) {
            echo HTML::selectField('entry_country_id', tep_get_countries(), $cInfo->entry_country_id) . '&nbsp;' . OSCOM::getDef('entry_country_error');
        } else {
            echo tep_get_country_name($cInfo->entry_country_id) . HTML::hiddenField('entry_country_id');
        }
    } else {
        echo HTML::selectField('entry_country_id', tep_get_countries(), $cInfo->entry_country_id);
    }
    ?>
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td class="formAreaTitle"><?php 
    echo OSCOM::getDef('category_contact');
    ?>
</td>
      </tr>
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:31,代码来源:customers.php


示例8: output


//.........这里部分代码省略.........
                     $ab_query = tep_db_query('SELECT * FROM address_book WHERE customers_id = "' . $customer_id . '" AND entry_country_id IN ("' . implode('", "', parent::$available_countries) . '") AND address_book_id = "' . $c['customers_default_address_id'] . '"');
                 } else {
                     $ab_query = tep_db_query('SELECT * FROM address_book WHERE customers_id = "' . $customer_id . '" AND entry_country_id IN ("' . implode('", "', parent::$available_countries) . '")');
                 }
                 while ($ab = tep_db_fetch_array($ab_query)) {
                     $html .= '<li class="address_block clearfix">';
                     //radio button
                     if (!$is_checked) {
                         if ($_POST['address_book_id'][$block] == $ab['address_book_id']) {
                             $checked = ' checked=checked';
                             $is_checked = true;
                         } else {
                             if (isset($a_id[$block . '_address_id']) && $a_id[$block . '_address_id'] == $ab['address_book_id']) {
                                 $checked = ' checked=checked';
                                 $is_checked = true;
                             } else {
                                 if ($c['customers_default_address_id'] == $ab['address_book_id']) {
                                     $checked = ' checked=checked';
                                     $is_checked = true;
                                 }
                             }
                         }
                     } else {
                         $checked = '';
                     }
                     $html .= '<input type="radio" id="address_book_id_' . $block . '_' . $ab['address_book_id'] . '" name="address_book_id[' . $block . ']" value="' . $ab['address_book_id'] . '"' . $checked . ' />';
                     $html .= '<label for="address_book_id_' . $block . '_' . $ab['address_book_id'] . '">';
                     $html .= '<div class="address">';
                     //name
                     $html .= '<div class="address_name">' . convert_to_entities($ab['entry_firstname']) . '</div>';
                     //street
                     $html .= '<div class="address_street">' . convert_to_entities($ab['entry_street_address']) . '</div>';
                     //city + postcode + country
                     $html .= '<div class="address_city">' . $ab['entry_postcode'] . ' ' . convert_to_entities($ab['entry_city']) . ' ' . convert_to_entities(tep_get_country_name($ab['entry_country_id'])) . '</div>';
                     $html .= '</div>';
                     //end address
                     $html .= '</label>';
                     //link to delete address book item
                     if ($c['customers_default_address_id'] == $ab['address_book_id']) {
                         $html .= '<div class="delete_address">[' . Translate('Hoofdadres') . ']</div>';
                     } else {
                         $html .= '<div class="delete_address"><a href="' . tep_href_link(basename($_SERVER['PHP_SELF']), 'delete_address=' . $ab['address_book_id']) . '" title="' . Translate('Verwijder adres') . '" class="btn btn-mini">' . Translate('Verwijder adres') . '</a></div>';
                     }
                     $html .= '</li>';
                     //end address_block
                 }
                 $html .= '</ul>';
                 //end address_list
                 //link to add new address book item
                 if ($block == 'billing' && $this->config['change_billing_address']['value'] == 'true' || $block != 'billing') {
                     $html .= '<div class="add_new_address"><a href="' . tep_href_link(basename($_SERVER['PHP_SELF']), 'checkout_step=' . $step . '&add_new_address=true') . '" title="' . Translate('Nieuw adres toevoegen') . '" class="btn btn-mini"><i class="icon-plus-sign"></i> ' . Translate('Nieuw adres toevoegen') . '</a></div>';
                 }
                 $html .= '</div>';
                 //end well
                 $html .= '</div>';
                 //end span6
             }
             $html .= '</div>';
             //end row-fluid
             //eof address list
         }
     } else {
         //Not logged in
         //get last filled in data if that is available
         if ($temp_orders_id > 0) {
             $to_query = tep_db_query('SELECT * FROM temp_orders WHERE orders_id = "' . $temp_orders_id . '"');
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:67,代码来源:Customers_info_module.php


示例9: Translate

 $email_table .= Translate('Beste ') . ' ' . Translate('beheerder') . "\n\n";
 $email_table .= "\n" . sprintf(Translate('Een bezoeker heeft zich geregistreerd via %s'), STORE_NAME) . "\n\n";
 $email_table .= '<table cellspacing="0" cellpadding="3" border="0" width="100%">';
 $email_table .= '<tr><td width="150">' . Translate('Voornaam') . ': </td><td>' . $firstname . '</td></tr>';
 $email_table .= "<tr><td>" . Translate('Achternaam') . ': </td><td>' . $lastname . '</td></tr>';
 $email_table .= "<tr><td>" . Translate('E-mailadres') . ': </td><td>' . $email_address . '</td></tr>';
 if (ACCOUNT_COMPANY == 'true') {
     $email_table .= "<tr><td>" . Translate('Bedrijfsnaam') . ': </td><td>' . $company . '</td></tr>';
     $email_table .= "<tr><td>" . Translate('BTW Nummer') . ': </td><td>' . $btwnr . '</td></tr>';
 }
 $email_table .= "<tr><td>" . Translate('Straat en huisnummer') . ': </td><td>' . $street_address . '</td></tr>';
 $email_table .= "<tr><td>" . Translate('Postcode') . ': </td><td>' . $postcode . '</td></tr>';
 $email_table .= "<tr><td>" . Translate('Woonplaats') . ': </td><td>' . $city . '</td></tr>';
 $email_table .= "<tr><td>" . Translate('Telefoonnummer') . ': </td><td>' . $telephone . '</td></tr>';
 $email_table .= "<tr><td>" . Translate('Faxnummer') . ': </td><td>' . $fax . '</td></tr>';
 $email_table .= "<tr><td>" . Translate('Land') . ': </td><td>' . tep_get_country_name($country) . '</td></tr>';
 $email_table .= '</table>';
 $email_table .= "\n\n" . Translate('Zonder manuele toevoeging in het softwarepakket, zal deze klant niet toegelaten worden in het beveiligde gedeelte van de website. ') . "\n\n";
 $email_table .= '</td><td style="width: 5px;"></td></tr></table>';
 $name = $lastname . " " . $firstname;
 $Varlogo = '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . 'mail/logo.jpg" border="0" /></a> ';
 $Vartable1 = '<table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff">';
 $Vartable2 = '<table width="100%" border="0" cellpadding="3" cellspacing="3" bgcolor="#EFEFEF">';
 $Vartext1 = '<h1>' . Translate('Account aanmaken') . '</h1>';
 $Vartext2 = $email_table;
 //content
 $Varcopyright = Translate('Copyright &copy; 2010');
 $Varmailfooter = Translate('Dit email adres is ingegeven op onze website door u of door een van onze bezoekers. Als u zich niet ingeschreven hebt op onze website contacteer ons dan via') . ' <a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">' . STORE_OWNER_EMAIL_ADDRESS . '</a>';
 require DIR_WS_MODULES . 'email/html_create_account.php';
 $email_text = $html_email_text;
 //END SEND HTML EMAIL//
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:31,代码来源:create_account.php


示例10: tep_address_format

function tep_address_format($address_format_id, $address, $html, $boln, $eoln)
{
    $address_format_query = tep_db_query("select address_format as format from " . TABLE_ADDRESS_FORMAT . " where address_format_id = '" . (int) $address_format_id . "'");
    $address_format = tep_db_fetch_array($address_format_query);
    $company = tep_output_string_protected($address['company']);
    if (isset($address['firstname']) && tep_not_null($address['firstname'])) {
        $firstname = tep_output_string_protected($address['firstname']);
        $lastname = tep_output_string_protected($address['lastname']);
    } elseif (isset($address['name']) && tep_not_null($address['name'])) {
        $firstname = tep_output_string_protected($address['name']);
        $lastname = '';
    } else {
        $firstname = '';
        $lastname = '';
    }
    $street = tep_html_entity_decode(tep_output_string_protected($address['street_address']));
    $suburb = tep_html_entity_decode(tep_output_string_protected($address['suburb']));
    $city = tep_html_entity_decode(tep_output_string_protected($address['city']));
    $state = tep_html_entity_decode(tep_output_string_protected($address['state']));
    $telephone = tep_html_entity_decode($address['telephone']);
    if (isset($address['country_id']) && tep_not_null($address['country_id'])) {
        $country = tep_get_country_name($address['country_id']);
        if (isset($address['zone_id']) && tep_not_null($address['zone_id'])) {
            //		$state = tep_get_zone_code($address['country_id'], $address['zone_id'], $state);
            $state = tep_get_zone_name($address['country_id'], $address['zone_id'], $state);
        }
    } elseif (isset($address['country']) && tep_not_null($address['country'])) {
        $country = tep_output_string_protected($address['country']);
    } else {
        $country = '';
    }
    if ($state == $city) {
        $city = '';
    }
    if (tep_not_null($address['postcode'])) {
        $postcode = tep_output_string_protected($address['postcode']) . ', ';
        $zip = $postcode;
    }
    if ($html) {
        // HTML Mode
        $HR = '<hr size="1" />';
        $hr = '<hr size="1" />';
        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 != '') $state .= $street . $cr . $suburb;
    if ($country == '') {
        $country = tep_output_string_protected($address['country']);
    }
    if ($state != '' && $state != $city) {
        $statecomma = $state . ', ';
    }
    $fmt = $address_format['format'];
    eval("\$address = \"{$fmt}\";");
    if (ACCOUNT_COMPANY == 'true' && tep_not_null($company)) {
        $address = $company . $cr . $address;
    }
    while (substr(trim($address), 0, 1) == ',') {
        $address = substr(trim($address), 1);
    }
    while (preg_match('/,\\s?,/', $address)) {
        $address = preg_replace('/,\\s?,/', ',', $address);
    }
    while (strpos($address, ' ,') !== false) {
        $address = str_replace(' ,', ',', $address);
    }
    if (substr(trim($address), -1) == ',') {
        $address = substr(trim($address), 0, -1);
    }
    return trim($address);
}
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:87,代码来源:general_old.php


示例11: create_customer


//.........这里部分代码省略.........
                 if ($this->options['customers_email_address'] == 'on') {
                     $email_table .= "<tr><td>" . Translate('E-mailadres') . ': </td><td>' . $email_address . '</td></tr>';
                 }
                 //Company
                 if ($this->options['entry_company'] == 'on') {
                     $email_table .= "<tr><td>" . Translate('Bedrijfsnaam') . ': </td><td>' . $company . '</td></tr>';
                 }
                 //BTW nummer
                 if ($this->options['billing_tva_intracom'] == 'on') {
                     $email_table .= "<tr><td>" . Translate('BTW Nummer') . ': </td><td>' . $btwnr . '</td></tr>';
                 }
                 //Street address
                 if ($this->options['entry_street_address'] == 'on') {
                     $email_table .= "<tr><td>" . Translate('Straat en huisnummer') . ': </td><td>' . $street_address . '</td></tr>';
                 }
                 //Postcode
                 if ($this->options['entry_postcode'] == 'on') {
                     $email_table .= "<tr><td>" . Translate('Postcode') . ': </td><td>' . $postcode . '</td></tr>';
                 }
                 //City
                 if ($this->options['entry_city'] == 'on') {
                     $email_table .= "<tr><td>" . Translate('Woonplaats') . ': </td><td>' . $city . '</td></tr>';
                 }
                 //Telephone
                 if ($this->options['customers_telephone'] == 'on') {
                     $email_table .= "<tr><td>" . Translate('Telefoonnummer') . ': </td><td>' . $telephone . '</td></tr>';
                 }
                 //Fax
                 if ($this->options['customers_fax'] == 'on') {
                     $email_table .= "<tr><td>" . Translate('Faxnummer') . ': </td><td>' . $fax . '</td></tr>';
                 }
                 //Country
                 if ($this->options['entry_country'] == 'on') {
                     $email_table .= "<tr><td>" . Translate('Land') . ': </td><td>' . tep_get_country_name($country) . '</td></tr>';
                 }
                 $email_table .= '</table>';
                 $email_table .= '</td><td style="width: 5px;"></td></tr></table>';
                 $Varlogo = '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . 'mail/logo.jpg" border="0" /></a> ';
                 $Vartable1 = '<table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff">';
                 $Vartable2 = '<table width="100%" border="0" cellpadding="3" cellspacing="3" bgcolor="#EFEFEF">';
                 $Vartext1 = '<h1>' . Translate('Account aanmaken') . '</h1>';
                 $Vartext2 = $email_table;
                 //content
                 $Varcopyright = Translate('Copyright &copy; 2010');
                 $Varmailfooter = Translate('Dit email adres is ingegeven op onze website door u of door een van onze bezoekers. Als u zich niet ingeschreven hebt op onze website contacteer ons dan via') . ' <a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">' . STORE_OWNER_EMAIL_ADDRESS . '</a>';
                 require DIR_WS_MODULES . 'email/html_create_account.php';
                 $email_text = $html_email_text;
                 tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, Translate('Nieuwe registratie'), $email_text, $name, $email_address);
                 //Mail to customer
                 $email_table = '<table cellspacing="0" cellpadding="0" border="0" width="587" bgcolor="#ffffff">';
                 $email_table .= '<tr><td style="width:5px;"></td><td>';
                 $email_table .= Translate('Beste ') . ' ' . $name . "\n\n";
                 $email_table .= "\n\n" . Translate('Uw account voor onze website werd succesvol aangevraagd. Hieronder vind u nog eens de ingevulde gegevens. Uw gegevens zijn aan ons doorgegeven voor moderatie. Van zodra uw account geactiveerd is, ontvangt u hierover een e-mail.') . "\n\n";
                 $email_table .= '<table cellspacing="0" cellpadding="3" border="0" width="100%">';
                 $email_table .= '<tr><td width="150">' . Translate('Naam') . ': </td><td>' . $name . '</td></tr>';
                 //Email
                 if ($this->options['customers_email_address'] == 'on') {
                     $email_table .= "<tr><td>" . Translate('E-mailadres') . ': </td><td>' . $email_address . '</td></tr>';
                 }
                 //Company
                 if ($this->options['entry_company'] == 'on') {
                     $email_table .= "<tr><td>" . Translate('Bedrijfsnaam') . ': </td><td>' . $company . '</td></tr>';
                 }
                 //BTW nummer
                 if ($this->options['billing_tva_intracom'] == 'on') {
                     $email_table .= "<tr><td>" . Translate('BTW Nummer') . ': </td><td>' . $btwnr . '</td></tr>';
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:67,代码来源:Customer.php


示例12: tep_address_format

function tep_address_format($address_format_id, $address, $html, $boln, $eoln)
{
    $OSCOM_Db = Registry::get('Db');
    $Qformat = $OSCOM_Db->prepare('select address_format from :table_address_format where address_format_id = :address_format_id');
    $Qformat->bindInt(':address_format_id', $address_format_id);
    $Qformat->execute();
    $replace = ['$company' => HTML::outputProtected($address['company']), '$firstname' => '', '$lastname' => '', '$street' => HTML::outputProtected($address['street_address']), '$suburb' => HTML::outputProtected($address['suburb']), '$city' => HTML::outputProtected($address['city']), '$state' => HTML::outputProtected($address['state']), '$postcode' => HTML::outputProtected($address['postcode']), '$country' => ''];
    if (isset($address['firstname']) && tep_not_null($address['firstname'])) {
        $replace['$firstname'] = HTML::outputProtected($address['firstname']);
        $replace['$lastname'] = HTML::outputProtected($address['lastname']);
    } elseif (isset($address['name']) && tep_not_null($address['name'])) {
        $replace['$firstname'] = HTML::outputProtected($address['name']);
    }
    if (isset($address['country_id']) && tep_not_null($address['country_id'])) {
        $replace['$country'] = tep_get_country_name($address['country_id']);
        if (isset($address['zone_id']) && tep_not_null($address['zone_id'])) {
            $replace['$state'] = tep_get_zone_code($address['country_id'], $address['zone_id'], $replace['$state']);
        }
    } elseif (isset($address['country']) && tep_not_null($address['country'])) {
        $replace['$country'] = HTML::outputProtected($address['country']['title']);
    }
    $replace['$zip'] = $replace['$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 = '----------------------------------------';
    }
    $replace['$CR'] = $CR;
    $replace['$cr'] = $cr;
    $replace['$HR'] = $HR;
    $replace['$hr'] = $hr;
    $replace['$statecomma'] = '';
    $replace['$streets'] = $replace['$street'];
    if ($replace['$suburb'] != '') {
        $replace['$streets'] = $replace['$street'] . $replace['$cr'] . $replace['$suburb'];
    }
    if ($replace['$state'] != '') {
        $replace['$statecomma'] = $replace['$state'] . ', ';
    }
    $address = strtr($Qformat->value('address_format'), $replace);
    if (ACCOUNT_COMPANY == 'true' && tep_not_null($replace['$company'])) {
        $address = $replace['$company'] . $replace['$cr'] . $address;
    }
    return $address;
}
开发者ID:Akofelaz,项目名称:oscommerce2,代码行数:61,代码来源:general.php


示例13: tep_db_query

     $_SESSION['billing_same_as_customer'] = $_POST['billing_same_as_customer'];
 }
 if (isset($_POST['shipping_same_as_billing'])) {
     $_SESSION['shipping_same_as_billing'] = $_POST['shipping_same_as_billing'];
 }
 // Update Order Info
 //figure out the new currency value
 $currency_value_query = tep_db_query("SELECT value \n                                              FROM " . TABLE_CURRENCIES . " \n                                              WHERE code = '" . $_POST['update_info_payment_currency'] . "'");
 $currency_value = tep_db_fetch_array($currency_value_query);
 //figure out the country, state
 $update_customer_state = tep_get_zone_name($_POST['update_customer_country_id'], $_POST['update_customer_zone_id'], $_POST['update_customer_state']);
 $update_customer_country = tep_get_country_name($_POST['update_customer_country_id']);
 $update_billing_state = tep_get_zone_name($_POST['update_billing_country_id'], $_POST['update_billing_zone_id'], $_POST['update_billing_state']);
 $update_billing_country = tep_get_country_name($_POST['update_billing_country_id']);
 $update_delivery_state = tep_get_zone_name($_POST['update_delivery_country_id'], $_POST['update_delivery_zone_id'], $_POST['update_delivery_state']);
 $update_delivery_country = tep_get_country_name($_POST['update_delivery_country_id']);
 $sql_data_array = array('customers_name' => tep_db_input(tep_db_prepare_input($_POST['update_customer_name'])), 'customers_company' => tep_db_input(tep_db_prepare_input($_POST['update_customer_company'])), 'customers_street_address' => tep_db_input(tep_db_prepare_input($_POST['update_customer_street_address'])), 'customers_suburb' => tep_db_input(tep_db_prepare_input($_POST['update_customer_suburb'])), 'customers_city' => tep_db_input(tep_db_prepare_input($_POST['update_customer_city'])), 'customers_state' => tep_db_input(tep_db_prepare_input($update_customer_state)), 'customers_postcode' => tep_db_input(tep_db_prepare_input($_POST['update_customer_postcode'])), 'customers_country' => tep_db_input(tep_db_prepare_input($update_customer_country)), 'customers_telephone' => tep_db_input(tep_db_prepare_input($_POST['update_customer_telephone'])), 'customers_email_address' => tep_db_input(tep_db_prepare_input($_POST['update_customer_email_address'])), 'billing_name' => tep_db_input(tep_db_prepare_input(isset($_POST['billing_same_as_customer']) && $_POST['billing_same_as_customer'] == 'on' ? $_POST['update_customer_name'] : $_POST['update_billing_name'])), 'billing_company' => tep_db_input(tep_db_prepare_input(isset($_POST['billing_same_as_customer']) && $_POST['billing_same_as_customer'] == 'on' ? $_POST['update_customer_company'] : $_POST['update_billing_company'])), 'billing_street_address' => tep_db_input(tep_db_prepare_input(isset($_POST['billing_same_as_customer']) && $_POST['billing_same_as_customer'] == 'on' ? $_POST['update_customer_street_address'] : $_POST['update_billing_street_address'])), 'billing_suburb' => tep_db_input(tep_db_prepare_input(isset($_POST['billing_same_as_customer']) && $_POST['billing_same_as_customer'] == 'on' ? $_POST['update_customer_suburb'] : $_POST['update_billing_suburb'])), 'billing_city' => tep_db_input(tep_db_prepare_input(isset($_POST['billing_same_as_customer']) && $_POST['billing_same_as_customer'] == 'on' ? $_POST['update_customer_city'] : $_POST['update_billing_city'])), 'billing_state' => tep_db_input(tep_db_prepare_input(isset($_POST['billing_same_as_customer']) && $_POST['billing_same_as_customer'] == 'on' ? $update_customer_state : $update_billing_state)), 'billing_postcode' => tep_db_input(tep_db_prepare_input(isset($_POST['billing_same_as_customer']) && $_POST['billing_same_as_customer'] == 'on' ? $_POST['update_customer_postcode'] : $_POST['update_billing_postcode'])), 'billing_country' => tep_db_input(tep_db_prepare_input(isset($_POST['billing_same_as_customer']) && $_POST['billing_same_as_customer'] == 'on' ? $update_customer_country : $update_billing_country)), 'delivery_name' => tep_db_input(tep_db_prepare_input(isset($_POST['shipping_same_as_billing']) && $_POST['shipping_same_as_billing'] == 'on' ? $_POST['billing_same_as_customer'] == 'on' ? $_POST['update_customer_name'] : $_POST['update_billing_name'] : $_POST['update_delivery_name'])), 'delivery_company' => tep_db_input(tep_db_prepare_input(isset($_POST['shipping_same_as_billing']) && $_POST['shipping_same_as_billing'] == 'on' ? $_POST['billing_same_as_customer'] == 'on' ? $_POST['update_customer_company'] : $_POST['update_billing_company'] : $_POST['update_delivery_company'])), 'delivery_street_address' => tep_db_input(tep_db_prepare_input(isset($_POST['shipping_same_as_billing']) && $_POST['shipping_same_as_billing'] == 'on' ? $_POST['billing_same_as_customer'] == 'on' ? $_POST['update_customer_street_address'] : $_POST['update_billing_street_address'] : $_POST['update_delivery_street_address'])), 'delivery_suburb' => tep_db_input(tep_db_prepare_input(isset($_POST['shipping_same_as_billing']) && $_POST['shipping_same_as_billing'] == 'on' ? $_POST['billing_same_as_customer'] == 'on' ? $_POST['update_customer_suburb'] : $_POST['update_billing_suburb'] : $_POST['update_delivery_suburb'])), 'delivery_city' => tep_db_input(tep_db_prepare_input(isset($_POST['shipping_same_as_billing']) && $_POST['shipping_same_as_billing'] == 'on' ? $_POST['billing_same_as_customer'] == 'on' ? $_POST['update_customer_city'] : $_POST['update_billing_city'] : $_POST['update_delivery_city'])), 'delivery_state' => tep_db_input(tep_db_prepare_input(isset($_POST['shipping_same_as_billing']) && $_POST['shipping_same_as_billing'] == 'on' ? $_POST['billing_same_as_customer'] == 'on' ? $update_customer_state : $update_billing_state : $update_delivery_state)), 'delivery_postcode' => tep_db_input(tep_db_prepare_input(isset($_POST['shipping_same_as_billing']) && $_POST['shipping_same_as_billing'] == 'on' ? $_POST['billing_same_as_customer'] == 'on' ? $_POST['update_customer_postcode'] : $_POST['update_billing_postcode'] : $_POST['update_delivery_postcode'])), 'delivery_country' => tep_db_input(tep_db_prepare_input(isset($_POST['shipping_same_as_billing']) && $_POST['shipping_same_as_billing'] == 'on' ? $_POST['billing_same_as_customer'] == 'on' ? $update_customer_country : $update_billing_country : $update_delivery_country)), 'payment_method' => tep_db_input(tep_db_prepare_input($_POST['update_info_payment_method'])), 'currency' => tep_db_input(tep_db_prepare_input($_POST['update_info_payment_currency'])), 'currency_value' => tep_db_input(tep_db_prepare_input($currency_value['value'])), 'cc_type' => tep_db_prepare_input($_POST['update_info_cc_type']), 'cc_owner' => tep_db_prepare_input($_POST['update_info_cc_owner']), 'cc_number' => tep_db_input(tep_db_prepare_input($_POST['update_info_cc_number'])), 'cc_expires' => tep_db_prepare_input($_POST['update_info_cc_expires']), 'last_modified' => 'now()');
 tep_db_perform(TABLE_ORDERS, $sql_data_array, 'update', 'orders_id = \'' . tep_db_input($oID) . '\'');
 $order_updated = true;
 // UPDATE STATUS HISTORY & SEND EMAIL TO CUSTOMER IF NECESSARY #####
 $check_status_query = tep_db_query(" SELECT customers_name, customers_email_address, orders_status, date_purchased FROM " . TABLE_ORDERS . " WHERE orders_id = '" . (int) $oID . "'");
 $check_status = tep_db_fetch_array($check_status_query);
 if ($check_status['orders_status'] != $_POST['status'] || tep_not_null($_POST['comments'])) {
     tep_db_query("UPDATE " . TABLE_ORDERS . " SET \n              orders_status = '" . tep_db_input($_POST['status']) . "', \n              last_modified = now() \n              WHERE orders_id = '" . (int) $oID . "'");
     // Notify Customer ?
     $customer_notified = '0';
     if (isset($_POST['notify']) && $_POST['notify'] == 'on') {
         $notify_comments = '';
         if (isset($_POST['notify_comments']) && $_POST['notify_comments'] == 'on') {
             $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $_POST['comments']) . "\n\n";
         }
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:edit_orders.php


示例14: tep_db_prepare_input

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP tep_get_country_zones函数代码示例发布时间:2022-05-23
下一篇:
PHP tep_get_country_list函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap