Esempio n. 1
0
 function OnPostForm()
 {
     $wizard =& $this->GetWizard();
     $serviceID = $wizard->GetVar("nextStep");
     $serviceStage = $wizard->GetVar("nextStepStage");
     if ($serviceID == "finish") {
         $wizard->SetCurrentStep("finish");
         return;
     }
     $defSiteName = GetMessage("wiz_site_default_name");
     if (GetMessage("wiz_site_name") != "") {
         $defSiteName = GetMessage("wiz_site_name");
     } elseif ($wizard->wizardName != "") {
         $defSiteName = $wizard->wizardName;
     }
     $res = false;
     $site_id = $wizard->GetVar("siteID");
     if ($site_id != "") {
         $db_res = CSite::GetList($by = "sort", $order = "desc", array("LID" => $site_id));
         if ($db_res) {
             $res = $db_res->Fetch();
         }
     }
     if ($wizard->GetVar("siteCreate") == "Y") {
         if (!$res) {
             $arFields = array("LID" => $site_id, "ACTIVE" => "Y", "SORT" => 100, "DEF" => "N", "NAME" => $defSiteName, "DIR" => $wizard->GetVar("siteFolder"), "FORMAT_DATE" => LANGUAGE_ID == "en" ? "MM/DD/YYYY" : "DD.MM.YYYY", "FORMAT_DATETIME" => LANGUAGE_ID == "en" ? "MM/DD/YYYY H:MI T" : "DD.MM.YYYY HH:MI:SS", "FORMAT_NAME" => CSite::GetDefaultNameFormat(), "CHARSET" => defined("BX_UTF") ? "UTF-8" : (LANGUAGE_ID == "ru" ? "windows-1251" : "ISO-8859-1"), "SITE_NAME" => $defSiteName, "SERVER_NAME" => $_SERVER["SERVER_NAME"], "EMAIL" => COption::GetOptionString("main", "email_from"), "LANGUAGE_ID" => LANGUAGE_ID, "DOC_ROOT" => "");
             $obSite = new CSite();
             $result = $obSite->Add($arFields);
             if ($result) {
             } else {
                 echo $obSite->LAST_ERROR;
                 die;
             }
         }
         $wizard->SetVar("siteCreate", "N");
     }
     $pattern = '/^(.*):(.*)\\((.*)\\)/';
     preg_match($pattern, $res["NAME"], $matches);
     if ($res && (count($matches) > 0 || $res["NAME"] == $site_id) && $site_id != "s1") {
         $templateID = $wizard->GetVar("templateID");
         $themeVarName = $templateID . "_themeID";
         $themeID = $wizard->GetVar($themeVarName);
         $templatesPath = WizardServices::GetTemplatesPath($wizard->GetPath() . "/site");
         $arTemplates = WizardServices::GetTemplates($templatesPath);
         $templatesPath = WizardServices::GetTemplatesPath($wizard->GetPath() . "/site");
         $arThemes = WizardServices::GetThemes($templatesPath . "/" . $templateID . "/themes", $templatesPath . "/" . $templateID);
         $siteNemNew = $defSiteName . ": " . $arTemplates[$templateID]["NAME"] . ' (' . $arThemes[$themeID]["NAME"] . ')';
         $obSite = new CSite();
         $result = $obSite->Update($site_id, array("NAME" => $siteNemNew, "SITE_NAME" => $siteNemNew));
     } elseif ($res["NAME"] == GetMessage("MAIN_DEFAULT_SITE_NAME")) {
         $SiteNAME = $defSiteName . " (" . GetMessage("MAIN_DEFAULT_SITE_NAME") . ")";
         $obSite = new CSite();
         $result = $obSite->Update($site_id, array("NAME" => $SiteNAME, "SITE_NAME" => $defSiteName));
     }
     CModule::IncludeModule('fileman');
     COption::SetOptionString("fileman", "different_set", "Y");
     $arMenuTypes = GetMenuTypes($site_id);
     if (count($arMenuTypes) == 0) {
         $arMenuTypes = array('left' => GetMessage("WIZ_MENU_LEFT"), 'top' => GetMessage("WIZ_MENU_TOP"), 'bottom' => GetMessage("WIZ_MENU_BOTTOM"));
     } else {
         if (!$arMenuTypes['left'] || $arMenuTypes['left'] == GetMessage("WIZ_MENU_LEFT_DEFAULT")) {
             $arMenuTypes['left'] = GetMessage("WIZ_MENU_LEFT");
         }
         if (!$arMenuTypes['top'] || $arMenuTypes['top'] == GetMessage("WIZ_MENU_TOP_DEFAULT")) {
             $arMenuTypes['top'] = GetMessage("WIZ_MENU_TOP");
         }
         if (!$arMenuTypes['bottom']) {
             $arMenuTypes['bottom'] = GetMessage("WIZ_MENU_BOTTOM");
         }
     }
     SetMenuTypes($arMenuTypes, $site_id);
     $arServices = WizardServices::GetServices($_SERVER["DOCUMENT_ROOT"] . $wizard->GetPath(), "/site/services/");
     $this->CorrectServices($arServices);
     if ($serviceStage == "skip") {
         $success = true;
     } else {
         $success = $this->InstallService($serviceID, $serviceStage);
     }
     if (!$this->repeatCurrentService) {
         list($nextService, $nextServiceStage, $stepsComplete, $status) = $this->GetNextStep($arServices, $serviceID, $serviceStage);
     }
     if ($nextService == "finish") {
         $formName = $wizard->GetFormName();
         $response = "window.ajaxForm.StopAjax(); window.ajaxForm.SetStatus('100'); window.ajaxForm.Post('" . $nextService . "', '" . $nextServiceStage . "','" . $status . "');";
         COption::SetOptionString("main", "wizard_first" . substr($wizard->GetID(), 7) . "_" . $wizard->GetVar("siteID"), "Y", false, $siteID);
     } else {
         $arServiceID = array_keys($arServices);
         $lastService = array_pop($arServiceID);
         $stepsCount = $arServices[$lastService]["POSITION"];
         if (array_key_exists("STAGES", $arServices[$lastService]) && is_array($arServices[$lastService])) {
             $stepsCount += count($arServices[$lastService]["STAGES"]) - 1;
         }
         $percent = round($stepsComplete / $stepsCount * 100);
         $response = "window.ajaxForm.SetStatus('" . $percent . "'); window.ajaxForm.Post('" . $nextService . "', '" . $nextServiceStage . "','" . $status . "');";
     }
     die("[response]" . $response . "[/response]");
 }
