本文整理汇总了PHP中CSite::GetDefSite方法的典型用法代码示例。如果您正苦于以下问题:PHP CSite::GetDefSite方法的具体用法?PHP CSite::GetDefSite怎么用?PHP CSite::GetDefSite使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSite
的用法示例。
在下文中一共展示了CSite::GetDefSite方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: InstallFiles
function InstallFiles()
{
if ($_ENV['COMPUTERNAME'] != 'BX') {
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/im/install/js", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/js", true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/im/install/components", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components", true, true);
CopyDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/im/install/activities', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/activities', true, true);
CopyDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/im/install/admin', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/admin', true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/im/install/templates", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates", True, True);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/im/install/public", $_SERVER["DOCUMENT_ROOT"] . "/", True, True);
$default_site_id = CSite::GetDefSite();
if ($default_site_id) {
$arAppTempalate = array("SORT" => 1, "CONDITION" => "CSite::InDir('/desktop_app/')", "TEMPLATE" => "desktop_app");
$arFields = array("TEMPLATE" => array());
$dbTemplates = CSite::GetTemplateList($default_site_id);
$desktopAppFound = false;
while ($template = $dbTemplates->Fetch()) {
if ($template["TEMPLATE"] == "desktop_app") {
$desktopAppFound = true;
$template = $arAppTempalate;
}
$arFields["TEMPLATE"][] = array("TEMPLATE" => $template['TEMPLATE'], "SORT" => $template['SORT'], "CONDITION" => $template['CONDITION']);
}
if (!$desktopAppFound) {
$arFields["TEMPLATE"][] = $arAppTempalate;
}
$obSite = new CSite();
$arFields["LID"] = $default_site_id;
$obSite->Update($default_site_id, $arFields);
}
$GLOBALS["APPLICATION"]->SetFileAccessPermission('/desktop_app/', array("*" => "R"));
}
return true;
}
示例2: InstallFiles
function InstallFiles()
{
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/mobile/public/mobile/", $_SERVER["DOCUMENT_ROOT"] . "/mobile/", True, True);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/mobile/install/templates/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates/", True, True);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/mobile/install/components/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components", true, true);
$default_site_id = CSite::GetDefSite();
if ($default_site_id) {
$arAppTempalate = array("SORT" => 1, "CONDITION" => "CSite::InDir('/mobile/')", "TEMPLATE" => "mobile_app");
$arFields = array("TEMPLATE" => array());
$dbTemplates = CSite::GetTemplateList($default_site_id);
$mobileAppFound = false;
while ($template = $dbTemplates->Fetch()) {
if ($template["TEMPLATE"] == "mobile_app") {
$mobileAppFound = true;
$template = $arAppTempalate;
}
$arFields["TEMPLATE"][] = array("TEMPLATE" => $template['TEMPLATE'], "SORT" => $template['SORT'], "CONDITION" => $template['CONDITION']);
}
if (!$mobileAppFound) {
$arFields["TEMPLATE"][] = $arAppTempalate;
}
$obSite = new CSite();
$arFields["LID"] = $default_site_id;
$obSite->Update($default_site_id, $arFields);
}
CUrlRewriter::ReindexFile("/mobile/webdav/index.php");
CUrlRewriter::ReindexFile("/mobile/disk/index.php");
CUrlRewriter::Add(array("CONDITION" => "#^/mobile/disk/(?<hash>[0-9]+)/download#", "RULE" => "download=1&objectId=\$1", "ID" => "bitrix:mobile.disk.file.detail", "PATH" => "/mobile/disk/index.php"));
return true;
}
示例3: InstallFiles
function InstallFiles($site_dir = "/", $default_site_id = false)
{
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/eshopapp/install/components", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components", true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/eshopapp/install/templates/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates/", true, true);
if (!$default_site_id) {
$default_site_id = CSite::GetDefSite();
}
if ($default_site_id) {
$arAppTempalate = array("SORT" => 1, "CONDITION" => "CSite::InDir('" . $site_dir . "eshop_app/')", "TEMPLATE" => "eshop_app");
$arFields = array("TEMPLATE" => array());
$dbTemplates = CSite::GetTemplateList($default_site_id);
$eshopAppFound = false;
while ($template = $dbTemplates->Fetch()) {
if ($template["TEMPLATE"] == "eshop_app") {
$eshopAppFound = true;
$template = $arAppTempalate;
}
$arFields["TEMPLATE"][] = array("TEMPLATE" => $template['TEMPLATE'], "SORT" => $template['SORT'], "CONDITION" => $template['CONDITION']);
}
if (!$eshopAppFound) {
$arFields["TEMPLATE"][] = $arAppTempalate;
}
$obSite = new CSite();
$arFields["LID"] = $default_site_id;
$obSite->Update($default_site_id, $arFields);
}
return true;
}
示例4: processActionCreateDefaultProcesses
protected function processActionCreateDefaultProcesses()
{
try {
$defaultSiteId = CSite::GetDefSite();
$iterator = CSite::GetByID($defaultSiteId);
$site = $iterator->Fetch();
$defaultLang = $site ? $site['LANGUAGE_ID'] : 'en';
if ($defaultLang == 'ua') {
$defaultLang = 'ru';
}
\Bitrix\Lists\Importer::installProcesses($defaultLang, $this->request->getPost('siteId'));
} catch (Exception $e) {
$this->errorCollection->add(array(new Error($e->getMessage())));
}
if ($this->errorCollection->hasErrors()) {
$this->sendJsonErrorResponse();
}
$this->sendJsonSuccessResponse();
}
示例5: __deprecated_Add
//.........这里部分代码省略.........
$MESSAGE = preg_replace("/(\\s\\[\\s(http:\\/\\/|https:\\/\\/|ftp:\\/\\/))(.*?)(\\s\\])/is", "", $MESSAGE);
$parser->allow = array("HTML" => 'Y', "ANCHOR" => 'Y', "BIU" => 'Y', "IMG" => "Y", "VIDEO" => "Y", "LIST" => 'N', "QUOTE" => 'Y', "CODE" => 'Y', "FONT" => 'Y', "SMILES" => "N", "UPLOAD" => 'N', "NL2BR" => 'N', "TABLE" => "Y");
$message_notify = $parser->convertText($commentText);
$arRecipientsIDs = CTaskNotifications::GetRecipientsIDs($arTask);
// Instant Messages
if (IsModuleInstalled("im") && CModule::IncludeModule("im") && sizeof($arRecipientsIDs)) {
$pageNumber = CForumMessage::GetMessagePage($MID, $messagesPerPage, $arUserGroupArray);
// There are different links for extranet users
$isExtranetEnabled = false;
if (CModule::IncludeModule("extranet")) {
$isExtranetEnabled = true;
}
if ($isExtranetEnabled) {
$arSites = array();
$dbSite = CSite::GetList($by = "sort", $order = "desc", array("ACTIVE" => "Y"));
while ($arSite = $dbSite->Fetch()) {
if (strlen(trim($arSite["DIR"])) > 0) {
$arSites[$arSite['ID']]['DIR'] = $arSite['DIR'];
} else {
$arSites[$arSite['ID']]['DIR'] = '/';
}
if (strlen(trim($arSite["SERVER_NAME"])) > 0) {
$arSites[$arSite['ID']]['SERVER_NAME'] = $arSite["SERVER_NAME"];
} else {
$arSites[$arSite['ID']]['SERVER_NAME'] = COption::GetOptionString("main", "server_name", $_SERVER["HTTP_HOST"]);
}
$arSites[$arSite['ID']]['urlPrefix'] = $arSites[$arSite['ID']]['SERVER_NAME'] . $arSites[$arSite['ID']]['DIR'];
// remove last '/'
if (strlen($arSites[$arSite['ID']]['urlPrefix']) > 0 && substr($arSites[$arSite['ID']]['urlPrefix'], -1) === '/') {
$arSites[$arSite['ID']]['urlPrefix'] = substr($arSites[$arSite['ID']]['urlPrefix'], 0, -1);
}
}
$extranet_site_id = CExtranet::GetExtranetSiteID();
$intranet_site_id = CSite::GetDefSite();
$arIntranetUsers = CExtranet::GetIntranetUsers();
} else {
if ($arTask["GROUP_ID"]) {
$pathTemplateWoExtranet = str_replace("#group_id#", $arTask["GROUP_ID"], COption::GetOptionString("tasks", "paths_task_group_entry", "/workgroups/group/#group_id#/tasks/task/view/#task_id#/", $arFields["SITE_ID"]));
} else {
$pathTemplateWoExtranet = COption::GetOptionString("tasks", "paths_task_user_entry", "/company/personal/user/#user_id#/tasks/task/view/#task_id#/", $arFields["SITE_ID"]);
}
}
foreach ($arRecipientsIDs as $userID) {
$urlPrefixForUser = tasksServerName();
if ($isExtranetEnabled) {
if (!in_array($userID, $arIntranetUsers) && $extranet_site_id) {
$userSiteId = $extranet_site_id;
} else {
$userSiteId = $intranet_site_id;
}
if (isset($arSites[$userSiteId]['SERVER_NAME'])) {
$urlPrefixForUser = tasksServerName($arSites[$userSiteId]['SERVER_NAME']);
}
if ($arTask["GROUP_ID"]) {
$pathTemplate = str_replace('#group_id#', $arTask['GROUP_ID'], CTasksTools::GetOptionPathTaskGroupEntry($userSiteId, ''));
} else {
$pathTemplate = CTasksTools::GetOptionPathTaskUserEntry($userSiteId, '');
}
} else {
$pathTemplate = $pathTemplateWoExtranet;
}
$NOTIFY_MESSAGE_TITLE_TEMPLATE = '';
$messageUrl = '';
if (strlen($pathTemplate) > 0) {
$groupId = 0;
if (isset($arTask['GROUP_ID'])) {
示例6: IncludeModuleLangFile
<?php
require $_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/include/prolog_admin_before.php';
IncludeModuleLangFile(__FILE__);
$SITE_ID = isset($_GET['SITE_ID']) ? $_GET['SITE_ID'] : false;
if ($SITE_ID !== false) {
if (!CSite::GetByID($SITE_ID)->Fetch()) {
$SITE_ID = false;
}
} else {
$SITE_ID = CSite::GetDefSite();
}
if ($SITE_ID === false || CModule::IncludeModule('extranet') && CExtranet::IsExtranetSite($SITE_ID)) {
die(GetMessage('CC_BSC1_WRONG_SITE'));
}
if (!function_exists('simplexml_load_string')) {
die(GetMessage('CC_BSC1_SIMPLE_XML_MISSING'));
}
$APPLICATION->IncludeComponent('bitrix:intranet.users.import.1c.hrxml', '', array('IBLOCK_TYPE' => COption::GetOptionString('intranet', 'iblock_type', '', $SITE_ID), 'DEPARTMENTS_IBLOCK_ID' => COption::GetOptionInt('intranet', 'iblock_structure', '', $SITE_ID), 'ABSENCE_IBLOCK_ID' => COption::GetOptionInt('intranet', 'iblock_absence', '', $SITE_ID), 'STATE_HISTORY_IBLOCK_ID' => COption::GetOptionInt('intranet', 'iblock_state_history', '', $SITE_ID), 'IBLOCK_TYPE_VACANCY' => COption::GetOptionString('intranet', 'iblock_type_vacancy', '', $SITE_ID), 'VACANCY_IBLOCK_ID' => COption::GetOptionInt('intranet', 'iblock_vacancy', '', $SITE_ID), 'SITE_ID' => COption::GetOptionString('intranet', 'import_SITE_ID', '', $SITE_ID), 'GROUP_PERMISSIONS' => unserialize(COption::GetOptionString('intranet', 'import_GROUP_PERMISSIONS', '', $SITE_ID)), 'DEFAULT_EMAIL' => COption::GetOptionString('intranet', 'import_DEFAULT_EMAIL', '', $SITE_ID), 'UNIQUE_EMAIL' => COption::GetOptionString('intranet', 'import_UNIQUE_EMAIL', '', $SITE_ID), 'LOGIN_TEMPLATE' => COption::GetOptionString('intranet', 'import_LOGIN_TEMPLATE', '', $SITE_ID), 'EMAIL_NOTIFY' => COption::GetOptionString('intranet', 'import_EMAIL_NOTIFY', '', $SITE_ID), 'EMAIL_NOTIFY_IMMEDIATELY' => COption::GetOptionString('intranet', 'import_EMAIL_NOTIFY_IMMEDIATELY', '', $SITE_ID), 'UPDATE_PROPERTIES' => unserialize(COption::GetOptionString('intranet', 'import_UPDATE_PROPERTIES', '', $SITE_ID)), 'LDAP_ID_PROPERTY_XML_ID' => COption::GetOptionString('intranet', 'import_LDAP_ID_PROPERTY_XML_ID', '', $SITE_ID), 'LDAP_SERVER' => COption::GetOptionString('intranet', 'import_LDAP_SERVER', '', $SITE_ID)), null, array('HIDE_ICONS' => 'Y'));
示例7: SendEvent
function SendEvent($ID, $mailTemplate = "SONET_NEW_EVENT")
{
$ID = IntVal($ID);
if ($ID <= 0) {
return false;
}
$arFilter = array("ID" => $ID);
$dbLogComments = CSocNetLogComments::GetList(array(), $arFilter, false, false, array("ID", "LOG_ID", "ENTITY_TYPE", "ENTITY_ID", "USER_ID", "USER_NAME", "USER_LAST_NAME", "USER_SECOND_NAME", "USER_LOGIN", "EVENT_ID", "LOG_DATE", "MESSAGE", "TEXT_MESSAGE", "URL", "MODULE_ID", "GROUP_NAME", "CREATED_BY_NAME", "CREATED_BY_SECOND_NAME", "CREATED_BY_LAST_NAME", "CREATED_BY_LOGIN", "LOG_SITE_ID", "SOURCE_ID", "LOG_SOURCE_ID"));
$arLogComment = $dbLogComments->Fetch();
if (!$arLogComment) {
return false;
}
$arLog = array();
if (intval($arLogComment["LOG_ID"]) > 0) {
$dbLog = CSocNetLog::GetList(array(), array("ID" => $arLogComment["LOG_ID"]));
$arLog = $dbLog->Fetch();
if (!$arLog) {
$arLog = array();
}
}
$arEvent = CSocNetLogTools::FindLogCommentEventByID($arLogComment["EVENT_ID"]);
if ($arEvent && array_key_exists("CLASS_FORMAT", $arEvent) && array_key_exists("METHOD_FORMAT", $arEvent) && strlen($arEvent["CLASS_FORMAT"]) > 0 && strlen($arEvent["METHOD_FORMAT"]) > 0) {
$dbSiteCurrent = CSite::GetByID(SITE_ID);
if ($arSiteCurrent = $dbSiteCurrent->Fetch()) {
if ($arSiteCurrent["LANGUAGE_ID"] != LANGUAGE_ID) {
$arLogComment["MAIL_LANGUAGE_ID"] = $arSiteCurrent["LANGUAGE_ID"];
}
}
$arLogComment["FIELDS_FORMATTED"] = call_user_func(array($arEvent["CLASS_FORMAT"], $arEvent["METHOD_FORMAT"]), $arLogComment, array(), true, $arLog);
}
if (array_key_exists($arLogComment["ENTITY_TYPE"], $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"]) && array_key_exists("HAS_MY", $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]) && $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]["HAS_MY"] == "Y" && array_key_exists("CLASS_OF", $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]) && array_key_exists("METHOD_OF", $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]) && strlen($GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]["CLASS_OF"]) > 0 && strlen($GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]["METHOD_OF"]) > 0 && method_exists($GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]["CLASS_OF"], $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]["METHOD_OF"])) {
$arOfEntities = call_user_func(array($GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]["CLASS_OF"], $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$arLogComment["ENTITY_TYPE"]]["METHOD_OF"]), $arLogComment["ENTITY_ID"]);
}
$arListParams = array("USE_SUBSCRIBE" => "Y", "ENTITY_TYPE" => $arLogComment["ENTITY_TYPE"], "ENTITY_ID" => $arLogComment["ENTITY_ID"], "EVENT_ID" => $arLogComment["EVENT_ID"], "USER_ID" => $arLogComment["USER_ID"], "OF_ENTITIES" => $arOfEntities, "TRANSPORT" => array("M", "X"));
$arLogSites = array();
$rsLogSite = CSocNetLog::GetSite($arLog["ID"]);
while ($arLogSite = $rsLogSite->Fetch()) {
$arLogSites[] = $arLogSite["LID"];
}
if (CModule::IncludeModule("extranet")) {
if ($arLogComment["ENTITY_TYPE"] == SONET_ENTITY_GROUP) {
$arSites = array();
$dbSite = CSite::GetList($by = "sort", $order = "desc", array("ACTIVE" => "Y"));
while ($arSite = $dbSite->Fetch()) {
$arSites[$arSite["ID"]] = array("DIR" => strlen(trim($arSite["DIR"])) > 0 ? $arSite["DIR"] : "/", "SERVER_NAME" => strlen(trim($arSite["SERVER_NAME"])) > 0 ? $arSite["SERVER_NAME"] : COption::GetOptionString("main", "server_name", $_SERVER["HTTP_HOST"]));
}
$intranet_site_id = CSite::GetDefSite();
}
$arIntranetUsers = CExtranet::GetIntranetUsers();
$extranet_site_id = CExtranet::GetExtranetSiteID();
}
$dbSubscribers = CSocNetLogEvents::GetList(array("TRANSPORT" => "DESC"), array("USER_ACTIVE" => "Y", "SITE_ID" => array_merge($arLogSites, array(false))), false, false, array("USER_ID", "ENTITY_TYPE", "ENTITY_ID", "ENTITY_CB", "ENTITY_MY", "USER_NAME", "USER_LAST_NAME", "USER_LOGIN", "USER_LID", "USER_EMAIL", "TRANSPORT"), $arListParams);
$arListParams = array("USE_SUBSCRIBE" => "Y", "ENTITY_TYPE" => $arLogComment["ENTITY_TYPE"], "ENTITY_ID" => $arLogComment["ENTITY_ID"], "EVENT_ID" => $arLogComment["EVENT_ID"], "USER_ID" => $arLogComment["USER_ID"], "OF_ENTITIES" => $arOfEntities, "TRANSPORT" => "N");
$dbUnSubscribers = CSocNetLogEvents::GetList(array("TRANSPORT" => "DESC"), array("USER_ACTIVE" => "Y", "SITE_ID" => array_merge($arLogSites, array(false))), false, false, array("USER_ID", "SITE_ID", "ENTITY_TYPE", "ENTITY_ID", "ENTITY_CB", "ENTITY_MY", "TRANSPORT", "EVENT_ID"), $arListParams);
$arUnSubscribers = array();
while ($arUnSubscriber = $dbUnSubscribers->Fetch()) {
$arUnSubscribers[] = $arUnSubscriber["USER_ID"] . "_" . $arUnSubscriber["ENTITY_TYPE"] . "_" . $arUnSubscriber["ENTITY_ID"] . "_" . $arUnSubscriber["ENTITY_MY"] . "_" . $arUnSubscriber["ENTITY_CB"] . "_" . $arUnSubscriber["EVENT_ID"];
}
$bHasAccessAll = CSocNetLogRights::CheckForUserAll($arLog["ID"] ? $arLog["ID"] : $arLogComment["LOG_ID"]);
$arSentUserID = array("M" => array(), "X" => array());
while ($arSubscriber = $dbSubscribers->Fetch()) {
if (is_array($arIntranetUsers) && !in_array($arSubscriber["USER_ID"], $arIntranetUsers) && !in_array($extranet_site_id, $arLogSites)) {
continue;
}
if (array_key_exists($arSubscriber["TRANSPORT"], $arSentUserID) && in_array($arSubscriber["USER_ID"], $arSentUserID[$arSubscriber["TRANSPORT"]])) {
continue;
}
if (intval($arSubscriber["ENTITY_ID"]) != 0 && $arSubscriber["EVENT_ID"] == "all" && (in_array($arSubscriber["USER_ID"] . "_" . $arSubscriber["ENTITY_TYPE"] . "_" . $arSubscriber["ENTITY_ID"] . "_N_" . $arSubscriber["ENTITY_CB"] . "_" . $arLogComment["EVENT_ID"], $arUnSubscribers) || in_array($arSubscriber["USER_ID"] . "_" . $arSubscriber["ENTITY_TYPE"] . "_" . $arSubscriber["ENTITY_ID"] . "_Y_" . $arSubscriber["ENTITY_CB"] . "_" . $arLogComment["EVENT_ID"], $arUnSubscribers))) {
continue;
} elseif (intval($arSubscriber["ENTITY_ID"]) == 0 && $arSubscriber["ENTITY_CB"] == "N" && $arSubscriber["EVENT_ID"] != "all" && (in_array($arSubscriber["USER_ID"] . "_" . $arSubscriber["ENTITY_TYPE"] . "_" . $arLogComment["ENTITY_ID"] . "_Y_N_all", $arUnSubscribers) || in_array($arSubscriber["USER_ID"] . "_" . $arSubscriber["ENTITY_TYPE"] . "_" . $arLogComment["ENTITY_ID"] . "_N_N_all", $arUnSubscribers) || in_array($arSubscriber["USER_ID"] . "_" . $arSubscriber["ENTITY_TYPE"] . "_" . $arLogComment["ENTITY_ID"] . "_Y_N_" . $arLogComment["EVENT_ID"], $arUnSubscribers) || in_array($arSubscriber["USER_ID"] . "_" . $arSubscriber["ENTITY_TYPE"] . "_" . $arLogComment["ENTITY_ID"] . "_N_N_" . $arLogComment["EVENT_ID"], $arUnSubscribers))) {
continue;
}
$arSentUserID[$arSubscriber["TRANSPORT"]][] = $arSubscriber["USER_ID"];
if (!$bHasAccessAll) {
$bHasAccess = CSocNetLogRights::CheckForUserOnly($arLog["ID"] ? $arLog["ID"] : $arLogComment["LOG_ID"], $arSubscriber["USER_ID"]);
if (!$bHasAccess) {
continue;
}
}
if ($arLogComment["ENTITY_TYPE"] == SONET_ENTITY_GROUP && is_array($arIntranetUsers) && CModule::IncludeModule("extranet")) {
$server_name = $arSites[!in_array($arSubscriber["USER_ID"], $arIntranetUsers) && $extranet_site_id ? $extranet_site_id : $intranet_site_id]["SERVER_NAME"];
$arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["URL_TO_SEND"] = str_replace(array("#SERVER_NAME#", "#GROUPS_PATH#"), array($server_name, COption::GetOptionString("socialnetwork", "workgroups_page", false, !in_array($arSubscriber["USER_ID"], $arIntranetUsers) && $extranet_site_id ? $extranet_site_id : $intranet_site_id)), $arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["URL"]);
} else {
$arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["URL_TO_SEND"] = $arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["URL"];
}
switch ($arSubscriber["TRANSPORT"]) {
case "X":
if (array_key_exists("URL_TO_SEND", $arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]) && strlen($arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["URL_TO_SEND"]) > 0) {
$link = GetMessage("SONET_GLC_SEND_EVENT_LINK") . $arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["URL_TO_SEND"];
} else {
$link = "";
}
$arMessageFields = array("FROM_USER_ID" => intval($arLogComment["USER_ID"]) > 0 ? $arLogComment["USER_ID"] : 1, "TO_USER_ID" => $arSubscriber["USER_ID"], "MESSAGE" => $arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["TITLE"] . " #BR# " . $arLogComment["FIELDS_FORMATTED"]["EVENT_FORMATTED"]["MESSAGE"] . (strlen($link) > 0 ? "#BR# " . $link : ""), "=DATE_CREATE" => $GLOBALS["DB"]->CurrentTimeFunction(), "MESSAGE_TYPE" => SONET_MESSAGE_SYSTEM, "IS_LOG" => "Y");
CSocNetMessages::Add($arMessageFields);
break;
case "M":
$arFields["SUBSCRIBER_ID"] = $arSubscriber["USER_ID"];
$arFields["SUBSCRIBER_NAME"] = $arSubscriber["USER_NAME"];
$arFields["SUBSCRIBER_LAST_NAME"] = $arSubscriber["USER_LAST_NAME"];
$arFields["SUBSCRIBER_LOGIN"] = $arSubscriber["USER_LOGIN"];
//.........这里部分代码省略.........
示例8: CheckSites
function CheckSites($arSite)
{
$arResult = array();
if (!is_array($arSite)) {
$arSite = array($arSite);
}
foreach ($arSite as $site_id) {
if (strlen($site_id) > 0) {
$rsSite = CSite::GetByID($site_id);
if ($rsSite->Fetch()) {
$arResult[] = $site_id;
}
}
}
if (!defined("ADMIN_SECTION")) {
$rsSite = CSite::GetByID(SITE_ID);
if ($rsSite->Fetch()) {
$arResult[] = SITE_ID;
}
}
if (count($arResult) < 1) {
$arResult[] = CSite::GetDefSite();
}
return $arResult;
}
示例9: getShopLocationParams
private static function getShopLocationParams($siteId = false)
{
$loc_diff = COption::GetOptionString('sale', 'ADDRESS_different_set', 'N');
if ($loc_diff == "Y" && ($siteId !== false || defined(SITE_ID))) {
if ($siteId === false) {
$siteId = SITE_ID;
}
$locId = COption::GetOptionString('sale', 'location', '', $siteId);
$locZip = COption::GetOptionString('sale', 'location_zip', '', $siteId);
} else {
$locId = COption::GetOptionString('sale', 'location', '');
$locZip = COption::GetOptionString('sale', 'location_zip', '');
if (strlen($locId) <= 0) {
static $defSite = null;
if (!isset($defSite)) {
$defSite = CSite::GetDefSite();
}
if ($defSite) {
$locId = COption::GetOptionString('sale', 'location', '', $defSite);
$locZip = COption::GetOptionString('sale', 'location_zip', '', $defSite);
}
}
}
if ((string) $locId != '') {
$location = self::getLocationByIdHitCached($locId);
if (intval($location['ID'])) {
$locId = $location['ID'];
}
}
return array('ID' => $locId, 'ZIP' => $locZip);
}
示例10: installDemoData
function installDemoData()
{
if (!CModule::IncludeModule("iblock")) {
return;
}
$currentPermissions = CLists::GetPermission();
unset($currentPermissions["bitrix_processes"]);
unset($currentPermissions["lists"]);
$socnet_iblock_type_id = COption::GetOptionString("lists", "socnet_iblock_type_id");
$isSocnetInstalled = IsModuleInstalled('socialnetwork');
$arTypes = array();
if (empty($currentPermissions)) {
$arTypes[] = array("ID" => "lists", "SECTIONS" => "Y", "IN_RSS" => "N", "SORT" => 80, "LANG" => array());
$arTypes[] = array("ID" => "bitrix_processes", "SECTIONS" => "Y", "IN_RSS" => "N", "SORT" => 90, "LANG" => array());
}
if ($isSocnetInstalled && strlen($socnet_iblock_type_id) <= 0) {
$arTypes[] = array("ID" => "lists_socnet", "SECTIONS" => "Y", "IN_RSS" => "N", "SORT" => 83, "LANG" => array());
}
$arLanguages = array();
if (!empty($arTypes)) {
$rsLanguage = CLanguage::GetList($by, $order, array());
while ($arLanguage = $rsLanguage->Fetch()) {
$arLanguages[] = $arLanguage["LID"];
}
}
foreach ($arTypes as $arType) {
$dbType = CIBlockType::GetList(array(), array("=ID" => $arType["ID"]));
if (!$dbType->Fetch()) {
foreach ($arLanguages as $languageID) {
IncludeModuleLangFile(__FILE__, $languageID);
$code = strtoupper($arType["ID"]);
$arType["LANG"][$languageID]["NAME"] = GetMessage($code . "_TYPE_NAME");
$arType["LANG"][$languageID]["ELEMENT_NAME"] = GetMessage($code . "_ELEMENT_NAME");
if ($arType["SECTIONS"] == "Y") {
$arType["LANG"][$languageID]["SECTION_NAME"] = GetMessage($code . "_SECTION_NAME");
}
}
$iblockType = new CIBlockType();
$iblockType->Add($arType);
}
}
if (empty($currentPermissions)) {
CLists::SetPermission('lists', array(1));
CLists::SetPermission('bitrix_processes', array(1));
}
$defaultSiteId = CSite::GetDefSite();
$siteObject = CSite::GetByID($defaultSiteId);
$site = $siteObject->fetch();
$defaultLang = $site ? $site['LANGUAGE_ID'] : 'en';
if ($defaultLang == 'ua') {
$defaultLang = 'ru';
}
\Bitrix\Lists\Importer::installProcesses($defaultLang);
if (IsModuleInstalled("bitrix24")) {
\Bitrix\Main\Config\Option::set("lists", "livefeed_url", "/company/processes/");
} else {
\Bitrix\Main\Config\Option::set("lists", "livefeed_url", "/services/processes/");
}
if ($isSocnetInstalled && strlen($socnet_iblock_type_id) <= 0) {
COption::SetOptionString("lists", "socnet_iblock_type_id", "lists_socnet");
CLists::EnableSocnet(true);
}
}
示例11: settingsConverter
/**
* Moves settings from options to DB
*/
public static function settingsConverter()
{
$settings = static::getSettings();
if (!empty($settings) && !empty($settings["SETTINGS"])) {
return false;
}
if (!CSaleYMHandler::install()) {
return false;
}
$settings = array();
$rsSites = CSite::GetList($by = "sort", $order = "asc", array());
while ($arSite = $rsSites->Fetch()) {
$serSiteSett = COption::GetOptionString("sale", "yandex_market_purchase_settings", "", $arSite["ID"], true);
$siteSett = unserialize($serSiteSett);
if (is_array($siteSett) && !empty($siteSett)) {
$settings[$arSite["ID"]] = $siteSett;
}
}
if (empty($settings)) {
$serSiteSett = COption::GetOptionString("sale", "yandex_market_purchase_settings", "");
$siteSett = unserialize($serSiteSett);
if (is_array($siteSett) && !empty($siteSett)) {
$settings[CSite::GetDefSite()] = $siteSett;
}
}
if (empty($settings)) {
return false;
}
if (!CSaleYMHandler::saveSettings($settings)) {
return false;
}
if (!CSaleYMHandler::setActivity(true)) {
return false;
}
if (!CSaleYMHandler::eventsStart()) {
return false;
}
return true;
}
示例12: ProcessPath
function ProcessPath($arUrl, $user_id, $explicit_site_id = false)
{
static $arIntranetUsers, $arSiteData, $extranet_site_id, $intranet_site_id;
if (!is_array($arUrl)) {
$arUrl = array($arUrl);
}
if (CModule::IncludeModule("extranet") && !$arIntranetUsers) {
$extranet_site_id = CExtranet::GetExtranetSiteID();
$intranet_site_id = CSite::GetDefSite();
$arIntranetUsers = CExtranet::GetIntranetUsers();
}
if (!$arSiteData) {
$arSiteData = self::GetSiteData();
}
$user_site_id = IsModuleInstalled("extranet") ? !in_array($user_id, $arIntranetUsers) && $extranet_site_id ? $extranet_site_id : ($explicit_site_id ? $explicit_site_id : $intranet_site_id) : ($explicit_site_id ? $explicit_site_id : SITE_ID);
$server_name = (CMain::IsHTTPS() ? "https" : "http") . "://" . $arSiteData[$user_site_id]["SERVER_NAME"];
$arUrl = str_replace(array("#SERVER_NAME#", "#GROUPS_PATH#", "#USER_PATH#"), array($server_name, $arSiteData[$user_site_id]["GROUPS_PATH"], $arSiteData[$user_site_id]["USER_PATH"]), $arUrl);
return array("SERVER_NAME" => $server_name, "URLS" => $arUrl, "DOMAIN" => count($arSiteData) > 1 ? $arSiteData[$user_site_id]["SERVER_NAME"] : false);
}
示例13: MailMessageAgent
public static function MailMessageAgent()
{
global $DB;
$defSiteID = CSite::GetDefSite();
$arMark = array();
$arUnsendMessage = CIMMessage::GetUnsendMessage();
$arToUser = array();
$arFromUser = array();
$arDialog = array();
foreach ($arUnsendMessage as $id => $arMessage) {
if (!isset($arMark[$arMessage["TO_USER_ID"]][$arMessage["CHAT_ID"]]) || $arMark[$arMessage["TO_USER_ID"]][$arMessage["CHAT_ID"]] < $arMessage["ID"]) {
$arMark[$arMessage["TO_USER_ID"]][$arMessage["CHAT_ID"]] = $arMessage["ID"];
}
if (strlen($arMessage["MESSAGE_OUT"]) <= 0) {
$arMessage["MESSAGE_OUT"] = $arMessage["MESSAGE"];
}
if (!isset($arToUser[$arMessage["TO_USER_ID"]])) {
$siteID = $arMessage["TO_USER_LID"];
if ($siteID == false || StrLen($siteID) <= 0) {
$siteID = $defSiteID;
if ($siteID == false || StrLen($siteID) <= 0) {
continue;
}
}
$arMessage["USER"] = htmlspecialcharsback(CUser::FormatName(CSite::GetNameFormat(false), array("NAME" => $arMessage["TO_USER_NAME"], "LAST_NAME" => $arMessage["TO_USER_LAST_NAME"], "SECOND_NAME" => $arMessage["TO_USER_SECOND_NAME"], "LOGIN" => $arMessage["TO_USER_LOGIN"]), true));
$arToUser[$arMessage["TO_USER_ID"]] = array("USER" => $arMessage["USER"], "USER_ID" => $arMessage["TO_USER_ID"], "USER_LOGIN" => $arMessage["TO_USER_LOGIN"], "USER_NAME" => $arMessage["TO_USER_NAME"], "USER_LAST_NAME" => $arMessage["TO_USER_LAST_NAME"], "USER_SECOND_NAME" => $arMessage["TO_USER_SECOND_NAME"], "TO_USER_LID" => $siteID, "EMAIL_TO" => $arMessage["TO_USER_EMAIL"]);
}
if (!isset($arFromUser[$arMessage["FROM_USER_ID"]])) {
$arMessage["FROM_USER"] = htmlspecialcharsback(CUser::FormatName(CSite::GetNameFormat(false), array("NAME" => $arMessage["FROM_USER_NAME"], "LAST_NAME" => $arMessage["FROM_USER_LAST_NAME"], "SECOND_NAME" => $arMessage["FROM_USER_SECOND_NAME"], "LOGIN" => $arMessage["FROM_USER_LOGIN"]), true));
$arFromUser[$arMessage["FROM_USER_ID"]] = array("FROM_USER" => $arMessage["FROM_USER"], "FROM_USER_ID" => $arMessage["FROM_USER_ID"], "FROM_USER_LOGIN" => $arMessage["FROM_USER_LOGIN"], "FROM_USER_NAME" => $arMessage["FROM_USER_NAME"], "FROM_USER_LAST_NAME" => $arMessage["FROM_USER_LAST_NAME"], "FROM_USER_SECOND_NAME" => $arMessage["FROM_USER_SECOND_NAME"]);
}
$arDialog[$arMessage["TO_USER_ID"]][$arMessage["FROM_USER_ID"]][] = array('DATE_CREATE' => $arMessage["DATE_CREATE"], 'MESSAGE' => CTextParser::convert4mail(str_replace("#BR#", "\n", strip_tags($arMessage["MESSAGE_OUT"]))));
}
foreach ($arMark as $userId => $ar) {
foreach ($ar as $chatId => $lastSendId) {
CIMMessage::SetLastSendId($chatId, $userId, $lastSendId);
}
}
foreach ($arToUser as $toID => $arToInfo) {
$message = "";
$bHeader = false;
$arNames = array();
$bFirstMessage = true;
foreach ($arDialog[$toID] as $fromID => $arMessages) {
if ($bFirstMessage) {
$bFirstMessage = false;
} else {
$message .= "\n";
}
if (count($arDialog[$toID]) > 1) {
$message .= GetMessage('IM_MAIL_TEMPLATE_NEW_MESSAGE_HEADER', array('#FROM_USER#' => $arFromUser[$fromID]['FROM_USER'])) . "\n";
$bHeader = true;
}
$arNames[] = $arFromUser[$fromID]['FROM_USER'];
foreach ($arMessages as $arMessage) {
$message .= "\n" . GetMessage('IM_MAIL_TEMPLATE_NEW_MESSAGE_TEXT', array('#DATE_CREATE#' => $arMessage['DATE_CREATE'], '#MESSAGE#' => $arMessage['MESSAGE'])) . "\n";
}
}
if ($bHeader) {
$message .= "\n" . GetMessage('IM_MAIL_TEMPLATE_NEW_MESSAGE_FOOTER');
}
$arFields = array("USER" => $arToInfo["USER_ID"], "USER_ID" => $arToInfo["USER_ID"], "USER_LOGIN" => $arToInfo["USER_LOGIN"], "USER_NAME" => $arToInfo["USER_NAME"], "USER_LAST_NAME" => $arToInfo["USER_LAST_NAME"], "USER_SECOND_NAME" => $arToInfo["USER_SECOND_NAME"], "EMAIL_TO" => $arToInfo["EMAIL_TO"], "TITLE" => $arToInfo["TITLE"], "MESSAGES" => $message);
if (count($arNames) > 1) {
$mailTemplate = "IM_NEW_MESSAGE_GROUP";
$arFields['FROM_USERS'] = implode(', ', $arNames);
} else {
$mailTemplate = "IM_NEW_MESSAGE";
$arFields['FROM_USER'] = implode(', ', $arNames);
}
$event = new CEvent();
$event->Send($mailTemplate, $arToInfo['TO_USER_LID'], $arFields, "N");
}
return "CIMMail::MailMessageAgent();";
}
示例14: GetULRsFromIBlockID
public static function GetULRsFromIBlockID($IBLOCK_ID, $params = array())
{
$IBLOCK_ID = intval($IBLOCK_ID);
if ($IBLOCK_ID <= 0) {
return false;
}
$params = is_array($params) ? $params : array();
$params["path"] = trim(!!$params["path"] ? $params["path"] : (!!$params["PATH"] ? $params["PATH"] : ""));
if (empty($params["path"])) {
$params["path"] = CIBlock::GetArrayByID($IBLOCK_ID, "DETAIL_PAGE_URL");
}
// Params for socialnetwork
static $arExtranetSite = false;
static $defSite = false;
$params["SECTION_ID"] = intval($params["SECTION_ID"]);
// root section id
$params["ELEMENT_ID"] = intval($params["ELEMENT_ID"]);
$arSection = is_array($params["SECTION"]) ? $params["SECTION"] : array();
// root section
$arElement = is_array($params["ELEMENT"]) ? $params["ELEMENT"] : array();
if (empty($arSection)) {
if ($params["SECTION_ID"] > 0) {
$arSection = CIBlockSection::GetList(array(), array("ID" => $params["SECTION_ID"], 'CHECK_PERMISSIONS' => 'N'), false, array('ID', 'IBLOCK_ID', 'SOCNET_GROUP_ID', 'CREATED_BY'))->fetch();
} else {
if ($params["ELEMENT_ID"] > 0 && empty($arElement)) {
$arElement = CIBlockElement::GetList(array(), array('ID' => $params["ELEMENT_ID"]), false, false, array('ID', 'IBLOCK_SECTION_ID', 'IBLOCK_CODE', 'IBLOCK_ID'))->fetch();
}
if (!empty($arElement) && $arElement["IBLOCK_SECTION_ID"] > 0) {
$res = CWebDavSymlinkHelper::getNavChain($IBLOCK_ID, $arElement["IBLOCK_SECTION_ID"]);
if (!!$res) {
$arSection = reset($res);
}
}
}
}
if (empty($arSection) || $arSection["IBLOCK_ID"] != $IBLOCK_ID) {
$arSection = array();
$arElement = array();
}
// Params for socialnetwork /
if (strpos($params["path"], "#SITE_DIR#") !== false) {
$params["path"] = str_replace("#SITE_DIR#", SITE_DIR, $params["path"]);
} else {
if (array_key_exists("SITE_ID", $params) && CModule::IncludeModule('extranet') && CExtranet::GetExtranetSiteID() == $params["SITE_ID"]) {
if ($arExtranetSite === false) {
$rsSites = CSite::GetByID(SITE_ID);
$arExtranetSite = $rsSites->Fetch();
unset($rsSites);
}
if ($arExtranetSite) {
if ($defSite === false) {
$defSite = CSite::GetDefSite();
}
$params["path"] = $arExtranetSite["DIR"] . $params["path"];
}
}
}
$SEF_FOLDER = "/";
$SEF_URL_TEMPLATES = array();
$arUrlRewrite = CUrlRewriter::GetList(!empty($params["path"]) ? array("QUERY" => str_replace("//", "/", $params["path"])) : array());
$entity = false;
foreach ($arUrlRewrite as $arRule) {
if (!in_array($arRule["ID"], array("bitrix:webdav", "bitrix:socialnetwork", "bitrix:socialnetwork_user", "bitrix:socialnetwork_group"))) {
continue;
}
$arComponents = WDGetComponentsOnPage($arRule["PATH"]);
$firstMet = !empty($params["path"]);
foreach ($arComponents as $arComponent) {
if ($arComponent["COMPONENT_NAME"] == $arRule["ID"]) {
$SEF_FOLDER = $arComponent["PARAMS"]["SEF_FOLDER"];
if (strpos($arRule["ID"], "bitrix:socialnetwork") === 0) {
if ($arRule["ID"] == "bitrix:socialnetwork" && $arComponent["PARAMS"]["FILES_GROUP_IBLOCK_ID"] == $arComponent["PARAMS"]["FILES_USER_IBLOCK_ID"] && ($firstMet || $arComponent["PARAMS"]["FILES_USER_IBLOCK_ID"] == $IBLOCK_ID)) {
$entity = $arSection["SOCNET_GROUP_ID"] > 0 ? "group" : "user";
} else {
if (($firstMet || $arComponent["PARAMS"]["FILES_USER_IBLOCK_ID"] == $IBLOCK_ID) && ($arRule["ID"] == "bitrix:socialnetwork_user" || $arRule["ID"] == "bitrix:socialnetwork")) {
$entity = "user";
} else {
if (($firstMet || $arComponent["PARAMS"]["FILES_GROUP_IBLOCK_ID"] == $IBLOCK_ID) && ($arRule["ID"] == "bitrix:socialnetwork_group" || $arRule["ID"] == "bitrix:socialnetwork")) {
$entity = "group";
}
}
}
if (!!$entity) {
$SEF_URL_TEMPLATES = $entity == "user" ? array("path" => $arComponent["PARAMS"]["SEF_URL_TEMPLATES"]["user_files"], "view" => "user/#user_id#/files/element/view/#element_id#/", "edit" => "user/#user_id#/files/element/edit/#element_id#/#action#/", "history" => "user/#user_id#/files/element/history/#element_id#/", "history_get" => "user/#user_id#/files/element/historyget/#element_id#/#element_name#") : array("path" => $arComponent["PARAMS"]["SEF_URL_TEMPLATES"]["group_files"], "view" => "group/#group_id#/files/element/view/#element_id#/", "edit" => "group/#group_id#/files/element/edit/#element_id#/#action#/", "history" => "group/#group_id#/files/element/history/#element_id#/", "history_get" => "group/#group_id#/files/element/historyget/#element_id#/#element_name#");
}
} else {
if ($arRule["ID"] == "bitrix:webdav" && ($firstMet || $arComponent["PARAMS"]["IBLOCK_ID"] == $IBLOCK_ID)) {
$entity = "lib";
$SEF_URL_TEMPLATES = array("path" => $arComponent["PARAMS"]["SEF_URL_TEMPLATES"]["sections"], "view" => $arComponent["PARAMS"]["SEF_URL_TEMPLATES"]["element"], "edit" => $arComponent["PARAMS"]["SEF_URL_TEMPLATES"]["element_edit"], "history" => $arComponent["PARAMS"]["SEF_URL_TEMPLATES"]["element_history"], "history_get" => $arComponent["PARAMS"]["SEF_URL_TEMPLATES"]["element_history_get"]);
}
}
if (!!$entity) {
$SEF_URL_TEMPLATES["component"] = $arRule["ID"];
break 2;
}
}
}
}
$repl = array("#id#", "#ELEMENT_ID#", "#element_id#", "#name#", "#ELEMENT_NAME#", "#element_name#", "#action#", "//");
$patt = array("#ELEMENT_ID#", "#ELEMENT_ID#", "#ELEMENT_ID#", "#ELEMENT_NAME#", "#ELEMENT_NAME#", "#ELEMENT_NAME#", "#ACTION#", "/");
//.........这里部分代码省略.........
示例15: LocalRedirect
LocalRedirect($strRedirect . "&ID=" . $ID . "&" . $tabControl->ActiveTabParam());
} elseif (strlen($save_and_add) > 0) {
LocalRedirect($strRedirect . "&ID=0&" . $tabControl->ActiveTabParam());
}
} elseif ($new == "Y") {
LocalRedirect($strRedirect . "&ID=" . $ID . "&" . $tabControl->ActiveTabParam());
}
}
}
}
$str_GROUP_ID = array();
$user = CUser::GetByID($ID);
if (!$user->ExtractFields("str_")) {
$ID = 0;
$str_ACTIVE = "Y";
$str_LID = CSite::GetDefSite();
} else {
$dbUserGroup = CUser::GetUserGroupList($ID);
while ($arUserGroup = $dbUserGroup->Fetch()) {
$str_GROUP_ID[intval($arUserGroup["GROUP_ID"])]["DATE_ACTIVE_FROM"] = $arUserGroup["DATE_ACTIVE_FROM"];
$str_GROUP_ID[intval($arUserGroup["GROUP_ID"])]["DATE_ACTIVE_TO"] = $arUserGroup["DATE_ACTIVE_TO"];
}
}
if ($COPY_ID > 0) {
$str_PERSONAL_PHOTO = "";
$str_WORK_LOGO = "";
}
if ($strError != '' || !$res) {
$save_PERSONAL_PHOTO = $str_PERSONAL_PHOTO;
$save_WORK_LOGO = $str_WORK_LOGO;
$DB->InitTableVarsForEdit("b_user", "", "str_");