本文整理汇总了PHP中CSocNetLogTools::HasLogEventCreatedBy方法的典型用法代码示例。如果您正苦于以下问题:PHP CSocNetLogTools::HasLogEventCreatedBy方法的具体用法?PHP CSocNetLogTools::HasLogEventCreatedBy怎么用?PHP CSocNetLogTools::HasLogEventCreatedBy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSocNetLogTools
的用法示例。
在下文中一共展示了CSocNetLogTools::HasLogEventCreatedBy方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __SLEGetTransport
function __SLEGetTransport($arFields, $arCurrentUserSubscribe)
{
if (array_key_exists($arFields["ENTITY_TYPE"] . "_" . $arFields["ENTITY_ID"] . "_" . $arFields["EVENT_ID"] . "_N_N", $arCurrentUserSubscribe["TRANSPORT"])) {
$arTransport[] = $arCurrentUserSubscribe["TRANSPORT"][$arFields["ENTITY_TYPE"] . "_" . $arFields["ENTITY_ID"] . "_" . $arFields["EVENT_ID"] . "_N_N"];
}
if (array_key_exists($arFields["ENTITY_TYPE"] . "_" . $arFields["ENTITY_ID"] . "_all_N_N", $arCurrentUserSubscribe["TRANSPORT"])) {
$arTransport[] = $arCurrentUserSubscribe["TRANSPORT"][$arFields["ENTITY_TYPE"] . "_" . $arFields["ENTITY_ID"] . "_all_N_N"];
}
$bHasLogEventCreatedBy = CSocNetLogTools::HasLogEventCreatedBy($arFields["EVENT_ID"]);
if ($bHasLogEventCreatedBy) {
if ($arFields["EVENT_ID"]) {
if (array_key_exists("U_" . $arFields["USER_ID"] . "_all_N_Y", $arCurrentUserSubscribe["TRANSPORT"])) {
$arTransport[] = $arCurrentUserSubscribe["TRANSPORT"]["U_" . $arFields["USER_ID"] . "_all_N_Y"];
} elseif (array_key_exists("U_" . $arFields["USER_ID"] . "_all_Y_Y", $arCurrentUserSubscribe["TRANSPORT"])) {
$arTransport[] = $arCurrentUserSubscribe["TRANSPORT"]["U_" . $arFields["USER_ID"] . "_all_Y_Y"];
}
}
}
if (!array_key_exists($arFields["ENTITY_TYPE"] . "_" . $arFields["ENTITY_ID"] . "_" . $arFields["EVENT_ID"] . "_N_N", $arCurrentUserSubscribe["TRANSPORT"]) && !array_key_exists($arFields["ENTITY_TYPE"] . "_" . $arFields["ENTITY_ID"] . "_all_N_N", $arCurrentUserSubscribe["TRANSPORT"])) {
if (array_key_exists($arFields["ENTITY_TYPE"] . "_0_" . $arFields["EVENT_ID"] . "_N_N", $arCurrentUserSubscribe["TRANSPORT"])) {
$arTransport[] = $arCurrentUserSubscribe["TRANSPORT"][$arFields["ENTITY_TYPE"] . "_0_" . $arFields["EVENT_ID"] . "_N_N"];
} elseif (array_key_exists($arFields["ENTITY_TYPE"] . "_0_all_N_N", $arCurrentUserSubscribe["TRANSPORT"])) {
$arTransport[] = $arCurrentUserSubscribe["TRANSPORT"][$arFields["ENTITY_TYPE"] . "_0_all_N_N"];
} else {
$arTransport[] = "N";
}
}
$arTransport = array_unique($arTransport);
usort($arTransport, "__SLTransportSort");
return $arTransport;
}
示例2: __SLMGetVisible
function __SLMGetVisible($arFields, $arCurrentUserSubscribe, $arMyEntities = array())
{
$bHasLogEventCreatedBy = CSocNetLogTools::HasLogEventCreatedBy($arFields["EVENT_ID"]);
if (array_key_exists($arFields["ENTITY_TYPE"] . "_" . $arFields["ENTITY_ID"] . "_" . $arFields["EVENT_ID"] . "_N_N", $arCurrentUserSubscribe["VISIBLE"])) {
$strVisible = $arCurrentUserSubscribe["VISIBLE"][$arFields["ENTITY_TYPE"] . "_" . $arFields["ENTITY_ID"] . "_" . $arFields["EVENT_ID"] . "_N_N"];
} elseif ($bHasLogEventCreatedBy && array_key_exists("U_" . $arFields["USER_ID"] . "_" . $arFields["EVENT_ID"] . "_N_Y", $arCurrentUserSubscribe["VISIBLE"])) {
$strVisible = $arCurrentUserSubscribe["VISIBLE"]["U_" . $arFields["USER_ID"] . "_" . $arFields["EVENT_ID"] . "_N_Y"];
} elseif (array_key_exists($arFields["ENTITY_TYPE"] . "_" . $arFields["ENTITY_ID"] . "_all_N_N", $arCurrentUserSubscribe["VISIBLE"])) {
$strVisible = $arCurrentUserSubscribe["VISIBLE"][$arFields["ENTITY_TYPE"] . "_" . $arFields["ENTITY_ID"] . "_all_N_N"];
} elseif ($bHasLogEventCreatedBy && array_key_exists("U_" . $arFields["USER_ID"] . "_all_N_Y", $arCurrentUserSubscribe["VISIBLE"])) {
$strVisible = $arCurrentUserSubscribe["VISIBLE"]["U_" . $arFields["USER_ID"] . "_all_N_Y"];
} elseif (array_key_exists($arFields["ENTITY_TYPE"], $arMyEntities) && in_array($arFields["ENTITY_ID"], $arMyEntities[$arFields["ENTITY_TYPE"]]) && array_key_exists($arFields["ENTITY_TYPE"] . "_0_" . $arFields["EVENT_ID"] . "_Y_N", $arCurrentUserSubscribe["VISIBLE"])) {
$strVisible = $arCurrentUserSubscribe["VISIBLE"][$arFields["ENTITY_TYPE"] . "_0_" . $arFields["EVENT_ID"] . "_Y_N"];
} elseif (array_key_exists($arFields["ENTITY_TYPE"], $arMyEntities) && in_array($arFields["ENTITY_ID"], $arMyEntities[$arFields["ENTITY_TYPE"]]) && array_key_exists($arFields["ENTITY_TYPE"] . "_0_all_Y_N", $arCurrentUserSubscribe["VISIBLE"])) {
$strVisible = $arCurrentUserSubscribe["VISIBLE"][$arFields["ENTITY_TYPE"] . "_0_all_Y_N"];
} elseif (array_key_exists($arFields["ENTITY_TYPE"] . "_0_" . $arFields["EVENT_ID"] . "_N_N", $arCurrentUserSubscribe["VISIBLE"])) {
$strVisible = $arCurrentUserSubscribe["VISIBLE"][$arFields["ENTITY_TYPE"] . "_0_" . $arFields["EVENT_ID"] . "_N_N"];
} elseif (array_key_exists($arFields["ENTITY_TYPE"] . "_0_all_N_N", $arCurrentUserSubscribe["VISIBLE"])) {
$strVisible = $arCurrentUserSubscribe["VISIBLE"][$arFields["ENTITY_TYPE"] . "_0_all_N_N"];
} else {
$strVisible = "Y";
}
return $strVisible;
}
示例3: str_replace
}
if ($arEvent) {
$arSubscribe["EVENT"]["TITLE"] = $arEvent["ENTITIES"][$entity_type]["TITLE_SETTINGS"];
if (array_key_exists("NAME_FORMATTED", $arEntityTmp) && strlen($arEntityTmp["NAME_FORMATTED"]) > 0) {
$arSubscribe["EVENT"]["TITLE_1"] = str_replace(array("#TITLE#"), array(array_key_exists("~NAME_FORMATTED", $arEntityTmp) ? $arEntityTmp["~NAME_FORMATTED"] : $arEntityTmp["NAME_FORMATTED"]), $arEvent["ENTITIES"][$entity_type]["TITLE_SETTINGS_1"]);
$arSubscribe["EVENT"]["TITLE_2"] = str_replace(array("#TITLE#"), array(array_key_exists("~NAME_FORMATTED", $arEntityTmp) ? $arEntityTmp["~NAME_FORMATTED"] : $arEntityTmp["NAME_FORMATTED"]), $arEvent["ENTITIES"][$entity_type]["TITLE_SETTINGS_2"]);
}
}
if (array_key_exists($entity_type, $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"]) && array_key_exists("TITLE_SETTINGS_ALL", $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$entity_type]) && strlen($GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$entity_type]["TITLE_SETTINGS_ALL"]) > 0) {
$arSubscribe["ALL"]["TITLE"] = $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$entity_type]["TITLE_SETTINGS_ALL"];
}
if (array_key_exists($entity_type, $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"]) && array_key_exists("TITLE_SETTINGS_ALL_1", $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$entity_type]) && strlen($GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$entity_type]["TITLE_SETTINGS_ALL_1"]) > 0 && array_key_exists("NAME_FORMATTED", $arEntityTmp) && strlen($arEntityTmp["NAME_FORMATTED"]) > 0) {
$arSubscribe["ALL"]["TITLE_1"] = str_replace(array("#TITLE#"), array(array_key_exists("~NAME_FORMATTED", $arEntityTmp) ? $arEntityTmp["~NAME_FORMATTED"] : $arEntityTmp["NAME_FORMATTED"]), $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$entity_type]["TITLE_SETTINGS_ALL_1"]);
$arSubscribe["ALL"]["TITLE_2"] = str_replace(array("#TITLE#"), array(array_key_exists("~NAME_FORMATTED", $arEntityTmp) ? $arEntityTmp["~NAME_FORMATTED"] : $arEntityTmp["NAME_FORMATTED"]), $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$entity_type]["TITLE_SETTINGS_ALL_2"]);
}
if (CSocNetLogTools::HasLogEventCreatedBy($event_id)) {
$value_default = "N";
$strTmp = "TRANSPORT";
if (!array_key_exists("CB_EVENT", $arSubscribe) || !array_key_exists($strTmp, $arSubscribe["CB_EVENT"]) || $arSubscribe["CB_EVENT"][$strTmp] == "I") {
if (array_key_exists("CB_ALL", $arSubscribe) && array_key_exists($strTmp, $arSubscribe["CB_ALL"]) && $arSubscribe["CB_ALL"][$strTmp] != "I") {
$arSubscribe["CB_EVENT"][$strTmp] = $arSubscribe["CB_ALL"][$strTmp];
$arSubscribe["CB_EVENT"][$strTmp . "_INHERITED"] = true;
} else {
$arSubscribe["CB_EVENT"][$strTmp] = $value_default;
$arSubscribe["CB_EVENT"][$strTmp . "_INHERITED"] = true;
}
}
if (!array_key_exists("CB_ALL", $arSubscribe) || !array_key_exists($strTmp, $arSubscribe["CB_ALL"]) || $arSubscribe["CB_ALL"][$strTmp] == "I") {
$arSubscribe["CB_ALL"][$strTmp] = $value_default;
$arSubscribe["CB_ALL"][$strTmp . "_INHERITED"] = true;
}
示例4: HasLogEventCreatedBy
function HasLogEventCreatedBy($event_id)
{
return CSocNetLogTools::HasLogEventCreatedBy($event_id);
}