3define(
"BX_WIZARD_WELCOME_ID",
"__welcome");
4define(
"BX_WIZARD_LICENSE_ID",
"__license");
5define(
"BX_WIZARD_SELECT_SITE_ID",
"__select_site");
6define(
"BX_WIZARD_SELECT_GROUP_ID",
"__select_group");
7define(
"BX_WIZARD_SELECT_TEMPLATE_ID",
"__select_template");
8define(
"BX_WIZARD_SELECT_SERVICE_ID",
"__select_service");
9define(
"BX_WIZARD_SELECT_STRUCTURE_ID",
"__select_structure");
10define(
"BX_WIZARD_START_INSTALL_ID",
"__start_install");
11define(
"BX_WIZARD_INSTALL_SITE_ID",
"__install_site");
12define(
"BX_WIZARD_INSTALL_TEMPLATE_ID",
"__install_template");
13define(
"BX_WIZARD_INSTALL_SERVICE_ID",
"__install_service");
14define(
"BX_WIZARD_INSTALL_STRUCTURE_ID",
"__install_structure");
15define(
"BX_WIZARD_FINISH_ID",
"__finish");
16define(
"BX_WIZARD_CANCEL_ID",
"__install_cancel");
58 $this->name = $wizardName;
69 if (!file_exists(
$_SERVER[
"DOCUMENT_ROOT"].$this->
path) || !is_dir(
$_SERVER[
"DOCUMENT_ROOT"].$this->path))
85 $this->__bInited =
true;
87 if (!empty($this->arErrors))
92 elseif ($this->pathToScript)
96 if(isset($this->arDescription[
"PARENT"]) && $this->arDescription[
"PARENT"] ==
"wizard_sol")
99 $wizardPath =
$_SERVER[
"DOCUMENT_ROOT"].
"/bitrix/modules/main";
100 $relativePath =
"install/wizard_sol/wizard.php";
104 if (file_exists(($fname = $wizardPath.
"/lang/".
LangSubst(
$lang).
"/".$relativePath)))
108 if (file_exists(($fname = $wizardPath.
"/lang/".
$lang.
"/".$relativePath)))
114 include($this->pathToScript);
116 if (array_key_exists(
"STEPS", $this->arDescription) && is_array($this->arDescription[
"STEPS"]))
118 $wizardName = (array_key_exists(
"NAME", $this->arDescription) ? $this->arDescription[
"NAME"] :
"");
119 $this->wizard =
new CWizardBase($wizardName, $this);
120 $this->wizard->AddSteps($this->arDescription[
"STEPS"]);
122 $this->wizard->Display();
141 $wizardName = (array_key_exists(
"NAME", $this->arDescription) ? $this->arDescription[
"NAME"] :
"");
142 $this->wizard =
new CWizardBase($wizardName, $this);
150 $step = $userWelcome;
158 $lastStepID = $step->GetStepID();
161 if ($this->
_InitSubStep(
"static", $this->arDescription[
"STEPS_SETTINGS"][
"WELCOME"]) )
163 $lastStepID = $this->__obLastStep->GetStepID();
166 $step->SetNextStep($this->__obFirstStep->GetStepID());
171 if ($this->licenseExists)
177 $step->SetPrevStep($lastStepID);
178 $lastStepID = $step->GetStepID();
181 if ( $this->
_InitSubStep(
"static", $this->arDescription[
"STEPS_SETTINGS"][
"LICENSE"]) )
183 $lastStepID = $this->__obLastStep->GetStepID();
186 $step->SetNextStep($this->__obFirstStep->GetStepID());
196 if ($this->siteExists)
202 $step->SetPrevStep($lastStepID);
203 $lastStepID = $step->GetStepID();
208 $lastStepID = $this->__obLastStep->GetStepID();
211 $step->SetNextStep($this->__obFirstStep->GetStepID());
216 if ($this->groupExists && $this->templateExists)
222 $step->SetPrevStep($lastStepID);
223 $lastStepID = $step->GetStepID();
227 if ($this->templateExists)
233 $step->SetPrevStep($lastStepID);
234 $lastStepID = $step->GetStepID();
239 $lastStepID = $this->__obLastStep->GetStepID();
242 $step->SetNextStep($this->__obFirstStep->GetStepID());
247 if ($this->serviceExists)
253 $step->SetPrevStep($lastStepID);
255 $lastStepID = $step->GetStepID();
257 if ($this->serviceSelected)
261 if (!array_key_exists(
$service, $this->arServices))
267 $this->__obFirstStep->SetPrevStep($lastStepID);
271 $lastStepID = $this->__obLastStep->GetStepID();
273 $step->SetNextStep($this->__obFirstStep->GetStepID());
281 if ($this->structureExists)
287 $step->SetPrevStep($lastStepID);
288 $lastStepID = $step->GetStepID();
291 if ($this->
_InitSubStep(
"select", $this->arStructure[
"SETTINGS"]))
293 $lastStepID = $this->__obLastStep->GetStepID();
296 $step->SetNextStep($this->__obFirstStep->GetStepID());
302 "siteID" => ($this->siteSelected ?
$siteID :
null),
303 "templateID" => ($this->templateSelected ?
$templateID :
null),
304 "arServices" => ($this->serviceSelected ?
$arServices : Array()),
307 if ($this->
__GetUserStep(
"start_install", $userStartInstall))
308 $step = $userStartInstall;
313 $step->SetPrevStep($lastStepID);
319 if ($this->
_InitSubStep(
"static", $this->arDescription[
"STEPS_SETTINGS"][
"START_INSTALL"]) )
321 $lastStepID = $this->__obLastStep->GetStepID();
324 $step->SetNextStep($this->__obFirstStep->GetStepID());
329 if ($this->siteSelected)
339 $step->SetNextStep($this->__obFirstStep->GetStepID());
344 if ($this->templateSelected)
354 $step->SetNextStep($this->__obFirstStep->GetStepID());
359 if ($this->serviceSelected)
365 if (!array_key_exists(
$service, $this->arServices))
368 if ($obLastStep !==
null)
380 $step->SetNextStep($this->__obFirstStep->GetStepID());
394 if ($this->structureSelected)
402 if ($this->
_InitSubStep(
"install", $this->arStructure[
"SETTINGS"]))
405 $step->SetNextStep($this->__obFirstStep->GetStepID());
426 if ($this->
_InitSubStep(
"end", $this->arDescription[
"STEPS_SETTINGS"][
"FINISH"]) )
429 $step->SetNextStep($this->__obFirstStep->GetStepID());
449 if ($this->
_InitSubStep(
"end", $this->arDescription[
"STEPS_SETTINGS"][
"CANCEL"]) )
452 $step->SetNextStep($this->__obFirstStep->GetStepID());
460 if (!array_key_exists(
"TEMPLATES", $this->arDescription) || !is_array($this->arDescription[
"TEMPLATES"]))
463 foreach ($this->arDescription[
"TEMPLATES"] as
$arTemplate)
468 $wizardPath =
$_SERVER[
"DOCUMENT_ROOT"].
"/bitrix/modules/main";
469 $relativePath =
"install/wizard_sol/template.php";
473 if (file_exists(($fname = $wizardPath.
"/lang/".
LangSubst(
$lang).
"/".$relativePath)))
477 if (file_exists(($fname = $wizardPath.
"/lang/".
$lang.
"/".$relativePath)))
480 include_once(
$_SERVER[
"DOCUMENT_ROOT"].
"/bitrix/modules/main/install/wizard_sol/template.php");
483 $this->wizard->SetTemplate(
new WizardTemplate, $stepID);
484 $this->wizard->DisableAdminTemplate();
493 if (!is_file($pathToFile))
498 include_once($pathToFile);
504 $this->wizard->SetTemplate(
new $arTemplate[
"CLASS"], $stepID);
505 $this->wizard->DisableAdminTemplate();
514 $this->siteExists = (!empty($this->arSites));
515 $this->groupExists = (!empty($this->arTemplateGroups));
516 $this->templateExists = (!empty($this->arTemplates));
517 $this->serviceExists = (!empty($this->arServices));
518 $this->structureExists = (!empty($this->arStructure));
522 $this->siteID =
$wizard->GetVar(
"__siteID");
523 $this->templateID =
$wizard->GetVar(
"__templateID");
524 $this->groupID =
$wizard->GetVar(
"__groupID");
525 $this->serviceID =
$wizard->GetVar(
"__serviceID");
526 $this->structureID =
$wizard->GetVar(
"__structureID");
528 $this->siteSelected = ($this->siteExists && $this->siteID !==
null && array_key_exists($this->siteID, $this->arSites));
529 $this->templateSelected = ($this->templateExists && $this->templateID !==
null && array_key_exists($this->templateID, $this->arTemplates));
530 $this->serviceSelected = ($this->serviceExists && is_array($this->serviceID));
531 $this->structureSelected = ($this->structureExists && $this->structureID <>
'');
536 if ($stepType ==
"select")
537 $arWizardStep = Array(
549 $arWizardStep = Array(
559 $foundCurrent =
false;
560 foreach ($arWizardStep as $stepID =>
$success)
564 $nextStepID = $stepID;
568 if ($currentStep == $stepID)
570 $foundCurrent =
true;
574 $obStep->SetNextStep($nextStepID);
579 if (!is_array($arInstallation))
582 if ($stepType ==
"install" || $stepType ==
"select")
584 $stepTypeKey = mb_strtoupper($stepType.
"_steps");
585 if (!array_key_exists($stepTypeKey, $arInstallation))
588 $arSteps =& $arInstallation[$stepTypeKey];
592 $arSteps =& $arInstallation;
595 if (!array_key_exists(
"SCRIPT", $arSteps) || !array_key_exists(
"STEPS", $arSteps))
598 $instScript =
$_SERVER[
"DOCUMENT_ROOT"].$this->path.
"/".$arSteps[
"SCRIPT"];
599 if (!is_file($instScript))
604 include_once($instScript);
607 $stepCount =
count($arSteps[
"STEPS"]);
608 $firstStepExists =
false;
609 $lastStepExists =
false;
611 foreach ($arSteps[
"STEPS"] as $stepID => $stepClass)
613 if (!class_exists($stepClass))
618 $subStep =
new $stepClass;
619 $this->wizard->AddStep($subStep, $stepID);
623 if (!array_key_exists($stepID, $this->wizard->wizardSteps))
625 $subStep = $this->wizard->wizardSteps[$stepID];
628 if ($stepType ==
"select")
632 elseif ($stepType ==
"install")
634 $subStep->SetAutoSubmit();
635 $subStep->SetCancelStep(
null);
636 $subStep->SetPrevStep(
null);
638 elseif ($stepType ==
"static")
644 if ($stepNumber == 1)
646 if ($stepType ==
"install")
647 $subStep->SetPrevStep(
null);
648 $this->__obFirstStep = $subStep;
649 $firstStepExists =
true;
653 if ($stepNumber == $stepCount)
655 $this->__obLastStep = $subStep;
656 $lastStepExists =
true;
662 return ($firstStepExists && $lastStepExists);
667 $stepName = mb_strtoupper($stepName);
669 if (!array_key_exists(
"STEPS_SETTINGS", $this->arDescription) || !array_key_exists($stepName, $this->arDescription[
"STEPS_SETTINGS"]))
672 if (!isset($this->arDescription[
"STEPS_SETTINGS"][$stepName][
"SCRIPT"]) || !isset($this->arDescription[
"STEPS_SETTINGS"][$stepName][
"CLASS"]))
675 $scriptPath = $this->arDescription[
"STEPS_SETTINGS"][$stepName][
"SCRIPT"];
676 $stepClass = $this->arDescription[
"STEPS_SETTINGS"][$stepName][
"CLASS"];
678 $pathToFile =
$_SERVER[
"DOCUMENT_ROOT"].$this->path.
"/".$scriptPath;
679 if (!is_file($pathToFile))
683 include_once($pathToFile);
685 if (!class_exists($stepClass))
688 $step =
new $stepClass;
690 if (!is_subclass_of($step,
"CWizardStep"))
698 if (!array_key_exists(
"STEPS_SETTINGS", $this->arDescription) || !array_key_exists($stepName, $this->arDescription[
"STEPS_SETTINGS"]))
701 if (isset($this->arDescription[
"STEPS_SETTINGS"][$stepName][
"TITLE"]))
702 $obStep->SetTitle($this->arDescription[
"STEPS_SETTINGS"][$stepName][
"TITLE"]);
704 if (isset($this->arDescription[
"STEPS_SETTINGS"][$stepName][
"SUBTITLE"]))
705 $obStep->SetSubTitle($this->arDescription[
"STEPS_SETTINGS"][$stepName][
"SUBTITLE"]);
707 if (isset($this->arDescription[
"STEPS_SETTINGS"][$stepName][
"CONTENT"]))
708 $obStep->content .= $this->arDescription[
"STEPS_SETTINGS"][$stepName][
"CONTENT"];
715 if (is_file(
$_SERVER[
"DOCUMENT_ROOT"].$this->
path.
"/license.php"))
718 if (is_file(
$_SERVER[
"DOCUMENT_ROOT"].$this->
path.
"/license_".LANGUAGE_ID.
".php"))
719 $path = $this->
path.
"/license_".LANGUAGE_ID.
".php";
726 echo
'<span style="color:red;">';
727 foreach ($this->arErrors as $arError)
728 echo $arError[0].
"<br />";
734 $descFile =
$_SERVER[
"DOCUMENT_ROOT"].$this->path.
"/.description.php";
736 if (!is_file($descFile))
741 $arWizardDescription = Array();
744 $this->arDescription = $arWizardDescription;
752 if (array_key_exists(
"DEPENDENCIES", $this->arDescription) && is_array($this->arDescription[
"DEPENDENCIES"]))
756 foreach ($this->arDescription[
"DEPENDENCIES"] as $module => $version)
758 if (!array_key_exists($module, $arModules))
765 elseif (!$arModules[$module][
"IsInstalled"])
768 str_replace(
"#MODULE#", $arModules[$module][
"MODULE_NAME"],
GetMessage(
"MAIN_WIZARD_ERROR_MODULE_REQUIRED"))
775 str_replace(Array(
"#MODULE#",
"#VERSION#"),
777 GetMessage(
"MAIN_WIZARD_ERROR_MODULE_REQUIRED2"))
789 $siteFile =
$_SERVER[
"DOCUMENT_ROOT"].$this->path.
"/.sites.php";
790 if (!is_file($siteFile))
795 $arWizardSites = Array();
797 $this->arSites = $arWizardSites;
802 $templatesPath = $this->
path.
"/templates";
803 if (file_exists(
$_SERVER[
"DOCUMENT_ROOT"].$templatesPath.
"/".LANGUAGE_ID))
804 $templatesPath .=
"/".LANGUAGE_ID;
805 return $templatesPath;
810 $settingFile =
$_SERVER[
"DOCUMENT_ROOT"].$this->path.
"/.templates.php";
811 $arWizardTemplates = Array();
812 if (is_file($settingFile))
815 include($settingFile);
824 while(($dirName = @readdir(
$handle)) !==
false)
826 if ($dirName ==
"." || $dirName ==
".." || !is_dir(
$absolutePath.
"/".$dirName))
834 if (file_exists(
$absolutePath.
"/".$dirName.
"/description.php"))
836 if (LANGUAGE_ID !=
"en" && LANGUAGE_ID !=
"ru")
838 if (file_exists(($fname =
$absolutePath.
"/".$dirName.
"/lang/".
LangSubst(LANGUAGE_ID).
"/description.php")))
842 if (file_exists(($fname =
$absolutePath.
"/".$dirName.
"/lang/".LANGUAGE_ID.
"/description.php")))
855 $arTemplate[
"SCREENSHOT"] = $relativePath.
"/".$dirName.
"/screen.gif";
860 $arTemplate[
"PREVIEW"] = $relativePath.
"/".$dirName.
"/preview.gif";
864 if (array_key_exists(
"TEMPLATES", $arWizardTemplates) && array_key_exists($dirName, $arWizardTemplates[
"TEMPLATES"]))
875 return strcmp(
$a[
"SORT"], $b[
"SORT"]);
879 if (array_key_exists(
"GROUPS", $arWizardTemplates) && is_array($arWizardTemplates[
"GROUPS"]))
880 $this->arTemplateGroups = $arWizardTemplates[
"GROUPS"];
885 $instScript =
$_SERVER[
"DOCUMENT_ROOT"].$this->path.
"/wizard.php";
887 if (!is_file($instScript))
890 $this->pathToScript = $instScript;
896 $serviceFile =
$_SERVER[
"DOCUMENT_ROOT"].$this->path.
"/.services.php";
897 if (!is_file($serviceFile))
902 $arWizardServices = Array();
903 include($serviceFile);
904 $this->arServices = $arWizardServices;
909 $structureFile =
$_SERVER[
"DOCUMENT_ROOT"].$this->path.
"/.structure.php";
910 if (!is_file($structureFile))
915 $arWizardStructure = Array();
916 include($structureFile);
917 $this->arStructure = $arWizardStructure;
922 if (!array_key_exists(
$siteID, $this->arSites))
926 require_once(
$_SERVER[
'DOCUMENT_ROOT'].
"/bitrix/modules/main/include.php");
934 if (!array_key_exists(
$templateID, $this->arTemplates))
938 $canCopyTemplate = !(
944 require_once(
$_SERVER[
'DOCUMENT_ROOT'].
"/bitrix/modules/main/include.php");
946 if ($canCopyTemplate)
957 $obSite = CSite::GetList(
"def",
"desc", Array(
"ACTIVE" =>
"Y"));
958 if ($arSite = $obSite->Fetch())
962 $obTemplate = CSite::GetTemplateList($arSite[
"LID"]);
965 if(!$found && trim(
$arTemplate[
"CONDITION"]) ==
'')
978 "NAME" => $arSite[
"NAME"],
981 $obSite =
new CSite();
982 $obSite->Update($arSite[
"LID"],
$arFields);
991 if (!array_key_exists(
$serviceID, $this->arServices))
995 require_once(
$_SERVER[
'DOCUMENT_ROOT'].
"/bitrix/modules/main/include.php");
1005 if ($this->structureID ==
'')
1010 "SERVICE_ID" => $this->serviceID,
1011 "SITE_ID" => $this->siteID
1016 require_once(
$_SERVER[
'DOCUMENT_ROOT'].
"/bitrix/modules/main/include.php");
1020 function __CreateMenuItem($arPage)
1024 " \"".$arPage[
"NAME"].
"\", \n".
1025 " \"".$arPage[
"LINK"].
"\", \n".
1032 function __GetFileName(
$fileName, $postFix)
1039 if ($position !==
false)
1045 $rootMenuType = (isset($this->arStructure[
"SETTINGS"]) && isset($this->arStructure[
"SETTINGS"][
"ROOT_MENU_TYPE"])
1046 ? $this->arStructure[
"SETTINGS"][
"ROOT_MENU_TYPE"]
1049 $childMenuType = (isset($this->arStructure[
"SETTINGS"]) && isset($this->arStructure[
"SETTINGS"][
"CHILD_MENU_TYPE"])
1050 ? $this->arStructure[
"SETTINGS"][
"CHILD_MENU_TYPE"]
1055 $arFileToMove = Array();
1056 $arPageCnt = Array();
1060 if (isset($arPage[
"TYPE"]) && mb_strtoupper($arPage[
"TYPE"]) ==
"SERVICE")
1062 $strRootMenu .= __CreateMenuItem($arPage);
1066 if (isset($arPage[
"CHILD"]) && is_array($arPage[
"CHILD"]) && !empty($arPage[
"CHILD"]))
1070 if ( ($position = mb_strrpos($rootPageID,
"-")) !==
false)
1071 $rootPageID = mb_substr($rootPageID, $position + 1, mb_strlen($rootPageID));
1074 $arFileToMove[] = Array(
1075 $_SERVER[
"DOCUMENT_ROOT"].$this->
path.
"/".$arPage[
"FILE"],
1076 $_SERVER[
"DOCUMENT_ROOT"].
"/".$rootPageID.
"/index.php"
1078 $arPage[
"LINK"] =
"/".$rootPageID.
"/";
1079 $strRootMenu .= __CreateMenuItem($arPage);
1082 $arSubPageCnt = Array();
1083 foreach ($arPage[
"CHILD"] as $subPageID => $arSubPage)
1085 $fileName = basename($arSubPage[
"FILE"]);
1087 if (array_key_exists(
$fileName, $arSubPageCnt))
1094 $arFileToMove[] = Array(
1095 $_SERVER[
"DOCUMENT_ROOT"].$this->
path.
"/".$arSubPage[
"FILE"],
1099 $arSubPage[
"LINK"] =
"/".$rootPageID.
"/".
$fileName;
1100 $strLeftMenu .= __CreateMenuItem($arSubPage);
1103 if ($strLeftMenu <>
'')
1105 $strSectionName =
"\$sSectionName = \"".$arPage[
"NAME"].
"\";\n";
1106 $APPLICATION->SaveFileContent(
$_SERVER[
"DOCUMENT_ROOT"].
"/".$rootPageID.
"/.section.php",
"<".
"?\n".$strSectionName.
"?".
">");
1108 $strLeftMenu =
"\$aMenuLinks = Array(".$strLeftMenu.
"\n);";
1109 $APPLICATION->SaveFileContent(
$_SERVER[
"DOCUMENT_ROOT"].
"/".$rootPageID.
"/.".$childMenuType.
".menu.php",
"<".
"?\n".$strLeftMenu.
"\n?".
">");
1116 if (array_key_exists(
$fileName, $arPageCnt))
1123 $arFileToMove[] = Array(
1124 $_SERVER[
"DOCUMENT_ROOT"].$this->
path.
"/".$arPage[
"FILE"],
1128 $arPage[
"LINK"] =
"/".$fileName;
1129 $strRootMenu .= __CreateMenuItem($arPage);
1135 if ($strRootMenu <>
'')
1137 $strRootMenu =
"\$aMenuLinks = Array(".$strRootMenu.
"\n);";
1138 $APPLICATION->SaveFileContent(
$_SERVER[
"DOCUMENT_ROOT"].
"/.".$rootMenuType.
".menu.php",
"<".
"?\n".$strRootMenu.
"\n?".
">");
1142 foreach ($arFileToMove as $arFile)
1149 $arPageIDs = explode(
"-", $pageID);
1152 if (!isset($arPageIDs[0]) || !array_key_exists($arPageIDs[0],
$arStructure))
1157 if (isset($arPageIDs[1]))
1159 if (!array_key_exists($arPageIDs[1],
$arStructure[$arPageIDs[0]][
"CHILD"]))
1171 $arNewStructure = Array();
1172 $rootPageCnt = Array();
1176 foreach ($arPages as
$page)
1185 if ( ($position = mb_strpos(
$page,
":")) !==
false)
1186 list($pageID, $rootID) = explode(
":", $pageID);
1189 if (empty($arPageProp))
1194 if (array_key_exists($pageID, $arNewStructure))
1196 $rootPageCnt[$pageID]++;
1197 $arNewStructure[$pageID.$rootPageCnt[$pageID]] = $arPageProp + Array(
"CHILD" => Array());
1201 $arNewStructure[$pageID] = $arPageProp + Array(
"CHILD" => Array());
1202 $rootPageCnt[$pageID] =
"";
1208 if (isset($rootPageCnt[$rootID]) && array_key_exists($rootID.$rootPageCnt[$rootID], $arNewStructure))
1210 if (array_key_exists($pageID, $arNewStructure[$rootID.$rootPageCnt[$rootID]][
"CHILD"]))
1212 (int)$childNumber++;
1213 $arNewStructure[$rootID.$rootPageCnt[$rootID]][
"CHILD"][$pageID.$childNumber] = $arPageProp;
1216 $arNewStructure[$rootID.$rootPageCnt[$rootID]][
"CHILD"][$pageID] = $arPageProp;
1220 if (array_key_exists($pageID, $arNewStructure[$rootID][
"CHILD"]))
1222 (int)$childNumber++;
1223 $arNewStructure[$rootID][
"CHILD"][$pageID.$childNumber] = $arPageProp;
1226 $arNewStructure[$rootID][
"CHILD"][$pageID] = $arPageProp;
1231 $arAddService = Array();
1234 if (isset($arPage[
"TYPE"]) && $arPage[
"TYPE"] ==
"SERVICE" && !array_key_exists($pageID, $arNewStructure))
1235 $arAddService[$pageID] = $arPage;
1238 return $arNewStructure + $arAddService;
1248 foreach (
$arFiles[
"FILES"] as $arFile)
1251 if (array_key_exists(
"DELETE", $arFile) && $arFile[
"DELETE"] <>
'')
1253 if ($arFile[
"DELETE"] ==
"/" || $arFile[
"DELETE"] ==
"/bitrix" || $arFile[
"DELETE"] ==
"/bitrix/")
1261 if (!array_key_exists(
"FROM", $arFile) && !array_key_exists(
"TO", $arFile))
1264 $rewrite = (array_key_exists(
"REWRITE", $arFile) && $arFile[
"REWRITE"] ==
"N" ?
false :
true);
1265 $recursive = (array_key_exists(
"RECURSIVE", $arFile) && $arFile[
"RECURSIVE"] ==
"N" ?
false :
true);
1267 $arFile[
"TO"] =
Rel2Abs(
"/", $arFile[
"TO"]);
1270 $_SERVER[
"DOCUMENT_ROOT"].$this->
path.
"/".$arFile[
"FROM"],
1271 $_SERVER[
"DOCUMENT_ROOT"].$arFile[
"TO"],
1293 $this->arErrors[] = Array(
$strError, $id);
1337 foreach ($this->arTemplateGroups as
$groupID => $arGroup)
1339 if (is_array($arGroup[
"SITE_ID"]) && in_array(
$siteID, $arGroup[
"SITE_ID"]))
1381 foreach ($this->arServices as
$serviceID => $arService)
1383 if (!array_key_exists(
"SITE_ID",$arService))
1386 if (is_array($arService[
"SITE_ID"]) && in_array(
$siteID, $arService[
"SITE_ID"]))
1400 if (!isset($this->arStructure[
"STRUCTURE"]) || !is_array($this->arStructure[
"STRUCTURE"]))
1407 return $this->arStructure[
"STRUCTURE"];
1415 foreach ($this->arStructure[
"STRUCTURE"] as $pageID => $arPage)
1417 if (array_key_exists(
"SERVICE_ID",$arPage) &&
$serviceID !==
null)
1419 $result = array_intersect(!is_array($arPage[
"SERVICE_ID"]) ? Array($arPage[
"SERVICE_ID"]) : $arPage[
"SERVICE_ID"],
$serviceID);
1427 if (array_key_exists(
"SITE_ID",$arPage) &&
$siteID !==
null)
1429 $result = array_intersect(!is_array($arPage[
"SITE_ID"]) ? Array($arPage[
"SITE_ID"]) : $arPage[
"SITE_ID"],
$siteID);
1443 if (
$lang ===
false)
1444 $lang = LANGUAGE_ID;
1446 $wizardPath =
$_SERVER[
"DOCUMENT_ROOT"].$this->path;
1451 $fname = $wizardPath.
"/lang/".$subst_lang.
"/".$relativePath;
1453 if (file_exists($fname))
1459 $fname = $wizardPath.
"/lang/".
$lang.
"/".$relativePath;
1461 if (file_exists($fname))
static convertLangPath($langFile, $language)
GetTemplateGroups($arFilter=Array())
__GetNewStructure($structureID, &$arStructure)
__InstallTemplate($templateID)
_SetNextStep($obStep, $currentStep, $stepType="select")
SetError($strError, $id=false)
__MoveDirFiles(&$arFiles)
__GetPageProperties($pageID, &$arStructure)
GetStructure($arFilter=Array())
_InitSubStep($stepType, &$arInstallation, $bInitStep=true)
__GetInstallationScript()
__GetUserStep($stepName, &$step)
GetTemplates($arFilter=Array())
__InstallService($serviceID)
IncludeWizardLang($relativePath="", $lang=false)
GetServices($arFilter=Array())
__SetStepDescription($obStep, $stepName)
static CheckName($wizardName)
static GetRepositoryPath()
static MakeWizardPath($wizardName)
$_SERVER["DOCUMENT_ROOT"]
if(!defined('SITE_ID')) $lang
CheckVersion($version1, $version2)
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
DeleteDirFilesEx($path, $root=null)
Rel2Abs($curdir, $relpath)
CopyDirFiles($path_from, $path_to, $ReWrite=true, $Recursive=false, $bDeleteAfterCopy=false, $strExclude="")
GetMessage($name, $aReplace=null)
__IncludeLang($path, $bReturnArray=false, $bFileChecked=false)
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
const BX_WIZARD_INSTALL_STRUCTURE_ID
const BX_WIZARD_LICENSE_ID
const BX_WIZARD_INSTALL_TEMPLATE_ID
const BX_WIZARD_SELECT_GROUP_ID
const BX_WIZARD_SELECT_SERVICE_ID
const BX_WIZARD_SELECT_TEMPLATE_ID
const BX_WIZARD_FINISH_ID
const BX_WIZARD_SELECT_STRUCTURE_ID
const BX_WIZARD_WELCOME_ID
const BX_WIZARD_START_INSTALL_ID
const BX_WIZARD_SELECT_SITE_ID
const BX_WIZARD_INSTALL_SERVICE_ID
const BX_WIZARD_INSTALL_SITE_ID
const BX_WIZARD_CANCEL_ID