Exemple #1
0
<?php

define("STOP_STATISTICS", true);
define("PUBLIC_AJAX_MODE", true);
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
if (!$USER->IsAdmin() || !check_bitrix_sessid()) {
    echo GetMessage('CLUWIZ_ERROR_ACCESS_DENIED');
    require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_after.php";
    die;
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/wizard.php";
$lang = $_REQUEST['lang'];
if (!preg_match('/^[a-z0-9_]{2}$/i', $lang)) {
    $lang = 'en';
}
$wizard = new CWizard("bitrix:cluster.slave_start");
$wizard->IncludeWizardLang("scripts/drop.php", $lang);
CModule::IncludeModule('cluster');
$node_id = $_REQUEST["node_id"];
if ($node_id <= 1) {
    $nodeDB = false;
} else {
    $nodeDB = CDatabase::GetDBNodeConnection($node_id, true, false);
}
if (!is_object($nodeDB)) {
    echo GetMessage('CLUWIZ_CONNECTION_ERROR');
} else {
    $arTablesToDelete = array();
    $rsTables = $nodeDB->Query("show tables", false, '', array("fixed_connection" => true));
    while ($arTable = $rsTables->Fetch()) {
        $arTablesToDelete[] = $arTable["Tables_in_" . $nodeDB->DBName];
<?php

include $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
//COption::SetOptionString("main", "controller_member", "N");
CControllerClient::JoinToController("http://controller.bsm:6448/", "admin", "password", false, false, false, true);
require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/interface/init_admin.php";
?>
<html><head><title><?php 
$APPLICATION->ShowTitle();
?>
</title></head>
<body><table width="100%"><tr><td width="1%"></td><td width="98%" align="center">
<div style="width:600px;">
<?php 
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/wizard.php";
$wizard = new CWizard("bitrix:controller_site");
$wizard->Install();
?>
</div>
</td><td width="1%"></td>
</table>
</body>
</html>
<?php 
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php";
Exemple #3
0
<?php

define("STOP_STATISTICS", true);
define("PUBLIC_AJAX_MODE", true);
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
if (!$USER->IsAdmin() || !check_bitrix_sessid()) {
    echo GetMessage('CLUWIZ_ERROR_ACCESS_DENIED');
    require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_after.php";
    die;
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/wizard.php";
$lang = $_REQUEST['lang'];
if (!preg_match('/^[a-z0-9_]{2}$/i', $lang)) {
    $lang = 'en';
}
$wizard = new CWizard("bitrix:cluster.slave_start");
$wizard->IncludeWizardLang("scripts/move.php", $lang);
CModule::IncludeModule('cluster');
$STEP = intval($_REQUEST['STEP']);
$node_id = intval($_REQUEST["node_id"]);
if ($node_id < 2) {
    $nodeDB = false;
} else {
    $nodeDB = CDatabase::GetDBNodeConnection($node_id, true, false);
}
if (!is_object($nodeDB)) {
    echo GetMessage('CLUWIZ_CONNECTION_ERROR');
} elseif ($STEP < 2) {
    $DB->Query("DELETE FROM b_cluster_table", false, '', array("fixed_connection" => true));
    $strError = CreateNodeTable($DB, $nodeDB, "b_cluster_table");
    $arTables = array();
Exemple #4
0
<?php

define("STOP_STATISTICS", true);
define('DLSERVER', 'www.1c-bitrix.ru');
define('DLPORT', 80);
define('DLPATH', '/download/files/locations/');
define('DLMETHOD', 'GET');
define('DLZIPFILE', 'zip_ussr.csv');
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/wizard.php";
$wizard = new CWizard("bitrix:sale.locations");
$wizard->IncludeWizardLang("scripts/loader.php");
$saleModulePermissions = $APPLICATION->GetGroupRight("sale");
if ($saleModulePermissions < "W") {
    echo GetMessage('WSL_LOADER_ERROR_ACCESS_DENIED');
    require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_after.php";
    die;
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/sale/general/location_import.php";
$arLoadParams = array('STEP' => intval($_REQUEST['STEP']), 'CSVFILE' => $_REQUEST['CSVFILE'], 'LOADZIP' => $_REQUEST['LOADZIP'], 'DLSERVER' => DLSERVER, 'DLPORT' => DLPORT, 'DLPATH' => DLPATH, 'DLMETHOD' => DLMETHOD, 'DLZIPFILE' => DLZIPFILE);
$arLoadResult = saleLocationLoadFile($arLoadParams);
if (strlen($arLoadResult['ERROR']) > 0) {
    echo $arLoadResult['ERROR'];
    if (isset($arLoadResult['RUN_ERROR']) && $arLoadResult['RUN_ERROR'] == true) {
        echo '<script>RunError()</script>';
    }
} elseif (isset($arLoadResult['COMPLETE']) && $arLoadResult['COMPLETE'] === true) {
    echo GetMessage('WSL_LOADER_ALL_LOADED');
    echo '<script>EnableButton();</script>';
} elseif ($arLoadResult['STEP'] !== false) {
    if (strlen($arLoadResult['MESSAGE']) > 0) {
Exemple #5
0
<?php

define("STOP_STATISTICS", true);
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
$saleModulePermissions = $APPLICATION->GetGroupRight("sale");
if (!check_bitrix_sessid() || $saleModulePermissions < "W") {
    echo GetMessage('WSL_IMPORT_ERROR_ACCESS_DENIED');
    require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_after.php";
    die;
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/wizard.php";
$wizard = new CWizard("bitrix:sale.locations");
$wizard->IncludeWizardLang("scripts/import.php");
$step_length = intval($_REQUEST["STEP_LENGTH"]);
if ($step_length <= 0) {
    $step_length = 10;
}
define('ZIP_WRITE_TO_LOG', 0);
define('ZIP_STEP_LENGTH', $step_length);
define('LOC_STEP_LENGTH', $step_length);
define('DLZIPFILE', 'zip_ussr.csv');
function writeToLog($cur_op)
{
    if (defined('ZIP_WRITE_TO_LOG') && ZIP_WRITE_TO_LOG === 1) {
        global $start_time;
        list($usec, $sec) = explode(" ", microtime());
        $cur_time = (double) $usec + (double) $sec;
        $fp = fopen('log.txt', 'a');
        fwrite($fp, $cur_time . ": ");
        fwrite($fp, $cur_op . "\r\n");
        fclose($fp);
Exemple #6
0
</span>
	<form action="<?php 
    echo $APPLICATION->GetCurPageParam(bitrix_sessid_get(), array("sessid"));
    ?>
" method="post">
		<?php 
    echo CAdminUtil::dumpVars($_POST, array("USER_LOGIN", "USER_PASSWORD", "sessid"));
    ?>
		<br><input type="submit" value="<?php 
    echo GetMessage("MAIN_WIZARD_INSTALL_RELOAD_PAGE");
    ?>
">
	</form>
<?php 
} else {
    $arWizardNameTmp = explode(":", $_REQUEST["wizardName"]);
    $arWizardName = array();
    foreach ($arWizardNameTmp as $a) {
        $a = preg_replace("#[^a-z0-9_.-]+#i", "", $a);
        if (strlen($a) > 0) {
            $arWizardName[] = $a;
        }
    }
    if (count($arWizardName) > 2) {
        $path = $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/" . $arWizardName[0] . "/install/wizards/" . $arWizardName[1] . "/" . $arWizardName[2];
        CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/" . $arWizardName[0] . "/install/wizards/" . $arWizardName[1] . "/" . $arWizardName[2], $_SERVER["DOCUMENT_ROOT"] . "/bitrix/wizards/" . $arWizardName[1] . "/" . $arWizardName[2], true, true, false, "");
        $arWizardName = array($arWizardName[1], $arWizardName[2]);
    }
    $installer = new CWizard($arWizardName[0] . (count($arWizardName) > 1 ? ":" . $arWizardName[1] : ""));
    $installer->Install();
}