Удалены первые

This commit is contained in:
zloj 2025-11-13 19:39:11 +03:00
parent c24dae2c4f
commit af57030414
16 changed files with 0 additions and 667 deletions

View File

@ -1,21 +0,0 @@
<?
if(!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true)
die();
if(!defined('WIZARD_DEFAULT_SITE_ID') && !empty($_REQUEST['wizardSiteID']))
define('WIZARD_DEFAULT_SITE_ID', $_REQUEST['wizardSiteID']);
$arWizardDescription = Array(
'NAME' => GetMessage('EMPTY_WIZARD_NAME'),
'DESCRIPTION' => GetMessage('EMPTY_WIZARD_DESC'),
'VERSION' => '1.0.3',
'START_TYPE' => 'WINDOW',
'WIZARD_TYPE' => 'INSTALL',
'IMAGE' => 'images/'.LANGUAGE_ID.'/solution.png',
'PARENT' => 'wizard_sol',
'TEMPLATES' => Array(
Array('SCRIPT' => 'wizard_sol')
),
'STEPS' => Array('SelectTemplateStep', 'SiteSettingsStep', 'ModuleSettingsStep', 'InstallStep', 'SuccessStep')
);
?>

View File

@ -1,4 +0,0 @@
<?
$MESS["EMPTY_WIZARD_NAME"] = "1С-Битрикс: Пустой сайт";
$MESS["EMPTY_WIZARD_DESC"] = "Мастер создания пустого сайта";
?>

View File

