コード例 #1
0
ファイル: index.php プロジェクト: mrdeadmouse/u136006
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule('crm')) {
    return;
}
if (WIZARD_INSTALL_DEMO_DATA || COption::GetOptionString("crm", "form_features") == "Y") {
    $arMenuItem = array(GetMessage('CRM_TOP_LINKS_ITEM_NAME'), WIZARD_SITE_DIR . 'crm/', array(), array(), "CBXFeatures::IsFeatureEnabled('crm') && CModule::IncludeModule('crm') && CCrmPerms::IsAccessEnabled()");
    WizardServices::AddMenuItem(WIZARD_SITE_DIR . '.top.menu.php', $arMenuItem, WIZARD_SITE_ID, 7);
}
if (WIZARD_INSTALL_DEMO_DATA || COption::GetOptionString("crm", "form_features") == "Y") {
    $arUrlRewrite = array();
    if (file_exists(WIZARD_SITE_ROOT_PATH . "/urlrewrite.php")) {
        include WIZARD_SITE_ROOT_PATH . "/urlrewrite.php";
    }
    CUrlRewriter::Add(array('CONDITION' => '#^' . WIZARD_SITE_DIR . 'crm/lead/#', 'RULE' => '', 'ID' => 'bitrix:crm.lead', 'PATH' => WIZARD_SITE_DIR . 'crm/lead/index.php'));
    CUrlRewriter::Add(array('CONDITION' => '#^' . WIZARD_SITE_DIR . 'crm/contact/#', 'RULE' => '', 'ID' => 'bitrix:crm.contact', 'PATH' => WIZARD_SITE_DIR . 'crm/contact/index.php'));
    CUrlRewriter::Add(array('CONDITION' => '#^' . WIZARD_SITE_DIR . 'crm/company/#', 'RULE' => '', 'ID' => 'bitrix:crm.company', 'PATH' => WIZARD_SITE_DIR . 'crm/company/index.php'));
    CUrlRewriter::Add(array('CONDITION' => '#^' . WIZARD_SITE_DIR . 'crm/deal/#', 'RULE' => '', 'ID' => 'bitrix:crm.deal', 'PATH' => WIZARD_SITE_DIR . 'crm/deal/index.php'));
    CUrlRewriter::Add(array('CONDITION' => '#^' . WIZARD_SITE_DIR . 'crm/quote/#', 'RULE' => '', 'ID' => 'bitrix:crm.quote', 'PATH' => WIZARD_SITE_DIR . 'crm/quote/index.php'));
    CUrlRewriter::Add(array('CONDITION' => '#^' . WIZARD_SITE_DIR . 'crm/invoice/#', 'RULE' => '', 'ID' => 'bitrix:crm.invoice', 'PATH' => WIZARD_SITE_DIR . 'crm/invoice/index.php'));
    CUrlRewriter::Add(array('CONDITION' => '#^' . WIZARD_SITE_DIR . 'crm/configs/fields/#', 'RULE' => '', 'ID' => 'bitrix:crm.config.fields', 'PATH' => WIZARD_SITE_DIR . 'crm/configs/fields/index.php'));
    CUrlRewriter::Add(array('CONDITION' => '#^' . WIZARD_SITE_DIR . 'crm/configs/bp/#', 'RULE' => '', 'ID' => 'bitrix:crm.config.bp', 'PATH' => WIZARD_SITE_DIR . 'crm/configs/bp/index.php'));
    CUrlRewriter::Add(array('CONDITION' => '#^' . WIZARD_SITE_DIR . 'crm/configs/perms/#', 'RULE' => '', 'ID' => 'bitrix:crm.config.perms', 'PATH' => WIZARD_SITE_DIR . 'crm/configs/perms/index.php'));
    CUrlRewriter::Add(array('CONDITION' => '#^' . WIZARD_SITE_DIR . 'crm/product/#', 'RULE' => '', 'ID' => 'bitrix:crm.product', 'PATH' => WIZARD_SITE_DIR . 'crm/product/index.php'));
    CUrlRewriter::Add(array('CONDITION' => '#^' . WIZARD_SITE_DIR . 'crm/configs/currency/#', 'RULE' => '', 'ID' => 'bitrix:crm.currency', 'PATH' => WIZARD_SITE_DIR . 'crm/configs/currency/index.php'));
    CUrlRewriter::Add(array('CONDITION' => '#^' . WIZARD_SITE_DIR . 'crm/configs/tax/#', 'RULE' => '', 'ID' => 'bitrix:crm.config.tax', 'PATH' => WIZARD_SITE_DIR . 'crm/configs/tax/index.php'));
    CUrlRewriter::Add(array('CONDITION' => '#^' . WIZARD_SITE_DIR . 'crm/configs/locations/#', 'RULE' => '', 'ID' => 'bitrix:crm.config.locations', 'PATH' => WIZARD_SITE_DIR . 'crm/configs/locations/index.php'));
    CUrlRewriter::Add(array('CONDITION' => '#^' . WIZARD_SITE_DIR . 'crm/configs/ps/#', 'RULE' => '', 'ID' => 'bitrix:crm.config.ps', 'PATH' => WIZARD_SITE_DIR . 'crm/configs/ps/index.php'));
コード例 #2
0
ファイル: index.php プロジェクト: mrdeadmouse/u136006
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule("iblock")) {
    return;
}
if (!CModule::IncludeModule("video")) {
    return;
}
//if(!WIZARD_IS_RERUN)
//{
WizardServices::CopyFile(WIZARD_SERVICE_RELATIVE_PATH . "/public/" . LANGUAGE_ID . "/video", WIZARD_SITE_DIR . "services/video");
$arMenuItem = array(GetMessage("VMENUIT"), WIZARD_SITE_DIR . "services/video/", array(), array(), "");
WizardServices::AddMenuItem(WIZARD_SITE_DIR . "services/.left.menu.php", $arMenuItem, WIZARD_SITE_ID, 11);
//}
$iblockCode = "video-meeting_" . WIZARD_SITE_ID;
$iblockType = "events";
$dbIblockType = CIBlockType::GetList(array(), array("=ID" => $iblockType));
if (!$dbIblockType->Fetch()) {
    $obBlocktype = new CIBlockType();
    $arFields = array("ID" => $iblockType, "SORT" => 500, "IN_RSS" => "N", "SECTIONS" => "Y");
    $arFields["LANG"][LANGUAGE_ID] = array("NAME" => GetMessage("VI_IBLOCK_NAME"));
    $res = $obBlocktype->Add($arFields);
}
$rsIBlock = CIBlock::GetList(array(), array("XML_ID" => $iblockCode, "TYPE" => $iblockType));
$iblockID = false;
if ($arIBlock = $rsIBlock->Fetch()) {
    $iblockID = $arIBlock["ID"];
}