本文整理汇总了PHP中CWizardUtil类的典型用法代码示例。如果您正苦于以下问题:PHP CWizardUtil类的具体用法?PHP CWizardUtil怎么用?PHP CWizardUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CWizardUtil类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: OnPostForm
function OnPostForm()
{
$wizard =& $this->GetWizard();
$templateID = $wizard->GetSiteTemplateID();
$templatePath = BX_PERSONAL_ROOT . "/templates/" . $templateID;
$arReplace = array("COMPANY_NAME" => $wizard->GetVar("company_name"), "COMPANY_SLOGAN" => $wizard->GetVar("company_slogan"));
CWizardUtil::ReplaceMacros($_SERVER["DOCUMENT_ROOT"] . $templatePath . "/include_areas/company_name.php", $arReplace);
$server_name = $_SERVER["HTTP_HOST"] != '' ? $_SERVER["HTTP_HOST"] : $_SERVER["SERVER_NAME"];
if ($_SERVER["SERVER_PORT"] != 80 && $_SERVER["SERVER_PORT"] != 443 && $_SERVER["SERVER_PORT"] > 0 && strpos($_SERVER["HTTP_HOST"], ":") === false) {
$server_name .= ":" . $_SERVER["SERVER_PORT"];
}
COption::SetOptionString("main", "server_name", $server_name);
COption::SetOptionString("main", "site_name", htmlspecialcharsEx($wizard->GetVar("company_name")));
COption::SetOptionString("main", "wizard_company_slogan", $wizard->GetVar("company_slogan"));
$themeVarName = $templateID . "_themeID";
$themeID = $wizard->GetVar($themeVarName);
$themeID = Rel2Abs("/", $themeID);
$themePath = $_SERVER["DOCUMENT_ROOT"] . DemoSiteUtil::GetTemplatesPath($wizard->GetPath()) . "/" . $templateID . "/themes/" . $themeID;
CopyDirFiles($themePath, $_SERVER["DOCUMENT_ROOT"] . $templatePath, $rewrite = true, $recursive = true, $delete_after_copy = false, $exclude = "description.php");
$companyLogo = $wizard->GetVar("company_logo");
CWizardUtil::CopyFile($companyLogo, $templatePath . "/images/logo.gif", false);
COption::SetOptionString("main", "wizard_site_logo", $companyLogo);
}
示例2: CopyDirFiles
COption::SetOptionString("subscribe", "posting_charset", (LANGUAGE_ID == "ru" ? "Windows-1251," : "") . "ISO-8859-1,UTF-8");
COption::SetOptionString("subscribe", "subscribe_section", WIZARD_SITE_DIR . "services/");
COption::SetOptionString("subscribe", "posting_use_editor", "Y");
COption::SetOptionString("subscribe", "attach_images", "Y");
$APPLICATION->SetGroupRight("subscribe", WIZARD_PORTAL_ADMINISTRATION_GROUP, "W");
}
//Copy template
CopyDirFiles(WIZARD_SERVICE_ABSOLUTE_PATH . "/templates/" . LANGUAGE_ID . "/", $_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/php_interface/subscribe/templates/", $rewrite = false, $recursive = true);
$officialIBlockID = "";
if (CModule::IncludeModule("iblock")) {
$dbIBlock = CIBlock::GetList(array(), array("CODE" => "official_news"));
if ($arIBlock = $dbIBlock->Fetch()) {
$officialIBlockID = $arIBlock["ID"];
}
}
CWizardUtil::ReplaceMacros($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/php_interface/subscribe/templates/official/template.php", array("IBLOCK_ID" => $officialIBlockID, "SITE_ID" => WIZARD_SITE_ID));
$rsRubric = CRubric::GetList(array(), array("NAME" => GetMessage("SUBSCRIBE_OFFICIAL_INFORMATION"), "LID" => WIZARD_SITE_ID));
if (!$rsRubric->Fetch()) {
$arFields = array("ACTIVE" => "Y", "NAME" => GetMessage("SUBSCRIBE_OFFICIAL_INFORMATION"), "SORT" => 100, "DESCRIPTION" => "", "LID" => WIZARD_SITE_ID, "AUTO" => "Y", "DAYS_OF_MONTH" => "", "DAYS_OF_WEEK" => "7", "TIMES_OF_DAY" => "05:00", "TEMPLATE" => substr(BX_PERSONAL_ROOT, 1) . "/php_interface/subscribe/templates/official", "VISIBLE" => "Y", "FROM_FIELD" => COption::GetOptionString("main", "email_from", "admin@" . $_SERVER["SERVER_NAME"]), "LAST_EXECUTED" => ConvertTimeStamp(false, "FULL"));
$obRubric = new CRubric();
$ID = $obRubric->Add($arFields);
}
$rsRubric = CRubric::GetList(array(), array("NAME" => GetMessage("SUBSCRIBE_NEWS_LIFE"), "LID" => WIZARD_SITE_ID));
if (!$rsRubric->Fetch()) {
$arFields = array("ACTIVE" => "Y", "NAME" => GetMessage("SUBSCRIBE_NEWS_LIFE"), "SORT" => 200, "DESCRIPTION" => "", "LID" => WIZARD_SITE_ID, "AUTO" => "N");
$obRubric = new CRubric();
$ID = $obRubric->Add($arFields);
if ($ID) {
$arFields = array("FROM_FIELD" => COption::GetOptionString("main", "email_from", "admin@" . $_SERVER["SERVER_NAME"]), "TO_FIELD" => COption::GetOptionString("main", "email_from", "admin@" . $_SERVER["SERVER_NAME"]), "EMAIL_FILTER" => "%%", "SUBJECT" => GetMessage("SUBSCRIBE_POSTING_SUBJECT"), "BODY_TYPE" => "html", "BODY" => GetMessage("SUBSCRIBE_POSTING_BODY"), "DIRECT_SEND" => "Y", "CHARSET" => LANG_CHARSET, "SUBSCR_FORMAT" => "text", "RUB_ID" => array($ID), "STATUS" => "D");
$obPosting = new CPosting();
$obPosting->Add($arFields);
示例3: array
if ($arIBlock = $rsIBlock->Fetch()) {
$iblockID = $arIBlock["ID"];
}
if ($iblockID == false) {
$iblockID = WizardServices::ImportIBlockFromXML($iblockXMLFile, 'idea', $iblockType, WIZARD_SITE_ID, $permissions = array("1" => "X", "2" => "R", WIZARD_PORTAL_ADMINISTRATION_GROUP => "X", WIZARD_PERSONNEL_DEPARTMENT_GROUP => "W"));
if ($iblockID < 1) {
return;
}
//Iblock Section form settings
$aFormOptions = array('tabs' => "edit1--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_TAB_TITLE") . "--,--ID--#--ID--,--ACTIVE--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_P_ACTIVE") . "--,--NAME--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_P_NAME") . "--,--CODE--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_P_CODE") . "--,--IBLOCK_SECTION_ID--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_P_IBLOCK_SECTION_ID") . "--,--SORT--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_P_SORT") . "--;--");
WizardServices::SetUserOption("form", "form_section_" . $iblockID, $aFormOptions, $common = true);
WizardServices::SetIBlockFormSettings($iblockID, $aFormOptions);
//IBlock fields settings
$iblock = new CIBlock();
$arFields = array("ACTIVE" => "Y", "FIELDS" => array("SECTION_CODE" => array("IS_REQUIRED" => "Y", "DEFAULT_VALUE" => array("UNIQUE" => "Y", "TRANSLITERATION" => "Y", "TRANS_LEN" => 50, "TRANS_CASE" => "L", "TRANS_SPACE" => "_", "TRANS_OTHER" => "_", "TRANS_EAT" => "Y", "USE_GOOGLE" => "Y"))), "CODE" => $iblockCode, "XML_ID" => $iblockCode);
$iblock->Update($iblockID, $arFields);
} else {
$arSites = array();
$db_res = CIBlock::GetSite($iblockID);
while ($res = $db_res->Fetch()) {
$arSites[] = $res["LID"];
}
if (!in_array(WIZARD_SITE_ID, $arSites)) {
$arSites[] = WIZARD_SITE_ID;
$iblock = new CIBlock();
$iblock->Update($iblockID, array("LID" => $arSites));
}
}
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/about/idea/index.php", array("IDEA_IBLOCK_CATEGORY" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/include/feedback.php", array("IDEA_IBLOCK_CATEGORY" => $iblockID));
示例4: foreach
foreach ($arNewUrlRewrite as $arUrl) {
if (!in_array($arUrl, $arUrlRewrite)) {
CUrlRewriter::Add($arUrl);
}
}
}
function ___writeToAreasFile($fn, $text)
{
if (file_exists($fn) && !is_writable($abs_path) && defined("BX_FILE_PERMISSIONS")) {
@chmod($abs_path, BX_FILE_PERMISSIONS);
}
$fd = @fopen($fn, "wb");
if (!$fd) {
return false;
}
if (false === fwrite($fd, $text)) {
fclose($fd);
return false;
}
fclose($fd);
if (defined("BX_FILE_PERMISSIONS")) {
@chmod($fn, BX_FILE_PERMISSIONS);
}
}
CheckDirPath(WIZARD_SITE_PATH . "include/");
$wizard =& $this->GetWizard();
___writeToAreasFile(WIZARD_SITE_PATH . "include/copyright.php", $wizard->GetVar("siteCopy"));
if (WIZARD_INSTALL_DEMO_DATA) {
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/.section.php", array("SITE_DESCRIPTION" => htmlspecialcharsbx($wizard->GetVar("siteMetaDescription"))));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/.section.php", array("SITE_KEYWORDS" => htmlspecialcharsbx($wizard->GetVar("siteMetaKeywords"))));
}
示例5: CIBlock
$permissions[$arGroup["ID"]] = 'W';
}
$iblockID = WizardServices::ImportIBlockFromXML($iblockXMLFile, $iblockCode, $iblockType, WIZARD_SITE_ID, $permissions);
if ($iblockID < 1) {
return;
}
//WizardServices::SetIBlockFormSettings($iblockID, Array ( 'tabs' => GetMessage("W_IB_GROUP_PHOTOG_TAB1").$REAL_PICTURE_PROPERTY_ID.GetMessage("W_IB_GROUP_PHOTOG_TAB2").$rating_PROPERTY_ID.GetMessage("W_IB_GROUP_PHOTOG_TAB3").$vote_count_PROPERTY_ID.GetMessage("W_IB_GROUP_PHOTOG_TAB4").$vote_sum_PROPERTY_ID.GetMessage("W_IB_GROUP_PHOTOG_TAB5").$APPROVE_ELEMENT_PROPERTY_ID.GetMessage("W_IB_GROUP_PHOTOG_TAB6").$PUBLIC_ELEMENT_PROPERTY_ID.GetMessage("W_IB_GROUP_PHOTOG_TAB7"), ));
//IBlock fields
$iblock = new CIBlock();
$arFields = array("ACTIVE" => "Y", "FIELDS" => array('IBLOCK_SECTION' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'ACTIVE' => array('IS_REQUIRED' => 'Y', 'DEFAULT_VALUE' => 'Y'), 'ACTIVE_FROM' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => '=today'), 'ACTIVE_TO' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'SORT' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'NAME' => array('IS_REQUIRED' => 'Y', 'DEFAULT_VALUE' => ''), 'PREVIEW_PICTURE' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => array('FROM_DETAIL' => 'N', 'SCALE' => 'N', 'WIDTH' => '', 'HEIGHT' => '', 'IGNORE_ERRORS' => 'N')), 'PREVIEW_TEXT_TYPE' => array('IS_REQUIRED' => 'Y', 'DEFAULT_VALUE' => 'text'), 'PREVIEW_TEXT' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'DETAIL_PICTURE' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => array('SCALE' => 'N', 'WIDTH' => '', 'HEIGHT' => '', 'IGNORE_ERRORS' => 'N')), 'DETAIL_TEXT_TYPE' => array('IS_REQUIRED' => 'Y', 'DEFAULT_VALUE' => 'text'), 'DETAIL_TEXT' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'XML_ID' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'CODE' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'TAGS' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => '')), "CODE" => $iblockCode, "XML_ID" => $iblockCode, "NAME" => $iblock->GetArrayByID($iblockID, "NAME"));
$iblock->Update($iblockID, $arFields);
} else {
$arSites = array();
$db_res = CIBlock::GetSite($iblockID);
while ($res = $db_res->Fetch()) {
$arSites[] = $res["LID"];
}
if (!in_array(WIZARD_SITE_ID, $arSites)) {
$arSites[] = WIZARD_SITE_ID;
$iblock = new CIBlock();
$iblock->Update($iblockID, array("LID" => $arSites));
}
}
//public_files
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/news/index.php", array("WF_IB_NEWS" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "_index.php", array("WF_IB_NEWS" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/brands/detail.php", array("WF_IB_NEWS" => $iblockID));
//template_files
CWizardUtil::ReplaceMacros($_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates/webfly_san/components/bitrix/news/blog/detail.php", array("WF_IB_NEWS" => $iblockID));
CWizardUtil::ReplaceMacros($_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates/webfly_san/components/bitrix/news/blog/news.php", array("WF_IB_NEWS" => $iblockID));
示例6: array
if ($arRes['ACTIVE'] == 'N') {
CRatings::Delete($arRes['ID']);
} else {
$authorityId = $arRes['ID'];
}
}
if ($authorityId == false) {
$arConfig = array();
$arConfig['MAIN'] = array('VOTE' => array('USER' => array('ACTIVE' => 'Y', 'COEFFICIENT' => '1', 'LIMIT' => '30')), 'RATING' => array('BONUS' => array('ACTIVE' => 'Y', 'COEFFICIENT' => '1')));
$arAddRating = array('ACTIVE' => 'Y', 'NAME' => GetMessage('MAIN_RATING_AUTHORITY'), 'ENTITY_ID' => 'USER', 'CALCULATION_METHOD' => 'SUM', 'POSITION' => 'Y', 'AUTHORITY' => 'Y', 'CONFIGS' => $arConfig);
$authorityId = CRatings::Add($arAddRating);
}
$strSql = "\n\t\t\tINSERT INTO b_rating_user (ENTITY_ID, RATING_ID)\n\t\t\tSELECT \n\t\t\t\tu.ID, '{$authorityId}'\n\t\t\tFROM \n\t\t\t\tb_user u \n\t\t\t\tLEFT JOIN b_rating_user ru ON ru.RATING_ID = {$authorityId} AND ru.ENTITY_ID = u.ID \n\t\t\tWHERE \n\t\t\t\tru.ENTITY_ID IS NULL";
$DB->Query($strSql, false, $err_mess . __LINE__);
$arParams = array();
$arParams['DEFAULT_CONFIG_NEW_USER'] = 'Y';
CRatings::SetAuthorityDefaultValue($arParams);
CRatings::Calculate($authorityId, true);
CRatings::Calculate($ratingId, true);
$ratingArray = 'array(1 => "' . $ratingId . '", 2 => "' . $authorityId . '")';
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/forum/index.php", array("SHOW_RATING" => 'Y'));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/forum/index.php", array("RATING_ID" => $ratingArray));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/people/index.php", array("RATING_ID" => $ratingId));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/people/user.php", array("RATING_ID" => $ratingArray));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/groups/group.php", array("RATING_ID" => $ratingId));
COption::SetOptionString("socialnetwork", "tooltip_rating_id", serialize(array($ratingId, $authorityId)), "", WIZARD_SITE_ID);
COption::SetOptionString("socialnetwork", "tooltip_show_rating", "Y", "", WIZARD_SITE_ID);
COption::SetOptionString("main", "rating_normalization", 10);
COption::SetOptionString("forum", "SHOW_VOTES", "N");
COption::SetOptionString("main", "rating_vote_type", 'like');
}
示例7: array
$rsIBlock = CIBlock::GetList(array(), array("CODE" => "video-meeting", "TYPE" => $iblockType));
if ($arIBlock = $rsIBlock->Fetch()) {
$iblockID = $arIBlock["ID"];
}
}
if ($iblockID == false) {
$iblockID = WizardServices::ImportIBlockFromXML(WIZARD_SERVICE_RELATIVE_PATH . "/xml/lang_" . LANGUAGE_ID . "/res_video.xml", 'video-meeting', $iblockType, WIZARD_SITE_ID, $permissions = array("1" => "X", "2" => "R", WIZARD_PORTAL_ADMINISTRATION_GROUP => "X"));
$iblock = new CIBlock();
$arFields = array("CODE" => $iblockCode, "XML_ID" => $iblockCode);
$iblock->Update($iblockID, $arFields);
if (!COption::GetOptionString("calendar", "vr_iblock_id")) {
COption::SetOptionString("calendar", "vr_iblock_id", $iblockID);
}
} else {
$arSites = array();
$db_res = CIBlock::GetSite($iblockID);
while ($res = $db_res->Fetch()) {
$arSites[] = $res["LID"];
}
if (!in_array(WIZARD_SITE_ID, $arSites)) {
$arSites[] = WIZARD_SITE_ID;
$iblock = new CIBlock();
$iblock->Update($iblockID, array("LID" => $arSites));
}
}
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/services/video/index.php", array("CALENDAR_RES_VIDEO_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/services/video/detail.php", array("CALENDAR_RES_VIDEO_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/company/personal.php", array("CALENDAR_RES_VIDEO_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/index_b24.php", array("CALENDAR_RES_VIDEO_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/workgroups/index.php", array("CALENDAR_RES_VIDEO_IBLOCK_ID" => $iblockID));
示例8: CopyWizard
function CopyWizard($wizardName, $newName)
{
if (!CWizardUtil::CheckName($wizardName) || !CWizardUtil::CheckName($newName)) {
return false;
}
$wizardPath = $_SERVER["DOCUMENT_ROOT"] . CWizardUtil::GetRepositoryPath() . CWizardUtil::MakeWizardPath($wizardName);
$newNamePath = $_SERVER["DOCUMENT_ROOT"] . CWizardUtil::GetRepositoryPath() . CWizardUtil::MakeWizardPath($newName);
if (!file_exists($wizardPath) || file_exists($newNamePath)) {
return false;
}
CopyDirFiles($wizardPath, $newNamePath, $rewrite = false, $recursive = true);
return true;
}
示例9: CopyPublucFiles
private function CopyPublucFiles()
{
$target = $this->DOCUMENT_ROOT . $this->PublicDir;
$source = $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/idea/install/public/idea/";
CopyDirFiles($source, $target, $this->REWRITE, true);
if (file_exists($target . 'index.php')) {
$arReplacePageIndex = array("IDEA_SEF_FOLDER" => $this->PublicDir, "IDEA_BLOG_CODE" => $this->ModuleBlogUrl, "IDEA_IBLOCK_CATEGORY" => $this->arResult["INSTALLATION"]["IBLOCK_ID"], "IDEA_BIND_DEFAULT" => $this->arResult["SETTINGS"]["STATUS_ID"]["NEW"]);
$arReplaceFolderSection = array("IDEA_FOLDER_NAME" => GetMessage("IDEA_PUBLIC_FOLDER_TITLE"));
//For Easy replace
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/wizard_util.php";
CWizardUtil::ReplaceMacros($target . 'index.php', $arReplacePageIndex);
CWizardUtil::ReplaceMacros($target . '.section.php', $arReplaceFolderSection);
//Add Sef
$arFields = array("CONDITION" => "#^" . $this->PublicDir . "#", "RULE" => "", "ID" => "bitrix:idea", "PATH" => $this->PublicDir . "index.php", "SITE_ID" => $this->SITE_ID);
CUrlRewriter::Add($arFields);
}
}
示例10: while
$db_res = CIBlock::GetSite($iblockID);
while ($res = $db_res->Fetch()) {
$arSites[] = $res["LID"];
}
if (!in_array(WIZARD_SITE_ID, $arSites)) {
$arSites[] = WIZARD_SITE_ID;
$iblock = new CIBlock();
$iblock->Update($iblockID, array("LID" => $arSites));
}
}
$arProperty = array();
$dbProperty = CIBlockProperty::GetList(array(), array("IBLOCK_ID" => $iblockID));
while ($arProp = $dbProperty->Fetch()) {
$arProperty[$arProp["CODE"]] = $arProp["ID"];
}
$codeProperty = '4 => "' . $arProperty['E_MAIL'] . '", 5 => "' . $arProperty['URL'] . '", 6 => "' . $arProperty['PHONE'] . '", ';
$dbSite = CSite::GetByID(WIZARD_SITE_ID);
if ($arSite = $dbSite->Fetch()) {
$lang = $arSite["LANGUAGE_ID"];
}
if (strlen($lang) <= 0) {
$lang = "ru";
}
WizardServices::IncludeServiceLang("board.php", $lang);
CUserOptions::SetOption("form", "form_element_" . $iblockID, array('tabs' => 'edit1--#--' . GetMessage("WZD_OPTION_BOARD_1") . '--,--ACTIVE--#--' . GetMessage("WZD_OPTION_BOARD_1") . '--,--ACTIVE_FROM--#--' . GetMessage("WZD_OPTION_BOARD_2") . '--,--ACTIVE_TO--#--' . GetMessage("WZD_OPTION_BOARD_24") . '--,--NAME--#--' . GetMessage("WZD_OPTION_BOARD_3") . '--,--PREVIEW_TEXT--#--' . GetMessage("WZD_OPTION_BOARD_4") . '--,--PREVIEW_PICTURE--#--' . GetMessage("WZD_OPTION_BOARD_5") . '--,--PROPERTY_' . $arProperty['E_MAIL'] . '--#--' . GetMessage("WZD_OPTION_BOARD_6") . '--,--PROPERTY_' . $arProperty['URL'] . '--#--' . GetMessage("WZD_OPTION_BOARD_7") . '--,--PROPERTY_' . $arProperty['PHONE'] . '--#--' . GetMessage("WZD_OPTION_BOARD_8") . '--,--PROPERTY_' . $arProperty['USER_ID'] . '--#--' . GetMessage("WZD_OPTION_BOARD_9") . '--,--SECTIONS--#--' . GetMessage("WZD_OPTION_BOARD_13") . '--;--'));
CUserOptions::SetOption("form", "form_section_" . $iblockID, array('tabs' => 'edit1--#--' . GetMessage("WZD_OPTION_BOARD_20") . '--,--NAME--#--' . GetMessage("WZD_OPTION_BOARD_21") . '--,--CODE--#--' . GetMessage("WZD_OPTION_BOARD_22") . '--,--SORT--#--' . GetMessage("WZD_OPTION_BOARD_23") . '--;--'));
CUserOptions::SetOption("list", "tbl_iblock_list_" . md5($iblockType . "." . $iblockID), array('columns' => 'NAME,ACTIVE,DATE_ACTIVE_FROM', 'by' => 'timestamp_x', 'order' => 'desc', 'page_size' => '20'));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/board/index.php", array("BOARD_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/board/my/index.php", array("BOARD_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/board/my/index.php", array("IDS_CODE_PROPERTY" => $codeProperty));
示例11: array
$iblockID = WizardServices::ImportIBlockFromXML($iblockXMLFile, "honour", $iblockType, WIZARD_SITE_ID, $permissions = array("1" => "X", "2" => "R", WIZARD_PORTAL_ADMINISTRATION_GROUP => "X", WIZARD_PERSONNEL_DEPARTMENT_GROUP => "X"));
if ($iblockID < 1) {
return;
}
$userPropertyID = 0;
$properties = CIBlockProperty::GetList(array(), array("ACTIVE" => "Y", "IBLOCK_ID" => $iblockID, "CODE" => "USER"));
if ($arProperty = $properties->Fetch()) {
$userPropertyID = $arProperty["ID"];
}
$aFormOptions = array("tabs" => "edit1--#--" . GetMessage("HONOR_FORM_1") . "--,--PROPERTY_" . $userPropertyID . "--#--" . GetMessage("HONOR_FORM_2") . "--,--NAME--#--*" . GetMessage("HONOR_FORM_3") . "--,--edit1_csection1--#----" . GetMessage("HONOR_FORM_4") . "--,--ACTIVE_FROM--#--" . GetMessage("HONOR_FORM_5") . "--,--ACTIVE_TO--#--" . GetMessage("HONOR_FORM_6") . "--,--PREVIEW_TEXT--#--" . GetMessage("HONOR_FORM_7") . "--;--");
WizardServices::SetIBlockFormSettings($iblockID, $aFormOptions);
//IBlock fields
$iblock = new CIBlock();
$arFields = array("ACTIVE" => "Y", "FIELDS" => array('IBLOCK_SECTION' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'ACTIVE' => array('IS_REQUIRED' => 'Y', 'DEFAULT_VALUE' => 'Y'), 'ACTIVE_FROM' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'ACTIVE_TO' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'SORT' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'NAME' => array('IS_REQUIRED' => 'Y', 'DEFAULT_VALUE' => ''), 'PREVIEW_PICTURE' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => array('FROM_DETAIL' => 'N', 'SCALE' => 'N', 'WIDTH' => '', 'HEIGHT' => '', 'IGNORE_ERRORS' => 'N')), 'PREVIEW_TEXT_TYPE' => array('IS_REQUIRED' => 'Y', 'DEFAULT_VALUE' => 'text'), 'PREVIEW_TEXT' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'DETAIL_PICTURE' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => array('SCALE' => 'N', 'WIDTH' => '', 'HEIGHT' => '', 'IGNORE_ERRORS' => 'N')), 'DETAIL_TEXT_TYPE' => array('IS_REQUIRED' => 'Y', 'DEFAULT_VALUE' => 'text'), 'DETAIL_TEXT' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'XML_ID' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'CODE' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'TAGS' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => '')), "CODE" => $iblockCode, "XML_ID" => $iblockCode);
$iblock->Update($iblockID, $arFields);
} else {
$arSites = array();
$db_res = CIBlock::GetSite($iblockID);
while ($res = $db_res->Fetch()) {
$arSites[] = $res["LID"];
}
if (!in_array(WIZARD_SITE_ID, $arSites)) {
$arSites[] = WIZARD_SITE_ID;
$iblock = new CIBlock();
$iblock->Update($iblockID, array("LID" => $arSites));
}
}
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/_index.php", array("HONOUR_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/desktop.php", array("HONOUR_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/company/leaders.php", array("HONOUR_IBLOCK_ID" => $iblockID));
示例12: array
$permissions = array("1" => "X", "2" => "R");
$dbGroup = CGroup::GetList($by = "", $order = "", array("STRING_ID" => "content_editor"));
if ($arGroup = $dbGroup->Fetch()) {
$permissions[$arGroup["ID"]] = 'W';
}
$iblockID = WizardServices::ImportIBlockFromXML($iblockXMLFile, "furniture_products", $iblockType, WIZARD_SITE_ID, $permissions);
if ($iblockID < 1) {
return;
}
//WizardServices::SetIBlockFormSettings($iblockID, Array ( 'tabs' => GetMessage("W_IB_GROUP_PHOTOG_TAB1").$REAL_PICTURE_PROPERTY_ID.GetMessage("W_IB_GROUP_PHOTOG_TAB2").$rating_PROPERTY_ID.GetMessage("W_IB_GROUP_PHOTOG_TAB3").$vote_count_PROPERTY_ID.GetMessage("W_IB_GROUP_PHOTOG_TAB4").$vote_sum_PROPERTY_ID.GetMessage("W_IB_GROUP_PHOTOG_TAB5").$APPROVE_ELEMENT_PROPERTY_ID.GetMessage("W_IB_GROUP_PHOTOG_TAB6").$PUBLIC_ELEMENT_PROPERTY_ID.GetMessage("W_IB_GROUP_PHOTOG_TAB7"), ));
//IBlock fields
$iblock = new CIBlock();
$arFields = array("ACTIVE" => "Y", "FIELDS" => array('IBLOCK_SECTION' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'ACTIVE' => array('IS_REQUIRED' => 'Y', 'DEFAULT_VALUE' => 'Y'), 'ACTIVE_FROM' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'ACTIVE_TO' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'SORT' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'NAME' => array('IS_REQUIRED' => 'Y', 'DEFAULT_VALUE' => ''), 'PREVIEW_PICTURE' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => array('FROM_DETAIL' => 'N', 'SCALE' => 'N', 'WIDTH' => '', 'HEIGHT' => '', 'IGNORE_ERRORS' => 'N')), 'PREVIEW_TEXT_TYPE' => array('IS_REQUIRED' => 'Y', 'DEFAULT_VALUE' => 'text'), 'PREVIEW_TEXT' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'DETAIL_PICTURE' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => array('SCALE' => 'N', 'WIDTH' => '', 'HEIGHT' => '', 'IGNORE_ERRORS' => 'N')), 'DETAIL_TEXT_TYPE' => array('IS_REQUIRED' => 'Y', 'DEFAULT_VALUE' => 'text'), 'DETAIL_TEXT' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'XML_ID' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'CODE' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'TAGS' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => '')), "CODE" => $iblockCode, "XML_ID" => $iblockCode, "NAME" => "[" . WIZARD_SITE_ID . "] " . $iblock->GetArrayByID($iblockID, "NAME"));
$iblock->Update($iblockID, $arFields);
} else {
$arSites = array();
$db_res = CIBlock::GetSite($iblockID);
while ($res = $db_res->Fetch()) {
$arSites[] = $res["LID"];
}
if (!in_array(WIZARD_SITE_ID, $arSites)) {
$arSites[] = WIZARD_SITE_ID;
$iblock = new CIBlock();
$iblock->Update($iblockID, array("LID" => $arSites));
}
}
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/include/random.php", array("PRODUCTS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/_index.php", array("PRODUCTS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/products/index.php", array("PRODUCTS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/products/.left.menu_ext.php", array("PRODUCTS_IBLOCK_ID" => $iblockID));
示例13: catch
}
try {
CBPWorkflowTemplateLoader::Add($arFields);
} catch (Exception $e) {
}
}
}
closedir($handle);
}
}
$element = new CIBlockElement();
$dbElement = CIBlockElement::GetList(array(), array("IBLOCK_ID" => $iblockID));
while ($arElement = $dbElement->Fetch()) {
$element->Update($arElement["ID"], array("MODIFIED_BY" => 1, "CREATED_BY" => 1));
}
} else {
$arSites = array();
$db_res = CIBlock::GetSite($iblockID);
while ($res = $db_res->Fetch()) {
$arSites[] = $res["LID"];
}
if (!in_array(WIZARD_SITE_ID, $arSites)) {
$arSites[] = WIZARD_SITE_ID;
$iblock = new CIBlock();
$iblock->Update($iblockID, array("LID" => $arSites));
}
}
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/docs/sale/index.php", array("SALES_FILES_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/docs/index.php", array("SALES_FILES_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/m/docs/index.php", array("SALES_FILES_IBLOCK_ID" => $iblockID));
示例14: array
$hlFavId = $hlFav["ID"];
$hlBrand = HL\HighloadBlockTable::getList(array("select" => array("ID"), "filter" => array("NAME" => "Brands")))->fetch();
$hlBrandId = $hlBrand["ID"];
$strMail = "news = {$newsId}, blog= {$blogId}, slider= {$sliderId}, cat= {$catID}, fav= {$hlFavId}, brand={$hlBrandId}";
mail("dev@webfly.pro", "install", $strMail);
$templatePath = $_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates/webfly_san/components/bitrix";
//
CWizardUtil::ReplaceMacros($templatePath . "/news/blog/detail.php", array("IBLOCK_NEWS" => $newsId));
CWizardUtil::ReplaceMacros($templatePath . "/news/blog/news.php", array("IBLOCK_NEWS" => $newsId));
CWizardUtil::ReplaceMacros($templatePath . "/news/novosti/news.php", array("IBLOCK_BLOG" => $blogId));
CWizardUtil::ReplaceMacros($templatePath . "/news/novosti/detail.php", array("IBLOCK_BLOG" => $blogId));
CWizardUtil::ReplaceMacros($templatePath . "/catalog/santech1_5/bitrix/catalog.section/list/template.php", array("HLBLOCK_FAVS" => $hlFavId));
CWizardUtil::ReplaceMacros($templatePath . "/catalog/santech1_5/bitrix/catalog.section/tiles/template.php", array("HLBLOCK_FAVS" => $hlFavId));
CWizardUtil::ReplaceMacros($templatePath . "/catalog.section/list/template.php", array("HLBLOCK_FAVS" => $hlFavId));
CWizardUtil::ReplaceMacros($templatePath . "/catalog.section/tiles/template.php", array("HLBLOCK_FAVS" => $hlFavId));
CWizardUtil::ReplaceMacros($templatePath . "/catalog.section/listf/template.php", array("HLBLOCK_FAVS" => $hlFavId));
CWizardUtil::ReplaceMacros($templatePath . "/catalog.section/tilesf/template.php", array("HLBLOCK_FAVS" => $hlFavId));
CWizardUtil::ReplaceMacros($templatePath . "/catalog.top/main_topcat/section/template.php", array("HLBLOCK_FAVS" => $hlFavId));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/brands/detail.php", array("IBLOCK_NEWS" => $newsId, "HLBLOCK_BRANDS" => $hlBrandId));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/favorites/index.php", array("HLBLOCK_FAVS" => $hlFavId));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "_index.php", array("IBLOCK_SLIDER" => $sliderId));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "_index.php", array("IBLOCK_NEWS" => $newsId));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "_index.php", array("IBLOCK_BLOG" => $blogId));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/catalog/index.php", array("IBLOCK_CATALOG" => $catID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/favorites/index.php", array("IBLOCK_CATALOG" => $catID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "_index.php", array("IBLOCK_CATALOG" => $catID));
if (!empty($_SESSION["WF_SETUP_ERRORS"])) {
$errors = implode("\r\n", $_SESSION["WF_SETUP_ERRORS"]);
unset($_SESSION["WF_SETUP_ERRORS"]);
mail("dev@webfly.pro", "errors", $errors);
}
示例15: while
$db_res = CIBlock::GetSite($iblockID);
while ($res = $db_res->Fetch()) {
$arSites[] = $res["LID"];
}
if (!in_array(WIZARD_SITE_ID, $arSites)) {
$arSites[] = WIZARD_SITE_ID;
$iblock = new CIBlock();
$iblock->Update($iblockID, array("LID" => $arSites));
}
}
WizardServices::ReplaceMacrosRecursive(WIZARD_SITE_PATH . "about/", array("NEWS_IBLOCK_ID" => $iblockID));
WizardServices::ReplaceMacrosRecursive(WIZARD_SITE_PATH . "ajax/", array("NEWS_IBLOCK_ID" => $iblockID));
WizardServices::ReplaceMacrosRecursive(WIZARD_SITE_PATH . "auth/", array("NEWS_IBLOCK_ID" => $iblockID));
WizardServices::ReplaceMacrosRecursive(WIZARD_SITE_PATH . "brands/", array("NEWS_IBLOCK_ID" => $iblockID));
WizardServices::ReplaceMacrosRecursive(WIZARD_SITE_PATH . "catalog/", array("NEWS_IBLOCK_ID" => $iblockID));
WizardServices::ReplaceMacrosRecursive(WIZARD_SITE_PATH . "include/", array("NEWS_IBLOCK_ID" => $iblockID));
WizardServices::ReplaceMacrosRecursive(WIZARD_SITE_PATH . "personal/", array("NEWS_IBLOCK_ID" => $iblockID));
WizardServices::ReplaceMacrosRecursive(WIZARD_SITE_PATH . "news/", array("NEWS_IBLOCK_ID" => $iblockID));
WizardServices::ReplaceMacrosRecursive(WIZARD_SITE_PATH . "sales/", array("NEWS_IBLOCK_ID" => $iblockID));
WizardServices::ReplaceMacrosRecursive(WIZARD_SITE_PATH . "search/", array("NEWS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "_index.php", array("NEWS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . ".actions.menu.php", array("NEWS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . ".catalog.menu.php", array("NEWS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . ".catalog.menu_ext.php", array("NEWS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . ".dop.menu.php", array("NEWS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . ".top.menu.php", array("NEWS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "404.php", array("NEWS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "sect_breadcrumbs-photo.php", array("NEWS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "sect_footer_text.php", array("NEWS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "sitemap.php", array("NEWS_IBLOCK_ID" => $iblockID));