@ -1,78 +0,0 @@
<?
$MESS['WIZ_TEMPLATE_SETTINGS'] = 'Настройка шаблона';
$MESS['WIZ_MAIN_SETTINGS'] = 'Настройка решения';
$MESS['WIZ_MODULE_SETTINGS'] = 'Настройка модулей';
$MESS['WIZ_INSTALL'] = 'Установка';
$MESS['WIZ_FINISH'] = 'Завершение установки';
$MESS['WIZ_GO'] = 'Перейти на сайт';
$MESS['WIZ_NOT_FIRST'] = 'Данный мастер предназначен для установки на чистую версию 1С-Битрикс!';
$MESS['WIZ_TEMPLATE_NAME'] = 'Название шаблона';
$MESS['WIZ_TEMPLATE_NAME_DEFAULT'] = 'Пустой шаблон';
$MESS['WIZ_TEMPLATE_DESCRIPTION'] = 'Описание шаблона';
$MESS['WIZ_TEMPLATE_DESCRIPTION_DEFAULT'] = 'Пустой шаблон для сайта';
$MESS['WIZ_TEMPLATE_DIR'] = 'Папка шаблона';
$MESS['WIZ_TEMPLATE_DIR_DEFAULT'] = 'empty';
$MESS['WIZ_TEMPLATE_DIR_ERROR'] = 'Папка шаблона содержит недопустимые символы!';
$MESS['WIZ_SETTINGS_SITE_NAME'] = 'Название сайта';
$MESS['WIZ_SETTINGS_SITE_NAME_DEFAULT'] = 'Название сайта';
$MESS['WIZ_SETTINGS_TITLE'] = 'Title';
$MESS['WIZ_SETTINGS_TITLE_DEFAULT'] = 'Title';
$MESS['WIZ_SETTINGS_DESCRIPTION'] = 'Description';
$MESS['WIZ_SETTINGS_DESCRIPTION_DEFAULT'] = 'Description';
$MESS['WIZ_SETTINGS_KEYWORDS'] = 'Keywords';
$MESS['WIZ_SETTINGS_KEYWORDS_DEFAULT'] = 'Keywords';
$MESS['WIZ_MODULE_INSTALL'] = 'Установить модули';
$MESS['WIZ_TEMPLATE_INSTALL'] = 'Установка шаблона';
$MESS['WIZ_SETTINGS_INSTALL'] = 'Настройка параметров';
$MESS['WIZ_MODULE_INSTALLING'] = 'Установка модуля: ';
$MESS['WIZ_MODULE_UNINSTALLING'] = 'Деинсталяция модуля: ';
$MESS['WIZ_START_INSTALL'] = 'Начало установки';
$MESS['NAS_OBLAKO_1C_BITRIX'] = 'Облако "1С-Битрикс"';
$MESS["NAS_EMPTYINSTALL_IM"] = "Веб-мессенджер";
$MESS["NAS_EMPTYINSTALL_CALENDAR"] = "Календарь событий";
$MESS["NAS_EMPTYINSTALL_REKLAMA_BANNERY"] = "Реклама, баннеры";
$MESS["NAS_EMPTYINSTALL_BIZNES_PROCESSY"] = "Бизнес процессы";
$MESS["NAS_EMPTYINSTALL_DIZAYNER_BIZNES_PROC"] = "Дизайнер бизнес-процессов";
$MESS["NAS_EMPTYINSTALL_BLOGI"] = "Блоги";
$MESS["NAS_EMPTYINSTALL_TORGOVYY_KATALOG"] = "Торговый каталог";
$MESS["NAS_EMPTYINSTALL_VEB_KLASTER"] = "Веб-кластер";
$MESS["NAS_EMPTYINSTALL_OBLACNYE_HRANILISA"] = "Облачные хранилища";
$MESS["NAS_EMPTYINSTALL_KOMPRESSIA"] = "Компрессия";
$MESS["NAS_EMPTYINSTALL_KONTROLLER"] = "Контроллер";
$MESS["NAS_EMPTYINSTALL_VALUTY"] = "Валюты";
$MESS["NAS_EMPTYINSTALL_EKSTRANET"] = "Экстранет";
$MESS["NAS_EMPTYINSTALL_VEB_FORMY"] = "Веб-формы";
$MESS["NAS_EMPTYINSTALL_FORUM"] = "Форум";
$MESS["NAS_EMPTYINSTALL_INFORMACIONNYE_BLOKI"] = "Информационные блоки";
$MESS["NAS_EMPTYINSTALL_MENEDJER_IDEY"] = "Менеджер идей";
$MESS["NAS_EMPTYINSTALL_INTRANET"] = "Интранет";
$MESS["NAS_EMPTYINSTALL_OBUCENIE"] = "Обучение";
$MESS["NAS_EMPTYINSTALL_UNIVERSALQNYE_SPISKI"] = "Универсальные списки";
$MESS["NAS_EMPTYINSTALL_POCTA"] = "Почта";
$MESS["NAS_EMPTYINSTALL_PLANERKI_I_SOBRANIA"] = "Планерки и собрания";
$MESS["NAS_EMPTYINSTALL_MODULQ_PROIZVODITELQ"] = "Модуль производительности";
$MESS["NAS_EMPTYINSTALL_FOTOGALEREA"] = "Фотогалерея 2.0";
$MESS["NAS_EMPTYINSTALL_KONSTRUKTOR_OTCETOV"] = "Конструктор отчетов";
$MESS["NAS_EMPTYINSTALL_INTERNET_MAGAZIN"] = "Интернет-магазин";
$MESS["NAS_EMPTYINSTALL_POISK"] = "Поиск";
$MESS["NAS_EMPTYINSTALL_PROAKTIVNAA_ZASITA"] = "Проактивная защита";
$MESS["NAS_EMPTYINSTALL_POISKOVAA_OPTIMIZACI"] = "Поисковая оптимизация";
$MESS["NAS_EMPTYINSTALL_SOCIALQNAA_SETQ"] = "Социальная сеть";
$MESS["NAS_EMPTYINSTALL_SOCIALQNYE_SERVISY"] = "Социальные сервисы";
$MESS["NAS_EMPTYINSTALL_VEB_ANALITIKA"] = "Веб-аналитика";
$MESS["NAS_EMPTYINSTALL_PODPISKA_RASSYLKI"] = "Подписка, рассылки";
$MESS["NAS_EMPTYINSTALL_TEHPODDERJKA"] = "Техподдержка";
$MESS["NAS_EMPTYINSTALL_ZADACI"] = "Задачи";
$MESS["NAS_EMPTYINSTALL_UCET_RABOCEGO_VREMEN"] = "Учет рабочего времени";
$MESS["NAS_EMPTYINSTALL_PEREVOD"] = "Перевод";
$MESS["NAS_EMPTYINSTALL_VIDEOKONFERENCII"] = "Видеоконференции";
$MESS["NAS_EMPTYINSTALL_VIDEOPORT"] = "Видеопорт";
$MESS["NAS_EMPTYINSTALL_OPROSY_GOLOSOVANIA"] = "Опросы, голосования";
$MESS["NAS_EMPTYINSTALL_BIBLIOTEKA_DOKUMENTO"] = "Библиотека документов";
$MESS["NAS_EMPTYINSTALL_VEB_SERVISY"] = "Веб-сервисы";
$MESS["NAS_EMPTYINSTALL_DOKUMENTOOBOROT"] = "Документооборот";
$MESS["NAS_EMPTYINSTALL_IMPORT_DANNYH_IZ_VNE"] = "Импорт данных из внешних источников";
$MESS["NAS_EMPTYINSTALL_SERVER"] = "сервер";
$MESS["NAS_EMPTYINSTALL_INSTALL_NONE"] = "Не устанавливать";
$MESS["NAS_EMPTYINSTALL_INSTALL_ALL"] = "Установить все";
?>

