本文整理汇总了PHP中Currency::getDefaultCurrencyName方法的典型用法代码示例。如果您正苦于以下问题:PHP Currency::getDefaultCurrencyName方法的具体用法?PHP Currency::getDefaultCurrencyName怎么用?PHP Currency::getDefaultCurrencyName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Currency
的用法示例。
在下文中一共展示了Currency::getDefaultCurrencyName方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tc
<?php
$this->pageTitle .= ' - ' . tc('My balance');
$this->breadcrumbs = array(tc('Control panel') => Yii::app()->createUrl('/usercpanel'), tc('My balance'));
$user = HUser::getModel();
echo '<b>' . tc('On the balance') . ': ' . $user->balance . ' ' . Currency::getDefaultCurrencyName() . '</b>';
echo '<br>';
echo CHtml::link(tt('Replenish the balance'), Yii::app()->createUrl('/paidservices/main/index', array('paid_id' => PaidServices::ID_ADD_FUNDS)), array('class' => 'fancy'));
示例2: getMenu
public static function getMenu()
{
$user = HUser::getModel();
if (param('useUserads')) {
$menu[] = array('label' => tc('My listings'), 'url' => Yii::app()->createUrl('/usercpanel/main/index'), 'active' => Yii::app()->controller->menuIsActive('my_listings'));
$menu[] = array('label' => tc('Add ad', 'apartments'), 'url' => Yii::app()->createUrl('/userads/main/create'), 'active' => Yii::app()->controller->menuIsActive('add_ad'));
}
if ($user->type == User::TYPE_AGENCY) {
$countAwaitAgent = HUser::getCountAwaitingAgent($user->id);
$bage = $countAwaitAgent ? ' (' . $countAwaitAgent . ')' : '';
$menu[] = array('label' => tt('My agents', 'usercpanel') . $bage, 'url' => Yii::app()->createUrl('/usercpanel/main/agents'), 'active' => Yii::app()->controller->menuIsActive('my_agents'));
}
$menu[] = array('label' => tc('My data'), 'url' => Yii::app()->createUrl('/usercpanel/main/data'), 'active' => Yii::app()->controller->menuIsActive('my_data'));
$menu[] = array('label' => tt('Change your password', 'usercpanel'), 'url' => Yii::app()->createUrl('/usercpanel/main/changepassword'), 'active' => Yii::app()->controller->menuIsActive('my_changepassword'));
if (issetModule('payment')) {
$menu[] = array('label' => tt('My payments', 'usercpanel'), 'url' => Yii::app()->createUrl('/usercpanel/main/payments'), 'active' => Yii::app()->controller->menuIsActive('my_payments'));
$menu[] = array('label' => tc('My balance') . ' (' . $user->balance . ' ' . Currency::getDefaultCurrencyName() . ')', 'url' => Yii::app()->createUrl('/usercpanel/main/balance'), 'active' => Yii::app()->controller->menuIsActive('my_balance'));
}
if (issetModule('bookingtable')) {
$menu[] = array('label' => tt('Booking applications', 'usercpanel') . ' (' . Bookingtable::getCountNew(true) . ')', 'url' => Yii::app()->createUrl('/bookingtable/main/index'), 'active' => Yii::app()->controller->menuIsActive('booking_applications'));
}
return $menu;
}
示例3: count
$productrows = $focus->getProductRows();
for ($i = 0; $i < count($productrows); $i++) {
$fieldcount = count($productrows[$i]);
$xtpl->assign("PRODUCTROWS", $focus->getProductRow($productrows[$i], $i, false));
$xtpl->parse("main.row1");
}
$xtpl_data = $focus->get_xtemplate_data();
$xtpl->assign("PAYMENT_TERM", $app_list_strings['payment_terms'][$focus->payment_term]);
require_once 'modules/Currencies/Currency.php';
$currency = new Currency();
if (isset($focus->currency_id) && !empty($focus->currency_id)) {
$currency->retrieve($focus->currency_id);
if ($currency->deleted != 1) {
$xtpl->assign("CURRENCY", $currency->name);
} else {
$xtpl->assign("CURRENCY", $currency->getDefaultCurrencyName());
}
} else {
$xtpl->assign("CURRENCY", $currency->getDefaultCurrencyName());
}
$usernameid = $xtpl_data['ASSIGNED_USER_ID'];
$xtpl_data['ASSIGNED_USER_NAME'] = get_assigned_user_name($usernameid);
$xtpl->assign("PurchaseOrder", $xtpl_data);
global $current_user;
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
$xtpl->assign("ADMIN_EDIT", "<a href='index.php?action=index&module=DynamicLayout&from_action=" . $_REQUEST['action'] . "&from_module=" . $_REQUEST['module'] . "&record=" . $_REQUEST['record'] . "'>" . get_image($image_path . "EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>");
}
$xtpl->assign("TAG", $focus->listviewACLHelper());
$detailView->processListNavigation($xtpl, "PURCHASEORDER", $offset);
$xtpl->parse("main");
$xtpl->out("main");
示例4: tc
<div id="price_fields">
<?php
echo CHtml::hiddenField('is_update', 0);
// if (issetModule('currency')) {
// echo '<div class="padding-bottom10"><small>' . tt('Price will be saved (converted) in the default currency on the site', 'apartments') . ' - ' . Currency::getDefaultCurrencyModel()->name . '</small></div>';
// }
if ($model->isPriceFromTo()) {
echo tc('price_from') . ' ' . $form->textField($model, 'price', array('class' => 'width100 noblock'));
echo ' ' . tc('price_to') . ' ' . $form->textField($model, 'price_to', array('class' => 'width100'));
} else {
echo $form->textField($model, 'price', array('class' => 'width100'));
}
if (issetModule('currency')) {
// Даем вводить ценую только в дефолтной валюте
echo ' ' . Currency::getDefaultCurrencyName();
$model->in_currency = Currency::getDefaultCurrencyModel()->char_code;
echo $form->hiddenField($model, 'in_currency');
// $form->dropDownList($model, 'in_currency', Currency::getActiveCurrencyArray(2), array('class' => 'width120'))
} else {
echo ' ' . param('siteCurrency', '$');
}
if ($model->type == Apartment::TYPE_RENT) {
$priceArray = Apartment::getPriceArray($model->type);
if (!in_array($model->price_type, array_keys($priceArray))) {
$model->price_type = Apartment::PRICE_PER_MONTH;
}
echo ' ' . $form->dropDownList($model, 'price_type', Apartment::getPriceArray($model->type), array('class' => 'width150'));
}
?>
</div>
示例5: getPriceAndCurrency
public function getPriceAndCurrency()
{
return $this->price . ' ' . Currency::getDefaultCurrencyName();
}
示例6:
</a>
<a class="reg-btn" href="/logout">Выход</a>
</div>
<div class="user-register">
<ul class="pull-left info-block">
<li><span>ID: <?php
echo $user->id;
?>
</span></li>
<li class="hr-vr"></li>
<li>
<a href="">Баланс:</a> <?php
echo $user->balance;
?>
<?php
echo Currency::getDefaultCurrencyName();
?>
</li>
<li class="hr-vr"></li>
<li><a href="">Избранное:</a> 3</li>
<li class="hr-vr"></li>
<li><a href="">Закладки:</a> 2</li>
</ul>
<!--<ul class="pull-right account-block">
<li><a href="/usercpanel">Личный кабинет</a></li>
<li><a href="/logout">Выйти</a></li>
</ul> -->
</div>
<?php
}
?>
示例7: Currency
require_once 'modules/Currencies/Currency.php';
$currency = new Currency();
//HTML2FPDF contains the functions - headerPDF, footerPDF, createHeading, createTr
$pdf = new HTML2FPDF();
//Shortcuts
$stage = $app_list_strings['quote_stage_dom'][$focus->stage];
$payment_term = $app_list_strings['payment_terms'][$focus->payment_term];
$shipping_term = $app_list_strings['shipping_term_dom'][$focus->shipping_term];
$payment_method = $app_list_strings['payment_method_dom'][$focus->payment_method];
$address = $focus->billtocity . ", " . $focus->billpostalcode . ", " . $focus->billtostate . ", " . $focus->billtocountry;
if (isset($focus->currency_id) && !empty($focus->currency_id)) {
$currency->retrieve($focus->currency_id);
if ($currency->deleted != 1) {
$curr = $currency->name;
} else {
$curr = $currency->getDefaultCurrencyName();
}
} else {
${$curr} = $currency->getDefaultCurrencyName();
}
//begin the Body's html creation (the Header and Footer are called later)
$bodyHtml .= $pdf->sectionHeading($mod_strings["LBL_MODULE_NAME"], $focus->name, $focus->quotenum);
$bodyHtml .= $pdf->createHeading();
$bodyHtml .= $pdf->createTr(false, $mod_strings["LBL_NAME"], $focus->name, $mod_strings["LBL_QUOTENUM"], $focus->quotenum);
$bodyHtml .= $pdf->createTr(false, $mod_strings["LBL_OPPORTUNITY_NAME"], $focus->opportunity_name, $mod_strings["LBL_STAGE"], $stage);
$bodyHtml .= $pdf->createTr(false, $mod_strings["LBL_ACCOUNT_NAME"], $focus->account_name, $mod_strings["LBL_BILLTOCONTACTNAME"], $focus->billtocontactname);
$bodyHtml .= $pdf->createTr(false, $mod_strings["LBL_CURRENCY"], $curr, $mod_strings["LBL_PAYMENT_METHOD"], $payment_method);
$bodyHtml .= $pdf->createTr(false, $mod_strings["LBL_PAYMENT_TERM"], $payment_term, $mod_strings["LBL_SHIPPING_TERM"], $shipping_term);
$bodyHtml .= $pdf->createTr(false, $mod_strings["LBL_ASSIGNEDUSER"], $focus->assigned_user_name, $mod_strings["LBL_VALIDUNTIL"], $focus->validuntil);
$bodyHtml .= $pdf->createTr(true, $mod_strings["LBL_BILLTOADDRESS"], $address);
$bodyHtml .= $pdf->createHeading($mod_strings["LBL_LINEITEMS"]);
示例8: tc
echo '<p>' . $paidService->description . '</p>';
}
echo CHtml::beginForm(array('/paidservices/main/index'));
echo CHtml::hiddenField('pay_submit', 1);
?>
<?php
if ($paidService->id == PaidServices::ID_ADD_FUNDS) {
?>
<p>
<div class="rowold">
<?php
echo tc('Add amount of');
?>
<?php
echo CHtml::textField('amount', 100) . ' ' . Currency::getDefaultCurrencyName();
?>
</div>
</p>
<?php
} else {
?>
<p>
<?php
echo tc('Will be used for listings');
?>
ID: <?php
echo CHtml::link($ad_id, Apartment::getUrlById($ad_id));
?>
</p>
<?php
示例9: getMenu
public static function getMenu()
{
$user = HUser::getModel();
if (param('useUserads')) {
$menu[] = array('label' => tc('My listings'), 'url' => Yii::app()->createUrl('/usercpanel/main/index'), 'active' => Yii::app()->controller->menuIsActive('my_listings'));
$menu[] = array('label' => tc('Add ad', 'apartments'), 'url' => Yii::app()->createUrl('/userads/main/create'), 'active' => Yii::app()->controller->menuIsActive('add_ad'));
}
if ($user->type == User::TYPE_AGENCY) {
$countAwaitAgent = HUser::getCountAwaitingAgent($user->id);
$bage = $countAwaitAgent ? ' (' . $countAwaitAgent . ')' : '';
$menu[] = array('label' => tt('My agents', 'usercpanel') . $bage, 'url' => Yii::app()->createUrl('/usercpanel/main/agents'), 'active' => Yii::app()->controller->menuIsActive('my_agents'));
}
if (issetModule('messages')) {
$bageMessages = '';
$countMessagesUnread = Messages::getCountUnread(Yii::app()->user->id);
$bageMessages = $countMessagesUnread > 0 ? " ({$countMessagesUnread})" : '';
$menu[] = array('label' => tt('My mailbox', 'messages') . $bageMessages, 'url' => Yii::app()->createUrl('/messages/main/index'), 'active' => Yii::app()->controller->menuIsActive('my_mailbox'));
if ($countMessagesUnread > 0) {
Yii::app()->clientScript->registerScript('init-cnt-unr-messages', '
message("' . Yii::t('module_messages', 'You have {n} unread messages', $countMessagesUnread) . '", "message", 4000);
', CClientScript::POS_READY);
}
}
$menu[] = array('label' => tc('My data'), 'url' => Yii::app()->createUrl('/usercpanel/main/data'), 'active' => Yii::app()->controller->menuIsActive('my_data'));
$menu[] = array('label' => tt('Change your password', 'usercpanel'), 'url' => Yii::app()->createUrl('/usercpanel/main/changepassword'), 'active' => Yii::app()->controller->menuIsActive('my_changepassword'));
if (issetModule('payment')) {
if (issetModule('tariffPlans')) {
$menu[] = array('label' => tc('Tariff Plans'), 'url' => Yii::app()->createUrl('/tariffPlans/main/index'), 'active' => Yii::app()->controller->menuIsActive('tariff_plans'));
}
$menu[] = array('label' => tt('My payments', 'usercpanel'), 'url' => Yii::app()->createUrl('/usercpanel/main/payments'), 'active' => Yii::app()->controller->menuIsActive('my_payments'));
$menu[] = array('label' => tc('My balance') . ' (' . $user->balance . ' ' . Currency::getDefaultCurrencyName() . ')', 'url' => Yii::app()->createUrl('/usercpanel/main/balance'), 'active' => Yii::app()->controller->menuIsActive('my_balance'));
}
if (issetModule('bookingtable')) {
$menu[] = array('label' => tt('Booking applications', 'usercpanel') . ' (' . Bookingtable::getCountNew(true) . ')', 'url' => Yii::app()->createUrl('/bookingtable/main/index'), 'active' => Yii::app()->controller->menuIsActive('booking_applications'));
}
return $menu;
}
示例10: testgetDefaultCurrencyName
public function testgetDefaultCurrencyName()
{
$currency = new Currency();
$this->assertEquals('US Dollars', $currency->getDefaultCurrencyName());
}
示例11: array
function get_next_row($result_field_name = 'result', $column_field_name = 'display_columns', $skip_non_summary_columns = false, $exporting = false)
{
global $current_user;
$chart_cells = array();
if ($this->do_export) {
$db_row = $this->db->fetchByAssoc($this->{$result_field_name}, false);
} else {
$db_row = $this->db->fetchByAssoc($this->{$result_field_name});
}
if ($db_row == 0 || sizeof($db_row) == 0) {
return 0;
}
// Call custom hooks
if (isset($this->full_bean_list) && is_array($this->full_bean_list) && array_key_exists('self', $this->full_bean_list) && is_object($this->full_bean_list['self']) && method_exists($this->full_bean_list['self'], 'call_custom_logic')) {
$this->full_bean_list['self']->call_custom_logic('process_report_row', array('row' => &$db_row, 'reporter' => $this));
}
if ($result_field_name == 'summary_result') {
if (!empty($this->child_filter) && !empty($db_row[$this->child_filter_name])) {
$this->child_filter_by = $db_row[$this->child_filter_name];
} else {
$this->child_filter = '';
$this->child_filter_by = '';
$this->child_filter_name = '';
}
}
$row = array();
$cells = array();
$fields = array();
foreach ($db_row as $key => $value) {
//if value is null or not set, then change to empty string. This prevents array index errors while processing
$fields[strtoupper($key)] = is_null($value) ? '' : $value;
}
// here we want to make copies, so use foreach
foreach ($this->report_def[$column_field_name] as $display_column) {
$display_column['table_alias'] = $this->getTableFromField($display_column);
$this->register_field_for_query($display_column);
if ($skip_non_summary_columns && empty($display_column['group_function'])) {
if ($exporting || $this->plain_text_output) {
array_push($cells, ' ');
} else {
array_push($cells, ' ');
}
continue;
}
$display_column['fields'] = $fields;
if ($this->plain_text_output == true) {
/*nsingh: bug 13554- date and time fields must be displayed using user's locale settings.
* Since to_pdf uses plain_text_output=true, we handle the date and time case here by using the 'List' context of the layout_manager
*/
if ($display_column['type'] == 'date' || $display_column['type'] == 'time' || $display_column['type'] == 'datetimecombo') {
$this->layout_manager->setAttribute('context', 'List');
} else {
$this->layout_manager->setAttribute('context', 'ListPlain');
}
} else {
$this->layout_manager->setAttribute('context', 'List');
}
// Make sure 'AVG' aggregate is shown as float, regardless of the original field type
if (!empty($display_column['group_function']) && strtolower($display_column['group_function']) === 'avg' && $display_column['type'] != 'currency') {
$display_column['type'] = 'float';
}
if ($display_column['type'] != 'currency' || substr_count($display_column['name'], '_usdoll') == 0 && (isset($display_column['group_function']) ? $display_column['group_function'] != 'weighted_amount' && $display_column['group_function'] != 'weighted_sum' : true)) {
$pos = $display_column['table_key'];
$module_name = '';
if ($pos) {
$module_name = substr($pos, strrpos($pos, ':') + 1);
}
$field_name = $this->getColumnFieldName($display_column);
if ($module_name == 'currencies' && empty($display_column['fields'][$field_name])) {
switch ($display_column['name']) {
case 'iso4217':
$display = $this->currency_obj->getDefaultISO4217();
break;
case 'symbol':
$display = $this->currency_obj->getDefaultCurrencySymbol();
break;
case 'name':
$display = $this->currency_obj->getDefaultCurrencyName();
break;
default:
$display = $this->layout_manager->widgetDisplay($display_column);
}
$display_column['fields'][$field_name] = $display;
} else {
if (!empty($field_name) && isset($display_column['fields'][$field_name])) {
$display_column['fields'][$field_name] = $this->db->fromConvert($display_column['fields'][$field_name], $display_column['type']);
}
$display = $this->layout_manager->widgetDisplay($display_column);
}
} else {
if (isset($display_column['group_function'])) {
$field_name = $this->getTruncatedColumnAlias(strtoupper($display_column['table_alias']) . "_" . strtoupper($display_column['group_function']) . "_" . strtoupper($display_column['name']));
} else {
unset($field_name);
}
if (!isset($field_name) || !isset($display_column['fields'][$field_name])) {
$field_name = $this->getTruncatedColumnAlias(strtoupper($display_column['table_alias']) . "_" . strtoupper($display_column['name']));
}
if (isset($display_column['fields'][$field_name])) {
$display = $display_column['fields'][$field_name];
//.........这里部分代码省略.........