本文整理汇总了PHP中oos_get_country_name函数的典型用法代码示例。如果您正苦于以下问题:PHP oos_get_country_name函数的具体用法?PHP oos_get_country_name怎么用?PHP oos_get_country_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了oos_get_country_name函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
$zones_result =& $dbconn->Execute($zones_query);
while ($zones = $zones_result->fields)
{
$zones_names[] = $zones['zone_name'];
$zones_values[] = $zones['zone_name'];
$zones_result->MoveNext();
}
$oSmarty->assign('zones_names', $zones_names);
$oSmarty->assign('zones_values', $zones_values);
} else {
$state = oos_get_zone_name($country, $zone_id, $state);
$oSmarty->assign('state', $state);
$oSmarty->assign('zone_id', $zone_id);
}
$country_name = oos_get_country_name($country);
$oSmarty->assign('country_name', $country_name);
if ($newsletter == '1') {
$news = $aLang['entry_newsletter_yes'];
} else {
$news = $aLang['entry_newsletter_no'];
}
$oSmarty->assign('news', $news);
$oos_pagetitle = $oBreadcrumb->trail_title(' » ');
$oos_pagetitle .= '»' . OOS_META_TITLE;
// assign Smarty variables;
$oSmarty->assign(
array(
'pagetitle' => htmlspecialchars($oos_pagetitle),
示例2: oos_address_format
function oos_address_format($address_format_id, $address, $html, $boln, $eoln) {
$dbconn =& oosDBGetConn();
$oostable =& oosDBGetTables();
$address_formattable = $oostable['address_format'];
$query = "SELECT address_format as format
FROM $address_formattable
WHERE address_format_id = '" . $address_format_id . "'";
$result =& $dbconn->Execute($query);
$address_format = $result->fields;
// Close result set
$result->Close();
$company = addslashes($address['company']);
$firstname = addslashes($address['firstname']);
$lastname = addslashes($address['lastname']);
$street = addslashes($address['street_address']);
$suburb = addslashes($address['suburb']);
$city = addslashes($address['city']);
$state = addslashes($address['state']);
$country_id = $address['country_id'];
$zone_id = $address['zone_id'];
$postcode = addslashes($address['postcode']);
$zip = $postcode;
$country = oos_get_country_name($country_id);
$state = oos_get_zone_code($country_id, $zone_id, $state);
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 ($firstname == '') $firstname = addslashes($address['name']);
if ($country == '') $country = addslashes($address['country']);
if ($state != '') $statecomma = $state . ', ';
$fmt = $address_format['format'];
eval("\$address = \"$fmt\";");
$address = stripslashes($address);
if ( (ACCOUNT_COMPANY == '1') && (!empty($company)) ) {
$address = $company . $cr . $address;
}
return $boln . $address . $eoln;
}
示例3: defined
----------------------------------------------------------------------
Released under the GNU General Public License
---------------------------------------------------------------------- */
/** ensure this file is being included by a parent file */
defined('OOS_VALID_MOD') or die('Direct Access to this location is not allowed.');
if ($oEvent->installed_plugin('down_for_maintenance')) {
return false;
}
if ($sPage == $aPages['customers_image']) {
return false;
}
$myworld_block = '0';
if (isset($_SESSION['customer_id'])) {
$myworld_block = '1';
$customerstable = $oostable['customers'];
$address_bookstable = $oostable['address_book'];
$customers_infotable = $oostable['customers_info'];
$sql = "SELECT c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_image,\n a.entry_city, a.entry_country_id, ci.customers_info_date_account_created AS date_account_created\n FROM {$customerstable} c,\n {$address_bookstable} a,\n {$customers_infotable} ci\n WHERE c.customers_id = '" . intval($_SESSION['customer_id']) . "'\n AND a.customers_id = c.customers_id\n AND ci.customers_info_id = c.customers_id\n AND a.address_book_id = '" . intval($_SESSION['customer_default_address_id']) . "'";
$myworld = $dbconn->GetRow($sql);
if ($myworld['customers_gender'] == 'm') {
$myworld_gender = $aLang['male'];
} elseif ($account['customers_gender'] == 'f') {
$myworld_gender = $aLang['female'];
}
$sCountryName = oos_get_country_name($myworld['entry_country_id']);
$sAccountCreated = oos_date_short($myworld['date_account_created']);
// assign Smarty variables;
$oSmarty->assign(array('myworld' => $myworld, 'myworld_gender' => $myworld_gender, 'country_name' => $sCountryName, 'account_created' => $sAccountCreated));
}
$oSmarty->assign('block_heading_myworld', $block_heading);
$oSmarty->assign('myworld_block', $myworld_block);
示例4: smarty_function_oos_address_format
function smarty_function_oos_address_format($params, &$smarty)
{
MyOOS_CoreApi::requireOnce('lib/smarty/libs/plugins/shared.escape_special_chars.php');
$address_format_id = '';
$address = '';
$html = '';
$boln = '';
$eoln = '<br />';
foreach ($params as $_key => $_val) {
${$_key} = smarty_function_escape_special_chars($_val);
}
$dbconn =& oosDBGetConn();
$oostable =& oosDBGetTables();
$address_formattable = $oostable['address_format'];
$query = "SELECT address_format AS format\n FROM {$address_formattable}\n WHERE address_format_id = '" . intval($address_format_id) . "'";
$address_format = $dbconn->GetRow($query);
$company = addslashes($address['company']);
$firstname = addslashes($address['firstname']);
$lastname = addslashes($address['lastname']);
$street = addslashes($address['street_address']);
$suburb = addslashes($address['suburb']);
$city = addslashes($address['city']);
$state = addslashes($address['state']);
$country_id = $address['country_id'];
$zone_id = $address['zone_id'];
$postcode = addslashes($address['postcode']);
$zip = $postcode;
$country = oos_get_country_name($country_id);
$state = oos_get_zone_code($country_id, $zone_id, $state);
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 ($firstname == '') {
$firstname = addslashes($address['name']);
}
if ($country == '') {
$country = addslashes($address['country']);
}
if ($state != '') {
$statecomma = $state . ', ';
}
$fmt = $address_format['format'];
eval("\$address = \"{$fmt}\";");
$address = stripslashes($address);
if (ACCOUNT_COMPANY == '1' && oos_is_not_null($company)) {
$address = $company . $cr . $address;
}
print $boln . $address . $eoln;
}
示例5: defined
defined('OOS_VALID_MOD') or die('Direct Access to this location is not allowed.');
if (!isset($_SESSION['customer_id'])) {
$_SESSION['navigation']->set_snapshot();
MyOOS_CoreApi::redirect(oos_href_link($aModules['user'], $aFilename['login'], '', 'SSL'));
}
require 'includes/languages/' . $sLanguage . '/user_account.php';
$customerstable = $oostable['customers'];
$address_bookstable = $oostable['address_book'];
$sql = "SELECT c.customers_gender, c.customers_firstname, c.customers_lastname,\n c.customers_dob, c.customers_number, c.customers_email_address,\n c.customers_vat_id, c.customers_telephone, c.customers_fax, c.customers_newsletter,\n a.entry_company, a.entry_owner, a.entry_street_address, a.entry_suburb,\n a.entry_postcode, a.entry_city, a.entry_zone_id, a.entry_state,\n a.entry_country_id\n FROM {$customerstable} c,\n {$address_bookstable} a\n WHERE c.customers_id = '" . intval($_SESSION['customer_id']) . "'\n AND a.customers_id = c.customers_id\n AND a.address_book_id = '" . intval($_SESSION['customer_default_address_id']) . "'";
$account = $dbconn->GetRow($sql);
if ($account['customers_gender'] == 'm') {
$gender = $aLang['male'];
} elseif ($account['customers_gender'] == 'f') {
$gender = $aLang['female'];
}
$sCountryName = oos_get_country_name($account['entry_country_id']);
if ($account['customers_newsletter'] == '1') {
$newsletter = $aLang['entry_newsletter_yes'];
} else {
$newsletter = $aLang['entry_newsletter_no'];
}
// links breadcrumb
$oBreadcrumb->add($aLang['navbar_title'], oos_href_link($aModules['user'], $aFilename['account'], '', 'SSL'));
$aOption['template_main'] = $sTheme . '/modules/user_account.html';
$aOption['page_heading'] = $sTheme . '/heading/page_heading.html';
$nPageType = OOS_PAGE_TYPE_ACCOUNT;
require 'includes/oos_system.php';
if (!isset($option)) {
require 'includes/info_message.php';
require 'includes/oos_blocks.php';
}
示例6: oos_cfg_get_country_name
/**
* Alias function to oos_get_country_name, which also returns the country name
*
* @param $country_id
* @return string
*/
function oos_cfg_get_country_name($country_id) {
return oos_get_country_name($country_id);
}
示例7: oos_address_format
/**
* Return a formatted address
*
* @param $address_format_id
* @param $address
* @param $html
* @param $boln
* @param $eoln
* @return string
*/
function oos_address_format($address_format_id, $address, $html, $boln, $eoln)
{
// Get database information
$dbconn =& oosDBGetConn();
$oostable =& oosDBGetTables();
$address_formattable = $oostable['address_format'];
$address_format_result = $dbconn->Execute("SELECT address_format AS format FROM {$address_formattable} WHERE address_format_id = '" . intval($address_format_id) . "'");
$address_format = $address_format_result->fields;
$company = addslashes($address['company']);
$firstname = addslashes($address['firstname']);
$lastname = addslashes($address['lastname']);
$street = addslashes($address['street_address']);
$suburb = addslashes($address['suburb']);
$city = addslashes($address['city']);
$state = addslashes($address['state']);
$country_id = $address['country_id'];
$zone_id = $address['zone_id'];
$postcode = addslashes($address['postcode']);
$zip = $postcode;
$country = oos_get_country_name($country_id);
$state = oos_get_zone_code($country_id, $zone_id, $state);
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 ($firstname == '') {
$firstname = addslashes($address['name']);
}
if ($country == '') {
$country = addslashes($address['country']);
}
if ($state != '') {
$statecomma = $state . ', ';
}
$fmt = $address_format['format'];
eval("\$address = \"{$fmt}\";");
$address = stripslashes($address);
if (ACCOUNT_COMPANY == '1' && oos_is_not_null($company)) {
$address = $company . $cr . $address;
}
return $boln . $address . $eoln;
}