本文整理汇总了PHP中CEventType::GetList方法的典型用法代码示例。如果您正苦于以下问题:PHP CEventType::GetList方法的具体用法?PHP CEventType::GetList怎么用?PHP CEventType::GetList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEventType
的用法示例。
在下文中一共展示了CEventType::GetList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: InstallDB
function InstallDB($arParams = array())
{
RegisterModuleDependences('main', 'OnBuildGlobalMenu', self::MODULE_ID, 'CIpdesignK', 'OnBuildGlobalMenu');
$arsites = array();
$rsSites = CSite::GetList($by="sort", $order="desc", false);
while ($arSite = $rsSites->Fetch()){
$arsites[] = $arSite['ID'];
}
$arFilter = array(
"TYPE_ID" => "SENDWISHLIST",
);
$rsET = CEventType::GetList($arFilter);
$arET = $rsET->Fetch();
if(empty($arET)){
$et = new CEventType;
$arMessageFields = array("USER_ID" => $UserProduct['USER']['ID'],
"USER_NAME" => $UserProduct['USER']["NAME"].' '.$UserProduct['USER']["LAST_NAME"],
"USER_EMAIL" => $UserProduct['USER']["EMAIL"],
"PRODUCTS_LIST" => $strListProduct);
$DESCRIPTION = '#USER_ID# - '.GetMessage("IT_BASKET_SENDER_USER_ID");
$DESCRIPTION .= '\n#USER_NAME# - '.GetMessage("IT_BASKET_SENDER_USER_NAME");
$DESCRIPTION .= '\n#USER_EMAIL# - '.GetMessage("IT_BASKET_SENDER_USER_EMAIL");
$DESCRIPTION .= '\n#PRODUCTS_LIST# - '.GetMessage("IT_BASKET_SENDER_PRODUCTS_LIST");
$sendType = $et->Add(array(
"LID" => 'ru',
"EVENT_NAME" => "SENDWISHLIST",
"NAME" => GetMessage("IT_SENDER_TYPE_NAME"),
"DESCRIPTION" => $DESCRIPTION
));
}else{
$sendType = $arET['ID'];
}
$rsMess = CEventMessage::GetList($by="site_id", $order="desc", array('TYPE' => 'SENDWISHLIST'));
$arMess = $rsMess->Fetch();
if(empty($arMess)){
$message = '';
$message .= '<h2>'.GetMessage("IT_BASKET_SENDER_TEMPLATE_HELLO").',#USER_NAME#</h2>';
$message .= '<p>'.GetMessage("IT_BASKET_SENDER_TEMPLATE_WHISHLIST").'</p>';
$message .= '<hr />';
$message .= '#PRODUCTS_LIST#';
$arFields = array("ACTIVE" => 'Y',
"EVENT_NAME" => "SENDWISHLIST",
"LID" => $arsites,
"EMAIL_FROM" => "#DEFAULT_EMAIL_FROM#",
"EMAIL_TO" => "#USER_EMAIL#",
"BCC" => "",
"MESSAGE" => $message,
"BODY_TYPE" => "html",
"SUBJECT" => GetMessage("IT_SENDER_MESSAGE_SUBJECT"). " #SERVER_NAME# ",
);
$emess = new CEventMessage;
if($emess->Add($arFields)){
}
};
RegisterModuleDependences("sale", "OnCondSaleActionsControlBuildList", self::MODULE_ID, "CSaleActionCtrlBasketMain", "GetControlDescr");
RegisterModuleDependences("main", "OnBeforeProlog", "main", "", "", 110, '/modules/ipdesign.k1785/itdiscount.php');
return true;
}
示例2: GetAdditionalFields
function GetAdditionalFields($id = 0){
$arFieldList = array(
"ID" => "SEND_MAIL",
"SIZE" => 5,
"TYPE" => "SELECT",
"CTYPE" => "SINGLE",
"VALUES" => array()
);
$curEventMessage = array();
$arFilter = array(
"ACTIVE" => "Y"
);
if($id > 0){
$arFilter["ID"] = $id;
}
//echo "<pre>";print_r($arFilter);echo "</pre>";
$rsEmailTemplates = CEventMessage::GetList($by, $order, $arFilter);
if($arEmailTemplate = $rsEmailTemplates->GetNext()){
//echo "<pre>";print_r($arEmailTemplate);echo "</pre>";
$arFieldList["VALUES"][] = array(
"ID" => $arEmailTemplate["ID"],
"NAME" => $arEmailTemplate["EVENT_TYPE"]
);
$curEventMessage = array(
"ID" => $arEmailTemplate["ID"],
"TYPE_ID" => $arEmailTemplate["EVENT_NAME"]
);
}
if($id > 0 && !empty($curEventMessage)){
$rsEmailEventType = CEventType::GetList(
array(
"TYPE_ID" => $curEventMessage["TYPE_ID"],
"LID" => "ru"
)
);
if($arEmailEventType = $rsEmailEventType->Fetch()){
//echo "<pre>";print_r($arEmailEventType);echo "</pre>";
preg_match_all('/#([A-Za-z_]+)#/iu', $arEmailEventType["DESCRIPTION"], $out);
//echo "<pre>";print_r($out);echo "</pre>";die;
if(!empty($out[0])){
return implode(",",$out[0]);
}
}else{
return "";
}
//return ($arEmailEventType = $rsEmailEventType->Fetch() ? $arEmailEventType["DESCRIPTION"] : "");
}else{
return "";
}
}
示例3: addEventTypeIfNotExists
/**
* @param $eventName
* @param $fields array(), key LID = language id
* @return bool|int
* @throws \Sprint\Migration\Exceptions\HelperException
*/
public function addEventTypeIfNotExists($eventName, $fields)
{
$this->checkRequiredKeys(__METHOD__, $fields, array('LID'));
/** @noinspection PhpDynamicAsStaticMethodCallInspection */
$aItem = \CEventType::GetList(array('TYPE_ID' => $eventName, 'LID' => $fields['LID']))->Fetch();
if ($aItem) {
return $aItem['ID'];
}
$default = array("LID" => $fields['LID'], "EVENT_NAME" => 'event_name', "NAME" => 'NAME', "DESCRIPTION" => 'description');
$fields = array_replace_recursive($default, $fields);
$fields['EVENT_NAME'] = $eventName;
$event = new \CEventType();
$id = $event->Add($fields);
if ($id) {
return $id;
}
$this->throwException(__METHOD__, 'Event type %s not added', $eventName);
}
示例4: CreateMailTemplate
public static function CreateMailTemplate($ID)
{
$ID = trim($ID);
if ('' == $ID) {
return false;
}
if (!($arStatus = CSaleStatus::GetByID($ID, LANGUAGE_ID))) {
return false;
}
$eventType = new CEventType();
$eventMessage = new CEventMessage();
$eventType->Delete("SALE_STATUS_CHANGED_" . $ID);
$b = 'sort';
$o = 'asc';
$dbSiteList = CSite::GetList($b, $o);
while ($arSiteList = $dbSiteList->Fetch()) {
IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/sale/general/status.php", $arSiteList["LANGUAGE_ID"]);
$arStatusLang = CSaleStatus::GetLangByID($ID, $arSiteList["LANGUAGE_ID"]);
$dbEventType = $eventType->GetList(array("EVENT_NAME" => "SALE_STATUS_CHANGED_" . $ID, "LID" => $arSiteList["LANGUAGE_ID"]));
if (!($arEventType = $dbEventType->Fetch())) {
$str = "";
$str .= "#ORDER_ID# - " . GetMessage("SKGS_ORDER_ID") . "\n";
$str .= "#ORDER_DATE# - " . GetMessage("SKGS_ORDER_DATE") . "\n";
$str .= "#ORDER_STATUS# - " . GetMessage("SKGS_ORDER_STATUS") . "\n";
$str .= "#EMAIL# - " . GetMessage("SKGS_ORDER_EMAIL") . "\n";
$str .= "#ORDER_DESCRIPTION# - " . GetMessage("SKGS_STATUS_DESCR") . "\n";
$str .= "#TEXT# - " . GetMessage("SKGS_STATUS_TEXT") . "\n";
$str .= "#SALE_EMAIL# - " . GetMessage("SKGS_SALE_EMAIL") . "\n";
$eventTypeID = $eventType->Add(array("LID" => $arSiteList["LANGUAGE_ID"], "EVENT_NAME" => "SALE_STATUS_CHANGED_" . $ID, "NAME" => GetMessage("SKGS_CHANGING_STATUS_TO") . " \"" . $arStatusLang["NAME"] . "\"", "DESCRIPTION" => $str));
}
$dbEventMessage = $eventMessage->GetList($b = "", $o = "", array("EVENT_NAME" => "SALE_STATUS_CHANGED_" . $ID, "SITE_ID" => $arSiteList["LID"]));
if (!($arEventMessage = $dbEventMessage->Fetch())) {
$subject = GetMessage("SKGS_STATUS_MAIL_SUBJ");
$message = GetMessage("SKGS_STATUS_MAIL_BODY1");
$message .= "------------------------------------------\n\n";
$message .= GetMessage("SKGS_STATUS_MAIL_BODY2");
$message .= GetMessage("SKGS_STATUS_MAIL_BODY3");
$message .= "#ORDER_STATUS#\n";
$message .= "#ORDER_DESCRIPTION#\n";
$message .= "#TEXT#\n\n";
$message .= "#SITE_NAME#\n";
$arFields = array("ACTIVE" => "Y", "EVENT_NAME" => "SALE_STATUS_CHANGED_" . $ID, "LID" => $arSiteList["LID"], "EMAIL_FROM" => "#SALE_EMAIL#", "EMAIL_TO" => "#EMAIL#", "SUBJECT" => $subject, "MESSAGE" => $message, "BODY_TYPE" => "text");
$eventMessageID = $eventMessage->Add($arFields);
}
}
return true;
}
示例5: GetMessage
<tr>
<td><?php
echo GetMessage("MAIN_F_EVENT_TYPE");
?>
</td>
<td><input type="text" name="find_event_type" size="47" value="<?php
echo htmlspecialcharsbx($find_event_type);
?>
"><?php
echo ShowFilterLogicHelp();
?>
<br><?php
$event_type_ref = array();
$event_type_ref_id = array();
$ref_en = array();
$rsType = CEventType::GetList(array("LID" => LANGUAGE_ID), array("name" => "asc"));
while ($arType = $rsType->Fetch()) {
$event_type_ref[] = $arType["NAME"] . ($arType["NAME"] == '' ? '' : ' ') . "[" . $arType["EVENT_NAME"] . "]";
$event_type_ref_id[] = $arType["EVENT_NAME"];
}
$arr = array("REFERENCE" => $event_type_ref, "REFERENCE_ID" => $event_type_ref_id);
echo SelectBoxFromArray("find_type_id", $arr, htmlspecialcharsbx($find_type_id), GetMessage("MAIN_ALL"));
?>
</td>
</tr>
<tr>
<td><?php
echo GetMessage("MAIN_F_TIMESTAMP") . ":";
?>
</td>
<td><?php
示例6: Fetch
function Fetch()
{
$arr = array();
$arr_lid = array();
$arr_lids = array();
if ($res = parent::Fetch()) {
if ($this->type != "none") {
$db_res_ = CEventType::GetList(array("EVENT_NAME" => $res["EVENT_NAME"]));
if ($db_res_ && ($res_ = $db_res_->Fetch())) {
do {
$arr[$res_["ID"]] = $res_;
$arr_lid[] = $res_["LID"];
$arr_lids[$res_["LID"]] = $res_;
} while ($res_ = $db_res_->Fetch());
}
$res["ID"] = array_keys($arr);
$res["LID"] = $arr_lid;
$res["NAME"] = empty($arr_lids[$this->LID]["NAME"]) ? $arr_lids["en"]["NAME"] : $arr_lids[$this->LID]["NAME"];
$res["SORT"] = empty($arr_lids[$this->LID]["SORT"]) ? $arr_lids["en"]["SORT"] : $arr_lids[$this->LID]["SORT"];
$res["DESCRIPTION"] = empty($arr_lids[$this->LID]["DESCRIPTION"]) ? $arr_lids["en"]["DESCRIPTION"] : $arr_lids[$this->LID]["DESCRIPTION"];
$res["TYPE"] = $arr;
if ($this->type != "type") {
$arr = array();
$db_res_ = CEventMessage::GetList($sort = "sort", $by = "asc", array("EVENT_NAME" => $res["EVENT_NAME"]));
if ($db_res_ && ($res_ = $db_res_->Fetch())) {
do {
$arr[$res_["ID"]] = $res_;
} while ($res_ = $db_res_->Fetch());
}
$res["TEMPLATES"] = $arr;
}
}
}
return $res;
}
示例7: array
<?php
/*
* This file is part of the Studio Fact package.
*
* (c) Kulichkin Denis (onEXHovia) <onexhovia@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) {
die;
}
use Bitrix\Main\Localization\Loc;
Loc::loadMessages(__FILE__);
$eventTypeList = array();
$eventType = CEventType::GetList(array('LID' => SITE_ID));
while ($item = $eventType->GetNext()) {
$eventTypeList[$item['EVENT_NAME']] = sprintf('[%s] %s', $item['EVENT_NAME'], $item['NAME']);
}
$eventTemplateList = array();
if (strlen($arCurrentValues['EVENT_NAME']) > 0) {
$eventTemplate = CEventMessage::GetList($o = '', $b = '', array('EVENT_NAME' => $arCurrentValues['EVENT_NAME']));
while ($item = $eventTemplate->GetNext()) {
$eventTemplateList[$item['ID']] = sprintf('[%d] %s', $item['ID'], $item['SUBJECT']);
}
}
$arComponentParameters = array('PARAMETERS' => array('ID' => array('PARENT' => 'BASE', 'NAME' => Loc::getMessage('ID'), 'TYPE' => 'STRING'), 'TYPE' => array('PARENT' => 'BASE', 'NAME' => Loc::getMessage('TYPE'), 'TYPE' => 'LIST', 'VALUES' => array('IBLOCK' => Loc::getMessage('TYPE_IBLOCK'), 'HLBLOCK' => Loc::getMessage('TYPE_HLBLOCK'), 'CUSTOM' => Loc::getMessage('TYPE_CUSTOM'))), 'ALIAS_FIELDS' => array('NAME' => Loc::getMessage('ALIAS_FIELDS'), 'TYPE' => 'CUSTOM', 'ADDITIONAL_VALUES' => 'Y', 'MULTIPLE' => 'Y', 'VALUES' => array()), 'DISPLAY_FIELDS' => array('NAME' => Loc::getMessage('DISPLAY_FIELDS'), 'TYPE' => 'STRING', 'ADDITIONAL_VALUES' => 'Y', 'MULTIPLE' => 'Y', 'VALUES' => array()), 'ATTACH_FIELDS' => array('NAME' => Loc::getMessage('ATTACH_FIELDS'), 'TYPE' => 'STRING', 'ADDITIONAL_VALUES' => 'Y', 'MULTIPLE' => 'Y', 'VALUES' => array()), 'EVENT_NAME' => array('NAME' => Loc::getMessage('EVENT_NAME'), 'TYPE' => 'LIST', 'ADDITIONAL_VALUES' => 'Y', 'VALUES' => $eventTypeList, 'REFRESH' => 'Y', 'DEFAULT' => ''), 'EVENT_TEMPLATE' => array('NAME' => Loc::getMessage('EVENT_TEMPLATE'), 'TYPE' => 'LIST', 'VALUES' => $eventTemplateList, 'ADDITIONAL_VALUES' => 'Y', 'DEFAULT' => ''), 'EVENT_TYPE' => array('NAME' => Loc::getMessage('EVENT_TYPE'), 'TYPE' => 'STRING', 'DEFAULT' => ''), 'BUILDER' => array('NAME' => Loc::getMessage('BUILDER'), 'TYPE' => 'STRING', 'DEFAULT' => ''), 'STORAGE' => array('NAME' => Loc::getMessage('STORAGE'), 'TYPE' => 'STRING', 'DEFAULT' => ''), 'VALIDATOR' => array('NAME' => Loc::getMessage('VALIDATOR'), 'TYPE' => 'STRING', 'DEFAULT' => ''), 'AJAX' => array('NAME' => Loc::getMessage('AJAX'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => ''), 'USE_CAPTCHA' => array('NAME' => Loc::getMessage('USE_CAPTCHA'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'Y'), 'USE_CSRF' => array('NAME' => Loc::getMessage('USE_CSRF'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'Y'), 'REDIRECT_PATH' => array('NAME' => Loc::getMessage('REDIRECT_PATH'), 'TYPE' => 'STRING', 'DEFAULT' => ''), 'CACHE_TIME' => array('DEFAULT' => 36000000), 'CACHE_GROUPS' => array('PARENT' => 'CACHE_SETTINGS', 'NAME' => Loc::getMessage('CACHE_GROUPS'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'Y')));
示例8: CEventType
function __construct()
{
$eventMessage = new CEventType();
$getList = $eventMessage->GetList();
while ($data = $getList->Fetch()) {
$this->items[] = $data;
}
}
示例9: GetMessage
$emess->Add(array("ACTIVE" => "Y", "EVENT_NAME" => $eventName, "LID" => $arSites, "EMAIL_FROM" => "#SALE_EMAIL#", "EMAIL_TO" => "#EMAIL#", "BCC" => "#BCC#", "SUBJECT" => GetMessage($eventName . "_SUBJECT"), "MESSAGE" => $message, "BODY_TYPE" => "html"));
}
$emess = new CEventMessage();
$emess->Add(array("ACTIVE" => "Y", "EVENT_NAME" => "SALE_NEW_ORDER_RECURRING", "LID" => $arSites, "EMAIL_FROM" => "#SALE_EMAIL#", "EMAIL_TO" => "#EMAIL#", "BCC" => "#BCC#", "SUBJECT" => GetMessage("SALE_NEW_ORDER_RECURRING_SUBJECT"), "MESSAGE" => GetMessage("SALE_NEW_ORDER_RECURRING_MESSAGE"), "BODY_TYPE" => "text"));
$emess = new CEventMessage();
$emess->Add(array("ACTIVE" => "Y", "EVENT_NAME" => "SALE_RECURRING_CANCEL", "LID" => $arSites, "EMAIL_FROM" => "#SALE_EMAIL#", "EMAIL_TO" => "#EMAIL#", "BCC" => "#BCC#", "SUBJECT" => GetMessage("SALE_RECURRING_CANCEL_SUBJECT"), "MESSAGE" => GetMessage("SALE_RECURRING_CANCEL_MESSAGE"), "BODY_TYPE" => "text"));
}
$dbStatus = CSaleStatus::GetList(array($by => $order), array(), false, false, array("ID"));
while ($arStatus = $dbStatus->Fetch()) {
$ID = $arStatus["ID"];
$eventType = new CEventType();
$eventMessage = new CEventMessage();
IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/sale/general/status.php", $lid);
$arStatusLang = CSaleStatus::GetLangByID($ID, $lid);
$template = str_replace("#SITE_CHARSET#", $lang["CHARSET"], $templateGeneral);
$dbEventType = $eventType->GetList(array("EVENT_NAME" => "SALE_STATUS_CHANGED_" . $ID, "LID" => $lid));
if (!($arEventType = $dbEventType->Fetch())) {
$str = "";
$str .= "#ORDER_ID# - " . GetMessage("SKGS_ORDER_ID") . "\n";
$str .= "#ORDER_DATE# - " . GetMessage("SKGS_ORDER_DATE") . "\n";
$str .= "#ORDER_STATUS# - " . GetMessage("SKGS_ORDER_STATUS") . "\n";
$str .= "#EMAIL# - " . GetMessage("SKGS_ORDER_EMAIL") . "\n";
$str .= "#ORDER_DESCRIPTION# - " . GetMessage("SKGS_STATUS_DESCR") . "\n";
$str .= "#TEXT# - " . GetMessage("SKGS_STATUS_TEXT") . "\n";
$str .= "#SALE_EMAIL# - " . GetMessage("SKGS_SALE_EMAIL") . "\n";
$eventTypeID = $eventType->Add(array("LID" => $lid, "EVENT_NAME" => "SALE_STATUS_CHANGED_" . $ID, "NAME" => GetMessage("SKGS_CHANGING_STATUS_TO") . " \"" . $arStatusLang["NAME"] . "\"", "DESCRIPTION" => $str));
}
if (count($arSites) > 0) {
$dbEventMessage = $eventMessage->GetList($b = "", $o = "", array("EVENT_NAME" => "SALE_STATUS_CHANGED_" . $ID, "SITE_ID" => $arSites));
if (!($arEventMessage = $dbEventMessage->Fetch())) {
$message = GetMessage("SKGS_STATUS_MAIL_BODY1");
示例10: array
}
}
}
$arEventsType = array("FORUM_NEW_MESSAGE_MAIL");
$OLD_MESS = $MESS;
$langs = CLanguage::GetList($b = "", $o = "");
while ($lang = $langs->Fetch()) {
$arSites = array();
$sites = CLang::GetList($by, $order, array("LANGUAGE_ID" => $lang["LID"]));
while ($site = $sites->Fetch()) {
$arSites[] = $site["LID"];
}
$langFile = $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/forum/lang/" . $lang["LID"] . "/install/events.php";
if (!file_exists($langFile)) {
continue;
}
$MESS = array();
include $langFile;
foreach ($arEventsType as $event) {
$fres = CEventType::GetList(array("EVENT_NAME" => $event, "LID" => $lang["LID"]));
if (!$fres->Fetch()) {
$et = new CEventType();
$et->Add(array("LID" => $lang["LID"], "EVENT_NAME" => $event, "NAME" => $MESS[$event . "_NAME"], "DESCRIPTION" => $MESS[$event . "_DESC"]));
if (is_array($arSites) && count($arSites) > 0) {
$em = new CEventMessage();
$em->Add(array("ACTIVE" => "Y", "EVENT_NAME" => $event, "LID" => $arSites, "EMAIL_FROM" => "#FROM_EMAIL#", "EMAIL_TO" => "#RECIPIENT#", "SUBJECT" => "#TOPIC_TITLE#", "MESSAGE" => $MESS[$event . "_MESSAGE"], "BODY_TYPE" => "text"));
}
}
}
}
$MESS = $OLD_MESS;
示例11: CEventType
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
$ET = new CEventType();
$oEventType = $ET->GetList(array("EVENT_NAME" => "ADD_IDEA_COMMENT"));
if (!$oEventType->Fetch()) {
$oLang = CLanguage::GetList($b = "", $o = "");
while ($arLang = $oLang->Fetch()) {
IncludeModuleLangFile(__FILE__, $arLang["LID"]);
//Event Type
$ET->Add(array("LID" => $arLang["LID"], "EVENT_NAME" => "ADD_IDEA_COMMENT", "NAME" => GetMessage("IDEA_EVENT_ADD_IDEA_COMMENT"), "DESCRIPTION" => '#FULL_PATH# - ' . GetMessage("IDEA_EVENT_ADD_IDEA_COMMENT_PARAM_FULL_PATH") . "\n" . '#IDEA_TITLE# - ' . GetMessage("IDEA_EVENT_ADD_IDEA_COMMENT_PARAM_IDEA_TITLE") . "\n" . '#AUTHOR# - ' . GetMessage("IDEA_EVENT_ADD_IDEA_COMMENT_PARAM_AUTHOR") . "\n" . '#IDEA_COMMENT_TEXT# - ' . GetMessage("IDEA_EVENT_ADD_IDEA_COMMENT_PARAM_IDEA_COMMENT_TEXT") . "\n" . '#DATE_CREATE# - ' . GetMessage("IDEA_EVENT_ADD_IDEA_COMMENT_PARAM_DATE_CREATE") . "\n" . '#EMAIL_TO# - ' . GetMessage("IDEA_EVENT_ADD_IDEA_COMMENT_PARAM_EMAIL_TO")));
$arSites = array();
$oSite = CLang::GetList($by = "", $order = "", array("LANGUAGE_ID" => $arLang["LID"]));
while ($arSite = $oSite->Fetch()) {
$arSites[] = $arSite["LID"];
}
//Template for Event Type
if (!empty($arSites)) {
$EM = new CEventMessage();
$EM->Add(array("ACTIVE" => "Y", "EVENT_NAME" => "ADD_IDEA_COMMENT", "LID" => $arSites, "EMAIL_FROM" => "#DEFAULT_EMAIL_FROM#", "EMAIL_TO" => "#EMAIL_TO#", "SUBJECT" => "#SITE_NAME#: " . GetMessage("IDEA_EVENT_ADD_IDEA_COMMENT") . ": #IDEA_TITLE#", "MESSAGE" => GetMessage("ADD_IDEA_COMMENT_TEMPLATE"), "BODY_TYPE" => "text"));
}
}
}
$oEventType = $ET->GetList(array("EVENT_NAME" => "ADD_IDEA"));
if (!$oEventType->Fetch()) {
$oLang = CLanguage::GetList($b = "", $o = "");
while ($arLang = $oLang->Fetch()) {
IncludeModuleLangFile(__FILE__, $arLang["LID"]);
//Event Type
示例12: while
<?php
$langs = CLanguage::GetList($b = "", $o = "");
while ($lang = $langs->Fetch()) {
$db_events = CEventType::GetList(array("EVENT_NAME" => "VOTE_FOR", "LID" => $lang["LID"]));
if (!$db_events->Fetch()) {
IncludeModuleLangFile(__FILE__, $lang["LID"]);
$et = new CEventType();
$et->Add(array("LID" => $lang["LID"], "EVENT_NAME" => "VOTE_FOR", "NAME" => GetMessage("VOTE_FOR_NAME"), "DESCRIPTION" => GetMessage("VOTE_FOR_DESC")));
$arSites = array();
$sites = CSite::GetList($b = "", $o = "", array("LANGUAGE_ID" => $lang["LID"]));
while ($site = $sites->Fetch()) {
$arSites[] = $site["LID"];
}
if (count($arSites) > 0) {
$emess = new CEventMessage();
$emess->Add(array("ACTIVE" => "Y", "EVENT_NAME" => "VOTE_FOR", "LID" => $arSites, "EMAIL_FROM" => "#DEFAULT_EMAIL_FROM#", "EMAIL_TO" => "#EMAIL_TO#", "SUBJECT" => GetMessage("VOTE_FOR_SUBJECT"), "MESSAGE" => GetMessage("VOTE_FOR_MESSAGE"), "BODY_TYPE" => "text"));
}
}
}
示例13: array
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
CModule::IncludeModule("iblock");
$dbIBlockType = CIBlock::GetList(array("sort" => "asc"), array("ACTIVE" => "Y"));
while ($arIBlockType = $dbIBlockType->Fetch()) {
$arIblockType[$arIBlockType["ID"]] = "[" . $arIBlockType["ID"] . "] " . $arIBlockType["NAME"];
}
$arFilter = array("LID" => "ru");
$rsET = CEventType::GetList($arFilter);
while ($arET = $rsET->Fetch()) {
$arEventType[$arET["ID"]] = "[" . $arET["ID"] . "] " . $arET["EVENT_NAME"];
}
$arComponentParameters = array('PARAMETERS' => array('IBLOCK_ID' => array('NAME' => 'Id инфоблока для сохранения', 'TYPE' => 'LIST', 'VALUES' => $arIblockType, 'MULTIPLE' => 'N', 'PARENT' => 'BASE', 'REFRESH' => 'Y'), 'EVENT_TYPE' => array('NAME' => 'Тип почтового события', 'TYPE' => 'LIST', 'VALUES' => $arEventType, 'MULTIPLE' => 'N', 'PARENT' => 'BASE'), 'LINK_SUCCESS' => array('NAME' => 'Путь в случае успешного добавления элемента', 'TYPE' => 'STRING'), 'CACHE_TIME' => array('DEFAULT' => 3600)));
示例14: CEventType
{
$et = new CEventType();
$et->Add(array("LID" => $LID, "EVENT_NAME" => $EVENT_NAME, "NAME" => $NAME, "DESCRIPTION" => $DESCRIPTION));
}
$em = new CEventMessage();
$langs = CLanguage::GetList($b = "", $o = "");
$evtMsg = 0;
while ($lang = $langs->Fetch()) {
WizardServices::IncludeServiceLang("feedback.php", $lang["LID"]);
$arSites = array();
$sites = CLang::GetList($by, $order, array("LANGUAGE_ID" => $lang["LID"]));
while ($site = $sites->Fetch()) {
$arSites[] = $site["LID"];
}
///////////////////// FEEDBACK_FORM /////////////////////
$fres = CEventType::GetList(array("EVENT_NAME" => "NEW_FEEDBACK_FORM", "LID" => $lang["LID"]));
if (!$fres->Fetch()) {
UET("NEW_FEEDBACK_FORM", GetMessage("FEEDBACK_FORM_NAME"), $lang["LID"], "\n\t\t\t#AUTHOR# - " . GetMessage("FEEDBACK_FORM_AUTHOR") . "\n #AUTHOR_EMAIL# - " . GetMessage("FEEDBACK_FORM_EMAIL") . "\n #TEXT# - " . GetMessage("FEEDBACK_FORM_TEXT") . "\n #EMAIL_FROM# - " . GetMessage("FEEDBACK_FORM_EMAIL_FROM") . "\n #EMAIL_TO# - " . GetMessage("FEEDBACK_FORM_EMAIL_TO") . "\n #LINK# " . GetMessage("FEEDBACK_FORM_EMAIL_TO"));
if (is_array($arSites) && count($arSites) > 0) {
//****************************************************************
$evtMsg = $em->Add(array("ACTIVE" => "Y", "EVENT_NAME" => "NEW_FEEDBACK_FORM", "LID" => $arSites, "EMAIL_FROM" => "#DEFAULT_EMAIL_FROM#", "EMAIL_TO" => "#EMAIL_TO#", "SUBJECT" => "#SITE_NAME#: " . GetMessage("FEEDBACK_FORM_DESC"), "MESSAGE" => GetMessage("FEEDBACK_FORM_BODY"), "BODY_TYPE" => "text"));
//****************************************************************
}
} else {
$arFilter = array("EVENT_NAME" => "NEW_FEEDBACK_FORM");
$rsMess = $em->GetList($by = "site_id", $order = "desc", $arFilter);
$arMess = $rsMess->Fetch();
$evtMsg = $arMess["ID"];
}
}
CWizardUtil::ReplaceMacros($_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates/webfly_san/footer.php", array("WF_FEEDBACK_EVENT" => $evtMsg));
示例15: array
$arTypesEx[$arRes["ID"]] = $arIBType["NAME"];
}
}
}
$arIBlocks = array();
if ($arCurrentValues["USE_IBLOCK"] == 'Y') {
$db_iblock = CIBlock::GetList(array("SORT" => "ASC"), array("SITE_ID" => $_REQUEST["site"], "TYPE" => $arCurrentValues["IBLOCK_TYPE"] != "-" ? $arCurrentValues["IBLOCK_TYPE"] : ""));
while ($arRes = $db_iblock->Fetch()) {
$arIBlocks[$arRes["ID"]] = $arRes["NAME"];
}
}
$arSections = array();
if (intval($arCurrentValues["IBLOCK_ID"]) > 0) {
$dbSect = CIBlockSection::GetList(array('left_margin' => 'asc'), array('IBLOCK_ID' => $arCurrentValues["IBLOCK_ID"]));
while ($arSect = $dbSect->Fetch()) {
$arSections[$arSect['ID']] = '[' . $arSect['ID'] . ']' . str_repeat('.', $arSect['DEPTH_LEVEL']) . ' ' . $arSect['NAME'];
}
}
$arEvents = array();
if ($arCurrentValues["SEND_NOTIFICATION"] == 'Y') {
$dbEvent = CEventType::GetList(array('LID' => SITE_ID), array('TYPE_ID' => 'ASC'));
while ($arEvent = $dbEvent->Fetch()) {
$arEvents[$arEvent['EVENT_NAME']] = $arEvent['NAME'];
}
}
$arGroups = array();
$dbGroup = CGroup::GetList($by = "c_sort", $order = "desc");
while ($arGroup = $dbGroup->Fetch()) {
$arGroups[$arGroup['ID']] = '[' . $arGroup['ID'] . '] ' . $arGroup['NAME'];
}
$arComponentParameters = array("GROUPS" => array(), "PARAMETERS" => array("FORM_CODE" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("CN_FORM_CODE_PARAM_TITLE"), "TYPE" => "STRING", "DEFAULT" => "custom"), "USE_IBLOCK" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("CN_USE_IBLOCK_PARAM_TITLE"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y"), "IBLOCK_TYPE" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("T_IBLOCK_DESC_LIST_TYPE"), "TYPE" => "LIST", "VALUES" => $arTypesEx, "DEFAULT" => "news", "REFRESH" => "Y"), "IBLOCK_ID" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("T_IBLOCK_DESC_LIST_ID"), "TYPE" => "LIST", "VALUES" => $arIBlocks, "DEFAULT" => '', "MULTIPLE" => "N", "REFRESH" => "Y"), "PARENT_SECTION_ID" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("CN_PARENT_SECTION_ID_PARAM_TITLE"), "TYPE" => "LIST", "DEFAULT" => "0", "VALUES" => $arSections), "ACTIVE_ITEM" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("CN_ACTIVE_ITEM"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "AJAX_OPEN_FORM" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("CN_AJAX_OPEN_FORM_PARAM_TITLE"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "ENABLE_FAKE_FORM" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("CN_ENABLE_FAKE_FORM_PARAM_TITLE"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "SEND_NOTIFICATION" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("CN_SEND_NOTIFICATION_PARAM_TITLE"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y"), "EVENT_NAME" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("CN_EVENT_NAME_PARAM_TITLE"), "TYPE" => "LIST", "DEFAULT" => "", "VALUES" => $arEvents), "SHOW_FOR_USER_GROUPS" => array("PARENT" => "ACCESS", "NAME" => Loc::GetMessage("CN_SHOW_FOR_USER_GROUPS_PARAM_TITLE"), "TYPE" => "LIST", "VALUES" => $arGroups, "DEFAULT" => '', "MULTIPLE" => "Y"), "ENABLE_FOR_USER_GROUPS" => array("PARENT" => "ACCESS", "NAME" => Loc::GetMessage("CN_ENABLE_FOR_USER_GROUPS_PARAM_TITLE"), "TYPE" => "LIST", "VALUES" => $arGroups, "DEFAULT" => '', "MULTIPLE" => "Y"), "NOT_ENABLE_NOTE" => array("PARENT" => "ACCESS", "NAME" => Loc::GetMessage("CN_NOT_ENABLE_NOTE_PARAM_TITLE"), "TYPE" => "STRING", "ROWS" => 3, "DEFAULT" => ""), 'CACHE_TIME' => array()));