当前位置: 首页>>代码示例>>PHP>>正文


PHP CAdminMessage类代码示例

本文整理汇总了PHP中CAdminMessage的典型用法代码示例。如果您正苦于以下问题:PHP CAdminMessage类的具体用法?PHP CAdminMessage怎么用?PHP CAdminMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了CAdminMessage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showProgress

 public static function showProgress($text, $title, $v)
 {
     $v = $v >= 0 ? $v : 0;
     if ($v < 100) {
         $msg = new \CAdminMessage(array("TYPE" => "PROGRESS", "HTML" => true, "MESSAGE" => $title, "DETAILS" => "#PROGRESS_BAR#<div style=\"width: " . self::PROGRESS_WIDTH . "px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: 20px;\">" . Converter::getHtmlConverter()->encode($text) . "</div>", "PROGRESS_TOTAL" => 100, "PROGRESS_VALUE" => $v, "PROGRESS_TEMPLATE" => '#PROGRESS_PERCENT#', "PROGRESS_WIDTH" => self::PROGRESS_WIDTH));
     } else {
         $msg = new \CAdminMessage(array("TYPE" => "OK", "MESSAGE" => $title, "DETAILS" => $text));
     }
     return $msg->show();
 }
开发者ID:supertest223,项目名称:bitrixtest,代码行数:10,代码来源:sitemapruntime.php

示例2: 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;
    }
开发者ID:Hawkart,项目名称:megatv,代码行数:34,代码来源:index.php

示例3: 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");

	}
开发者ID:ASDAFF,项目名称:bitrix-basket,代码行数:13,代码来源:index.php

示例4: DoInstall

 public function DoInstall()
 {
     global $APPLICATION;
     if (version_compare(SM_VERSION, '15.0.2') < 0) {
         $APPLICATION->IncludeAdminFile(GetMessage('NIK_GLVRD_INSTALL_TITLE'), __DIR__ . '/old_bitrix.php');
     } else {
         CopyDirFiles(__DIR__ . '/images', $_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/images/' . $this->MODULE_ID, true, true);
         CopyDirFiles(__DIR__ . '/js', $_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/js/' . $this->MODULE_ID, true, true);
         RegisterModule('nik.glvrd');
         $this->DoDependences(true);
         CAdminMessage::ShowNote(GetMessage('NIK_GLVRD_INSTALL_COMPLETE_TITLE'));
     }
 }
开发者ID:niksamokhvalov,项目名称:nik.glvrd,代码行数:13,代码来源:index.php

示例5: 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);
     }
 }
开发者ID:Hawkart,项目名称:megatv,代码行数:16,代码来源:Out.php

示例6: 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;
}
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:16,代码来源:ajax.php

示例7: 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>
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:step2.php

示例8: ShowDataSaveForm

	private function ShowDataSaveForm() {
		$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_NAME'));
		include($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_admin_after.php');
		?>
		<form action="<?= $APPLICATION->GetCurPage()?>" method="get">
			<?= bitrix_sessid_post()?>
			<input type="hidden" name="lang" value="<?= LANG?>" />
			<input type="hidden" name="id" value="<?= $this->MODULE_ID?>" />
			<input type="hidden" name="uninstall" value="Y" />
			<input type="hidden" name="step" value="2" />
			<?CAdminMessage::ShowMessage(GetMessage('MOD_UNINST_WARN'))?>
			<input type="submit" name="inst" value="<?echo GetMessage('MOD_UNINST_DEL')?>" />
		</form>
		<?
		include($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/epilog_admin.php');
		die();
	}
开发者ID:rnsokolov,项目名称:bitrixtemplate_stylish,代码行数:29,代码来源:index.php

示例9: foreach

            }
        }
        \Bitrix\Sender\MailingGroupTable::delete(array('MAILING_ID' => $ID));
        foreach ($GROUP as $arGroup) {
            \Bitrix\Sender\MailingGroupTable::add($arGroup);
        }
    }
    if ($res) {
        if ($apply != "") {
            LocalRedirect("/bitrix/admin/sender_mailing_edit.php?ID=" . $ID . "&lang=" . LANG . "&" . $tabControl->ActiveTabParam());
        } else {
            LocalRedirect("/bitrix/admin/sender_mailing_admin.php?lang=" . LANG);
        }
    } else {
        if (!empty($arError)) {
            $message = new CAdminMessage(implode("<br>", $arError));
        }
        $bVarsFromForm = true;
    }
} else {
    $GROUP_EXCLUDE = $GROUP_INCLUDE = array();
    $groupDb = \Bitrix\Sender\MailingGroupTable::getList(array('select' => array('ID' => 'GROUP_ID', 'INCLUDE'), 'filter' => array('MAILING_ID' => $ID)));
    while ($arGroup = $groupDb->fetch()) {
        if ($arGroup['INCLUDE']) {
            $GROUP_INCLUDE[] = $arGroup['ID'];
        } else {
            $GROUP_EXCLUDE[] = $arGroup['ID'];
        }
    }
}
//Edit/Add part
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:mailing_edit.php

