本文整理汇总了PHP中getMsg函数的典型用法代码示例。如果您正苦于以下问题:PHP getMsg函数的具体用法?PHP getMsg怎么用?PHP getMsg使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getMsg函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPresentOrderTotalAndCurrency
function getPresentOrderTotalAndCurrency($order_id)
{
$currency_id = modApiFunc("Localization", "whichCurrencySendOrderToPaymentShippingGatewayIn", $order_id, $this->getUid());
$currency = modApiFunc("Localization", "getCurrencyCodeById", $currency_id);
$order = modApiFunc('Checkout', 'getOrderInfo', $order_id, $currency_id);
return array('total' => floatval($order['Total']), 'curr' => $currency, 'msg' => getMsg('CHCKT', 'PAYMENT_STATUS_SUSPICIOUS'));
}
示例2: onAction
function onAction()
{
global $application;
$emails_keys = modApiFunc('Request', 'getValueByKey', 'emails');
$emails_topics = modApiFunc('Request', 'getValueByKey', 'topic');
$customer_id = modApiFunc('Request', 'getValueByKey', 'customer_id');
if (!is_array($emails_topics)) {
$emails_topics = array();
}
foreach (array_keys($emails_keys) as $email) {
$topics = @$emails_topics[$email];
if (!is_array($topics)) {
$topics = array();
}
modApiFunc('Subscriptions', 'changeSubscriptions', $email, $topics);
$params = array('customer_id' => $customer_id, 'email' => $email);
execQuery('SUBSCR_LINK_SUBSCRIPTION_TO_CUSTOMER', $params);
}
$messages['MESSAGES'][] = getMsg('SYS', 'SUBSCRIPTIONS_UPDATED');
modApiFunc('Session', 'set', 'AplicationSettingsMessages', $messages);
$request = new Request();
$request->setView(CURRENT_REQUEST_URL);
$request->setKey('page_view', modApiFunc('Request', 'getValueByKey', 'page_view'));
$request->setKey('customer_id', $customer_id);
$application->redirect($request);
}
示例3: about_content
function about_content()
{
global $mos;
global $nav_lang;
if (!isset($_REQUEST['mod'])) {
return;
}
$mod = $_REQUEST['mod'];
$fa = $mos . '/etc/about/' . $mod . '.' . $nav_lang . '.html';
if (file_exists($fa)) {
readfile($fa);
return;
}
$fa = $mos . '/etc/about/' . $mod . '.en.html';
if (file_exists($fa)) {
readfile($fa);
return;
}
$fa = $mos . '/etc/about/' . $mod . '.ru.html';
if (file_exists($fa)) {
readfile($fa);
} else {
echo getMsg('coreNoAbout');
}
}
示例4: onAction
function onAction()
{
$errors = array();
$topics = modApiFunc('Request', 'getValueByKey', 'topic');
if ($topics && is_array($topics)) {
$this->key = modApiFunc('Request', 'getValueByKey', 'key_unsubscribe');
$this->rec = modApiFunc('Newsletter', 'getUnsubscribeRecord', $this->key);
if ($this->rec) {
$email = modApiFunc('Subscriptions', 'getEmailById', $this->rec['email_id']);
if ($email) {
modApiFunc('Subscriptions', 'unsubscribeEmails', $topics, $email);
} else {
$errors[] = getMsg('SUBSCR', 'ERROR_UNSUBSCRIBE_GENERAL');
}
} else {
$errors[] = getMsg('SUBSCR', 'ERROR_UNSUBSCRIBE_GENERAL');
}
} else {
$errors[] = getMsg('SUBSCR', 'ERROR_UNSUBSCRIBE_NO_TOPICS');
}
$SessionPost['ViewState']['ErrorsArray'] = $errors;
$SessionPost['ViewState']['Stage'] = 'finish';
modApiFunc('Session', 'set', 'SessionPost', $SessionPost);
global $application;
$request = new Request();
$request->setView(CURRENT_REQUEST_URL);
$application->redirect($request);
}
示例5: getTag
function getTag($tag)
{
global $application;
$value = null;
switch ($tag) {
case 'Local_PaymentMethodName':
$ModuleInfo = modApiFunc($this->ModuleAPIClassName, "getInfo");
$value = $ModuleInfo['Name'];
break;
case 'Local_PaymentMethodMessage':
$cost = modApiFunc($this->ModuleAPIClassName, "getPerOrderPaymentModuleShippingFee");
if (!empty($cost)) {
$value = getMsg("PM_COD", "MODULE_PER_ORDER_SHIPPING_FEE_CZ_TEXT");
$value = str_replace("{cost}", modApiFunc("Localization", "currency_format", $cost), $value);
} else {
$value = "";
}
break;
// $ModuleInfo = modApiFunc($this->ModuleAPIClassName, "getInfo");
// $value = "<b>" . $ModuleInfo['Description'] . "</b>";
// break;
// $ModuleInfo = modApiFunc($this->ModuleAPIClassName, "getInfo");
// $value = "<b>" . $ModuleInfo['Description'] . "</b>";
// break;
default:
break;
}
return $value;
}
示例6: outputTaxNamesList
function outputTaxNamesList()
{
global $application;
$retval = "";
if ($this->TaxNamesList == NULL) {
$retval .= modApiFunc('TmplFiller', 'fill', "taxes/tax-settings/", "tax_name_item_na.tpl.html", array());
for ($i = 0; $i < $this->maxRows - 1; $i++) {
$retval .= modApiFunc('TmplFiller', 'fill', "taxes/tax-settings/", "tax_name_item_empty.tpl.html", array());
}
} else {
$n = sizeof($this->TaxNamesList);
$i = 1;
foreach ($this->TaxNamesList as $TaxNameInfo) {
$TaxNameInfo['included_into_price'] = $TaxNameInfo['included_into_price'] == "true" ? "<i>(" . getMsg('SYS', 'TAX_NAMES_HEADER_003') . ")</i>" : "";
if ($TaxNameInfo['NeedsAddress'] == DB_TRUE) {
$TaxNameInfo['Address'] = $this->MessageResources->getMessage($TaxNameInfo['Address']);
} else {
$TaxNameInfo['Address'] = $this->MessageResources->getMessage('TAX_ADDRESS_NAME_1025');
}
$TaxNameInfo['I'] = $i;
$TaxNameInfo['Name'] = prepareHTMLDisplay($TaxNameInfo['Name']);
$this->_Template_Contents = $TaxNameInfo;
$application->registerAttributes($this->_Template_Contents);
$retval .= modApiFunc('TmplFiller', 'fill', "taxes/tax-settings/", "tax_name_item.tpl.html", array());
$i++;
}
if ($n < $this->maxRows) {
for ($i = 0; $i < $this->maxRows - $n; $i++) {
$retval .= modApiFunc('TmplFiller', 'fill', "taxes/tax-settings/", "tax_name_item_empty.tpl.html", array());
}
}
}
return $retval;
}
示例7: outputNotificationsList
/**
* Outputs a list of specified views.
*/
function outputNotificationsList()
{
global $application;
$retval = "";
$list = modApiFunc("Notifications", "getNotificationsList");
$n = sizeof($list);
if ($n == 0) {
$retval .= modApiFunc('TmplFiller', 'fill', "notifications/list/", "item_na.tpl.html", array());
$n++;
} else {
$i = 0;
foreach ($list as $item) {
$request = new Request();
$request->setView('NotificationInfo');
$request->setAction('SetCurrentNotification');
$request->setKey('n_id', $item['Id']);
$Info_Link = $request->getURL();
$item['I'] = $i;
$item['InfoLink'] = $Info_Link;
$item['Active'] = $item['Active'] == 'checked' ? getMsg('NTFCTN', 'NTFCTN_INFO_YES_LABEL') : getMsg('NTFCTN', 'NTFCTN_INFO_NO_LABEL');
$item['From_addr'] = modApiFunc("Notifications", "getExtendedEmail", $item['From_addr'], $item['Email_Code'], false, !empty($item['Admin_ID']) ? $item['Admin_ID'] : NULL);
$this->_Template_Contents = $item;
$application->registerAttributes($this->_Template_Contents);
$retval .= modApiFunc('TmplFiller', 'fill', "notifications/list/", "item.tpl.html", array());
$i++;
}
}
for ($i = 0; $i < 10 - $n; $i++) {
$retval .= modApiFunc('TmplFiller', 'fill', "notifications/list/", "item_empty.tpl.html", array());
}
return $retval;
}
示例8: output
function output($group_id_range_from = 0, $group_id_range_to = 999999, $group_title)
{
$groups = modApiFunc('Reports', 'getReportGroups');
$current_group_id = (int) modApiFunc('Request', 'getValueByKey', 'report_group_id');
if ($current_group_id !== null and isset($groups[$current_group_id])) {
$current_group_id = (int) $current_group_id;
} else {
reset($groups);
$current_group_id = array_keys($groups);
$current_group_id = $current_group_id[0];
}
$links = '';
foreach ($groups as $grp_id => $grp) {
if ($grp_id < $group_id_range_from or $grp_id > $group_id_range_to) {
continue;
}
$data = array();
$data['LinkName'] = $grp['GROUP_NAME'];
$data['LinkDescription'] = $grp['GROUP_DESCRIPTION'];
$request = new Request();
$request->setView(CURRENT_REQUEST_URL);
$request->setKey('report_group_id', $grp_id);
$data['LinkHref'] = $request->getURL();
if ($current_group_id === $grp_id and $current_group_id >= $group_id_range_from and $current_group_id <= $group_id_range_to) {
$links .= $this->_TmplFiller->fill("", "group-link-selected.tpl.html", $data);
} else {
$links .= $this->_TmplFiller->fill("", "group-link.tpl.html", $data);
}
}
return $this->_TmplFiller->fill("", "container.tpl.html", array('ReportGroupLinks' => $links, 'Title' => getMsg('RPTS', $group_title)));
}
示例9: onAction
/**
*
*/
function onAction()
{
global $application;
$request = $application->getInstance('Request');
$instance = $request->getValueByKey('instance');
$log_clear_type = $request->getValueByKey('log_clear_type');
$value = '';
switch ($instance) {
case 'cache':
CCacheFactory::clearAll();
$value = getMsg("SYS", "MSG_CACHE_CLEARED");
if (APC_EXTENSION_LOADED) {
apc_clear_cache("user");
}
break;
case 'timeline':
modApiFunc('Timeline', 'clearTimeline', $log_clear_type);
$timeline = modApiFunc('Timeline', 'getTimelineRecsCount');
if ($timeline == 0) {
$value = getMsg("SYS", "ADMIN_PHP_FILES_NO_LOG_RECORDS");
} else {
$value = $timeline . getMsg("SYS", "ADMIN_PHP_FILES_LOG_RECORDS");
}
break;
default:
break;
}
return $value;
}
示例10: outputResultMessage
function outputResultMessage()
{
global $application;
if (modApiFunc("Session", "is_set", "ResultMessage")) {
$msg = modApiFunc("Session", "get", "ResultMessage");
modApiFunc("Session", "un_set", "ResultMessage");
$template_contents = array("ResultMessage" => getMsg('RP', $msg));
$this->_Template_Contents = $template_contents;
$application->registerAttributes($this->_Template_Contents);
$this->mTmplFiller =& $application->getInstance('TmplFiller');
return $this->mTmplFiller->fill("related_products/misc/", "result-message.tpl.html", array());
} elseif (modApiFunc("Session", "is_set", "Errors")) {
$return_html_code = "";
$errors = modApiFunc("Session", "get", "Errors");
modApiFunc("Session", "un_set", "Errors");
foreach ($errors as $ekey => $eval) {
$template_contents = array("ErrorMessage" => getMsg('RP', $eval));
$this->_Template_Contents = $template_contents;
$application->registerAttributes($this->_Template_Contents);
$this->mTmplFiller =& $application->getInstance('TmplFiller');
$return_html_code .= $this->mTmplFiller->fill("related_products/misc/", "error-message.tpl.html", array());
}
return $return_html_code;
} else {
return "";
}
}
示例11: onAction
/**
* Deletes tax rate by zip set.
*/
function onAction()
{
global $application;
$SessionPost = array();
$SessionPost = $_POST;
$Errors = array();
$Result = array();
$request = new Request();
$request->setView("PopupWindow");
$updateSid = $request->getValueByKey("updateSid", 0);
if ($updateSid) {
$request->setKey("updateSid", $updateSid);
}
$description = '';
if (isset($_POST['file_description'])) {
$description = prepareHTMLDisplay(trim($_POST['file_description']));
}
if ($description == '') {
$SessionPost['Errors'][] = getMsg("TAX_ZIP", "ADD_NEW_SET_EMPTY_FILE_DESCRIPTION_ERROR");
modApiFunc('Session', 'set', 'SessionPost', $SessionPost);
$request->setKey("page_view", "TaxRateByZip_AddNewSet");
$application->redirect($request);
return;
}
modApiFunc('Session', 'set', 'SessionPost', $SessionPost);
$sid = modApiFunc("TaxRateByZip", "addSetToDB", $description, $_POST["csv_file_name"]);
$request->setKey("page_view", "TaxRatesImportView");
$request->setKey("sid", $sid);
$application->redirect($request);
}
示例12: onAction
function onAction()
{
global $application;
$this->topics = modApiFunc('Request', 'getValueByKey', 'topic');
if (empty($this->topics)) {
$this->topics = array();
}
$SessionPost = array();
$this->email = trim(modApiFunc('Request', 'getValueByKey', 'email'));
if (modApiFunc('Users', 'isValidEmail', $this->email)) {
if (modApiFunc('Subscriptions', 'canClientUnsubscribe')) {
$ViewState = $this->changeSubscriptions();
} else {
$ViewState = $this->addSubscriptions();
}
$SessionPost['ViewState'] = $ViewState;
if ($this->signed_in) {
$params = array('account' => $this->account, 'email' => $this->email);
execQuery('SUBSCR_LINK_SUBSCRIPTION_TO_CUSTOMER', $params);
} else {
modApiFunc('Subscriptions', 'setCustomerSubscribedEmail', $this->email);
}
} else {
$SessionPost['ViewState']['ErrorsArray'][] = getMsg('SUBSCR', 'ERROR_SUBSCR_INVALID_EMAIL');
}
modApiFunc('Session', 'set', 'SessionPost', $SessionPost);
$r = new Request();
$r->setView(CURRENT_REQUEST_URL);
$r->setAnchor('subscribe_box');
$application->redirect($r);
}
示例13: Params_Verify
/**
*
* Params_Verify
* @param string $v this is value
* @param string $code this is md5code string
*/
public function Params_Verify($v = '', $code = '')
{
//截取前五位
$md5_str = md5($v . C('PARAMS_AUTH_CODE'));
if (substr($md5_str, 0, 6) != $code) {
return getMsg('Illegal request');
}
}
示例14: info_body
function info_body()
{
$id = 1;
function showInfo($cmd)
{
global $id;
?>
<div class="info_frame">
<a href="#" onclick="look('l_<?php
echo $id;
?>
','t_<?php
echo $id;
?>
')"><div id="t_<?php
echo $id;
?>
" class="info_topic"><?php
echo $cmd;
?>
</div></a>
<div id="l_<?php
echo $id;
?>
" class="info_list"><pre>
<?php
exec($cmd, $lines);
foreach ($lines as $s) {
echo "{$s}\n";
}
$id += 1;
?>
</pre></div></div><br />
<?php
}
?>
<div id="container">
<h3><?php
echo getMsg('coreInfo');
?>
</h3>
<?php
showInfo("/bin/uname -a");
showInfo("cat /proc/cpuinfo");
showInfo("cat /proc/meminfo");
showInfo("/sbin/lsmod");
showInfo("/bin/ps -w");
showInfo("/bin/dmesg");
showInfo("/bin/busybox");
showInfo("cat /proc/mounts");
showInfo("/bin/df -h");
showInfo("/sbin/fdisk -l");
showInfo("/sbin/ifconfig");
showInfo("/sbin/route");
showInfo("cat /etc/resolv.conf");
showInfo("set");
echo "</div>\n";
}
示例15: out_AttrsGroup
function out_AttrsGroup($group_name)
{
global $application;
$template_contents = array('GroupName' => getMsg('CA', 'PIG_' . _ml_strtoupper($group_name)), 'GroupAttrs' => $this->out_Attributes($group_name));
$this->_Template_Contents = $template_contents;
$application->registerAttributes($this->_Template_Contents);
$this->mTmplFiller =& $application->getInstance('TmplFiller');
return $this->mTmplFiller->fill("customer_account/export_customers/", "group-container.tpl.html", array());
}