Esempio n. 1
0
 function InstallDB()
 {
     global $DB, $APPLICATION;
     $this->errors = false;
     if (!$DB->Query("SELECT 'x' FROM b_im_chat", true)) {
         $this->errors = $DB->RunSQLBatch($_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/im/install/db/" . strtolower($DB->type) . "/install.sql");
     }
     if ($this->errors !== false) {
         $APPLICATION->ThrowException(implode("", $this->errors));
         return false;
     }
     RegisterModule("im");
     RegisterModuleDependences('main', 'OnAddRatingVote', 'im', 'CIMEvent', 'OnAddRatingVote');
     RegisterModuleDependences('main', 'OnCancelRatingVote', 'im', 'CIMEvent', 'OnCancelRatingVote');
     RegisterModuleDependences('main', 'OnAfterUserUpdate', 'im', 'CIMEvent', 'OnAfterUserUpdate');
     RegisterModuleDependences('main', 'OnUserDelete', 'im', 'CIMEvent', 'OnUserDelete');
     RegisterModuleDependences("pull", "OnGetDependentModule", "im", "CIMEvent", "OnGetDependentModule");
     RegisterModuleDependences("main", "OnProlog", "main", "", "", 3, "/modules/im/ajax_hit.php");
     RegisterModuleDependences("perfmon", "OnGetTableSchema", "im", "CIMTableSchema", "OnGetTableSchema");
     RegisterModuleDependences("im", "OnGetNotifySchema", "im", "CIMNotifySchema", "OnGetNotifySchema");
     RegisterModuleDependences("main", "OnFileDelete", "im", "CIMEvent", "OnFileDelete");
     RegisterModuleDependences("main", "OnApplicationsBuildList", "im", "DesktopApplication", "OnApplicationsBuildList");
     CAgent::AddAgent("CIMMail::MailNotifyAgent();", "im", "N", 600);
     CAgent::AddAgent("CIMMail::MailMessageAgent();", "im", "N", 600);
     CAgent::AddAgent("CIMDisk::RemoveTmpFileAgent();", "im", "N", 43200);
     CModule::IncludeModule("im");
     if (CIMConvert::ConvertCount() > 0) {
         Cmodule::IncludeModule("im");
         CAdminNotify::Add(array("MESSAGE" => GetMessage("IM_CONVERT_MESSAGE", array("#A_TAG_START#" => '<a href="/bitrix/admin/im_convert.php?lang=' . LANGUAGE_ID . '">', "#A_TAG_END#" => "</a>")), "TAG" => "IM_CONVERT", "MODULE_ID" => "IM", "ENABLE_CLOSE" => "Y"));
         CAgent::AddAgent("CIMConvert::UndeliveredMessageAgent();", "im", "N", 20, "", "Y", ConvertTimeStamp(time() + CTimeZone::GetOffset() + 20, "FULL"));
     }
     return true;
 }
Esempio n. 2
0
<?php

if (!$USER->IsAdmin()) {
    return;
}
global $MESS;
include GetLangFileName($GLOBALS['DOCUMENT_ROOT'] . '/bitrix/modules/im/lang/', '/options.php');
IncludeModuleLangFile($_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/modules/main/options.php');
$module_id = 'im';
CModule::IncludeModule($module_id);
$MOD_RIGHT = $APPLICATION->GetGroupRight($module_id);
if (CIMConvert::ConvertCount() > 0) {
    $aMenu = array(array("TEXT" => GetMessage("IM_OPTIONS_CONVERT"), "LINK" => "im_convert.php?lang=" . LANGUAGE_ID, "TITLE" => GetMessage("IM_OPTIONS_CONVERT_TITLE")));
    $context = new CAdminContextMenu($aMenu);
    $context->Show();
}
$arDefaultValues['default'] = array('path_to_user_profile' => IsModuleInstalled("intranet") ? '/company/personal/user/#user_id#/' : '/club/user/#user_id#/', 'user_name_template' => "#LAST_NAME# #NAME#");
$arDefaultValues['extranet'] = array('path_to_user_profile' => '/extranet/contacts/personal/user/#user_id#/', 'user_name_template' => "#LAST_NAME# #NAME#");
$dbSites = CSite::GetList($b = "", $o = "", array("ACTIVE" => "Y"));
$arSites = array();
$aSubTabs = array();
while ($site = $dbSites->Fetch()) {
    $site["ID"] = htmlspecialcharsbx($site["ID"]);
    $site["NAME"] = htmlspecialcharsbx($site["NAME"]);
    $arSites[] = $site;
    $aSubTabs[] = array("DIV" => "opt_site_" . $site["ID"], "TAB" => "(" . $site["ID"] . ") " . $site["NAME"], 'TITLE' => '');
}
$subTabControl = new CAdminViewTabControl("subTabControl", $aSubTabs);
$aTabs = array(array("DIV" => "edit1", "TAB" => GetMessage("IM_TAB_SETTINGS"), "ICON" => "im_path", "TITLE" => GetMessage("IM_TAB_TITLE_SETTINGS")));
$tabControl = new CAdminTabControl("tabControl", $aTabs);
if (strlen($_POST['Update'] . $_GET['RestoreDefaults']) > 0 && check_bitrix_sessid()) {
Esempio n. 3
0
					document.getElementById('convert_result_div').innerHTML = result;
					if(BX('im_convert_finish') != null)
					{
						CloseWaitWindow();
						StopConvert();
					}
				}
			);
		}

		return false;
	}
	</script>

	<?php 
    $max_messages = CIMConvert::ConvertCount();
    if ($max_messages <= 0) {
        CAdminMessage::ShowMessage(array("MESSAGE" => GetMessage("IM_CONVERT_COMPLETE"), "DETAILS" => GetMessage("IM_CONVERT_COMPLETE_ALL_OK"), "HTML" => true, "TYPE" => "OK"));
        CAdminNotify::DeleteByTag("IM_CONVERT");
    }
    ?>
	<div id="convert_result_div" style="margin:0px">
	</div>


	<form method="POST" action="<?php 
    echo $APPLICATION->GetCurPage();
    ?>
?lang=<?php 
    echo htmlspecialcharsbx(LANG);
    ?>