示例10: ShowNote

	function ShowNote($message)
	{
		if(!empty($message))
			CAdminMessage::ShowMessage(array("MESSAGE"=>$message, "TYPE"=>"OK"));
	}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:5,代码来源:admin_lib.php

示例11: Array

		<td colspan="2" align="center">

<?$ml_res = CMailLog::GetList(Array("ID"=>"ASC"), Array("MESSAGE_ID"=>$ID));?>
<select style="width:80%;" size="5">
<?while($arr_log = $ml_res->GetNext()):?>
<option>(<?=$arr_log["DATE_INSERT"]?>) <?=$arr_log["MESSAGE_TEXT"]?></option>
<?endwhile;?>
</select>

		</td>
	</tr>


<?$tabControl->Buttons();?>

<input type="hidden" name="save_form" value="Y">
<input <?if ($MOD_RIGHT<"W") echo "disabled" ?> type="submit" name="save"  class="adm-btn-save" value="<?echo GetMessage("MAIL_MSG_VIEW_SAVE")?>">
&nbsp;<input <?if ($MOD_RIGHT<"W") echo "disabled" ?> type="submit" name="apply" value="<?echo GetMessage("MAIL_MSG_VIEW_APPLY")?>">
&nbsp;<input <?if ($MOD_RIGHT<"W") echo "disabled" ?> type="submit" name="prev" value="&lt;&lt;" title="<?echo GetMessage("MAIL_MSG_VIEW_SAVE_PREV")?>">
&nbsp;<input <?if ($MOD_RIGHT<"W") echo "disabled" ?> type="submit" name="next" value="&gt;&gt;" title="<?echo GetMessage("MAIL_MSG_VIEW_SAVE_NEXT")?>">
<?$tabControl->End();?>
</form>
<?
else:
	$APPLICATION->SetTitle(GetMessage("MAIL_MSG_VIEW_TITLE"));
	require($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/include/prolog_admin_after.php");
	CAdminMessage::ShowMessage(GetMessage("MAIL_MSG_NOTFOUND"));
endif;

require($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/include/epilog_admin.php");?>
开发者ID:ASDAFF,项目名称:bitrix-5,代码行数:30,代码来源:mail_message_view.php

示例12: array

							break;
						}
					}
				}

				$banner["SETTINGS"]["Phrases"][] = array(
					'Phrase' => $phrase,
					'AutoBudgetPriority' => $request["PhrasePriority"][$key],
					'StatusPhraseModerate' => $phraseStatus,
				);
			}
		}

		$message = new CAdminMessage(array(
			"TYPE" => "ERROR",
			"MESSAGE" => Loc::getMessage('SEO_BANNER_ERROR'),
			"DETAILS" => implode('<br>', $result->getErrorMessages()),
		));
	}
}

$APPLICATION->SetTitle(
	$ID > 0
		? Loc::getMessage("SEO_BANNER_EDIT_TITLE", array(
			"#ID#" => $ID,
			"#XML_ID#" => $banner["XML_ID"],
		))
		: Loc::getMessage("SEO_BANNER_NEW_TITLE")
);