View File

@ -1,8 +0,0 @@
<?
define("B_PROLOG_INCLUDED", true);
define("WIZARD_DEFAULT_SITE_ID", "#SITE_ID#");
define("WIZARD_DEFAULT_TONLY", true);
define("PRE_LANGUAGE_ID", "ru");
define("PRE_INSTALL_CHARSET", "#SITE_ENCODING#");
include_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/install/wizard/wizard.php");
?>

View File

@ -1,9 +0,0 @@
<?
$sSectionName = 'Главная';
$arDirProperties = array(
'title' => '#SITE_TITLE#',
'description' => '#SITE_DESCRIPTION#',
'keywords' => '#SITE_KEYWORDS#',
'robots' => 'index, follow'
);
?>

View File

@ -1,20 +0,0 @@
<?
include_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/urlrewrite.php');
CHTTP::SetStatus("404 Not Found");
@define("ERROR_404","Y");
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetTitle("404 Not Found");
$APPLICATION->IncludeComponent("bitrix:main.map", ".default", Array(
"LEVEL" => "3",
"COL_NUM" => "2",
"SHOW_DESCRIPTION" => "Y",
"SET_TITLE" => "Y",
"CACHE_TIME" => "36000000"
)
);
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>

View File

@ -1,8 +0,0 @@
<?
require($_SERVER['DOCUMENT_ROOT'].'/bitrix/header.php');
$APPLICATION->SetTitle('Главная');
?>
<?
require($_SERVER['DOCUMENT_ROOT'].'/bitrix/footer.php');
?>

View File

@ -1,6 +0,0 @@
<?
$sSectionName = "Авторизация";
$arDirProperties = array(
);
?>

View File

@ -1,16 +0,0 @@
<?
define("NEED_AUTH", true);
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
if (isset($_REQUEST["backurl"]) && strlen($_REQUEST["backurl"])>0)
LocalRedirect($backurl);
$APPLICATION->SetTitle("Авторизация");
?>
<p>Вы зарегистрированы и успешно авторизовались.</p>
<p>Используйте административную панель в верхней части экрана для быстрого доступа к функциям управления структурой и информационным наполнением сайта. Набор кнопок верхней панели отличается для различных разделов сайта. Так отдельные наборы действий предусмотрены для управления статическим содержимым страниц, динамическими публикациями (новостями, каталогом, фотогалереей) и т.п.</p>
<p><a href="<?=SITE_DIR?>">Вернуться на главную страницу</a></p>
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,9 +0,0 @@
<?
if(!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true)
die();
$arTemplate = Array(
'NAME' => '#TEMPLATE_NAME#',
'DESCRIPTION' => '#TEMPLATE_DESCRIPTION#'
);
?>

View File

@ -1,6 +0,0 @@
<?
if(!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true)
die();
?>
</body>
</html>

View File

@ -1,17 +0,0 @@
<?
if(!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true)
die();
?>
<!DOCTYPE html>
<html>
<head>
<?$APPLICATION->ShowHead();?>
<title><?$APPLICATION->ShowTitle();?></title>
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
</head>
<body>
<div id="panel">
<?$APPLICATION->ShowPanel();?>
</div>

View File

