本文整理汇总了PHP中WizardServices::IncludeServiceLang方法的典型用法代码示例。如果您正苦于以下问题:PHP WizardServices::IncludeServiceLang方法的具体用法?PHP WizardServices::IncludeServiceLang怎么用?PHP WizardServices::IncludeServiceLang使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WizardServices
的用法示例。
在下文中一共展示了WizardServices::IncludeServiceLang方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CreateForm
function CreateForm($arForm, $arFormFields, $langFile)
{
if (!CModule::IncludeModule("form")) {
return false;
}
// set defaults
$arFieldDefaults = array("ACTIVE" => "Y", "C_SORT" => 0, "ADDITIONAL" => "N", "TITLE_TYPE" => "text", "IN_RESULTS_TABLE" => "Y", "IN_EXCEL_TABLE" => "Y");
foreach ($arFormFields as $key => $arField) {
if ($arFormFields['ADDITIONAL'] == 'Y' && !is_set($arFormFields['C_SORT'])) {
$arFormFields['C_SORT'] = 5000;
}
$arFieldDefaults["C_SORT"] += 100;
$arFormFields[$key] = array_merge($arFieldDefaults, $arField);
$arFormFields[$key]["TITLE"] = GetMessage($arField["SID"] . "_QUESTION");
}
$rsLanguage = CLanguage::GetList($by, $order, array());
while ($arLanguage = $rsLanguage->Fetch()) {
WizardServices::IncludeServiceLang($langFile, $arLanguage["LID"]);
$arForm["arMENU"][$arLanguage["LID"]] = GetMessage(substr($arForm["SID"], 0, -3) . "_MENU_NAME");
}
$dbForm = CForm::GetBySID($arForm["SID"]);
if ($dbForm->Fetch()) {
return;
}
WizardServices::IncludeServiceLang("status.php");
if ($formID = CForm::Set($arForm, false, "N")) {
// setup form fields
foreach ($arFormFields as $key => $arField) {
$arField["FORM_ID"] = $formID;
$fieldID = CFormField::Set($arField, false, "N");
}
if ($arTemplates = CForm::SetMailTemplate($formID)) {
CForm::Set(array('SID' => $arForm['SID'], 'arMAIL_TEMPLATE' => $arTemplates), $formID, 'N');
}
$arStatuses = array(array("FORM_ID" => $formID, "TITLE" => GetMessage("STATUS_NEW"), "C_SORT" => 100, "ACTIVE" => "Y", "DEFAULT_VALUE" => "Y", "CSS" => "statusgray", "arPERMISSION_VIEW" => array(0), "arPERMISSION_MOVE" => array(0), "arPERMISSION_EDIT" => array(0), "arPERMISSION_DELETE" => array(0)), array("FORM_ID" => $formID, "TITLE" => GetMessage("STATUS_RECEIVED"), "C_SORT" => 200, "ACTIVE" => "Y", "DEFAULT_VALUE" => "N", "CSS" => "statusblue", "arPERMISSION_VIEW" => array(0)), array("FORM_ID" => $formID, "TITLE" => GetMessage("STATUS_DONE"), "C_SORT" => 300, "ACTIVE" => "Y", "DEFAULT_VALUE" => "N", "CSS" => "statusgreen", "arPERMISSION_VIEW" => array(0)), array("FORM_ID" => $formID, "TITLE" => GetMessage("STATUS_REFUSE"), "C_SORT" => 400, "ACTIVE" => "Y", "DEFAULT_VALUE" => "N", "CSS" => "statusred", "arPERMISSION_VIEW" => array(0)));
foreach ($arStatuses as $key => $arStatus) {
if ($STATUS_ID = CFormStatus::Set($arStatus, false, "N")) {
if ($arStatus['DEFAULT_VALUE'] == 'N' && ($arTemplates = CFormStatus::SetMailTemplate($formID, $STATUS_ID))) {
foreach ($arTemplates as $TEMPLATE_ID) {
if (null == $em) {
$em = new CEventMessage();
}
$em->Update($TEMPLATE_ID, array('MESSAGE' => GetMessage('STATUS_MESSAGE')));
}
CFormStatus::Set(array('FORM_ID' => $formID, 'arMAIL_TEMPLATE' => $arTemplates), $STATUS_ID, 'N');
}
}
}
}
return $formID;
}
示例2: array
$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));
}
}
$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));
示例3: CIBlock
$arSites[] = WIZARD_SITE_ID;
$iblock = new CIBlock();
$iblock->Update($iblockID, array("LID" => $arSites));
}
}
$arProperty = array();
$codeProperty = '';
$i = 4;
$dbProperty = CIBlockProperty::GetList(array(), array("IBLOCK_ID" => $iblockID));
while ($arProp = $dbProperty->Fetch()) {
$arProperty[$arProp["CODE"]] = $arProp["ID"];
$codeProperty .= $i++ . ' => "' . $arProp["ID"] . '",';
}
$codeRequired = '3 => "' . $arProperty['FIO'] . '", 4 => "' . $arProperty['SEX'] . '", 5 => "' . $arProperty['AGE'] . '", 6 => "' . $arProperty['EMAIL'] . '", ';
$dbSite = CSite::GetByID(WIZARD_SITE_ID);
if ($arSite = $dbSite->Fetch()) {
$lang = $arSite["LANGUAGE_ID"];
}
if (strlen($lang) <= 0) {
$lang = "ru";
}
WizardServices::IncludeServiceLang("resume.php", $lang);
CUserOptions::SetOption("form", "form_element_" . $iblockID, array('tabs' => 'edit1--#--' . GetMessage("WZD_OPTION_RESUME_0") . '--,--ACTIVE--#--' . GetMessage("WZD_OPTION_RESUME_1") . '--,--ACTIVE_FROM--#--' . GetMessage("WZD_OPTION_RESUME_2") . '--,--ACTIVE_TO--#--' . GetMessage("WZD_OPTION_RESUME_24") . '--,--NAME--#--' . GetMessage("WZD_OPTION_RESUME_3") . '--,--PROPERTY_' . $arProperty['FIO'] . '--#--' . GetMessage("WZD_OPTION_RESUME_6") . '--,--PROPERTY_' . $arProperty['SEX'] . '--#--' . GetMessage("WZD_OPTION_RESUME_7") . '--,--PROPERTY_' . $arProperty['AGE'] . '--#--' . GetMessage("WZD_OPTION_RESUME_8") . '--,--PROPERTY_' . $arProperty['EDUCATION'] . '--#--' . GetMessage("WZD_OPTION_RESUME_9") . '--,--PROPERTY_' . $arProperty['EDUCATIONAL'] . '--#--' . GetMessage("WZD_OPTION_RESUME_10") . '--,--PROPERTY_' . $arProperty['PROFESSION'] . '--#--' . GetMessage("WZD_OPTION_RESUME_11") . '--,--PROPERTY_' . $arProperty['ADDEDUCATION'] . '--#--' . GetMessage("WZD_OPTION_RESUME_12") . '--,--PROPERTY_' . $arProperty['EXPERIENCE'] . '--#--' . GetMessage("WZD_OPTION_RESUME_13") . '--,--PROPERTY_' . $arProperty['REMUNERATION'] . '--#--' . GetMessage("WZD_OPTION_RESUME_14") . '--,--PROPERTY_' . $arProperty['SCHEDULE'] . '--#--' . GetMessage("WZD_OPTION_RESUME_15") . '--,--PROPERTY_' . $arProperty['SKILLS'] . '--#--' . GetMessage("WZD_OPTION_RESUME_16") . '--,--PROPERTY_' . $arProperty['PERSON'] . '--#--' . GetMessage("WZD_OPTION_RESUME_17") . '--,--PROPERTY_' . $arProperty['PHONE'] . '--#--' . GetMessage("WZD_OPTION_RESUME_18") . '--,--PROPERTY_' . $arProperty['EMAIL'] . '--#--' . GetMessage("WZD_OPTION_RESUME_19") . '--,--PREVIEW_TEXT--#--' . GetMessage("WZD_OPTION_RESUME_4") . '--;--'));
CUserOptions::SetOption("form", "form_section_" . $iblockID, array('tabs' => 'edit1--#--' . GetMessage("WZD_OPTION_RESUME_20") . '--,--NAME--#--' . GetMessage("WZD_OPTION_RESUME_21") . '--,--CODE--#--' . GetMessage("WZD_OPTION_RESUME_22") . '--,--SORT--#--' . GetMessage("WZD_OPTION_RESUME_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 . "/job/index.php", array("RESUME_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/job/resume/index.php", array("RESUME_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/job/resume/my/index.php", array("RESUME_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/job/resume/my/index.php", array("IDS_CODE_PROPERTY" => $codeProperty));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/job/resume/my/index.php", array("IDS_CODE_REQUIRED" => $codeRequired));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/sect_rbottom.php", array("RESUME_IBLOCK_ID" => $iblockID));
示例4: array
} else {
$strError = "Couldn't delete catalog iblock";
}
//die($strError);
}
}
if ($boolFlag) {
$IBLOCK_CATALOG_ID = false;
}
}
$dbResultList = CCatalogGroup::GetList(array(), array("BASE" => "Y"));
if (!$dbResultList->Fetch()) {
$arFields = array();
$rsLanguage = CLanguage::GetList($by, $order, array());
while ($arLanguage = $rsLanguage->Fetch()) {
WizardServices::IncludeServiceLang("catalog.php", $arLanguage["ID"]);
$arFields["USER_LANG"][$arLanguage["ID"]] = GetMessage("WIZ_PRICE_NAME");
}
$arFields["BASE"] = "Y";
$arFields["SORT"] = 100;
$arFields["NAME"] = "BASE";
$arFields["USER_GROUP"] = array(1);
$arFields["USER_GROUP_BUY"] = array(1);
CCatalogGroup::Add($arFields);
}
if ($IBLOCK_CATALOG_ID == false) {
$permissions = array("1" => "X", "2" => "R");
$dbGroup = CGroup::GetList($by = "", $order = "", array("STRING_ID" => "sale_administrator"));
if ($arGroup = $dbGroup->Fetch()) {
$permissions[$arGroup["ID"]] = 'W';
}
示例5: OnPostForm
function OnPostForm()
{
$wizard =& $this->GetWizard();
if ($wizard->IsPrevButtonClick()) {
return;
}
if (!$this->ldp) {
$this->SetError(GetMessage("wiz_ldap_error"), "ldapServer");
return;
} elseif (!$this->ldp->BindAdmin()) {
$this->SetError(GetMessage("wiz_ldap_error1"), "ldapLogin");
return;
}
if ($this->IsServerCheck()) {
$this->connSuccessString = GetMessage("wiz_ldap_success");
$wizard->SetCurrentStep("ldap_settings");
} elseif ($this->ldp) {
$dbGroup = $this->ldp->GetGroupList();
if (!$dbGroup->Fetch()) {
$this->SetError(GetMessage("wiz_ldap_error_root"), "ldapBaseDN");
return;
}
}
if ($wizard->GetVar('ldapNTLM') == 'Y' && strlen($wizard->GetVar('ldapNTLMDomain')) <= 0) {
$this->SetError(GetMessage('wiz_ldap_error_domain'), "ldapNTLMDomain");
return;
}
$wizardPath = $wizard->GetPath();
$servicePath = $_SERVER["DOCUMENT_ROOT"] . $wizardPath . "/site/services/main/groups.php";
if (file_exists($servicePath)) {
define("WIZARD_IS_RERUN", true);
define("WIZARD_SERVICE_ABSOLUTE_PATH", $_SERVER["DOCUMENT_ROOT"] . $wizardPath . "/site/services/main");
WizardServices::IncludeServiceLang("groups.php");
include_once $servicePath;
}
}
示例6: array
$dbExistsGroup = CForumGroup::GetListEx(array(), array("LID" => LANGUAGE_ID));
while ($arExistsGroup = $dbExistsGroup->Fetch()) {
foreach ($arGroupID as $xmlID => $ID) {
if ($arExistsGroup["NAME"] == GetMessage($xmlID . "_GROUP_NAME")) {
$arGroupID[$xmlID] = $arExistsGroup["ID"];
}
}
}
$sort = 1;
foreach ($arGroupID as $xmlID => $groupID) {
if ($groupID > 0) {
continue;
}
$arNewGroup = array("SORT" => $sort++, "LANG" => array());
foreach ($arLanguages as $languageID) {
$arMessages = WizardServices::IncludeServiceLang("index.php", $languageID, $bReturnArray = true);
$arNewGroup["LANG"][] = array("LID" => $languageID, "NAME" => array_key_exists($xmlID . "_GROUP_NAME", $arMessages) ? $arMessages[$xmlID . "_GROUP_NAME"] : GetMessage($xmlID . "_GROUP_NAME"), "DESCRIPTION" => array_key_exists($xmlID . "_GROUP_DESCRIPTION", $arMessages) ? $arMessages[$xmlID . "_GROUP_DESCRIPTION"] : GetMessage($xmlID . "_GROUP_DESCRIPTION"));
}
$arGroupID[$xmlID] = CForumGroup::Add($arNewGroup);
}
$rsUser = CUser::GetByID(1);
if ($arUser = $rsUser->Fetch()) {
$userName = $arUser["NAME"] . (strlen($arUser["NAME"]) <= 0 || strlen($arUser["LAST_NAME"]) <= 0 ? "" : " ") . $arUser["LAST_NAME"];
$authorName = strlen(trim($userName)) > 0 ? $userName : $arUser["LOGIN"];
} else {
$authorName = "admin";
}
$arForums = array(array("XML_ID" => "NEWS_COMMENTS", "NAME" => GetMessage("NEWS_COMMENTS_FORUM_NAME"), "DESCRIPTION" => GetMessage("NEWS_COMMENTS_FORUM_DESCRIPTION"), "SORT" => 2, "ACTIVE" => "Y", "ALLOW_HTML" => "N", "ALLOW_ANCHOR" => "Y", "ALLOW_BIU" => "Y", "ALLOW_IMG" => "Y", "ALLOW_LIST" => "Y", "ALLOW_QUOTE" => "Y", "ALLOW_CODE" => "Y", "ALLOW_FONT" => "Y", "ALLOW_SMILES" => "Y", "ALLOW_UPLOAD" => "Y", "ALLOW_NL2BR" => "N", "MODERATION" => "N", "ALLOW_MOVE_TOPIC" => "Y", "ORDER_BY" => "P", "DEDUPLICATION" => "N", "ORDER_DIRECTION" => "DESC", "LID" => LANGUAGE_ID, "PATH2FORUM_MESSAGE" => "", "ALLOW_UPLOAD_EXT" => "", "FORUM_GROUP_ID" => $arGroupID["COMMENTS"], "ASK_GUEST_EMAIL" => "N", "USE_CAPTCHA" => "N", "SITES" => array(WIZARD_SITE_ID => WIZARD_SITE_DIR . "community/forum/messages/forum#FORUM_ID#/topic#TOPIC_ID#/message#MESSAGE_ID#/#message#MESSAGE_ID#"), "EVENT1" => "forum", "EVENT2" => "message", "EVENT3" => "", "GROUP_ID" => array("2" => "M", WIZARD_PORTAL_ADMINISTRATION_GROUP => "Y")), array("XML_ID" => "PHOTOGALLERY_COMMENTS", "NAME" => GetMessage("PHOTOGALLERY_COMMENTS_FORUM_NAME"), "DESCRIPTION" => GetMessage("PHOTOGALLERY_COMMENTS_FORUM_DESCRIPTION"), "SORT" => 3, "ACTIVE" => "Y", "ALLOW_HTML" => "N", "ALLOW_ANCHOR" => "Y", "ALLOW_BIU" => "Y", "ALLOW_IMG" => "Y", "ALLOW_LIST" => "Y", "ALLOW_QUOTE" => "Y", "ALLOW_CODE" => "Y", "ALLOW_FONT" => "Y", "ALLOW_SMILES" => "Y", "ALLOW_UPLOAD" => "Y", "ALLOW_NL2BR" => "N", "MODERATION" => "N", "ALLOW_MOVE_TOPIC" => "Y", "ORDER_BY" => "P", "ORDER_DIRECTION" => "DESC", "LID" => LANGUAGE_ID, "PATH2FORUM_MESSAGE" => "", "ALLOW_UPLOAD_EXT" => "", "DEDUPLICATION" => "N", "FORUM_GROUP_ID" => $arGroupID["HIDDEN"], "ASK_GUEST_EMAIL" => "N", "USE_CAPTCHA" => "N", "SITES" => array(WIZARD_SITE_ID => WIZARD_SITE_DIR . "community/forum/messages/forum#FORUM_ID#/topic#TOPIC_ID#/message#MESSAGE_ID#/#message#MESSAGE_ID#"), "EVENT1" => "forum", "EVENT2" => "message", "EVENT3" => "", "GROUP_ID" => array("2" => "M", WIZARD_PORTAL_ADMINISTRATION_GROUP => "Y")), array("XML_ID" => "USERS_AND_GROUPS", "NAME" => GetMessage("USERS_AND_GROUPS_FORUM_NAME"), "DESCRIPTION" => GetMessage("USERS_AND_GROUPS_FORUM_DESCRIPTION"), "SORT" => 4, "ACTIVE" => "Y", "ALLOW_HTML" => "N", "ALLOW_ANCHOR" => "Y", "ALLOW_BIU" => "Y", "ALLOW_IMG" => "Y", "ALLOW_LIST" => "Y", "ALLOW_QUOTE" => "Y", "ALLOW_CODE" => "Y", "ALLOW_FONT" => "Y", "ALLOW_SMILES" => "Y", "ALLOW_UPLOAD" => "A", "ALLOW_NL2BR" => "N", "MODERATION" => "N", "ALLOW_MOVE_TOPIC" => "Y", "ORDER_BY" => "P", "DEDUPLICATION" => "N", "ORDER_DIRECTION" => "DESC", "LID" => LANGUAGE_ID, "PATH2FORUM_MESSAGE" => "", "ALLOW_UPLOAD_EXT" => "", "FORUM_GROUP_ID" => $arGroupID["HIDDEN"], "ASK_GUEST_EMAIL" => "N", "USE_CAPTCHA" => "N", "SITES" => array(WIZARD_SITE_ID => WIZARD_SITE_DIR . "community/forum/messages/forum#FORUM_ID#/topic#TOPIC_ID#/message#MESSAGE_ID#/#message#MESSAGE_ID#"), "EVENT1" => "forum", "EVENT2" => "message", "EVENT3" => "", "GROUP_ID" => array(WIZARD_PORTAL_ADMINISTRATION_GROUP => "Y")), array("XML_ID" => "DOCS_SHARED_COMMENTS", "NAME" => GetMessage("DOCS_SHARED_COMMENTS_NAME"), "DESCRIPTION" => GetMessage("DOCS_SHARED_COMMENTS_DECRIPTION"), "SORT" => 5, "ACTIVE" => "Y", "ALLOW_HTML" => "N", "ALLOW_ANCHOR" => "Y", "ALLOW_BIU" => "Y", "ALLOW_IMG" => "Y", "ALLOW_LIST" => "Y", "ALLOW_QUOTE" => "Y", "ALLOW_CODE" => "Y", "ALLOW_FONT" => "Y", "ALLOW_SMILES" => "Y", "ALLOW_UPLOAD" => "Y", "ALLOW_NL2BR" => "N", "MODERATION" => "N", "DEDUPLICATION" => "N", "ALLOW_MOVE_TOPIC" => "Y", "ORDER_BY" => "P", "ORDER_DIRECTION" => "DESC", "LID" => LANGUAGE_ID, "PATH2FORUM_MESSAGE" => "", "ALLOW_UPLOAD_EXT" => "", "FORUM_GROUP_ID" => $arGroupID["HIDDEN"], "ASK_GUEST_EMAIL" => "N", "USE_CAPTCHA" => "N", "SITES" => array(WIZARD_SITE_ID => WIZARD_SITE_DIR . "community/forum/messages/forum#FORUM_ID#/topic#TOPIC_ID#/message#MESSAGE_ID#/#message#MESSAGE_ID#"), "EVENT1" => "forum", "EVENT2" => "message", "EVENT3" => "", "GROUP_ID" => array("2" => "M", WIZARD_PORTAL_ADMINISTRATION_GROUP => "Y")), array("XML_ID" => "DOCS_SALES_COMMENTS", "NAME" => GetMessage("DOCS_SALES_COMMENTS_NAME"), "DESCRIPTION" => GetMessage("DOCS_SALES_COMMENTS_DECRIPTION"), "SORT" => 6, "ACTIVE" => "Y", "ALLOW_HTML" => "N", "ALLOW_ANCHOR" => "Y", "ALLOW_BIU" => "Y", "ALLOW_IMG" => "Y", "ALLOW_LIST" => "Y", "ALLOW_QUOTE" => "Y", "ALLOW_CODE" => "Y", "ALLOW_FONT" => "Y", "ALLOW_SMILES" => "Y", "ALLOW_UPLOAD" => "Y", "ALLOW_NL2BR" => "N", "MODERATION" => "N", "DEDUPLICATION" => "N", "ALLOW_MOVE_TOPIC" => "Y", "ORDER_BY" => "P", "ORDER_DIRECTION" => "DESC", "LID" => LANGUAGE_ID, "PATH2FORUM_MESSAGE" => "", "ALLOW_UPLOAD_EXT" => "", "FORUM_GROUP_ID" => $arGroupID["HIDDEN"], "ASK_GUEST_EMAIL" => "N", "USE_CAPTCHA" => "N", "SITES" => array(WIZARD_SITE_ID => WIZARD_SITE_DIR . "community/forum/messages/forum#FORUM_ID#/topic#TOPIC_ID#/message#MESSAGE_ID#/#message#MESSAGE_ID#"), "EVENT1" => "forum", "EVENT2" => "message", "EVENT3" => "", "GROUP_ID" => array("2" => "A", WIZARD_PORTAL_ADMINISTRATION_GROUP => "Y", WIZARD_EMPLOYEES_GROUP => "M", WIZARD_MARKETING_AND_SALES_GROUP => "M")), array("XML_ID" => "DOCS_DIRECTORS_COMMENTS", "NAME" => GetMessage("DOCS_DIRECTORS_COMMENTS_NAME"), "DESCRIPTION" => GetMessage("DOCS_DIRECTORS_COMMENTS_DECRIPTION"), "SORT" => 6, "ACTIVE" => "Y", "ALLOW_HTML" => "N", "ALLOW_ANCHOR" => "Y", "ALLOW_BIU" => "Y", "ALLOW_IMG" => "Y", "ALLOW_LIST" => "Y", "ALLOW_QUOTE" => "Y", "ALLOW_CODE" => "Y", "ALLOW_FONT" => "Y", "ALLOW_SMILES" => "Y", "ALLOW_UPLOAD" => "Y", "ALLOW_NL2BR" => "N", "MODERATION" => "N", "DEDUPLICATION" => "N", "ALLOW_MOVE_TOPIC" => "Y", "ORDER_BY" => "P", "ORDER_DIRECTION" => "DESC", "LID" => LANGUAGE_ID, "PATH2FORUM_MESSAGE" => "", "ALLOW_UPLOAD_EXT" => "", "FORUM_GROUP_ID" => $arGroupID["HIDDEN"], "ASK_GUEST_EMAIL" => "N", "USE_CAPTCHA" => "N", "SITES" => array(WIZARD_SITE_ID => WIZARD_SITE_DIR . "community/forum/messages/forum#FORUM_ID#/topic#TOPIC_ID#/message#MESSAGE_ID#/#message#MESSAGE_ID#"), "EVENT1" => "forum", "EVENT2" => "message", "EVENT3" => "", "GROUP_ID" => array("2" => "A", WIZARD_PORTAL_ADMINISTRATION_GROUP => "Y", WIZARD_DIRECTION_GROUP => "M")), array("XML_ID" => "GROUPS_AND_USERS_FILES_COMMENTS", "NAME" => GetMessage("GROUPS_AND_USERS_COMMENTS_NAME"), "DESCRIPTION" => GetMessage("GROUPS_AND_USERS_COMMENTS_DESCRIPTION"), "SORT" => 6, "ACTIVE" => "Y", "ALLOW_HTML" => "N", "ALLOW_ANCHOR" => "Y", "ALLOW_BIU" => "Y", "ALLOW_IMG" => "Y", "ALLOW_LIST" => "Y", "ALLOW_QUOTE" => "Y", "ALLOW_CODE" => "Y", "ALLOW_FONT" => "Y", "ALLOW_SMILES" => "Y", "ALLOW_UPLOAD" => "Y", "ALLOW_NL2BR" => "N", "MODERATION" => "N", "DEDUPLICATION" => "N", "ALLOW_MOVE_TOPIC" => "Y", "ORDER_BY" => "P", "ORDER_DIRECTION" => "DESC", "LID" => LANGUAGE_ID, "PATH2FORUM_MESSAGE" => "", "ALLOW_UPLOAD_EXT" => "", "FORUM_GROUP_ID" => $arGroupID["HIDDEN"], "ASK_GUEST_EMAIL" => "N", "USE_CAPTCHA" => "N", "SITES" => array(WIZARD_SITE_ID => WIZARD_SITE_DIR . "community/forum/messages/forum#FORUM_ID#/topic#TOPIC_ID#/message#MESSAGE_ID#/#message#MESSAGE_ID#"), "EVENT1" => "forum", "EVENT2" => "message", "EVENT3" => "", "GROUP_ID" => array("2" => "M", WIZARD_PORTAL_ADMINISTRATION_GROUP => "Y")));
foreach ($arForums as $arForum) {
$dbForum = CForumNew::GetList(array(), array("SITE_ID" => WIZARD_SITE_ID, "XML_ID" => $arForum["XML_ID"]));
if ($dbForum->Fetch()) {
示例7: array
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
if (!CModule::IncludeModule("iblock")) {
return;
}
$arTypes = array(array(), array("ID" => "news", "SECTIONS" => "Y", "IN_RSS" => "N", "SORT" => 50, "LANG" => array()), array("ID" => "portfolio", "SECTIONS" => "Y", "IN_RSS" => "N", "SORT" => 100, "LANG" => array()), array("ID" => "price", "SECTIONS" => "Y", "IN_RSS" => "N", "SORT" => 150, "LANG" => array()), array("ID" => "reviews", "SECTIONS" => "Y", "IN_RSS" => "N", "SORT" => 200, "LANG" => array()), array("ID" => "services", "SECTIONS" => "Y", "IN_RSS" => "N", "SORT" => 250, "LANG" => array()), array("ID" => "slider", "SECTIONS" => "Y", "IN_RSS" => "N", "SORT" => 300, "LANG" => array()));
$arLanguages = array();
$rsLanguage = CLanguage::GetList($by, $order, array());
while ($arLanguage = $rsLanguage->Fetch()) {
$arLanguages[] = $arLanguage["LID"];
}
$iblockType = new CIBlockType();
foreach ($arTypes as $arType) {
$dbType = CIBlockType::GetList(array(), array("=ID" => $arType["ID"]));
if ($dbType->Fetch()) {
continue;
}
foreach ($arLanguages as $languageID) {
WizardServices::IncludeServiceLang("type.php", $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->Add($arType);
}
示例8: CIBlock
if ($iblockID < 1) {
return;
}
//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', 'METHOD' => 'resample', 'COMPRESSION' => 95, 'DELETE_WITH_DETAIL' => 'N', 'UPDATE_WITH_DETAIL' => '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', 'METHOD' => 'resample', 'COMPRESSION' => 95)), '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' => 'Y', 'DEFAULT_VALUE' => array('UNIQUE' => 'Y', 'TRANSLITERATION' => 'Y', 'TRANS_LEN' => 100, 'TRANS_CASE' => 'L', 'TRANS_SPACE' => '_', 'TRANS_OTHER' => '_', 'TRANS_EAT' => 'Y', 'USE_GOOGLE' => 'Y')), 'TAGS' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'SECTION_NAME' => array('IS_REQUIRED' => 'Y', 'DEFAULT_VALUE' => ''), 'SECTION_PICTURE' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => array('FROM_DETAIL' => 'N', 'SCALE' => 'N', 'WIDTH' => '', 'HEIGHT' => '', 'IGNORE_ERRORS' => 'N', 'METHOD' => 'resample', 'COMPRESSION' => 95, 'DELETE_WITH_DETAIL' => 'N', 'UPDATE_WITH_DETAIL' => 'N')), 'SECTION_DESCRIPTION_TYPE' => array('IS_REQUIRED' => 'Y', 'DEFAULT_VALUE' => 'text'), 'SECTION_DESCRIPTION' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'SECTION_DETAIL_PICTURE' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => array('SCALE' => 'N', 'WIDTH' => '', 'HEIGHT' => '', 'IGNORE_ERRORS' => 'N', 'METHOD' => 'resample', 'COMPRESSION' => 95)), 'SECTION_XML_ID' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'SECTION_CODE' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => array('UNIQUE' => 'N', 'TRANSLITERATION' => 'N', 'TRANS_LEN' => 100, 'TRANS_CASE' => 'L', 'TRANS_SPACE' => '_', 'TRANS_OTHER' => '_', 'TRANS_EAT' => 'Y', 'USE_GOOGLE' => 'N'))), "CODE" => "news", "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));
}
}
$dbSite = CSite::GetByID(WIZARD_SITE_ID);
if ($arSite = $dbSite->Fetch()) {
$lang = $arSite["LANGUAGE_ID"];
}
if (strlen($lang) <= 0) {
$lang = "ru";
}
WizardServices::IncludeServiceLang("news.php", $lang);
//CUserOptions::SetOption("form", "form_element_".$iblockID, array ( 'tabs' => 'edit1--#--'.GetMessage("WZD_OPTION_NEWS_1").'--,--ACTIVE--#--'.GetMessage("WZD_OPTION_NEWS_2").'--,--ACTIVE_FROM--#--'.GetMessage("WZD_OPTION_NEWS_3").'--,--NAME--#--'.GetMessage("WZD_OPTION_NEWS_5").'--,--CODE--#--'.GetMessage("WZD_OPTION_NEWS_6").'--,--PREVIEW_TEXT--#--'.GetMessage("WZD_OPTION_NEWS_8").'--,--DETAIL_TEXT--#--'.GetMessage("WZD_OPTION_NEWS_10").'--;--', ));
//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 . "/news/index.php", array("NEWS_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/sect_bottom.php", array("NEWS_IBLOCK_ID" => $iblockID));
示例9: array
$iblock->Update($iblockID, array("LID" => $arSites));
}
}
//template
CWizardUtil::ReplaceMacros($_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates/webfly_san/footer.php", array("WF_IB_FEEDBACK" => $iblockID));
// creating event
function UET($EVENT_NAME, $NAME, $LID, $DESCRIPTION)
{
$et = new CEventType();
$et->Add(array("LID" => $LID, "EVENT_NAME" => $EVENT_NAME, "NAME" => $NAME, "DESCRIPTION" => $DESCRIPTION));
}
$em = new CEventMessage();
$langs = CLanguage::GetList($b = "", $o = "");
$evtMsg = 0;
while ($lang = $langs->Fetch()) {
WizardServices::IncludeServiceLang("feedback.php", $lang["LID"]);
$arSites = array();
$sites = CLang::GetList($by, $order, array("LANGUAGE_ID" => $lang["LID"]));
while ($site = $sites->Fetch()) {
$arSites[] = $site["LID"];
}
///////////////////// FEEDBACK_FORM /////////////////////
$fres = CEventType::GetList(array("EVENT_NAME" => "NEW_FEEDBACK_FORM", "LID" => $lang["LID"]));
if (!$fres->Fetch()) {
UET("NEW_FEEDBACK_FORM", GetMessage("FEEDBACK_FORM_NAME"), $lang["LID"], "\n\t\t\t#AUTHOR# - " . GetMessage("FEEDBACK_FORM_AUTHOR") . "\n #AUTHOR_EMAIL# - " . GetMessage("FEEDBACK_FORM_EMAIL") . "\n #TEXT# - " . GetMessage("FEEDBACK_FORM_TEXT") . "\n #EMAIL_FROM# - " . GetMessage("FEEDBACK_FORM_EMAIL_FROM") . "\n #EMAIL_TO# - " . GetMessage("FEEDBACK_FORM_EMAIL_TO") . "\n #LINK# " . GetMessage("FEEDBACK_FORM_EMAIL_TO"));
if (is_array($arSites) && count($arSites) > 0) {
//****************************************************************
$evtMsg = $em->Add(array("ACTIVE" => "Y", "EVENT_NAME" => "NEW_FEEDBACK_FORM", "LID" => $arSites, "EMAIL_FROM" => "#DEFAULT_EMAIL_FROM#", "EMAIL_TO" => "#EMAIL_TO#", "SUBJECT" => "#SITE_NAME#: " . GetMessage("FEEDBACK_FORM_DESC"), "MESSAGE" => GetMessage("FEEDBACK_FORM_BODY"), "BODY_TYPE" => "text"));
//****************************************************************
}
} else {
示例10: unset
$Set_ID = $_SESSION["WF_IBL_SETTINGS_ID"];
unset($_SESSION["WF_IBL_SETTINGS_ID"]);
//Creating default values
$hldata = HL\HighloadBlockTable::getById($Set_ID)->fetch();
$hlentity = HL\HighloadBlockTable::compileEntity($hldata);
$hlHandler = $hlentity->getDataClass();
$getList = new Entity\Query($hlHandler);
$getList->setSelect(array('*'));
$getList->setOrder(array("ID" => "ASC"));
$getList->setFilter(array("ID" => 1));
$result = $getList->exec();
$result = new CDBResult($result);
if ($row = $result->Fetch()) {
} else {
$arData = array("UF_THEME" => "default", "UF_SHADOWS" => "default", "UF_BUTTONS" => "coral", "UF_BG" => "default");
$hlHandler::add($arData);
}
$Brand_ID = $_SESSION["WF_IBL_BRANDS_ID"];
unset($_SESSION["WF_IBL_BRANDS_ID"]);
$hldata = HL\HighloadBlockTable::getById($Brand_ID)->fetch();
$hlentity = HL\HighloadBlockTable::compileEntity($hldata);
$hlHandler = $hlentity->getDataClass();
$sort = 100;
$arBrandsUt = array("1 Marka" => "ref_files/7e44ec9828b17ace0d8f75a349b8de43.png", "Apollo" => "ref_files/61441e895fdde98034964c624e295f90.png", "AquaVita" => "ref_files/9d8f6c21dbd87f76b88a8b35e3cd0572.png", "BAS" => "ref_files/7eaea2afe6729ef29a25aeb82aba2513.png", "Cersanit" => "ref_files/9fe61dfbd7454a7ee27e41e0066fd3ba.png", "EAGO" => "ref_files/7d6f158e6fba7b90963c489c218fb8ef.png", "Kolpa-san" => "ref_files/a1906e21f88ebf48c6550117fb77b69f.png", "Loranto" => "ref_files/794eda4bc38c0decfb66455b436919e2.png", "RELISAN" => "ref_files/a3a02d848afdf90036f1def792d5adaf.png", "Roca" => "ref_files/bddd67008a780c90950540be078685a0.png", "Triton" => "ref_files/f75713924bd7964c999de3fbea43c2de.png", "Vayer" => "ref_files/5841ebf40c33bc9858245adfe7336427.png", "IDDIS" => "ref_files/85f24f3d3a9da494f411baa869b9df69.png", "Grohe" => "ref_files/6a2820fa128435a333ca473d06a78895.png", "Hansgrohe" => "ref_files/82499c22bd8a60b4ced944606973a91a.png");
WizardServices::IncludeServiceLang("highloadblocks.php", "ru");
foreach ($arBrandsUt as $brandName => $BrandIMG) {
$lowerName = str_replace(array(" ", "-"), "", strtolower($brandName));
$arData = array("UF_NAME" => $brandName, "UF_FILE" => array("name" => $lowerName . ".png", "type" => "image/png", "tmp_name" => WIZARD_ABSOLUTE_PATH . "/site/services/iblock/" . $BrandIMG), "UF_SORT" => $sort, "UF_DESCRIPTION" => GetMessage("SHORT_DESC_" . $lowerName), "UF_FULL_DESCRIPTION" => GetMessage("LONG_DESC_" . $lowerName), "UF_LINK" => $lowerName, "UF_EXTERNAL_CODE" => "", "UF_XML_ID" => $lowerName);
$result = $hlHandler::add($arData);
$sort = $sort + 10;
}
示例11: CIBlock
$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"];
}
$dbSite = CSite::GetByID(WIZARD_SITE_ID);
if ($arSite = $dbSite->Fetch()) {
$lang = $arSite["LANGUAGE_ID"];
}
if (strlen($lang) <= 0) {
$lang = "ru";
}
WizardServices::IncludeServiceLang("catalog.php", $lang);
//for element edit
CUserOptions::SetOption("form", "form_element_" . $iblockID, array('tabs' => 'edit1--#--' . GetMessage("WZD_OPTION_CATALOG_1") . '--,--NAME--#--' . GetMessage("WZD_OPTION_CATALOG_3") . '--,--CODE--#--' . GetMessage("WZD_OPTION_CATALOG_4") . '--,--PROPERTY_' . $arProperty["TITLE"] . '--#--' . GetMessage("WZD_OPTION_CATALOG_35") . '--,--PROPERTY_' . $arProperty["HEADER1"] . '--#--' . GetMessage("WZD_OPTION_CATALOG_36") . '--,--PROPERTY_' . $arProperty["KEYWORDS"] . '--#--' . GetMessage("WZD_OPTION_CATALOG_37") . '--,--PROPERTY_' . $arProperty["META_DESCRIPTION"] . '--#--' . GetMessage("WZD_OPTION_CATALOG_38") . '--,--ACTIVE--#--' . GetMessage("WZD_OPTION_CATALOG_2") . '--,--PROPERTY_' . $arProperty["SALELEADER"] . '--#--' . GetMessage("WZD_OPTION_CATALOG_29") . '--,--PROPERTY_' . $arProperty["NEWPRODUCT"] . '--#--' . GetMessage("WZD_OPTION_CATALOG_11") . '--,--PROPERTY_' . $arProperty["SPECIALOFFER"] . '--#--' . GetMessage("WZD_OPTION_CATALOG_10") . '--,--PREVIEW_TEXT--#--' . GetMessage("WZD_OPTION_CATALOG_6") . '--,--DETAIL_TEXT--#--' . GetMessage("WZD_OPTION_CATALOG_7") . '--,--DETAIL_PICTURE--#--' . GetMessage("WZD_OPTION_CATALOG_5") . '--,--PROPERTY_' . $arProperty["MORE_PHOTO"] . '--#--' . GetMessage("WZD_OPTION_CATALOG_18") . '--,--SECTIONS--#--' . GetMessage("WZD_OPTION_CATALOG_39") . '--,--IBLOCK_ELEMENT_PROPERTY--#--' . GetMessage("WZD_OPTION_CATALOG_32") . '--,--CATALOG--#--' . GetMessage("WZD_OPTION_CATALOG_20") . '--;--cedit1--#--' . GetMessage("WZD_OPTION_CATALOG_33") . '--,--PROPERTY_' . $arProperty["RECOMMEND"] . '--#--' . GetMessage("WZD_OPTION_CATALOG_31") . '--;--edit8--#--' . GetMessage("WZD_OPTION_CATALOG_34") . '--,--OFFERS--#--' . GetMessage("WZD_OPTION_CATALOG_34") . '--;--'));
//for section edit
CUserOptions::SetOption("form", "form_section_" . $iblockID, array('tabs' => 'edit1--#--' . GetMessage("WZD_OPTION_CATALOG_21") . '--,--ACTIVE--#--' . GetMessage("WZD_OPTION_CATALOG_22") . '--,--IBLOCK_SECTION_ID--#--' . GetMessage("WZD_OPTION_CATALOG_23") . '--,--NAME--#--' . GetMessage("WZD_OPTION_CATALOG_24") . '--,--CODE--#--' . GetMessage("WZD_OPTION_CATALOG_25") . '--,--UF_BROWSER_TITLE--#--' . GetMessage("WZD_OPTION_CATALOG_35") . '--,--UF_TITLE_H1--#--' . GetMessage("WZD_OPTION_CATALOG_36") . '--,--UF_KEYWORDS--#--' . GetMessage("WZD_OPTION_CATALOG_37") . '--,--UF_META_DESCRIPTION--#--' . GetMessage("WZD_OPTION_CATALOG_38") . '--,--SORT--#--' . GetMessage("WZD_OPTION_CATALOG_28") . '--,--PICTURE--#--' . GetMessage("WZD_OPTION_CATALOG_26") . '--,--DESCRIPTION--#--' . GetMessage("WZD_OPTION_CATALOG_27") . '--;--edit1_csection2--#--' . GetMessage("WZD_OPTION_CATALOG_40") . '--,--SECTION_PROPERTY--#--' . GetMessage("WZD_OPTION_CATALOG_41") . '--;--edit4--#--' . GetMessage("WZD_OPTION_CATALOG_41") . '--;--'));
CUserOptions::SetOption("list", "tbl_iblock_list_" . md5($iblockType . "." . $iblockID), array('columns' => 'DETAIL_PICTURE,PROPERTY_' . $arProperty["ARTNUMBER"] . ',NAME,CATALOG_GROUP_1,PROPERTY_' . $arProperty["SPECIALOFFER"] . ',PROPERTY_' . $arProperty["NEWPRODUCT"] . ',PROPERTY_' . $arProperty["SALELEADER"] . '', 'by' => 'timestamp_x', 'order' => 'desc', 'page_size' => '20'));
CUserOptions::SetOption("list", "tbl_product_admin_" . md5($iblockType . "." . $iblockID), array('columns' => 'DETAIL_PICTURE,NAME,CATALOG_GROUP_1,ACTIVE,SORT,CATALOG_QUANTITY,ID,TIMESTAMP_X' . '', 'by' => 'timestamp_x', 'order' => 'desc', 'page_size' => '20'));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/catalog/index.php", array("CATALOG_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/sect_inc.php", array("CATALOG_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/_index.php", array("CATALOG_IBLOCK_ID" => $iblockID));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/catalog/sect_sidebar.php.php", array("CATALOG_IBLOCK_ID" => $iblockID));
示例12: CIBlock
//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', 'METHOD' => 'resample', 'COMPRESSION' => 95, 'DELETE_WITH_DETAIL' => 'N', 'UPDATE_WITH_DETAIL' => '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', 'METHOD' => 'resample', 'COMPRESSION' => 95)), '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' => array('UNIQUE' => 'N', 'TRANSLITERATION' => 'N', 'TRANS_LEN' => 100, 'TRANS_CASE' => 'L', 'TRANS_SPACE' => '_', 'TRANS_OTHER' => '_', 'TRANS_EAT' => 'Y', 'USE_GOOGLE' => 'N')), 'TAGS' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'SECTION_NAME' => array('IS_REQUIRED' => 'Y', 'DEFAULT_VALUE' => ''), 'SECTION_PICTURE' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => array('FROM_DETAIL' => 'N', 'SCALE' => 'N', 'WIDTH' => '', 'HEIGHT' => '', 'IGNORE_ERRORS' => 'N', 'METHOD' => 'resample', 'COMPRESSION' => 95, 'DELETE_WITH_DETAIL' => 'N', 'UPDATE_WITH_DETAIL' => 'N')), 'SECTION_DESCRIPTION_TYPE' => array('IS_REQUIRED' => 'Y', 'DEFAULT_VALUE' => 'text'), 'SECTION_DESCRIPTION' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'SECTION_DETAIL_PICTURE' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => array('SCALE' => 'N', 'WIDTH' => '', 'HEIGHT' => '', 'IGNORE_ERRORS' => 'N', 'METHOD' => 'resample', 'COMPRESSION' => 95)), 'SECTION_XML_ID' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => ''), 'SECTION_CODE' => array('IS_REQUIRED' => 'N', 'DEFAULT_VALUE' => array('UNIQUE' => 'N', 'TRANSLITERATION' => 'N', 'TRANS_LEN' => 100, 'TRANS_CASE' => 'L', 'TRANS_SPACE' => '_', 'TRANS_OTHER' => '_', 'TRANS_EAT' => 'Y', 'USE_GOOGLE' => 'N'))), "CODE" => "faq", "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));
}
}
$dbSite = CSite::GetByID(WIZARD_SITE_ID);
if ($arSite = $dbSite->Fetch()) {
$lang = $arSite["LANGUAGE_ID"];
}
if (strlen($lang) <= 0) {
$lang = "ru";
}
WizardServices::IncludeServiceLang("faq.php", $lang);
CUserOptions::SetOption("form", "form_element_" . $iblockID, array('tabs' => 'edit1--#--' . GetMessage("WZD_OPTION_FAQ_1") . '--,--ACTIVE--#--' . GetMessage("WZD_OPTION_FAQ_2") . '--,--SORT--#--' . GetMessage("WZD_OPTION_FAQ_3") . '--,--NAME--#--' . GetMessage("WZD_OPTION_FAQ_4") . '--,--DETAIL_TEXT--#--' . GetMessage("WZD_OPTION_FAQ_5") . '--;--'));
CUserOptions::SetOption("list", "tbl_iblock_list_" . md5($iblockType . "." . $iblockID), array('columns' => 'NAME,SORT,ACTIVE', 'by' => 'timestamp_x', 'order' => 'desc', 'page_size' => '20'));
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/about/faq/index.php", array("FAQ_IBLOCK_ID" => $iblockID));
$dbSection = CIBlockSection::GetList(array(), array("IBLOCK_ID" => $iblockID));
if ($arSection = $dbSection->Fetch()) {
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/about/faq/index.php", array("FAQ_SECTION_ID" => $arSection["ID"]));
}
示例13: __createIBlockType
protected function __createIBlockType($typeID)
{
if (!array_key_exists($typeID, $this->_arConfig['IBLOCK_TYPE'])) {
return false;
}
$arType = array('ID' => $typeID, 'SECTIONS' => $this->_arConfig['IBLOCK_TYPE'][$typeID]['SECTIONS'], 'IN_RSS' => $this->_arConfig['IBLOCK_TYPE'][$typeID]['IN_RSS'], 'SORT' => $this->_arConfig['IBLOCK_TYPE'][$typeID]['SORT'], 'LANG' => array());
if ($this->_arConfig['IBLOCK_TYPE'][$typeID]['IS_EXISTS'] == true) {
return true;
}
$dbType = \CIBlockType::GetList(array(), array('=ID' => $arType['ID']));
if ($dbType->Fetch()) {
$this->_arConfig['IBLOCK_TYPE'][$typeID]['IS_EXISTS'] = true;
return true;
}
$arLanguages = self::getLanguages();
foreach ($arLanguages as $languageID) {
\WizardServices::IncludeServiceLang('_iblock_types.php', $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();
global $DB;
$DB->StartTransaction();
$res = $iblockType->Add($arType);
if (!$res) {
$DB->Rollback();
echo 'Error creating iblock type: ' . $iblockType->LAST_ERROR . '<br>';
die;
} else {
$this->_arConfig['IBLOCK_TYPE'][$typeID]['IS_EXISTS'] = true;
$DB->Commit();
}
return true;
}
示例14: serialize
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
COption::SetOptionString("fileman", "propstypes", serialize(array("description" => GetMessage("MAIN_OPT_DESCRIPTION"), "keywords" => GetMessage("MAIN_OPT_KEYWORDS"), "title" => GetMessage("MAIN_OPT_TITLE"), "keywords_inner" => GetMessage("MAIN_OPT_KEYWORDS_INNER"))), false, $siteID);
COption::SetOptionInt("search", "suggest_save_days", 250);
COption::SetOptionString("search", "use_tf_cache", "Y");
COption::SetOptionString("search", "use_word_distance", "Y");
COption::SetOptionString("search", "use_social_rating", "Y");
COption::SetOptionString("iblock", "use_htmledit", "Y");
//socialservices
if (COption::GetOptionString("socialservices", "auth_services") == "") {
$bRu = LANGUAGE_ID == 'ru';
$arServices = array("VKontakte" => "Y", "MyMailRu" => "N", "Twitter" => "Y", "Facebook" => "Y", "Livejournal" => "N", "YandexOpenID" => "N", "Rambler" => "N", "MailRuOpenID" => "N", "Liveinternet" => "N", "Blogger" => "N", "OpenID" => "N", "LiveID" => "N");
COption::SetOptionString("socialservices", "auth_services", serialize($arServices));
}
//Subscription
if (!CModule::IncludeModule("subscribe")) {
return;
}
$rubrika = new CRubric();
$sort = array("SORT" => "ASC");
$res = $rubrika->GetList($sort);
$r = $res->Fetch();
if (!$r) {
WizardServices::IncludeServiceLang("news.php", "ru");
$arFieldsSBS = array("LID" => WIZARD_SITE_ID, "NAME" => GetMessage("SBS_NEWS_HEAD"), "ACTIVE" => "Y", "DESCRIPTION" => GetMessage("SBS_NEWS_DESC"), "VISIBLE" => "Y", "SORT" => "100");
$rubrika->Add($arFieldsSBS);
}
示例15: Array
$dbVat = CCatalogVat::GetList(array(), Array("SITE_ID" => WIZARD_SITE_ID));
if(!($dbVat->Fetch()))
{
$arF = Array ("ACTIVE" => "Y", "SORT" => "100", "NAME" => GetMessage("WIZ_VAT_1"), "RATE" => 0);
CCatalogVat::Set($arF);
$arF = Array ("ACTIVE" => "Y", "SORT" => "200", "NAME" => GetMessage("WIZ_VAT_2"), "RATE" => GetMessage("WIZ_VAT_2_VALUE"));
CCatalogVat::Set($arF);
}
$dbResultList = CCatalogGroup::GetList(Array(), Array("CODE" => "BASE"));
if($arRes = $dbResultList->Fetch())
{
$arFields = Array();
foreach($arLanguages as $langID)
{
WizardServices::IncludeServiceLang("step1.php", $langID);
$arFields["USER_LANG"][$langID] = GetMessage("WIZ_PRICE_NAME");
}
$arFields["BASE"] = "Y";
if($wizard->GetVar("installPriceBASE") == "Y"){
$db_res = CCatalogGroup::GetGroupsList(array("CATALOG_GROUP_ID"=>'1', "BUY"=>"Y"));
if ($ar_res = $db_res->Fetch())
{
$wizGroupId[] = $ar_res['GROUP_ID'];
}
$wizGroupId[] = 2;
$arFields["USER_GROUP"] = $wizGroupId;
$arFields["USER_GROUP_BUY"] = $wizGroupId;
}
CCatalogGroup::Update($arRes["ID"], $arFields);
}