require($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/include/prolog_admin_after.php");
开发者ID:nycmic,项目名称:bittest,代码行数:31,代码来源:seo_search_yandex_direct_banner_edit.php

示例13: elseif

                $STEP = 5;
            } elseif ($STEP == 5) {
                $STEP = LastStep21($arIBlock);
            }
        } else {
            $arErrors[] = GetMessage("IBCONV_WRONG_VERSION");
        }
    } else {
        $arErrors[] = GetMessage("IBCONV_WRONG_IBLOCK");
    }
}
foreach ($arErrors as $strError) {
    CAdminMessage::ShowMessage($strError);
}
foreach ($arMessages as $strMessage) {
    CAdminMessage::ShowMessage(array("MESSAGE" => $strMessage, "TYPE" => "OK"));
}
if (count($arErrors) == 0) {
    ?>
	<?php 
    if ($STEP == 0) {
        ?>
		<p><span class="required"><?php 
        echo GetMessage("IBCONV_ATTENTION");
        ?>
</span> <?php 
        echo GetMessage("IBCONV_WARNING_MESSAGE", array("#IBLOCK_NAME#" => htmlspecialcharsbx($arIBlock["NAME"])));
        ?>
		<input type="button" name="START" value="<?php 
        echo GetMessage("IBCONV_MOVE");
        ?>
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:iblock_convert.php

示例14: array

?>

<?php 
$aMenu = array(array("TEXT" => GetMessage("SPSN_2FLIST"), "LINK" => "/bitrix/admin/sale_pay_system.php?lang=" . LANG . GetFilterParams("filter_"), "ICON" => "btn_list"));
if ($ID > 0 && $saleModulePermissions >= "W") {
    $aMenu[] = array("SEPARATOR" => "Y");
    $aMenu[] = array("TEXT" => GetMessage("SPSN_NEW_PAYSYS"), "LINK" => "/bitrix/admin/sale_pay_system_edit.php?lang=" . LANG . GetFilterParams("filter_"), "ICON" => "btn_new");
    $aMenu[] = array("TEXT" => GetMessage("SPSN_DELETE_PAYSYS"), "LINK" => "javascript:if(confirm('" . GetMessage("SPSN_DELETE_PAYSYS_CONFIRM") . "')) window.location='/bitrix/admin/sale_pay_system.php?action=delete&ID[]=" . $ID . "&lang=" . LANG . "&" . bitrix_sessid_get() . "#tb';", "WARNING" => "Y", "ICON" => "btn_delete");
}
$context = new CAdminContextMenu($aMenu);
$context->Show();
?>

<?php 
if (strlen($errorMessage) > 0) {
    echo CAdminMessage::ShowMessage(array("DETAILS" => $errorMessage, "TYPE" => "ERROR", "MESSAGE" => GetMessage("SPSN_ERROR"), "HTML" => true));
}
?>

<script language="JavaScript">
<!--
function SetActLinkText(ind, flag)
{
	var paySysActSwitch = document.getElementById("pay_sys_switch_" + ind);
	if (flag)
	{
		paySysActSwitch.innerHTML = "<br><?php 
echo GetMessage("SPS_HIDE_PROPS");
?>
";
	}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:pay_system_edit.php

示例15: RaiseErrorAndDie

function RaiseErrorAndDie($strError, $bRepeat = false)
{
    if ($bRepeat) {
        $strError .= '<br><input type=button value="' . GetMessage('DUMP_RETRY') . '" onclick="RetryRequest()" id="retry_button">
		<script>window.setTimeout(RetryRequest, 60000);</script>';
    }
    CAdminMessage::ShowMessage(array("MESSAGE" => GetMessage("MAIN_DUMP_ERROR"), "DETAILS" => $strError, "TYPE" => "ERROR", "HTML" => true));
    echo '<script>EndDump();</script>';
    die;
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:10,代码来源:dump.php


注:本文中的CAdminMessage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。