@ -1,465 +0,0 @@
<?
if(!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true)
die();
global $arModNames;
$arModNames = array(
'advertising' => GetMessage("NAS_EMPTYINSTALL_REKLAMA_BANNERY"),
'bitrixcloud' => GetMessage("NAS_OBLAKO_1C_BITRIX"),
'bizproc' => GetMessage("NAS_EMPTYINSTALL_BIZNES_PROCESSY"),
'bizprocdesigner' => GetMessage("NAS_EMPTYINSTALL_DIZAYNER_BIZNES_PROC"),
'blog' => GetMessage("NAS_EMPTYINSTALL_BLOGI"),
'calendar' => GetMessage("NAS_EMPTYINSTALL_CALENDAR"),
'catalog' => GetMessage("NAS_EMPTYINSTALL_TORGOVYY_KATALOG"),
'cluster' => GetMessage("NAS_EMPTYINSTALL_VEB_KLASTER"),
'clouds' => GetMessage("NAS_EMPTYINSTALL_OBLACNYE_HRANILISA"),
'compression' => GetMessage("NAS_EMPTYINSTALL_KOMPRESSIA"),
'controller' => GetMessage("NAS_EMPTYINSTALL_KONTROLLER"),
'crm' => 'CRM',
'currency' => GetMessage("NAS_EMPTYINSTALL_VALUTY"),
'DAV' => 'DAV',
'extranet' => GetMessage("NAS_EMPTYINSTALL_EKSTRANET"),
'form' => GetMessage("NAS_EMPTYINSTALL_VEB_FORMY"),
'forum' => GetMessage("NAS_EMPTYINSTALL_FORUM"),
'iblock' => GetMessage("NAS_EMPTYINSTALL_INFORMACIONNYE_BLOKI"),
'idea' => GetMessage("NAS_EMPTYINSTALL_MENEDJER_IDEY"),
'im' => GetMessage("NAS_EMPTYINSTALL_IM"),
'intranet' => GetMessage("NAS_EMPTYINSTALL_INTRANET"),
'ldap' => 'AD/LDAP',
'learning' => GetMessage("NAS_EMPTYINSTALL_OBUCENIE"),
'lists' => GetMessage("NAS_EMPTYINSTALL_UNIVERSALQNYE_SPISKI"),
'mail' => GetMessage("NAS_EMPTYINSTALL_POCTA"),
'meeting' => GetMessage("NAS_EMPTYINSTALL_PLANERKI_I_SOBRANIA"),
'perfmon' => GetMessage("NAS_EMPTYINSTALL_MODULQ_PROIZVODITELQ"),
'photogallery' => GetMessage("NAS_EMPTYINSTALL_FOTOGALEREA"),
'report' => GetMessage("NAS_EMPTYINSTALL_KONSTRUKTOR_OTCETOV"),
'sale' => GetMessage("NAS_EMPTYINSTALL_INTERNET_MAGAZIN"),
'search' => GetMessage("NAS_EMPTYINSTALL_POISK"),
'security' => GetMessage("NAS_EMPTYINSTALL_PROAKTIVNAA_ZASITA"),
'seo' => GetMessage("NAS_EMPTYINSTALL_POISKOVAA_OPTIMIZACI"),
'socialnetwork' => GetMessage("NAS_EMPTYINSTALL_SOCIALQNAA_SETQ"),
'socialservices' => GetMessage("NAS_EMPTYINSTALL_SOCIALQNYE_SERVISY"),
'statistic' => GetMessage("NAS_EMPTYINSTALL_VEB_ANALITIKA"),
'subscribe' => GetMessage("NAS_EMPTYINSTALL_PODPISKA_RASSYLKI"),
'support' => GetMessage("NAS_EMPTYINSTALL_TEHPODDERJKA"),
'tasks' => GetMessage("NAS_EMPTYINSTALL_ZADACI"),
'timeman' => GetMessage("NAS_EMPTYINSTALL_UCET_RABOCEGO_VREMEN"),
'translate' => GetMessage("NAS_EMPTYINSTALL_PEREVOD"),
'video' => GetMessage("NAS_EMPTYINSTALL_VIDEOKONFERENCII"),
'videoport' => GetMessage("NAS_EMPTYINSTALL_VIDEOPORT"),
'vote' => GetMessage("NAS_EMPTYINSTALL_OPROSY_GOLOSOVANIA"),
'webdav' => GetMessage("NAS_EMPTYINSTALL_BIBLIOTEKA_DOKUMENTO"),
'webservice' => GetMessage("NAS_EMPTYINSTALL_VEB_SERVISY"),
'wiki' => 'Wiki',
'workflow' => GetMessage("NAS_EMPTYINSTALL_DOKUMENTOOBOROT"),
'xdimport' => GetMessage("NAS_EMPTYINSTALL_IMPORT_DANNYH_IZ_VNE"),
'xmpp' => 'XMPP '.GetMessage("NAS_EMPTYINSTALL_SERVER")
);
function on_shutdown(&$install_steps, &$currentStep)
{
//ob_end_clean();
if(!isset($install_steps[$currentStep + 1]))
$response = "window.ajaxForm.StopAjax(); window.ajaxForm.SetStatus('100'); window.ajaxForm.Post('".($currentStep + 1)."', 'skip', '".($currentStep < 2 ? $install_steps[$currentStep] : $install_steps[$currentStep]['status'])."');";
else
{
$progress = round($currentStep / sizeof($install_steps) * 100);
$response = "window.ajaxForm.SetStatus('".$progress."'); window.ajaxForm.Post('".($currentStep + 1)."', 'skip', '".($currentStep < 2 ? $install_steps[$currentStep] : $install_steps[$currentStep]['status'])."');";
}
die("[response]".$response."[/response]");
}
class SelectTemplateStep extends CWizardStep
{
private $s_count = 0;
function InitStep()
{
$wizard =& $this->GetWizard();
$wizard->solutionName = 'empty';
$this->SetStepID('set_template');
$this->SetTitle(GetMessage('WIZ_TEMPLATE_SETTINGS'));
$sites = CSite::GetList($by = "sort", $order = "desc");
while($sites_f = $sites->Fetch())
$this->s_count++;
if($this->s_count < 2)
{
$this->SetNextStep('set_site');
$this->SetNextCaption(GetMessage('WIZ_MAIN_SETTINGS'));
$wizard->SetDefaultVars(
Array(
'templateDescription' => GetMessage('WIZ_TEMPLATE_DESCRIPTION_DEFAULT'),
'templateName' => GetMessage('WIZ_TEMPLATE_NAME_DEFAULT'),
'templateDir' => GetMessage('WIZ_TEMPLATE_DIR_DEFAULT')
)
);
}
else
{
$site_wizard = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/bitrix/wizards/nsandrey/empty_install/site/_index.php');
$site_wizard = strtr($site_wizard, array('#SITE_ID#' => SITE_ID, '#SITE_ENCODING#' => SITE_CHARSET));
file_put_contents($_SERVER['DOCUMENT_ROOT'].SITE_DIR.'index.php', $site_wizard);
$this->SetNextStep('success');
$this->SetNextCaption(GetMessage('WIZ_FINISH'));
}
}
function OnPostForm()
{
if($this->s_count < 2)
{
$wizard =& $this->GetWizard();
$templateDir = $wizard->GetVar('templateDir');
if(!preg_match('#^[A-Za-z0-9_]+$#is', $templateDir))
$this->SetError(GetMessage('WIZ_TEMPLATE_DIR_ERROR'));
}
}
function ShowStep()
{
$wizard =& $this->GetWizard();
if($this->s_count < 2)
$this->content .= '<div class="wizard-input-form">
<div class="wizard-input-form-block">
<h4><label for="siteName">'.GetMessage('WIZ_TEMPLATE_NAME').'</label></h4>
<div class="wizard-input-form-block-content">
<div class="wizard-input-form-field wizard-input-form-field-text">
'.$this->ShowInputField('text', 'templateName').'
</div>
</div>
</div>
<div class="wizard-input-form-block">
<h4><label for="siteName">'.GetMessage('WIZ_TEMPLATE_DESCRIPTION').'</label></h4>
<div class="wizard-input-form-block-content">
<div class="wizard-input-form-field wizard-input-form-field-text">
'.$this->ShowInputField('text', 'templateDescription').'
</div>
</div>
</div>
<div class="wizard-input-form-block">
<h4><label for="siteName">'.GetMessage('WIZ_TEMPLATE_DIR').'</label></h4>
<div class="wizard-input-form-block-content">
<div class="wizard-input-form-field wizard-input-form-field-text">
'.$this->ShowInputField('text', 'templateDir').'
</div>
</div>
</div>
</div>';
else
$this->content .= GetMessage('WIZ_NOT_FIRST');
}
}
class SiteSettingsStep extends CWizardStep
{
function InitStep()
{
$wizard =& $this->GetWizard();
$wizard->solutionName = 'empty';
$this->SetStepID('set_site');
$this->SetTitle(GetMessage('WIZ_MAIN_SETTINGS'));
$this->SetNextStep('set_modules');
$this->SetNextCaption(GetMessage('WIZ_MODULE_SETTINGS'));
$wizard->SetDefaultVars(
Array(
'siteName' => GetMessage('WIZ_SETTINGS_SITE_NAME_DEFAULT'),
'siteMetaTitle' => GetMessage('WIZ_SETTINGS_TITLE_DEFAULT'),
'siteMetaDescription' => GetMessage('WIZ_SETTINGS_DESCRIPTION_DEFAULT'),
'siteMetaKeywords' => GetMessage('WIZ_SETTINGS_KEYWORDS_DEFAULT')
)
);
}
function OnPostForm()
{
}
function ShowStep()
{
$this->content .= '<div class="wizard-input-form">
<div class="wizard-input-form-block">
<h4><label for="siteName">'.GetMessage('WIZ_SETTINGS_SITE_NAME').'</label></h4>
<div class="wizard-input-form-block-content">
<div class="wizard-input-form-field wizard-input-form-field-text">
'.$this->ShowInputField('text', 'siteName').'
</div>
</div>
</div>
<div class="wizard-input-form-block">
<h4><label for="siteName">'.GetMessage('WIZ_SETTINGS_TITLE').'</label></h4>
<div class="wizard-input-form-block-content">
<div class="wizard-input-form-field wizard-input-form-field-text">
'.$this->ShowInputField('text', 'siteMetaTitle').'
</div>
</div>
</div>
<div class="wizard-input-form-block">
<h4><label for="siteName">'.GetMessage('WIZ_SETTINGS_DESCRIPTION').'</label></h4>
<div class="wizard-input-form-block-content">
<div class="wizard-input-form-field wizard-input-form-field-text">
'.$this->ShowInputField('text', 'siteMetaDescription').'
</div>
</div>
</div>
<div class="wizard-input-form-block">
<h4><label for="siteName">'.GetMessage('WIZ_SETTINGS_KEYWORDS').'</label></h4>
<div class="wizard-input-form-block-content">
<div class="wizard-input-form-field wizard-input-form-field-text">
'.$this->ShowInputField('text', 'siteMetaKeywords').'
</div>
</div>
</div>
</div>';
}
}
class ModuleSettingsStep extends CWizardStep
{
private $arModules = array();
function InitStep()
{
global $arModNames;
$wizard =& $this->GetWizard();
$wizard->solutionName = 'empty';
$this->SetStepID('set_modules');
$this->SetTitle(GetMessage('WIZ_MODULE_SETTINGS'));
$this->SetNextStep('install_step');
$this->SetNextCaption(GetMessage('WIZ_MAIN_SETTINGS'));
foreach($arModNames as $m_id => $m_name)
if(is_dir($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/'.$m_id))
$this->arModules[$m_id] = $m_name;
asort($this->arModules);
$wizard->SetVar('b_modules', $this->arModules);
$wizard->SetDefaultVars(array('install' => array()));
}
function OnPostForm()
{
}
function ShowStep()
{
$wizard =& $this->GetWizard();
$this->content .= '<div class="wizard-input-form">
<div class="wizard-input-form-block">
<h4><label for="siteName">'.GetMessage('WIZ_MODULE_INSTALL').'</label></h4>
<div class="wizard-input-form-block-content">';
foreach($this->arModules as $m_id => $m_name)
$this->content .= $this->ShowCheckboxField('install[]', $m_id).' '.$m_name.'<br />';
$this->content .= '<br><a href="" onclick="checkAllModules(); return false;">'.GetMessage("NAS_EMPTYINSTALL_INSTALL_ALL").'</a> | <a href="" onclick="uncheckAllModules(); return false;">'.GetMessage("NAS_EMPTYINSTALL_INSTALL_NONE").'</a>
</div>
</div>
</div>
<script type="text/javascript">
function checkAllModules()
{
var inputs = document.getElementsByTagName("input");
for (var i = 0; i < inputs.length; i++)
{
if (inputs[i].type == "checkbox")
{
if (!inputs[i].checked)
inputs[i].checked = true;
}
}
}
function uncheckAllModules()
{
var inputs = document.getElementsByTagName("input");
for (var i = 0; i < inputs.length; i++)
{
if (inputs[i].type == "checkbox")
{
if (inputs[i].checked)
inputs[i].checked = false;
}
}
}
</script>';
}
}
class InstallStep extends CWizardStep
{
function InitStep()
{
global $arModNames;
$wizard =& $this->GetWizard();
$wizard->solutionName = 'empty';
$this->SetStepID('install_step');
$this->SetTitle(GetMessage('WIZ_INSTALL'));
}
function OnPostForm()
{
$wizard =& $this->GetWizard();
$currentStep = $wizard->GetVar('nextStep');
$install_mod = $wizard->GetVar('install');
$all_mod = $wizard->GetVar('b_modules');
if($currentStep < 1)
$currentStep = 0;
$install_steps = array(
GetMessage('WIZ_TEMPLATE_INSTALL'),
GetMessage('WIZ_SETTINGS_INSTALL')
);
foreach($all_mod as $m_id => $m_name)
$install_steps[] = in_array($m_id, $install_mod) ? array('module' => array('install', $m_id), 'status' => GetMessage('WIZ_MODULE_INSTALLING').$m_name) : array('module' => array('uninstall', $m_id), 'status' => GetMessage('WIZ_MODULE_UNINSTALLING').$m_name);
if(!isset($install_steps[$currentStep]))
{
$wizard->SetCurrentStep('success');
return;
}
$arVars = $wizard->GetVars();
switch($currentStep)
{
case 0:
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
CopyDirFiles($_SERVER['DOCUMENT_ROOT'].'/bitrix/wizards/nsandrey/empty_install/site/template/', $_SERVER['DOCUMENT_ROOT'].'/bitrix/templates/'.$arVars['templateDir'].'/', true, true, false);
$templ_desc = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/bitrix/templates/'.$arVars['templateDir'].'/description.php');
$templ_desc = strtr($templ_desc, array('#TEMPLATE_NAME#' => $arVars['templateName'], '#TEMPLATE_DESCRIPTION#' => $arVars['templateDescription']));
file_put_contents($_SERVER['DOCUMENT_ROOT'].'/bitrix/templates/'.$arVars['templateDir'].'/description.php', $templ_desc);
break;
case 1:
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
CopyDirFiles($_SERVER['DOCUMENT_ROOT'].'/bitrix/wizards/nsandrey/empty_install/site/public/'.LANGUAGE_ID.'/', $_SERVER['DOCUMENT_ROOT'].'/', true, true, false);
$site_meta = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/.section.php');
$site_meta = strtr($site_meta, array('#SITE_TITLE#' => $arVars['siteMetaTitle'], '#SITE_DESCRIPTION#' => $arVars['siteMetaDescription'], '#SITE_KEYWORDS#' => $arVars['siteMetaKeywords']));
file_put_contents($_SERVER['DOCUMENT_ROOT'].'/.section.php', $site_meta);
$obSite = new CSite;
$obSite->Update(SITE_ID, array('NAME' => $arVars['siteName'], 'TEMPLATE' => array(array('CONDITION' => '', 'SORT' => 1, 'TEMPLATE' => $arVars['templateDir']))));
break;
default:
ob_start();
if(@file_exists($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/'.$install_steps[$currentStep]['module'][1].'/install/index.php'))
{
include_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/'.$install_steps[$currentStep]['module'][1].'/install/index.php');
register_shutdown_function('on_shutdown', $install_steps, $currentStep);
$module = new $install_steps[$currentStep]['module'][1];
global $step;
$_REQUEST['sessid'] = bitrix_sessid();
if($install_steps[$currentStep]['module'][1] == 'wiki' || $install_steps[$currentStep]['module'][1] == 'photogallery')
$_REQUEST['step'] = $step = 3;
else
$_REQUEST['step'] = $step = 2;
if($install_steps[$currentStep]['module'][0] == 'install' && !$module->IsInstalled())
$module->DoInstall();
elseif($install_steps[$currentStep]['module'][0] == 'uninstall' && $module->IsInstalled())
$module->DoUninstall();
}
ob_end_clean();
break;
}
if(!isset($install_steps[$currentStep + 1]))
$response = "window.ajaxForm.StopAjax(); window.ajaxForm.SetStatus('100'); window.ajaxForm.Post('".($currentStep + 1)."', 'skip', '".($currentStep < 2 ? $install_steps[$currentStep] : $install_steps[$currentStep]['status'])."');";
else
{
$progress = round($currentStep / sizeof($install_steps) * 100);
$response = "window.ajaxForm.SetStatus('".$progress."'); window.ajaxForm.Post('".($currentStep + 1)."', 'skip', '".($currentStep < 2 ? $install_steps[$currentStep] : $install_steps[$currentStep]['status'])."');";
}
die("[response]".$response."[/response]");
}
function ShowStep()
{
$wizard =& $this->GetWizard();
$this->content .= '
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2"><div id="status"></div></td>
</tr>
<tr>
<td width="90%" height="10">
<div style="border:1px solid #B9CBDF; width:100%;"><div id="indicator" style="height:10px; width:0%; background-color:#B9CBDF"></div></div>
</td>
<td width="10%">&nbsp;<span id="percent">0%</span><span id="percent2" style="display: none;">0%</span></td>
</tr>
</table>
<div id="wait" align=center>
<br />
<table width=200 cellspacing=0 cellpadding=0 border=0 style="border:1px solid #EFCB69" bgcolor="#FFF7D7">
<tr>
<td height=50 width="50" valign="middle" align=center><img src="/bitrix/images/main/wizard_sol/wait.gif"></td>
<td height=50 width=150>'.GetMessage("WIZARD_WAIT_WINDOW_TEXT").'</td>
</tr>
</table>
</div><br /><br />
<div id="error_container" style="display:none">
<div id="error_notice"><span style="color:red;">'.GetMessage("INST_ERROR_OCCURED").'<br />'.GetMessage("INST_TEXT_ERROR").':</span></div>
<div id="error_text"></div>
<div><span style="color:red;">'.GetMessage("INST_ERROR_NOTICE").'</span></div>
<div id="error_buttons" align="center"><br />
<input type="button" value="'.GetMessage("INST_RETRY_BUTTON").'" id="error_retry_button" onclick="" />&nbsp;<input type="button" id="error_skip_button" value="'.GetMessage("INST_SKIP_BUTTON").'" onclick="" />&nbsp;</div>
</div>
'.$this->ShowHiddenField("nextStep", $firstService).'
'.$this->ShowHiddenField("nextStepStage", $stage).'
<iframe style="display:none;" id="iframe-post-form" name="iframe-post-form" src="javascript:\'\'"></iframe>';
$formName = $wizard->GetFormName();
$NextStepVarName = $wizard->GetRealName("nextStep");
$this->content .= '
<script type="text/javascript">
var ajaxForm = new CAjaxForm("'.$formName.'", "iframe-post-form", "'.$NextStepVarName.'");
ajaxForm.Post("0", "skip", "'.GetMessage("WIZ_START_INSTALL").'");
</script>';
}
}
class SuccessStep extends CWizardStep
{
function InitStep()
{
$wizard =& $this->GetWizard();
$wizard->solutionName = 'empty';
$this->SetStepID('success');
$this->SetTitle(GetMessage('WIZ_FINISH'));
$this->SetNextStep('success');
$this->SetNextCaption(GetMessage('WIZ_GO'));
}
function ShowStep()
{
CopyDirFiles($_SERVER['DOCUMENT_ROOT'].'/_index.php', $_SERVER['DOCUMENT_ROOT'].'/index.php', true, true, true);
bx_accelerator_reset();
}
}
?>