本文整理汇总了PHP中iaLanguage::set方法的典型用法代码示例。如果您正苦于以下问题:PHP iaLanguage::set方法的具体用法?PHP iaLanguage::set怎么用?PHP iaLanguage::set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类iaLanguage
的用法示例。
在下文中一共展示了iaLanguage::set方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$iaView->assign('items', $iaInvoice->getItemsByInvoiceId($invoice['id']));
$iaView->disableLayout();
echo $iaView->display('invoice');
return;
} else {
return iaView::errorPage(iaView::ERROR_NOT_FOUND);
}
}
iaUsers::reloadIdentity();
if (isset($_POST['amount'])) {
$amount = (double) $_POST['amount'];
if ($amount > 0) {
if ($amount >= (double) $iaCore->get('funds_min_deposit') && $amount <= (double) $iaCore->get('funds_max_deposit')) {
$iaTransaction->createInvoice(iaLanguage::get('funds'), $amount, iaTransaction::TRANSACTION_MEMBER_BALANCE, iaUsers::getIdentity(true), $profilePageUrl);
} else {
iaLanguage::set('amount_incorrect', iaLanguage::getf('amount_incorrect', array('min' => $iaCore->get('funds_min_deposit'), 'max' => $iaCore->get('funds_max_deposit'), 'currency' => $iaCore->get('currency'))));
$iaView->setMessages(iaLanguage::get('amount_incorrect'));
}
} else {
$iaView->setMessages(iaLanguage::get('amount_incorrect'));
}
}
$pagination = array('page' => 1, 'limit' => 10, 'total' => 0, 'template' => $profilePageUrl . 'funds/?page={page}');
$pagination['page'] = isset($_GET['page']) && 1 < $_GET['page'] ? (int) $_GET['page'] : $pagination['page'];
$pagination['page'] = ($pagination['page'] - 1) * $pagination['limit'];
$transactions = $iaDb->all('SQL_CALC_FOUND_ROWS *', '`member_id` = ' . iaUsers::getIdentity()->id . ' ORDER BY `status`', $pagination['page'], $pagination['limit'], iaTransaction::getTable());
$pagination['total'] = $iaDb->foundRows();
$iaView->caption($iaView->title() . ': ' . number_format(iaUsers::getIdentity()->funds, 2, '.', '') . ' ' . $iaCore->get('currency'));
$iaView->assign('pagination', $pagination);
$iaView->assign('transactions', $transactions);
$iaView->display('transactions');
示例2: array
$iaView->setMessages(iaLanguage::get('this_transaction_already_passed'), iaView::ALERT);
iaUtil::go_to($iaPage->getUrlByName('member_funds'));
}
break;
case iaTransaction::REFUNDED:
case iaTransaction::FAILED:
$iaView->setMessages($messages);
iaUtil::go_to($iaPage->getUrlByName('member_funds'));
break;
default:
$error = true;
$messages[] = 'Unknown status';
}
$iaView->setMessages($messages, $error ? iaView::ERROR : iaView::SUCCESS);
$memberBalance = iaUsers::hasIdentity() ? iaUsers::getIdentity()->funds : 0;
iaLanguage::set('funds_in_your_account', iaLanguage::getf('funds_in_your_account', array('sum' => $memberBalance, 'currency' => $iaCore->get('currency'))));
$isBalancePayment = iaUsers::hasIdentity() && iaTransaction::TRANSACTION_MEMBER_BALANCE == $transaction['item'] && iaUsers::getIdentity()->id == $transaction['item_id'];
$isFundsEnough = (bool) (!$isBalancePayment && iaUsers::hasIdentity() && iaUsers::getIdentity()->funds >= $transaction['amount']);
// FIXME: solution to prevent csrf catching.
// Should be replaced once it is possible to disable csrf checking for a single page.
if (isset($_POST)) {
$paymentPost = $_POST;
if (isset($_SERVER['HTTP_ORIGIN'])) {
$wwwChunk = 'www.';
$referrerDomain = explode(IA_URL_DELIMITER, $_SERVER['HTTP_ORIGIN']);
$referrerDomain = strtolower($referrerDomain[2]);
$referrerDomain = str_replace($wwwChunk, '', $referrerDomain);
$domain = explode(IA_URL_DELIMITER, $iaCore->get('baseurl'));
$domain = strtolower($domain[2]);
$domain = str_replace($wwwChunk, '', $domain);
if ($referrerDomain !== $domain) {
示例3: str_replace
// latest lyrics
if ($iaView->blockExists('latest_lyrics')) {
$sql2 = "ORDER BY t1.`date_added` DESC LIMIT 0, " . $defaultLimit;
$iaView->assign('latest_lyrics', $iaDb->getAll($sql . $sql2));
}
// popular lyrics
if ($iaView->blockExists('popular_lyrics')) {
$sql2 = "ORDER BY t1.`views_num` DESC LIMIT 0, " . $defaultLimit;
$iaView->assign('popular_lyrics', $iaDb->getAll($sql . $sql2));
}
// new lyrics
$new_lyrics = $iaLyric->getLyrics(false, 0, 50);
if ($new_lyrics) {
$new_lyrics = $iaItem->updateItemsFavorites($new_lyrics, 'lyrics');
} else {
iaLanguage::set('no_lyrics', str_replace('{%URL%}', $iaCore->packagesData['lyrics']['url'] . 'add/', iaLanguage::get('no_lyrics')));
}
$iaView->assign('new_lyrics', $new_lyrics);
// genres
$iaCore->iaDb->setTable('lyrics_genres');
$genres_list = $iaCore->iaDb->all("*", "`status` = 'active' ORDER BY `title` ASC");
$iaCore->iaDb->resetTable();
$iaView->assign('genres_list', $genres_list);
// top artists
if ($iaView->blockExists('top_artists')) {
$top_artists = $iaArtist->getTopArtists();
$iaView->assign('top_artists', $top_artists);
}
// new artists
if ($iaView->blockExists('new_artists')) {
$new_artists = $iaArtist->getLatestArtists();