本文整理汇总了PHP中CAdminMessage::ShowMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminMessage::ShowMessage方法的具体用法?PHP CAdminMessage::ShowMessage怎么用?PHP CAdminMessage::ShowMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAdminMessage
的用法示例。
在下文中一共展示了CAdminMessage::ShowMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ShowForm
private function ShowForm($type, $message, $buttonName = '')
{
$keys = array_keys($GLOBALS);
for ($i = 0; $i < count($keys); $i++) {
if ($keys[$i] != 'i' && $keys[$i] != 'GLOBALS' && $keys[$i] != 'strTitle' && $keys[$i] != 'filepath') {
global ${$keys[$i]};
}
}
$PathInstall = str_replace('\\', '/', __FILE__);
$PathInstall = substr($PathInstall, 0, strlen($PathInstall) - strlen('/index.php'));
IncludeModuleLangFile($PathInstall . '/install.php');
$APPLICATION->SetTitle(GetMessage('ASD_MODULE_MONEY_NAME'));
include $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_admin_after.php';
echo CAdminMessage::ShowMessage(array('MESSAGE' => $message, 'TYPE' => $type));
?>
<form action="<?php
echo $APPLICATION->GetCurPage();
?>
" method="get">
<p>
<input type="hidden" name="lang" value="<?php
echo LANG;
?>
" />
<input type="submit" value="<?php
echo strlen($buttonName) ? $buttonName : GetMessage('MOD_BACK');
?>
" />
</p>
</form>
<?php
include $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/epilog_admin.php';
die;
}
示例2: DoInstall
function DoInstall()
{
global $APPLICATION, $step;
if (!$this->InstallFiles()) {
CAdminMessage::ShowMessage('Failed to copy files. Catalog /bitrix/ must be writable');
}
$this->InstallDB(false);
$this->InstallEvents();
$this->InstallPublic();
$APPLICATION->IncludeAdminFile(GetMessage("BEONO_MODULE_BASKET_INSTALL_TITLE"), dirname(__FILE__)."/step.php");
}
示例3: unlock_export
function unlock_export()
{
global $APPLICATION, $profileID;
if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/bitrix/tools/acrit.exportpro/export_{$profileID}_run.lock")) {
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
unlink($_SERVER['DOCUMENT_ROOT'] . "/bitrix/tools/acrit.exportpro/export_{$profileID}_run.lock");
ob_start();
echo '<td colspan="2" align="center">';
CAdminMessage::ShowMessage(array('MESSAGE' => GetMessage('ACRIT_EXPORTPRO_EXPORT_UNLOCK'), 'TYPE' => 'OK', 'HTML' => 'TRUE'));
echo '</td>';
$data = ob_get_clean();
$APPLICATION->RestartBuffer();
echo Bitrix\Main\Web\Json::encode(array('result' => 'ok', 'blocks' => array(array('id' => '#unlock-container', 'html' => $data))));
}
die;
}
示例4: outError
public static function outError($msg, $var1 = null, $var2 = null)
{
if (func_num_args() > 1) {
$params = func_get_args();
$msg = call_user_func_array('sprintf', $params);
}
if (self::canOutAsAdminMessage()) {
$msg = self::prepareToHtml($msg);
/** @noinspection PhpDynamicAsStaticMethodCallInspection */
\CAdminMessage::ShowMessage(array("MESSAGE" => $msg, 'HTML' => true, 'TYPE' => 'ERROR'));
} elseif (self::canOutAsHtml()) {
self::outToHtml('[red]' . $msg . '[/]');
} else {
self::outToConsole($msg);
}
}
示例5: IncludeModuleLangFile
<?php
if (!check_bitrix_sessid()) {
return;
}
IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/form/install/install.php");
if (is_array($errors) && count($errors) > 0) {
foreach ($errors as $val) {
$alErrors .= $val . "<br>";
}
echo CAdminMessage::ShowMessage(array("TYPE" => "ERROR", "MESSAGE" => GetMessage("MOD_INST_ERR"), "DETAILS" => $alErrors, "HTML" => true));
} else {
echo CAdminMessage::ShowNote(GetMessage("MOD_INST_OK"));
}
/*
if (strlen($public_dir)>0) :
?>
<p><?=GetMessage("MOD_DEMO_DIR")?></p>
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<td align="center"><p><b><?=GetMessage("MOD_DEMO_SITE")?></b></p></td>
<td align="center"><p><b><?=GetMessage("MOD_DEMO_LINK")?></b></p></td>
</tr>
<?
$sites = CSite::GetList($by, $order, Array("ACTIVE"=>"Y"));
while($site = $sites->Fetch())
{
?>
<tr>
<td width="0%"><p>[<?=$site["ID"]?>] <?=$site["NAME"]?></p></td>
<td width="0%"><p><a href="<?if(strlen($site["SERVER_NAME"])>0) echo "http://".$site["SERVER_NAME"];?><?=$site["DIR"].$public_dir?>/result_list.php?WEB_FORM_NAME=ANKETA"><?=$site["DIR"].$public_dir?>/result_list.php?WEB_FORM_NAME=ANKETA</a></p></td>
示例6: import_cancel
public static function import_cancel()
{
$moduleId = 'prmedia.treelikecomments';
// retrieve or init session storage
$sessionStorage = $_SESSION['tlc_import_cancel'];
if ($_REQUEST['start'] == 'Y')
{
$sessionStorage = array(
'processing_time' => time(),
'current_count' => 0,
'total_count' => CTreelikeForumImporter::getImportedCount()
);
}
// import cancel comments...
$obComment = new CTreelikeComments;
global $DB;
$is_finish = true;
$currentTime = time();
$rsCommentId = $DB->Query('SELECT COMMENT_ID FROM prmedia_treelike_comments_import_forum');
while ($arCommentId = $rsCommentId->Fetch())
{
$is_finish = false;
$commentId = intval($arCommentId['COMMENT_ID']);
$obComment->Delete($commentId);
CTreelikeForumImporter::removeImportedComment($commentId);
$sessionStorage['current_count']++;
// one step is one second
if ($currentTime != time())
{
break;
}
}
if ($is_finish)
{
// go to finish step
echo '<script>document.getElementsByClassName("wizard-next-button")[0].click();</script>';
CTreelikeForumImporter::clearCache();
return;
}
// progress message
$text = GetMessage('PRMEDIA_WIZARDS_IMPORT_CANCEL_FORUM_PROGRESS_MESSAGE');
$arReplace = array(
"#IMPORTED#" => $sessionStorage['current_count'],
"#COUNT#" => $sessionStorage['total_count'],
"#TIME#" => gmdate("i:s", time() - $sessionStorage['processing_time'])
);
$progressMessage = str_replace(array_keys($arReplace), $arReplace, $text);
CAdminMessage::ShowMessage(array(
"TYPE" => "PROGRESS",
"MESSAGE" => GetMessage('PRMEDIA_SS_DIST_CANCEL_PROGRESS_TITLE'),
"DETAILS" => $progressMessage,
"HTML" => true,
"PROGRESS_VALUE" => $sessionStorage['current_count'],
"PROGRESS_TOTAL" => $sessionStorage['total_count']
));
echo "<script>jsPrmediaCommentImporter.update();</script>";
$_SESSION['tlc_import_cancel'] = $sessionStorage;
}
示例7: intval
</span></li>
<li><?php
echo Loc::getMessage('SALE_SLI_STAT_TOTAL_GROUPS');
?>
: <span class="bx-ui-loc-i-stat-groups"><?php
echo intval($arResult['STATISTICS']['GROUPS']['CNT']);
?>
</span></li>
</ul>
<?php
echo EndNote();
?>
<div class="bx-ui-loc-i-progressbar">
<?php
CAdminMessage::ShowMessage(array("TYPE" => "PROGRESS", "DETAILS" => '#PROGRESS_BAR#' . '<div class="adm-loc-i-statusbar">' . Loc::getMessage('SALE_SLI_STATUS') . ': <span class="bx-ui-loc-i-loader"></span> <span class="bx-ui-loc-i-status-text">' . Loc::getMessage('SALE_SLI_STAGE_INITIAL') . '</span></div>', "HTML" => true, "PROGRESS_TOTAL" => 100, "PROGRESS_VALUE" => 0, "PROGRESS_TEMPLATE" => '<span class="bx-ui-loc-i-percents">#PROGRESS_VALUE#</span>%'));
?>
</div>
<?php
$tabControl->Begin();
$tabControl->BeginNextTab();
?>
<tr class="heading">
<td colspan="2"><?php
echo Loc::getMessage('SALE_SLI_SOURCE');
?>
</td>
</tr>
示例8: LocalRedirect
}
LocalRedirect($redirectPath);
}
foreach ($postData as $key => $value) {
$dataGroup[$key] = $value;
}
}
$tabControl = new CAdminTabControl('tabControl', $tabsStructur);
$context = new CAdminContextMenu($contextMenu);
$errorsList = isset($errorsList) ? $errorsList : array();
$dataGroup = array_map('htmlspecialchars', $dataGroup);
$prologType = $request->getQuery('mode') == 'list' ? 'prolog_js' : 'prolog';
require sprintf('%s%s', getenv('DOCUMENT_ROOT'), $includePath[$prologType]);
$context->show();
if (sizeof($errorsList) > 0) {
CAdminMessage::ShowMessage(join(PHP_EOL, $errorsList));
}
?>
<form method="post" action="<?php
echo $applicationOld->getCurPage();
?>
" enctype="multipart/form-data">
<input type="hidden" name="ID" value="<?php
echo $dataGroup['ID'];
?>
">
<input type="hidden" name="lang" value="<?php
echo LANGUAGE_ID;
?>
">
<?php
示例9: htmlspecialcharsbx
$crmIntegrationUrl = htmlspecialcharsbx($_REQUEST["crm_url"]);
$crmIntegrationImpUrl = htmlspecialcharsbx($_REQUEST["crm_imp_url"]);
$find = "/^(http:\\/\\/|https:\\/\\/|ssl:\\/\\/)/i";
if (!preg_match($find, $crmIntegrationUrl, $res) && !empty($_REQUEST["crm_url"])) {
$crmIntegrationUrl = "http://" . $crmIntegrationUrl;
}
if (!preg_match($find, $crmIntegrationImpUrl, $res) && !empty($_REQUEST["crm_imp_url"])) {
$crmIntegrationImpUrl = "http://" . $crmIntegrationImpUrl;
}
$successMessage = GetMessage("SPTEN_SCRM_SUCCESS_MESS", array("#URL#" => $crmIntegrationUrl, "#PATH#" => $crmIntegrationUrl . "/crm/configs/external_sale/", "#IMP#" => !empty($crmIntegrationImpUrl) ? $crmIntegrationImpUrl : $crmIntegrationUrl . "/crm/configs/external_sale/"));
$successMessage .= '<br /><br /><div class="crm-admin-buttons" id="id_new_crm_btns">
<span class="crm-admin-button-wrap">
<a target="_blank" href="' . (!empty($crmIntegrationImpUrl) ? $crmIntegrationImpUrl : $crmIntegrationUrl . "/crm/configs/external_sale/") . '" class="adm-btn adm-btn-green">' . GetMessage("SPTEN_SCRM_CRM_BTN") . '</a>
</span>
</div>';
CAdminMessage::ShowMessage(array("MESSAGE" => $successMessage, "TYPE" => "OK", "HTML" => true));
}
?>
<div class="crm-admin-wrap">
<?php
if (count($arCrmIntegration) <= 0) {
?>
<p class="crm-admin-paragraph">
<?php
echo GetMessage("SPTEN_SCRM_TEXT1");
?>
</p>
<p class="crm-admin-paragraph">
<?php
echo GetMessage("SPTEN_SCRM_TEXT2");
示例10: CAdminSorting
<?php
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
if (!CModule::IncludeModule('learning')) {
require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_admin_after.php';
// second system's prolog
if (IsModuleInstalled('learning') && defined('LEARNING_FAILED_TO_LOAD_REASON')) {
echo LEARNING_FAILED_TO_LOAD_REASON;
} else {
CAdminMessage::ShowMessage(GetMessage('LEARNING_MODULE_NOT_FOUND'));
}
require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/epilog_admin.php';
// system's epilog
exit;
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/learning/prolog.php";
IncludeModuleLangFile(__FILE__);
$sTableID = "t_learning_group_admin";
$oSort = new CAdminSorting($sTableID, "ID", "desc");
// sort initializing
$lAdmin = new CAdminList($sTableID, $oSort);
// list initializing
$filter = new CAdminFilter($sTableID . "_filter", array(GetMessage('LEARNING_ADMIN_GROUPS_TITLE'), 'ID', GetMessage('LEARNING_ADMIN_GROUPS_ACTIVE'), GetMessage('LEARNING_ADMIN_GROUPS_CODE'), GetMessage('LEARNING_ADMIN_GROUPS_COURSE_TITLE'), GetMessage('LEARNING_ADMIN_GROUPS_COURSE_LESSON_ID'), GetMessage('LEARNING_ADMIN_GROUPS_SORT'), GetMessage('LEARNING_ADMIN_GROUPS_ACTIVE_FROM'), GetMessage('LEARNING_ADMIN_GROUPS_ACTIVE_TO')));
$arFilterFields = array("filter_title", "filter_id", "filter_active", "filter_code", "filter_course_title", "filter_course_lesson_id", "filter_sort", "filter_active_from_from", "filter_active_from_to", "filter_active_to_from", "filter_active_to_to");
$lAdmin->InitFilter($arFilterFields);
// filter initializing
$arFilter = array('ID' => $filter_id, 'ACTIVE' => $filter_active, 'TITLE' => $filter_title, 'CODE' => $filter_code, 'SORT' => $filter_sort, '>=ACTIVE_FROM' => $filter_active_from_from, '<=ACTIVE_FROM' => $filter_active_from_to, '>=ACTIVE_TO' => $filter_active_to_from, '<=ACTIVE_TO' => $filter_active_to_to, 'COURSE_TITLE' => $filter_course_title, 'COURSE_LESSON_ID' => $filter_course_lesson_id);
if ($lAdmin->EditAction()) {
foreach ($FIELDS as $ID => $arFields) {
if (!$lAdmin->IsUpdated($ID)) {
continue;
示例11: htmlspecialcharsex
><?php
echo htmlspecialcharsex(GetMessage("SCA_YES"));
?>
</option>
<option value="N"<?php
if ($filter_active == "N") {
echo " selected";
}
?>
><?php
echo htmlspecialcharsex(GetMessage("SCA_NO"));
?>
</option>
</select>
</td>
</tr>
<?php
$oFilter->Buttons(array("table_id" => $sTableID, "url" => $APPLICATION->GetCurPage(), "form" => "find_form"));
$oFilter->End();
?>
</form>
<?php
if (!CSaleUserCards::CheckPassword()) {
echo CAdminMessage::ShowMessage(array("DETAILS" => GetMessage("SCA_NO_VALID_PASSWORD"), "TYPE" => "ERROR", "MESSAGE" => GetMessage("SCA_ATTENTION")));
}
?>
<?php
$lAdmin->DisplayList();
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
示例12: CAccess
$defaultType = \Bitrix\Security\Mfa\Otp::getDefaultType();
$targetRights = \Bitrix\Security\Mfa\Otp::getMandatoryRights();
$access = new CAccess();
$targetRightsNames = $access->GetNames($targetRights);
CJSCore::Init(array('access'));
$APPLICATION->AddHeadScript('/bitrix/js/security/admin/page/otp.js');
$APPLICATION->SetTitle(GetMessage("SEC_OTP_NEW_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
if (CSecurityUser::isActive()) {
$messageType = "OK";
$messageText = GetMessage("SEC_OTP_NEW_ON");
} else {
$messageType = "ERROR";
$messageText = GetMessage("SEC_OTP_NEW_OFF");
}
CAdminMessage::ShowMessage(array("MESSAGE" => $messageText, "TYPE" => $messageType, "HTML" => true));
?>
<form method="POST" action="security_otp.php?lang=<?php
echo LANGUAGE_ID;
echo htmlspecialcharsbx($returnUrl);
?>
" enctype="multipart/form-data" name="editform">
<?php
echo bitrix_sessid_post();
?>
<input type="hidden" name="lang" value="<?php
echo LANG;
?>
">
<?php
示例13: array
</tr>
<?php
}
?>
</table>
</td>
<?php
}
?>
</tr></table></div>
<?php
} else {
CAdminMessage::ShowMessage(GetMessage("STAT_NOT_ENOUGH_DATA"));
}
} else {
CAdminMessage::ShowMessage(GetMessage("STAT_GD_NOT_INSTALLED"));
}
}
$lAdmin->EndCustomContent();
$aContext = array();
$aContext[] = array("TEXT" => $summa == "Y" ? GetMessage("STAT_SUMMARIZED_GRAPH") : GetMessage("STAT_MULTI_GRAPH"), "MENU" => array(array("TEXT" => GetMessage("STAT_SUMMARIZED_GRAPH"), "ACTION" => $lAdmin->ActionDoGroup(0, "", "summa=Y"), "ICON" => $summa == "Y" ? "checked" : ""), array("TEXT" => GetMessage("STAT_MULTI_GRAPH"), "ACTION" => $lAdmin->ActionDoGroup(0, "", "summa=N"), "ICON" => $summa != "Y" ? "checked" : "")));
if ($STAT_RIGHT > "M") {
$aContext[] = array("TEXT" => $show_money == "Y" ? GetMessage("STAT_SHOW_MONEY") : GetMessage("STAT_SHOW_COUNT"), "MENU" => array(array("TEXT" => GetMessage("STAT_MONEY"), "ACTION" => $lAdmin->ActionDoGroup(0, "", "show_money=Y"), "ICON" => $show_money == "Y" ? "checked" : ""), array("TEXT" => GetMessage("STAT_COUNT"), "ACTION" => $lAdmin->ActionDoGroup(0, "", "show_money=N"), "ICON" => $show_money != "Y" ? "checked" : "")));
}
$lAdmin->AddAdminContextMenu($aContext, false, false);
$lAdmin->CheckListMode();
$APPLICATION->SetTitle(GetMessage("STAT_RECORDS_LIST"));
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$oFilter = new CAdminFilter($sTableID . "_filter", array(GetMessage("STAT_F_EVENTS")));
?>
示例14: foreach
$tres = $oArchiver->add("\"" . $_SERVER["DOCUMENT_ROOT"] . $path . "\"", false, $_SERVER["DOCUMENT_ROOT"] . $path);
if (!$tres) {
$strError = "Archiver error";
$arErrors =& $oArchiver->GetErrors();
if (count($arErrors) > 0) {
$strError .= ":<br>";
foreach ($arErrors as $value) {
$strError .= "[" . $value[0] . "] " . $value[1] . "<br>";
}
} else {
$strError .= ".<br>";
}
}
header('Pragma: public');
header('Cache-control: private');
header("Content-Type: application/force-download; name=\"" . $ID . ".tar.gz\"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: " . filesize($tmpfname));
header("Content-Disposition: attachment; filename=\"" . $ID . ".tar.gz\"");
header("Expires: 0");
readfile($tmpfname);
unlink($tmpfname);
// die();
}
if (strlen($strError) > 0) {
$APPLICATION->SetTitle("Archiver error");
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
CAdminMessage::ShowMessage($strError);
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin_before.php";
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin_after.php";
示例15: foreach
?>
: </b><select name="domain">
<?php
foreach ($arDomains as $domain) {
$domainView = \CBXPunycode::ToUnicode($domain['DOMAIN'], $errors = null);
$domainEnc = Converter::getHtmlConverter()->encode($domain['DOMAIN']);
$domainViewEnc = Converter::getHtmlConverter()->encode($domainView);
?>
<option value="<?php
echo $domainEnc;
?>
"><?php
echo $domainViewEnc;
?>
</option>
<?php
}
?>
</select><br /><br />
<textarea style="width: 700px; height: 450px;" name="original_text"></textarea>
</form>
</div><div id="seo_original_text_form_ok" style="display: none;">
<?php
CAdminMessage::ShowMessage(array("MESSAGE" => Loc::getMessage('SEO_YANDEX_ORIGINAL_TEXT_OK'), "HTML" => true, "DETAILS" => Loc::getMessage('SEO_YANDEX_ORIGINAL_TEXT_OK_DETAILS', array('#LANGUAGE_ID#' => LANGUAGE_ID)), "TYPE" => "OK"));
?>
</div>
<?php
}
break;
}
}