Esempio n. 2
0
COption::SetOptionString("main", 'CAPTCHA_arBGColor_2', 'FFFFFF');
COption::SetOptionString("main", 'CAPTCHA_numEllipses', '0');
COption::SetOptionString("main", 'CAPTCHA_numLines', '0');
COption::SetOptionString("main", 'CAPTCHA_textStartX', '40');
COption::SetOptionString("main", 'CAPTCHA_textFontSize', '26');
COption::SetOptionString("main", 'CAPTCHA_arTextColor_1', '000000');
COption::SetOptionString("main", 'CAPTCHA_arTextColor_2', '000000');
COption::SetOptionString("main", 'CAPTCHA_textAngel_1', '-15');
COption::SetOptionString("main", 'CAPTCHA_textAngel_2', '15');
COption::SetOptionString("main", 'CAPTCHA_textDistance_1', '-2');
COption::SetOptionString("main", 'CAPTCHA_textDistance_2', '-2');
COption::SetOptionString("main", 'CAPTCHA_bWaveTransformation', 'N');
COption::SetOptionString("main", 'CAPTCHA_arBorderColor', '000000');
COption::SetOptionString("main", 'CAPTCHA_arTTFFiles', 'bitrix_captcha.ttf');
SetMenuTypes(array("left" => GetMessage("LEFT_MENU_NAME"), "top" => GetMessage("TOP_MENU_NAME")), "s1");
SetMenuTypes(array("left" => GetMessage("LEFT_MENU_NAME"), "top" => GetMessage("TOP_MENU_NAME")), "");
COption::SetOptionString("fileman", "default_edit", "html");
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"))));
if (LANGUAGE_ID != 'ru' && COption::GetOptionString('seo', 'counters', '') == '') {
    COption::SetOptionString('seo', 'counters', '<a href="http://www.webdew.ro/utils.php"><img src="http://www.webdew.ro/pagerank/free-pagerank-display.php?a=getCode&amp;s=goo" title="Free PageRank Display Code" border="0px" alt="PageRank" /></a>');
}
//user options
DemoSiteUtil::SetUserOption("global", "settings", array("start_menu_preload" => "Y", "start_menu_title" => "N"), $common = true);
//Gadgets
CUserOptions::SetOption('intranet', '~gadgets_holder1', unserialize(GetMessage("MAIN_SETTINGS_GADGETS")), true);
//Print template
$pathToService = str_replace("\\", "/", dirname(__FILE__));
CopyDirFiles($wizardPath . "/misc/print_template/" . LANGUAGE_ID, $_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/print", $rewrite = true, $recursive = true);
$obSite = CSite::GetByID("s1");
if (!($arSite = $obSite->Fetch())) {
    return;
Esempio n. 3
0
     }
 } else {
     COption::SetOptionString($module_id, "different_set", "N");
     COption::SetOptionInt($module_id, "num_menu_param", $num_menu_param);
     $armt = array();
     $menutypes = "";
     for ($i = 0; $i < $menutypes_count; $i++) {
         if (strlen(${"menutypes_" . $i . "_type"}) > 0) {
             $armt[${"menutypes_" . $i . "_type"}] = ${"menutypes_" . $i . "_name"};
         }
     }
     if (strlen($menutypes_new_type) > 0 && $USER->CanDoOperation('fileman_edit_menu_types')) {
         $armt[$menutypes_new_type] = $menutypes_new_name;
     }
     if (strlen(addslashes(serialize($armt))) <= 2000) {
         SetMenuTypes($armt, $siteList_ID[$j]["ID"]);
     } else {
         $addError = GetMessage("FILEMAN_OPTION_ADD_ERROR_MENU") . '<br />';
     }
     $propstypes = "";
     $arPT = array();
     for ($i = 0; $i < $propstypes_count; $i++) {
         if (strlen(${"propstypes_" . $i . "_type"}) > 0) {
             $arPT[${"propstypes_" . $i . "_type"}] = ${"propstypes_" . $i . "_name"};
         }
     }
     if (strlen($propstypes_new_type) > 0) {
         $arPT[$propstypes_new_type] = $propstypes_new_name;
     }
     if (!CFileMan::SetPropstypes($arPT)) {
         $addError .= GetMessage("FILEMAN_OPTION_ADD_ERROR_PROPS");
Esempio n. 4
0
	else
	{
		COption::SetOptionString($module_id, "different_set", "N");
		COption::SetOptionInt($module_id, "num_menu_param", $num_menu_param);

		$armt = Array();
		$menutypes = "";
		for($i=0; $i<$menutypes_count; $i++)
		{
			if(strlen(${"menutypes_".$i."_type"})>0)
				$armt[${"menutypes_".$i."_type"}] = ${"menutypes_".$i."_name"};
		}
		if(strlen($menutypes_new_type)>0 && $USER->CanDoOperation('fileman_edit_menu_types'))
			$armt[$menutypes_new_type] = $menutypes_new_name;

		SetMenuTypes($armt, '');

		$propstypes = "";
		$arPT = Array();
		for($i=0; $i<$propstypes_count; $i++)
		{
			if(strlen(${"propstypes_".$i."_type"})>0)
				$arPT[${"propstypes_".$i."_type"}] = ${"propstypes_".$i."_name"};
		}
		if(strlen($propstypes_new_type)>0)
			$arPT[$propstypes_new_type] = $propstypes_new_name;

		CFileMan::SetPropstypes($arPT);

		$j = 0;
		while($j < count($siteList_ID))
Esempio n. 5
0
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (WIZARD_INSTALL_DEMO_DATA) {
    $arMenuTypes = GetMenuTypes();
    $arMenuTypes["bottom1"] = GetMessage("MAIN_OPT_MENU_BOTTOM_R");
    $arMenuTypes["bottom2"] = GetMessage("MAIN_OPT_MENU_BOTTOM_I");
    SetMenuTypes($arMenuTypes, WIZARD_SITE_ID);
}
Esempio n. 6
0
COption::SetOptionString("main", "component_cache_on", "Y");
COption::SetOptionString("main", "save_original_file_name", "Y");
COption::SetOptionString("main", "captcha_registration", "N");
COption::SetOptionString("main", "use_secure_password_cookies", "Y");
COption::SetOptionString("main", "new_user_email_uniq_check", "Y");
COption::SetOptionString("main", "auth_comp2", "Y");
COption::SetOptionString("main", "vendor", LANGUAGE_ID == "ru" ? "1c_bitrix_portal" : "bitrix_portal");
COption::SetOptionString("main", "PARAM_MAX_USERS", "25");
COption::SetOptionString("main", "update_autocheck", "7");
COption::SetOptionString("main", "use_digest_auth", "Y");
COption::SetOptionString("main", "use_time_zones", "Y");
COption::SetOptionString("main", "auto_time_zone", "Y");
COption::SetOptionString("main", "map_top_menu_type", "top");
COption::SetOptionString("main", "map_left_menu_type", "left");
SetMenuTypes(array("left" => GetMessage("MAIN_OPT_MENU_SECT"), "top" => GetMessage("MAIN_OPT_MENU_MAIN"), "bottom" => GetMessage("MAIN_OPT_MENU_BOTTOM"), "top_links" => GetMessage("MAIN_OPT_MENU_TOPLINKS"), "department" => GetMessage("MAIN_OPT_MENU_DEPARTMENT")), WIZARD_SITE_ID);
SetMenuTypes(array("left" => GetMessage("MAIN_OPT_MENU_SECT"), "top" => GetMessage("MAIN_OPT_MENU_MAIN"), "bottom" => GetMessage("MAIN_OPT_MENU_BOTTOM"), "top_links" => GetMessage("MAIN_OPT_MENU_TOPLINKS"), "department" => GetMessage("MAIN_OPT_MENU_DEPARTMENT")), "");
COption::SetOptionString("fileman", "default_edit", "html");
COption::SetOptionString("iblock", "use_htmledit", "Y");
COption::SetOptionString("iblock", "combined_list_mode", "Y");
COption::SetOptionString("search", "use_stemming", "Y");
COption::SetOptionString("search", "include_mask", "*.php;*.html;*.htm;*.doc;*.ppt;*.xls;*.rtf;*.docx;*.xlsx;*.pptx;*.odt;*.odp;*.ods;*.pdf");
COption::SetOptionString("search", "exclude_mask", "/bitrix/*;/upload/*;");
COption::SetOptionString("search", "use_word_distance", "Y");
COption::SetOptionString("statistic", "IMPORTANT_PAGE_PARAMS", "ID, IBLOCK_ID, SECTION_ID, ELEMENT_ID, PARENT_ELEMENT_ID, FID, TID, MID, UID, VOTE_ID, print, goto");
COption::SetOptionString("statistic", "DEFENCE_ON", "N");
COption::SetOptionString("statistic", "DEFENCE_STACK_TIME", "20");
COption::SetOptionString("main", "event_log_logout", "Y");
COption::SetOptionString("main", "event_log_login_success", "Y");
COption::SetOptionString("main", "event_log_login_fail", "Y");
COption::SetOptionString("main", "event_log_register", "Y");
COption::SetOptionString("main", "event_log_register_fail", "Y");
Esempio n. 7
0
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (WIZARD_IS_RERUN === true) {
    return;
}
CGroup::SetSubordinateGroups(WIZARD_EXTRANET_ADMIN_GROUP, array(WIZARD_EXTRANET_GROUP));
SetMenuTypes(array("left" => GetMessage("MAIN_OPT_MENU_SECT"), "top" => GetMessage("MAIN_OPT_MENU_MAIN")), WIZARD_SITE_ID);
$sOptions = 'a:1:{s:7:"GADGETS";a:9:{s:8:"ADV@9058";a:4:{s:6:"COLUMN";i:0;s:3:"ROW";i:0;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:23:"EXTRANET_CONTACTS@11468";a:5:{s:6:"COLUMN";i:0;s:3:"ROW";i:1;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";s:8:"SETTINGS";a:2:{s:25:"MY_WORKGROUPS_USERS_COUNT";s:1:"5";s:18:"PUBLIC_USERS_COUNT";s:1:"5";}}s:15:"WORKGROUPS@2647";a:4:{s:6:"COLUMN";i:1;s:3:"ROW";i:0;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:11:"TASKS@27413";a:4:{s:6:"COLUMN";i:1;s:3:"ROW";i:1;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:13:"UPDATES@32753";a:5:{s:6:"COLUMN";i:1;s:3:"ROW";i:2;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";s:8:"SETTINGS";a:2:{s:11:"ENTITY_TYPE";s:1:"G";s:8:"EVENT_ID";s:0:"";}}s:14:"MESSAGES@24748";a:4:{s:6:"COLUMN";i:2;s:3:"ROW";i:0;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:13:"PROFILE@20859";a:4:{s:6:"COLUMN";i:2;s:3:"ROW";i:1;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:13:"TICKETS@11871";a:4:{s:6:"COLUMN";i:2;s:3:"ROW";i:2;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:15:"RSSREADER@16757";a:4:{s:6:"COLUMN";i:2;s:3:"ROW";i:3;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}}}';
$arOptions = unserialize($sOptions);
CExtranetWizardServices::SetUserOption('intranet', '~gadgets_dashboard_external', $arOptions, $common = true);
COption::SetOptionString("tasks", "paths_task_user", WIZARD_SITE_DIR . "contacts/personal/user/#user_id#/tasks/", false, WIZARD_SITE_ID);
COption::SetOptionString("tasks", "paths_task_user_entry", WIZARD_SITE_DIR . "contacts/personal/user/#user_id#/tasks/task/view/#task_id#/", false, WIZARD_SITE_ID);
COption::SetOptionString("tasks", "paths_task_user_edit", WIZARD_SITE_DIR . "contacts/personal/user/#user_id#/tasks/task/edit/#task_id#/", false, WIZARD_SITE_ID);
COption::SetOptionString("tasks", "paths_task_user_action", WIZARD_SITE_DIR . "contacts/personal/user/#user_id#/tasks/task/#action#/#task_id#/", false, WIZARD_SITE_ID);
COption::SetOptionString("tasks", "paths_task_group", WIZARD_SITE_DIR . "workgroups/group/#group_id#/tasks/", false, WIZARD_SITE_ID);
COption::SetOptionString("tasks", "paths_task_group_entry", WIZARD_SITE_DIR . "workgroups/group/#group_id#/tasks/task/view/#task_id#/", false, WIZARD_SITE_ID);
COption::SetOptionString("tasks", "paths_task_group_edit", WIZARD_SITE_DIR . "workgroups/group/#group_id#/tasks/task/edit/#task_id#/", false, WIZARD_SITE_ID);
COption::SetOptionString("tasks", "paths_task_group_action", WIZARD_SITE_DIR . "workgroups/group/#group_id#/tasks/task/#action#/#task_id#/", false, WIZARD_SITE_ID);
$arSites = array();
$arSitesID = array();
$rsSites = CSite::GetList($by = "sort", $order = "desc", array());
while ($arSite = $rsSites->Fetch()) {
    $arSites[] = $arSite;
    $arSitesID[] = $arSite["ID"];
}
COption::SetOptionString('calendar', 'pathes_for_sites', false);
COption::SetOptionString("calendar", 'pathes_sites', serialize($arSitesID));
foreach ($arSites as $arSite) {