12895 - change all adm/filemanager from another prestashop 1.6 to fix auto sizing images issue
This commit is contained in:
parent
0c386225e2
commit
95fc898e6a
1
adm/filemanager/LICENSE
Normal file
1
adm/filemanager/LICENSE
Normal file
@ -0,0 +1 @@
|
|||||||
|
This work is licensed under the Creative Commons Attribution-NonCommercial 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
|
@ -2,32 +2,35 @@
|
|||||||
|
|
||||||
include('config/config.php');
|
include('config/config.php');
|
||||||
|
|
||||||
if ($_SESSION['verify'] != 'RESPONSIVEfilemanager')
|
if ($_SESSION['verify'] != 'RESPONSIVEfilemanager') {
|
||||||
die('forbiden');
|
die('forbiden');
|
||||||
|
}
|
||||||
|
|
||||||
include('include/utils.php');
|
include('include/utils.php');
|
||||||
|
|
||||||
if (isset($_GET['action']))
|
if (isset($_GET['action'])) {
|
||||||
switch ($_GET['action'])
|
switch ($_GET['action']) {
|
||||||
{
|
|
||||||
case 'view':
|
case 'view':
|
||||||
if (isset($_GET['type']))
|
if (isset($_GET['type'])) {
|
||||||
$_SESSION['view_type'] = $_GET['type'];
|
$_SESSION['view_type'] = $_GET['type'];
|
||||||
else
|
} else {
|
||||||
die('view type number missing');
|
die('view type number missing');
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'sort':
|
case 'sort':
|
||||||
if (isset($_GET['sort_by']))
|
if (isset($_GET['sort_by'])) {
|
||||||
$_SESSION['sort_by'] = $_GET['sort_by'];
|
$_SESSION['sort_by'] = $_GET['sort_by'];
|
||||||
if (isset($_GET['descending']))
|
}
|
||||||
|
if (isset($_GET['descending'])) {
|
||||||
$_SESSION['descending'] = $_GET['descending'] === 'true';
|
$_SESSION['descending'] = $_GET['descending'] === 'true';
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'image_size':
|
case 'image_size':
|
||||||
if (realpath(dirname(_PS_ROOT_DIR_.$_POST['path'])) != realpath(_PS_ROOT_DIR_.$upload_dir))
|
if (realpath(dirname(_PS_ROOT_DIR_.$_POST['path'])) != realpath(_PS_ROOT_DIR_.$upload_dir)) {
|
||||||
die();
|
die();
|
||||||
|
}
|
||||||
$pos = strpos($_POST['path'], $upload_dir);
|
$pos = strpos($_POST['path'], $upload_dir);
|
||||||
if ($pos !== false)
|
if ($pos !== false) {
|
||||||
{
|
|
||||||
$info = getimagesize(substr_replace($_POST['path'], $current_path, $pos, strlen($upload_dir)));
|
$info = getimagesize(substr_replace($_POST['path'], $current_path, $pos, strlen($upload_dir)));
|
||||||
echo json_encode($info);
|
echo json_encode($info);
|
||||||
}
|
}
|
||||||
@ -41,21 +44,23 @@ if (isset($_GET['action']))
|
|||||||
|| strpos($_POST['url'], 'http://featherfiles.aviary.com/') !== 0
|
|| strpos($_POST['url'], 'http://featherfiles.aviary.com/') !== 0
|
||||||
|| $_POST['name'] != fix_filename($_POST['name'], $transliteration)
|
|| $_POST['name'] != fix_filename($_POST['name'], $transliteration)
|
||||||
|| !in_array(strtolower($info['extension']), array('jpg', 'jpeg', 'png'))
|
|| !in_array(strtolower($info['extension']), array('jpg', 'jpeg', 'png'))
|
||||||
)
|
) {
|
||||||
die('wrong data');
|
die('wrong data');
|
||||||
|
}
|
||||||
$image_data = get_file_by_url($_POST['url']);
|
$image_data = get_file_by_url($_POST['url']);
|
||||||
if ($image_data === false)
|
if ($image_data === false) {
|
||||||
{
|
|
||||||
die('file could not be loaded');
|
die('file could not be loaded');
|
||||||
}
|
}
|
||||||
|
|
||||||
$put_contents_path = $current_path;
|
$put_contents_path = $current_path;
|
||||||
|
|
||||||
if (isset($_POST['path']))
|
if (isset($_POST['path'])) {
|
||||||
$put_contents_path .= str_replace("\0", "", $_POST['path']);
|
$put_contents_path .= str_replace("\0", "", $_POST['path']);
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($_POST['name']))
|
if (isset($_POST['name'])) {
|
||||||
$put_contents_path .= str_replace("\0", "", $_POST['name']);
|
$put_contents_path .= str_replace("\0", "", $_POST['name']);
|
||||||
|
}
|
||||||
|
|
||||||
file_put_contents($put_contents_path, $image_data);
|
file_put_contents($put_contents_path, $image_data);
|
||||||
//new thumb creation
|
//new thumb creation
|
||||||
@ -67,46 +72,40 @@ if (isset($_GET['action']))
|
|||||||
}*/
|
}*/
|
||||||
break;
|
break;
|
||||||
case 'extract':
|
case 'extract':
|
||||||
if (strpos($_POST['path'], '/') === 0 || strpos($_POST['path'], '../') !== false || strpos($_POST['path'], './') === 0)
|
if (strpos($_POST['path'], '/') === 0 || strpos($_POST['path'], '../') !== false || strpos($_POST['path'], './') === 0) {
|
||||||
die('wrong path');
|
die('wrong path');
|
||||||
|
}
|
||||||
$path = $current_path.$_POST['path'];
|
$path = $current_path.$_POST['path'];
|
||||||
$info = pathinfo($path);
|
$info = pathinfo($path);
|
||||||
$base_folder = $current_path.fix_dirname($_POST['path']).'/';
|
$base_folder = $current_path.fix_dirname($_POST['path']).'/';
|
||||||
switch ($info['extension'])
|
switch ($info['extension']) {
|
||||||
{
|
|
||||||
case 'zip':
|
case 'zip':
|
||||||
$zip = new ZipArchive;
|
$zip = new ZipArchive;
|
||||||
if ($zip->open($path) === true)
|
if ($zip->open($path) === true) {
|
||||||
{
|
|
||||||
//make all the folders
|
//make all the folders
|
||||||
for ($i = 0; $i < $zip->numFiles; $i++)
|
for ($i = 0; $i < $zip->numFiles; $i++) {
|
||||||
{
|
|
||||||
$OnlyFileName = $zip->getNameIndex($i);
|
$OnlyFileName = $zip->getNameIndex($i);
|
||||||
$FullFileName = $zip->statIndex($i);
|
$FullFileName = $zip->statIndex($i);
|
||||||
if ($FullFileName['name'][strlen($FullFileName['name']) - 1] == '/')
|
if ($FullFileName['name'][strlen($FullFileName['name']) - 1] == '/') {
|
||||||
{
|
|
||||||
create_folder($base_folder.$FullFileName['name']);
|
create_folder($base_folder.$FullFileName['name']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//unzip into the folders
|
//unzip into the folders
|
||||||
for ($i = 0; $i < $zip->numFiles; $i++)
|
for ($i = 0; $i < $zip->numFiles; $i++) {
|
||||||
{
|
|
||||||
$OnlyFileName = $zip->getNameIndex($i);
|
$OnlyFileName = $zip->getNameIndex($i);
|
||||||
$FullFileName = $zip->statIndex($i);
|
$FullFileName = $zip->statIndex($i);
|
||||||
|
|
||||||
if (!($FullFileName['name'][strlen($FullFileName['name']) - 1] == '/'))
|
if (!($FullFileName['name'][strlen($FullFileName['name']) - 1] == '/')) {
|
||||||
{
|
|
||||||
$fileinfo = pathinfo($OnlyFileName);
|
$fileinfo = pathinfo($OnlyFileName);
|
||||||
if (in_array(strtolower($fileinfo['extension']), $ext))
|
if (in_array(strtolower($fileinfo['extension']), $ext)) {
|
||||||
{
|
|
||||||
copy('zip://'.$path.'#'.$OnlyFileName, $base_folder.$FullFileName['name']);
|
copy('zip://'.$path.'#'.$OnlyFileName, $base_folder.$FullFileName['name']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$zip->close();
|
$zip->close();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
echo 'failed to open file';
|
echo 'failed to open file';
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'gz':
|
case 'gz':
|
||||||
$p = new PharData($path);
|
$p = new PharData($path);
|
||||||
@ -179,13 +178,12 @@ if (isset($_GET['action']))
|
|||||||
<div class="jp-no-solution">
|
<div class="jp-no-solution">
|
||||||
<span>Update Required</span>
|
<span>Update Required</span>
|
||||||
To play the media you will need to either update your browser to a recent version or update your
|
To play the media you will need to either update your browser to a recent version or update your
|
||||||
<a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
|
<a href="http://get.adobe.com/flashplayer/" class="_blank">Flash plugin</a>.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if (in_array(strtolower($info['extension']), $ext_music))
|
if (in_array(strtolower($info['extension']), $ext_music)) {
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -194,11 +192,16 @@ if (isset($_GET['action']))
|
|||||||
$("#jquery_jplayer_1").jPlayer({
|
$("#jquery_jplayer_1").jPlayer({
|
||||||
ready: function () {
|
ready: function () {
|
||||||
$(this).jPlayer("setMedia", {
|
$(this).jPlayer("setMedia", {
|
||||||
title: "<?php Tools::safeOutput($_GET['title']); ?>",
|
title: "<?php Tools::safeOutput($_GET['title']);
|
||||||
mp3: "<?php echo Tools::safeOutput($preview_file); ?>",
|
?>",
|
||||||
m4a: "<?php echo Tools::safeOutput($preview_file); ?>",
|
mp3: "<?php echo Tools::safeOutput($preview_file);
|
||||||
oga: "<?php echo Tools::safeOutput($preview_file); ?>",
|
?>",
|
||||||
wav: "<?php echo Tools::safeOutput($preview_file); ?>"
|
m4a: "<?php echo Tools::safeOutput($preview_file);
|
||||||
|
?>",
|
||||||
|
oga: "<?php echo Tools::safeOutput($preview_file);
|
||||||
|
?>",
|
||||||
|
wav: "<?php echo Tools::safeOutput($preview_file);
|
||||||
|
?>"
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
swfPath: "js",
|
swfPath: "js",
|
||||||
@ -211,8 +214,8 @@ if (isset($_GET['action']))
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
} elseif (in_array(strtolower($info['extension']), $ext_video))
|
|
||||||
{
|
} elseif (in_array(strtolower($info['extension']), $ext_video)) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -221,9 +224,12 @@ if (isset($_GET['action']))
|
|||||||
$("#jquery_jplayer_1").jPlayer({
|
$("#jquery_jplayer_1").jPlayer({
|
||||||
ready: function () {
|
ready: function () {
|
||||||
$(this).jPlayer("setMedia", {
|
$(this).jPlayer("setMedia", {
|
||||||
title: "<?php Tools::safeOutput($_GET['title']); ?>",
|
title: "<?php Tools::safeOutput($_GET['title']);
|
||||||
m4v: "<?php echo Tools::safeOutput($preview_file); ?>",
|
?>",
|
||||||
ogv: "<?php echo Tools::safeOutput($preview_file); ?>"
|
m4v: "<?php echo Tools::safeOutput($preview_file);
|
||||||
|
?>",
|
||||||
|
ogv: "<?php echo Tools::safeOutput($preview_file);
|
||||||
|
?>"
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
swfPath: "js",
|
swfPath: "js",
|
||||||
@ -237,9 +243,11 @@ if (isset($_GET['action']))
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
} else {
|
||||||
die('no action passed');
|
die('no action passed');
|
||||||
|
}
|
||||||
?>
|
?>
|
@ -1,17 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
mb_internal_encoding('UTF-8');
|
|
||||||
|
|
||||||
if (!defined('_PS_ADMIN_DIR_'))
|
if (!defined('_PS_ADMIN_DIR_')) {
|
||||||
define('_PS_ADMIN_DIR_', getcwd().'/../');
|
define('_PS_ADMIN_DIR_', dirname(__FILE__).'/../../');
|
||||||
|
}
|
||||||
|
|
||||||
require_once(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
require_once(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||||
require_once(_PS_ADMIN_DIR_.'/init.php');
|
require_once(_PS_ADMIN_DIR_.'/init.php');
|
||||||
|
|
||||||
|
if (function_exists('mb_internal_encoding')) {
|
||||||
|
mb_internal_encoding('UTF-8');
|
||||||
|
}
|
||||||
|
|
||||||
$products_accesses = Profile::getProfileAccess(Context::getContext()->employee->id_profile, Tab::getIdFromClassName('AdminProducts'));
|
$products_accesses = Profile::getProfileAccess(Context::getContext()->employee->id_profile, Tab::getIdFromClassName('AdminProducts'));
|
||||||
$cms_accesses = Profile::getProfileAccess(Context::getContext()->employee->id_profile, Tab::getIdFromClassName('AdminCmsContent'));
|
$cms_accesses = Profile::getProfileAccess(Context::getContext()->employee->id_profile, Tab::getIdFromClassName('AdminCmsContent'));
|
||||||
|
|
||||||
if (!$products_accesses['edit'] && !$cms_accesses['edit'])
|
if (!$products_accesses['edit'] && !$cms_accesses['edit']) {
|
||||||
die(Tools::displayError());
|
die(Tools::displayError());
|
||||||
|
}
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// DON'T COPY THIS VARIABLES IN FOLDERS config.php FILES
|
// DON'T COPY THIS VARIABLES IN FOLDERS config.php FILES
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@ -30,12 +36,13 @@ if (!$products_accesses['edit'] && !$cms_accesses['edit'])
|
|||||||
// | | | |- responsivefilemanager
|
// | | | |- responsivefilemanager
|
||||||
// | | | | |- plugin.min.js
|
// | | | | |- plugin.min.js
|
||||||
|
|
||||||
$base_url="http://".$_SERVER['HTTP_HOST']; // DON'T TOUCH (base url (only domain) of site (without final /)).
|
|
||||||
$upload_dir = __PS_BASE_URI__.'img/cms/'; // path from base_url to base of upload folder (with start and final /)
|
$base_url = Tools::getHttpHost(true); // DON'T TOUCH (base url (only domain) of site (without final /)).
|
||||||
|
$base_url = Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE') ? $base_url : str_replace('https', 'http', $base_url);
|
||||||
|
$upload_dir = Context::getContext()->shop->getBaseURI().'img/cms/'; // path from base_url to base of upload folder (with start and final /)
|
||||||
$current_path = _PS_ROOT_DIR_.'/img/cms/'; // relative path from filemanager folder to upload folder (with final /)
|
$current_path = _PS_ROOT_DIR_.'/img/cms/'; // relative path from filemanager folder to upload folder (with final /)
|
||||||
//thumbs folder can't put inside upload folder
|
//thumbs folder can't put inside upload folder
|
||||||
$thumbs_base_path = _PS_ROOT_DIR_.'/img/tmp/cms/'; // relative path from filemanager folder to thumbs folder (with final /)
|
$thumbs_base_path = _PS_ROOT_DIR_.'/img/tmp/cms/'; // relative path from filemanager folder to thumbs folder (with final /)
|
||||||
$thumbs_base_path = _PS_ROOT_DIR_.'/img/cms/'; // relative path from filemanager folder to thumbs folder (with final /)
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------
|
||||||
// YOU CAN COPY AND CHANGE THESE VARIABLES INTO FOLDERS config.php FILES TO CUSTOMIZE EACH FOLDER OPTIONS
|
// YOU CAN COPY AND CHANGE THESE VARIABLES INTO FOLDERS config.php FILES TO CUSTOMIZE EACH FOLDER OPTIONS
|
||||||
@ -97,10 +104,10 @@ $duplicate_files=true;
|
|||||||
//Allowed extensions (lowercase insert)
|
//Allowed extensions (lowercase insert)
|
||||||
//**********************
|
//**********************
|
||||||
$ext_img = array('jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'svg'); //Images
|
$ext_img = array('jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'svg'); //Images
|
||||||
$ext_file = array('doc', 'docx','rtf', 'pdf', 'xls', 'xlsx', 'txt', 'csv','html','xhtml','psd','sql','log','fla','xml','ade','adp','mdb','accdb','ppt','pptx','odt','ots','ott','odb','odg','otp','otg','odf','ods','odp','css','ai'); //Files
|
$ext_file = array('pdf'); // array('doc', 'docx','rtf', 'pdf', 'xls', 'xlsx', 'txt', 'csv','html','xhtml','psd','sql','log','fla','xml','ade','adp','mdb','accdb','ppt','pptx','odt','ots','ott','odb','odg','otp','otg','odf','ods','odp','css','ai'); //Files
|
||||||
$ext_video = array('mov', 'mpeg', 'mp4', 'avi', 'mpg','wma',"flv","webm"); //Video
|
$ext_video = array('mov', 'mpeg', 'mp4', 'avi', 'mpg', 'wma', 'flv', 'webm'); //Video
|
||||||
$ext_music = array('mp3', 'm4a', 'ac3', 'aiff', 'mid','ogg','wav'); //Audio
|
$ext_music = array();//array('mp3', 'm4a', 'ac3', 'aiff', 'mid','ogg','wav'); //Audio
|
||||||
$ext_misc = array('zip', 'rar','gz','tar','iso','dmg'); //Archives
|
$ext_misc = array();// array('zip', 'rar','gz','tar','iso','dmg'); //Archives
|
||||||
|
|
||||||
$ext=array_merge($ext_img, $ext_file, $ext_misc, $ext_video, $ext_music); //allowed extensions
|
$ext=array_merge($ext_img, $ext_file, $ext_misc, $ext_video, $ext_music); //allowed extensions
|
||||||
|
|
||||||
@ -164,5 +171,3 @@ $relative_image_creation_name_to_prepend= array('','test_'); //name to prepend o
|
|||||||
$relative_image_creation_name_to_append = array('_test',''); //name to append on filename
|
$relative_image_creation_name_to_append = array('_test',''); //name to append on filename
|
||||||
$relative_image_creation_width = array(300,400); //width of image (you can leave empty if you set height)
|
$relative_image_creation_width = array(300,400); //width of image (you can leave empty if you set height)
|
||||||
$relative_image_creation_height = array(200,''); //height of image (you can leave empty if you set width)
|
$relative_image_creation_height = array(200,''); //height of image (you can leave empty if you set width)
|
||||||
|
|
||||||
?>
|
|
||||||
|
35
adm/filemanager/config/index.php
Normal file
35
adm/filemanager/config/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2016 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||||
|
* that is bundled with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://opensource.org/licenses/afl-3.0.php
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@prestashop.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* DISCLAIMER
|
||||||
|
*
|
||||||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||||||
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
|
*
|
||||||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2016 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
35
adm/filemanager/css/index.php
Normal file
35
adm/filemanager/css/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2016 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||||
|
* that is bundled with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://opensource.org/licenses/afl-3.0.php
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@prestashop.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* DISCLAIMER
|
||||||
|
*
|
||||||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||||||
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
|
*
|
||||||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2016 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
File diff suppressed because it is too large
Load Diff
@ -1,45 +1,50 @@
|
|||||||
<?php
|
<?php
|
||||||
include('config/config.php');
|
include('config/config.php');
|
||||||
if ($_SESSION['verify'] != 'RESPONSIVEfilemanager') die('forbiden');
|
if ($_SESSION['verify'] != 'RESPONSIVEfilemanager') {
|
||||||
|
die('forbiden');
|
||||||
|
}
|
||||||
include('include/utils.php');
|
include('include/utils.php');
|
||||||
|
|
||||||
$_POST['path_thumb'] = $thumbs_base_path.$_POST['path_thumb'];
|
$_POST['path_thumb'] = $thumbs_base_path.$_POST['path_thumb'];
|
||||||
if (!isset($_POST['path_thumb']) && trim($_POST['path_thumb']) == '')
|
if (!isset($_POST['path_thumb']) && trim($_POST['path_thumb']) == '') {
|
||||||
die('wrong path');
|
die('wrong path');
|
||||||
|
}
|
||||||
|
|
||||||
$thumb_pos = strpos($_POST['path_thumb'], $thumbs_base_path);
|
$thumb_pos = strpos($_POST['path_thumb'], $thumbs_base_path);
|
||||||
if ($thumb_pos === false
|
if ($thumb_pos === false
|
||||||
|| preg_match('/\.{1,2}[\/|\\\]/', $_POST['path_thumb']) !== 0
|
|| preg_match('/\.{1,2}[\/|\\\]/', $_POST['path_thumb']) !== 0
|
||||||
|| preg_match('/\.{1,2}[\/|\\\]/', $_POST['path']) !== 0
|
|| preg_match('/\.{1,2}[\/|\\\]/', $_POST['path']) !== 0
|
||||||
)
|
) {
|
||||||
die('wrong path');
|
die('wrong path');
|
||||||
|
}
|
||||||
|
|
||||||
$language_file = 'lang/en.php';
|
$language_file = 'lang/en.php';
|
||||||
if (isset($_GET['lang']) && $_GET['lang'] != 'undefined' && $_GET['lang'] != '')
|
if (isset($_GET['lang']) && $_GET['lang'] != 'undefined' && $_GET['lang'] != '') {
|
||||||
{
|
|
||||||
$path_parts = pathinfo($_GET['lang']);
|
$path_parts = pathinfo($_GET['lang']);
|
||||||
if (is_readable('lang/'.$path_parts['basename'].'.php'))
|
if (is_readable('lang/'.$path_parts['basename'].'.php')) {
|
||||||
$language_file = 'lang/'.$path_parts['basename'].'.php';
|
$language_file = 'lang/'.$path_parts['basename'].'.php';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
require_once $language_file;
|
require_once $language_file;
|
||||||
|
|
||||||
$base = $current_path;
|
$base = $current_path;
|
||||||
|
|
||||||
if (isset($_POST['path']))
|
if (isset($_POST['path'])) {
|
||||||
$path = $current_path.str_replace("\0", "", $_POST['path']);
|
$path = $current_path.str_replace("\0", "", $_POST['path']);
|
||||||
else
|
} else {
|
||||||
$path = $current_path;
|
$path = $current_path;
|
||||||
|
}
|
||||||
|
|
||||||
$cycle = true;
|
$cycle = true;
|
||||||
$max_cycles = 50;
|
$max_cycles = 50;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($cycle && $i < $max_cycles)
|
while ($cycle && $i < $max_cycles) {
|
||||||
{
|
|
||||||
$i++;
|
$i++;
|
||||||
if ($path == $base) $cycle = false;
|
if ($path == $base) {
|
||||||
|
$cycle = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (file_exists($path.'config.php'))
|
if (file_exists($path.'config.php')) {
|
||||||
{
|
|
||||||
require_once($path.'config.php');
|
require_once($path.'config.php');
|
||||||
$cycle = false;
|
$cycle = false;
|
||||||
}
|
}
|
||||||
@ -49,157 +54,154 @@ while ($cycle && $i < $max_cycles)
|
|||||||
|
|
||||||
$path = $current_path.str_replace("\0", "", $_POST['path']);
|
$path = $current_path.str_replace("\0", "", $_POST['path']);
|
||||||
$path_thumb = $_POST['path_thumb'];
|
$path_thumb = $_POST['path_thumb'];
|
||||||
if (isset($_POST['name']))
|
if (isset($_POST['name'])) {
|
||||||
{
|
|
||||||
$name = $_POST['name'];
|
$name = $_POST['name'];
|
||||||
if (preg_match('/\.{1,2}[\/|\\\]/', $name) !== 0) die('wrong name');
|
if (preg_match('/\.{1,2}[\/|\\\]/', $name) !== 0) {
|
||||||
|
die('wrong name');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$info = pathinfo($path);
|
$info = pathinfo($path);
|
||||||
if (isset($info['extension']) && !(isset($_GET['action']) && $_GET['action'] == 'delete_folder') && !in_array(strtolower($info['extension']), $ext))
|
if (isset($info['extension']) && !(isset($_GET['action']) && $_GET['action'] == 'delete_folder') && !in_array(strtolower($info['extension']), $ext)) {
|
||||||
die('wrong extension');
|
die('wrong extension');
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($_GET['action']))
|
if (isset($_GET['action'])) {
|
||||||
{
|
switch ($_GET['action']) {
|
||||||
|
|
||||||
switch ($_GET['action'])
|
|
||||||
{
|
|
||||||
case 'delete_file':
|
case 'delete_file':
|
||||||
if ($delete_files)
|
if ($delete_files) {
|
||||||
{
|
|
||||||
unlink($path);
|
unlink($path);
|
||||||
if (file_exists($path_thumb))
|
if (file_exists($path_thumb)) {
|
||||||
unlink($path_thumb);
|
unlink($path_thumb);
|
||||||
|
}
|
||||||
|
|
||||||
$info = pathinfo($path);
|
$info = pathinfo($path);
|
||||||
if ($relative_image_creation)
|
if ($relative_image_creation) {
|
||||||
{
|
foreach ($relative_path_from_current_pos as $k => $path) {
|
||||||
foreach ($relative_path_from_current_pos as $k => $path)
|
if ($path != '' && $path[strlen($path) - 1] != '/') {
|
||||||
{
|
|
||||||
if ($path != '' && $path[strlen($path) - 1] != '/')
|
|
||||||
$path .= '/';
|
$path .= '/';
|
||||||
if (file_exists($info['dirname'].'/'.$path.$relative_image_creation_name_to_prepend[$k].$info['filename'].$relative_image_creation_name_to_append[$k].'.'.$info['extension']))
|
}
|
||||||
|
if (file_exists($info['dirname'].'/'.$path.$relative_image_creation_name_to_prepend[$k].$info['filename'].$relative_image_creation_name_to_append[$k].'.'.$info['extension'])) {
|
||||||
unlink($info['dirname'].'/'.$path.$relative_image_creation_name_to_prepend[$k].$info['filename'].$relative_image_creation_name_to_append[$k].'.'.$info['extension']);
|
unlink($info['dirname'].'/'.$path.$relative_image_creation_name_to_prepend[$k].$info['filename'].$relative_image_creation_name_to_append[$k].'.'.$info['extension']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($fixed_image_creation)
|
if ($fixed_image_creation) {
|
||||||
{
|
foreach ($fixed_path_from_filemanager as $k => $path) {
|
||||||
foreach ($fixed_path_from_filemanager as $k => $path)
|
if ($path != '' && $path[strlen($path) - 1] != '/') {
|
||||||
{
|
|
||||||
if ($path != '' && $path[strlen($path) - 1] != '/')
|
|
||||||
$path .= '/';
|
$path .= '/';
|
||||||
|
}
|
||||||
$base_dir = $path.substr_replace($info['dirname'].'/', '', 0, strlen($current_path));
|
$base_dir = $path.substr_replace($info['dirname'].'/', '', 0, strlen($current_path));
|
||||||
if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].'.'.$info['extension']))
|
if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].'.'.$info['extension'])) {
|
||||||
unlink($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].'.'.$info['extension']);
|
unlink($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].'.'.$info['extension']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'delete_folder':
|
case 'delete_folder':
|
||||||
if ($delete_folders)
|
if ($delete_folders) {
|
||||||
{
|
if (is_dir($path_thumb)) {
|
||||||
if (is_dir($path_thumb))
|
|
||||||
deleteDir($path_thumb);
|
deleteDir($path_thumb);
|
||||||
if (is_dir($path))
|
}
|
||||||
{
|
if (is_dir($path)) {
|
||||||
deleteDir($path);
|
deleteDir($path);
|
||||||
if ($fixed_image_creation)
|
if ($fixed_image_creation) {
|
||||||
{
|
foreach ($fixed_path_from_filemanager as $k => $paths) {
|
||||||
foreach ($fixed_path_from_filemanager as $k => $paths)
|
if ($paths != '' && $paths[strlen($paths) - 1] != '/') {
|
||||||
{
|
$paths .= '/';
|
||||||
if ($paths != '' && $paths[strlen($paths) - 1] != '/') $paths .= '/';
|
}
|
||||||
$base_dir = $paths.substr_replace($path, '', 0, strlen($current_path));
|
$base_dir = $paths.substr_replace($path, '', 0, strlen($current_path));
|
||||||
if (is_dir($base_dir))
|
if (is_dir($base_dir)) {
|
||||||
deleteDir($base_dir);
|
deleteDir($base_dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'create_folder':
|
case 'create_folder':
|
||||||
if ($create_folders)
|
if ($create_folders) {
|
||||||
create_folder(fix_path($path, $transliteration), fix_path($path_thumb, $transliteration));
|
create_folder(fix_path($path, $transliteration), fix_path($path_thumb, $transliteration));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'rename_folder':
|
case 'rename_folder':
|
||||||
if ($rename_folders)
|
if ($rename_folders) {
|
||||||
{
|
|
||||||
$name = fix_filename($name, $transliteration);
|
$name = fix_filename($name, $transliteration);
|
||||||
$name = str_replace('.', '', $name);
|
$name = str_replace('.', '', $name);
|
||||||
|
|
||||||
if (!empty($name))
|
if (!empty($name)) {
|
||||||
{
|
if (!rename_folder($path, $name, $transliteration)) {
|
||||||
if (!rename_folder($path, $name, $transliteration))
|
|
||||||
die(lang_Rename_existing_folder);
|
die(lang_Rename_existing_folder);
|
||||||
|
}
|
||||||
rename_folder($path_thumb, $name, $transliteration);
|
rename_folder($path_thumb, $name, $transliteration);
|
||||||
if ($fixed_image_creation)
|
if ($fixed_image_creation) {
|
||||||
{
|
foreach ($fixed_path_from_filemanager as $k => $paths) {
|
||||||
foreach ($fixed_path_from_filemanager as $k => $paths)
|
if ($paths != '' && $paths[strlen($paths) - 1] != '/') {
|
||||||
{
|
$paths .= '/';
|
||||||
if ($paths != '' && $paths[strlen($paths) - 1] != '/') $paths .= '/';
|
}
|
||||||
$base_dir = $paths.substr_replace($path, '', 0, strlen($current_path));
|
$base_dir = $paths.substr_replace($path, '', 0, strlen($current_path));
|
||||||
rename_folder($base_dir, $name, $transliteration);
|
rename_folder($base_dir, $name, $transliteration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
die(lang_Empty_name);
|
die(lang_Empty_name);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'rename_file':
|
case 'rename_file':
|
||||||
if ($rename_files)
|
if ($rename_files) {
|
||||||
{
|
|
||||||
$name = fix_filename($name, $transliteration);
|
$name = fix_filename($name, $transliteration);
|
||||||
if (!empty($name))
|
if (!empty($name)) {
|
||||||
{
|
if (!rename_file($path, $name, $transliteration)) {
|
||||||
if (!rename_file($path, $name, $transliteration))
|
|
||||||
die(lang_Rename_existing_file);
|
die(lang_Rename_existing_file);
|
||||||
|
}
|
||||||
rename_file($path_thumb, $name, $transliteration);
|
rename_file($path_thumb, $name, $transliteration);
|
||||||
if ($fixed_image_creation)
|
if ($fixed_image_creation) {
|
||||||
{
|
|
||||||
$info = pathinfo($path);
|
$info = pathinfo($path);
|
||||||
foreach ($fixed_path_from_filemanager as $k => $paths)
|
foreach ($fixed_path_from_filemanager as $k => $paths) {
|
||||||
{
|
if ($paths != '' && $paths[strlen($paths) - 1] != '/') {
|
||||||
if ($paths != '' && $paths[strlen($paths) - 1] != '/') $paths .= '/';
|
$paths .= '/';
|
||||||
|
}
|
||||||
$base_dir = $paths.substr_replace($info['dirname'].'/', '', 0, strlen($current_path));
|
$base_dir = $paths.substr_replace($info['dirname'].'/', '', 0, strlen($current_path));
|
||||||
if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].'.'.$info['extension']))
|
if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].'.'.$info['extension'])) {
|
||||||
rename_file($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].'.'.$info['extension'], $fixed_image_creation_name_to_prepend[$k].$name.$fixed_image_creation_to_append[$k], $transliteration);
|
rename_file($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].'.'.$info['extension'], $fixed_image_creation_name_to_prepend[$k].$name.$fixed_image_creation_to_append[$k], $transliteration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
|
} else {
|
||||||
die(lang_Empty_name);
|
die(lang_Empty_name);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'duplicate_file':
|
case 'duplicate_file':
|
||||||
if ($duplicate_files)
|
if ($duplicate_files) {
|
||||||
{
|
|
||||||
$name = fix_filename($name, $transliteration);
|
$name = fix_filename($name, $transliteration);
|
||||||
if (!empty($name))
|
if (!empty($name)) {
|
||||||
{
|
if (!duplicate_file($path, $name)) {
|
||||||
if (!duplicate_file($path, $name))
|
|
||||||
die(lang_Rename_existing_file);
|
die(lang_Rename_existing_file);
|
||||||
|
}
|
||||||
duplicate_file($path_thumb, $name);
|
duplicate_file($path_thumb, $name);
|
||||||
if ($fixed_image_creation)
|
if ($fixed_image_creation) {
|
||||||
{
|
|
||||||
$info = pathinfo($path);
|
$info = pathinfo($path);
|
||||||
foreach ($fixed_path_from_filemanager as $k => $paths)
|
foreach ($fixed_path_from_filemanager as $k => $paths) {
|
||||||
{
|
if ($paths != '' && $paths[strlen($paths) - 1] != '/') {
|
||||||
if ($paths != '' && $paths[strlen($paths) - 1] != '/') $paths .= '/';
|
$paths .= '/';
|
||||||
|
}
|
||||||
$base_dir = $paths.substr_replace($info['dirname'].'/', '', 0, strlen($current_path));
|
$base_dir = $paths.substr_replace($info['dirname'].'/', '', 0, strlen($current_path));
|
||||||
if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].'.'.$info['extension']))
|
if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].'.'.$info['extension'])) {
|
||||||
duplicate_file($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].'.'.$info['extension'], $fixed_image_creation_name_to_prepend[$k].$name.$fixed_image_creation_to_append[$k]);
|
duplicate_file($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].'.'.$info['extension'], $fixed_image_creation_name_to_prepend[$k].$name.$fixed_image_creation_to_append[$k]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
|
} else {
|
||||||
die(lang_Empty_name);
|
die(lang_Empty_name);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
die('wrong action');
|
die('wrong action');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -1,20 +1,25 @@
|
|||||||
<?php
|
<?php
|
||||||
include('config/config.php');
|
include('config/config.php');
|
||||||
if ($_SESSION['verify'] != 'RESPONSIVEfilemanager') die('forbiden');
|
if ($_SESSION['verify'] != 'RESPONSIVEfilemanager') {
|
||||||
|
die('forbiden');
|
||||||
|
}
|
||||||
include('include/utils.php');
|
include('include/utils.php');
|
||||||
|
|
||||||
if (preg_match('/\.{1,2}[\/|\\\]/', $_POST['path']) !== 0)
|
if (preg_match('/\.{1,2}[\/|\\\]/', $_POST['path']) !== 0) {
|
||||||
die('wrong path');
|
die('wrong path');
|
||||||
|
}
|
||||||
|
|
||||||
if (strpos($_POST['name'], '/') !== false || strpos($_POST['name'], '\\') !== false)
|
if (strpos($_POST['name'], '/') !== false || strpos($_POST['name'], '\\') !== false) {
|
||||||
die('wrong path');
|
die('wrong path');
|
||||||
|
}
|
||||||
|
|
||||||
$path = $current_path.$_POST['path'];
|
$path = $current_path.$_POST['path'];
|
||||||
$name = $_POST['name'];
|
$name = $_POST['name'];
|
||||||
|
|
||||||
$info = pathinfo($name);
|
$info = pathinfo($name);
|
||||||
if (!in_array(fix_strtolower($info['extension']), $ext))
|
if (!in_array(fix_strtolower($info['extension']), $ext)) {
|
||||||
die('wrong extension');
|
die('wrong extension');
|
||||||
|
}
|
||||||
|
|
||||||
header('Pragma: private');
|
header('Pragma: private');
|
||||||
header('Cache-control: private, must-revalidate');
|
header('Cache-control: private, must-revalidate');
|
||||||
@ -24,4 +29,3 @@ header('Content-Disposition: attachment; filename="'.($name).'"');
|
|||||||
readfile($path.$name);
|
readfile($path.$name);
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
?>
|
|
35
adm/filemanager/img/ico/index.php
Normal file
35
adm/filemanager/img/ico/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2016 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||||
|
* that is bundled with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://opensource.org/licenses/afl-3.0.php
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@prestashop.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* DISCLAIMER
|
||||||
|
*
|
||||||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||||||
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
|
*
|
||||||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2016 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
35
adm/filemanager/img/ico_dark/index.php
Normal file
35
adm/filemanager/img/ico_dark/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2016 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||||
|
* that is bundled with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://opensource.org/licenses/afl-3.0.php
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@prestashop.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* DISCLAIMER
|
||||||
|
*
|
||||||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||||||
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
|
*
|
||||||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2016 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
35
adm/filemanager/img/index.php
Normal file
35
adm/filemanager/img/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2016 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||||
|
* that is bundled with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://opensource.org/licenses/afl-3.0.php
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@prestashop.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* DISCLAIMER
|
||||||
|
*
|
||||||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||||||
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
|
*
|
||||||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2016 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
35
adm/filemanager/include/index.php
Normal file
35
adm/filemanager/include/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2016 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||||
|
* that is bundled with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://opensource.org/licenses/afl-3.0.php
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@prestashop.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* DISCLAIMER
|
||||||
|
*
|
||||||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||||||
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
|
*
|
||||||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2016 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
File diff suppressed because it is too large
Load Diff
@ -1,46 +1,67 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if($_SESSION["verify"] != "RESPONSIVEfilemanager") die('forbiden');
|
if ($_SESSION["verify"] != "RESPONSIVEfilemanager") {
|
||||||
|
die('forbiden');
|
||||||
|
}
|
||||||
|
|
||||||
function deleteDir($dir) {
|
function deleteDir($dir)
|
||||||
if (!file_exists($dir)) return true;
|
{
|
||||||
if (!is_dir($dir)) return unlink($dir);
|
if (!file_exists($dir)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!is_dir($dir)) {
|
||||||
|
return unlink($dir);
|
||||||
|
}
|
||||||
foreach (scandir($dir) as $item) {
|
foreach (scandir($dir) as $item) {
|
||||||
if ($item == '.' || $item == '..') continue;
|
if ($item == '.' || $item == '..') {
|
||||||
if (!deleteDir($dir.DIRECTORY_SEPARATOR.$item)) return false;
|
continue;
|
||||||
|
}
|
||||||
|
if (!deleteDir($dir.DIRECTORY_SEPARATOR.$item)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return rmdir($dir);
|
return rmdir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
function duplicate_file($old_path,$name){
|
function duplicate_file($old_path, $name)
|
||||||
|
{
|
||||||
if (file_exists($old_path)) {
|
if (file_exists($old_path)) {
|
||||||
$info=pathinfo($old_path);
|
$info=pathinfo($old_path);
|
||||||
$new_path=$info['dirname']."/".$name.".".$info['extension'];
|
$new_path=$info['dirname']."/".$name.".".$info['extension'];
|
||||||
if(file_exists($new_path)) return false;
|
if (file_exists($new_path)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return copy($old_path, $new_path);
|
return copy($old_path, $new_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function rename_file($old_path,$name,$transliteration){
|
function rename_file($old_path, $name, $transliteration)
|
||||||
|
{
|
||||||
$name=fix_filename($name, $transliteration);
|
$name=fix_filename($name, $transliteration);
|
||||||
if (file_exists($old_path)) {
|
if (file_exists($old_path)) {
|
||||||
$info=pathinfo($old_path);
|
$info=pathinfo($old_path);
|
||||||
$new_path=$info['dirname']."/".$name.".".$info['extension'];
|
$new_path=$info['dirname']."/".$name.".".$info['extension'];
|
||||||
if(file_exists($new_path)) return false;
|
if (file_exists($new_path)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return rename($old_path, $new_path);
|
return rename($old_path, $new_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function rename_folder($old_path,$name,$transliteration){
|
function rename_folder($old_path, $name, $transliteration)
|
||||||
|
{
|
||||||
$name=fix_filename($name, $transliteration);
|
$name=fix_filename($name, $transliteration);
|
||||||
if (file_exists($old_path)) {
|
if (file_exists($old_path)) {
|
||||||
$new_path=fix_dirname($old_path)."/".$name;
|
$new_path=fix_dirname($old_path)."/".$name;
|
||||||
if(file_exists($new_path)) return false;
|
if (file_exists($new_path)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return rename($old_path, $new_path);
|
return rename($old_path, $new_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_img_gd($imgfile, $imgthumb, $newwidth, $newheight="") {
|
function create_img_gd($imgfile, $imgthumb, $newwidth, $newheight="")
|
||||||
|
{
|
||||||
if (image_check_memory_usage($imgfile, $newwidth, $newheight)) {
|
if (image_check_memory_usage($imgfile, $newwidth, $newheight)) {
|
||||||
require_once('php_image_magician.php');
|
require_once('php_image_magician.php');
|
||||||
$magicianObj = new imageLib($imgfile);
|
$magicianObj = new imageLib($imgfile);
|
||||||
@ -51,7 +72,8 @@ function create_img_gd($imgfile, $imgthumb, $newwidth, $newheight="") {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_img($imgfile, $imgthumb, $newwidth, $newheight="") {
|
function create_img($imgfile, $imgthumb, $newwidth, $newheight="")
|
||||||
|
{
|
||||||
if (image_check_memory_usage($imgfile, $newwidth, $newheight)) {
|
if (image_check_memory_usage($imgfile, $newwidth, $newheight)) {
|
||||||
require_once('php_image_magician.php');
|
require_once('php_image_magician.php');
|
||||||
$magicianObj = new imageLib($imgfile);
|
$magicianObj = new imageLib($imgfile);
|
||||||
@ -63,7 +85,8 @@ function create_img($imgfile, $imgthumb, $newwidth, $newheight="") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeSize($size) {
|
function makeSize($size)
|
||||||
|
{
|
||||||
$units = array('B','KB','MB','GB','TB');
|
$units = array('B','KB','MB','GB','TB');
|
||||||
$u = 0;
|
$u = 0;
|
||||||
while ((round($size / 1024) > 0) && ($u < 4)) {
|
while ((round($size / 1024) > 0) && ($u < 4)) {
|
||||||
@ -73,7 +96,8 @@ function makeSize($size) {
|
|||||||
return (number_format($size, 0) . " " . $units[$u]);
|
return (number_format($size, 0) . " " . $units[$u]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function foldersize($path) {
|
function foldersize($path)
|
||||||
|
{
|
||||||
$total_size = 0;
|
$total_size = 0;
|
||||||
$files = scandir($path);
|
$files = scandir($path);
|
||||||
$cleanPath = rtrim($path, '/'). '/';
|
$cleanPath = rtrim($path, '/'). '/';
|
||||||
@ -84,8 +108,7 @@ function foldersize($path) {
|
|||||||
if (is_dir($currentFile)) {
|
if (is_dir($currentFile)) {
|
||||||
$size = foldersize($currentFile);
|
$size = foldersize($currentFile);
|
||||||
$total_size += $size;
|
$total_size += $size;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$size = filesize($currentFile);
|
$size = filesize($currentFile);
|
||||||
$total_size += $size;
|
$total_size += $size;
|
||||||
}
|
}
|
||||||
@ -95,20 +118,29 @@ function foldersize($path) {
|
|||||||
return $total_size;
|
return $total_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_folder($path=false,$path_thumbs=false){
|
function create_folder($path=false, $path_thumbs=false)
|
||||||
|
{
|
||||||
$oldumask = umask(0);
|
$oldumask = umask(0);
|
||||||
if ($path && !file_exists($path))
|
if ($path && !file_exists($path)) {
|
||||||
mkdir($path, 0777, true); // or even 01777 so you get the sticky bit set
|
mkdir($path, 0777, true);
|
||||||
if($path_thumbs && !file_exists($path_thumbs))
|
} // or even 01777 so you get the sticky bit set
|
||||||
mkdir($path_thumbs, 0777, true) or die("$path_thumbs cannot be found"); // or even 01777 so you get the sticky bit set
|
if ($path_thumbs && !file_exists($path_thumbs)) {
|
||||||
|
mkdir($path_thumbs, 0777, true) or die("$path_thumbs cannot be found");
|
||||||
|
} // or even 01777 so you get the sticky bit set
|
||||||
umask($oldumask);
|
umask($oldumask);
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_files_extensions_on_path($path,$ext){
|
function check_files_extensions_on_path($path, $ext)
|
||||||
|
{
|
||||||
if (!is_dir($path)) {
|
if (!is_dir($path)) {
|
||||||
$fileinfo = pathinfo($path);
|
$fileinfo = pathinfo($path);
|
||||||
if(!in_array(mb_strtolower($fileinfo['extension']),$ext))
|
if (function_exists('mb_strtolower')) {
|
||||||
|
if (!in_array(mb_strtolower($fileinfo['extension']), $ext)) {
|
||||||
unlink($path);
|
unlink($path);
|
||||||
|
} elseif (!in_array(Tools::strtolower($fileinfo['extension']), $ext)) {
|
||||||
|
unlink($path);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$files = scandir($path);
|
$files = scandir($path);
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
@ -117,32 +149,30 @@ function check_files_extensions_on_path($path,$ext){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_files_extensions_on_phar( $phar, &$files, $basepath, $ext ) {
|
function check_files_extensions_on_phar($phar, &$files, $basepath, $ext)
|
||||||
foreach( $phar as $file )
|
|
||||||
{
|
|
||||||
if( $file->isFile() )
|
|
||||||
{
|
|
||||||
if(in_array(mb_strtolower($file->getExtension()),$ext))
|
|
||||||
{
|
{
|
||||||
|
foreach ($phar as $file) {
|
||||||
|
if ($file->isFile()) {
|
||||||
|
if (function_exists('mb_strtolower')) {
|
||||||
|
if (in_array(mb_strtolower($file->getExtension()), $ext)) {
|
||||||
|
$files[] = $basepath.$file->getFileName();
|
||||||
|
} elseif (in_array(Tools::strtolower($file->getExtension()), $ext)) {
|
||||||
$files[] = $basepath.$file->getFileName();
|
$files[] = $basepath.$file->getFileName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( $file->isDir() )
|
} elseif ($file->isDir()) {
|
||||||
{
|
|
||||||
$iterator = new DirectoryIterator($file);
|
$iterator = new DirectoryIterator($file);
|
||||||
check_files_extensions_on_phar($iterator, $files, $basepath.$file->getFileName().'/', $ext);
|
check_files_extensions_on_phar($iterator, $files, $basepath.$file->getFileName().'/', $ext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function fix_filename($str,$transliteration){
|
function fix_filename($str, $transliteration)
|
||||||
|
{
|
||||||
if ($transliteration) {
|
if ($transliteration) {
|
||||||
if( function_exists( 'transliterator_transliterate' ) )
|
if (function_exists('transliterator_transliterate')) {
|
||||||
{
|
|
||||||
$str = transliterator_transliterate('Accents-Any', $str);
|
$str = transliterator_transliterate('Accents-Any', $str);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$str = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $str);
|
$str = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $str);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,51 +185,59 @@ function fix_filename($str,$transliteration){
|
|||||||
// Empty or incorrectly transliterated filename.
|
// Empty or incorrectly transliterated filename.
|
||||||
// Here is a point: a good file UNKNOWN_LANGUAGE.jpg could become .jpg in previous code.
|
// Here is a point: a good file UNKNOWN_LANGUAGE.jpg could become .jpg in previous code.
|
||||||
// So we add that default 'file' name to fix that issue.
|
// So we add that default 'file' name to fix that issue.
|
||||||
if( strpos( $str, '.' ) === 0 )
|
if (strpos($str, '.') === 0) {
|
||||||
{
|
|
||||||
$str = 'file'.$str;
|
$str = 'file'.$str;
|
||||||
}
|
}
|
||||||
|
|
||||||
return trim($str);
|
return trim($str);
|
||||||
}
|
}
|
||||||
|
|
||||||
function fix_dirname($str){
|
function fix_dirname($str)
|
||||||
|
{
|
||||||
return str_replace('~', ' ', dirname(str_replace(' ', '~', $str)));
|
return str_replace('~', ' ', dirname(str_replace(' ', '~', $str)));
|
||||||
}
|
}
|
||||||
|
|
||||||
function fix_strtoupper($str){
|
function fix_strtoupper($str)
|
||||||
if( function_exists( 'mb_strtoupper' ) )
|
{
|
||||||
|
if (function_exists('mb_strtoupper')) {
|
||||||
return mb_strtoupper($str);
|
return mb_strtoupper($str);
|
||||||
else
|
} else {
|
||||||
return strtoupper($str);
|
return strtoupper($str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function fix_strtolower($str){
|
|
||||||
if( function_exists( 'mb_strtoupper' ) )
|
|
||||||
return mb_strtolower($str);
|
|
||||||
else
|
|
||||||
return strtolower($str);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function fix_path($path,$transliteration){
|
|
||||||
$info=pathinfo($path);
|
function fix_strtolower($str)
|
||||||
if (($s = strrpos($path, '/')) !== false) $s++;
|
|
||||||
if (($e = strrpos($path, '.') - $s) !== strlen($info['filename']))
|
|
||||||
{
|
{
|
||||||
|
if (function_exists('mb_strtoupper')) {
|
||||||
|
return mb_strtolower($str);
|
||||||
|
} else {
|
||||||
|
return strtolower($str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function fix_path($path, $transliteration)
|
||||||
|
{
|
||||||
|
$info=pathinfo($path);
|
||||||
|
if (($s = strrpos($path, '/')) !== false) {
|
||||||
|
$s++;
|
||||||
|
}
|
||||||
|
if (($e = strrpos($path, '.') - $s) !== strlen($info['filename'])) {
|
||||||
$info['filename'] = substr($path, $s, $e);
|
$info['filename'] = substr($path, $s, $e);
|
||||||
$info['basename'] = substr($path, $s);
|
$info['basename'] = substr($path, $s);
|
||||||
}
|
}
|
||||||
$tmp_path = $info['dirname'].DIRECTORY_SEPARATOR.$info['basename'];
|
$tmp_path = $info['dirname'].DIRECTORY_SEPARATOR.$info['basename'];
|
||||||
|
|
||||||
$str=fix_filename($info['filename'], $transliteration);
|
$str=fix_filename($info['filename'], $transliteration);
|
||||||
if($tmp_path!="")
|
if ($tmp_path!="") {
|
||||||
return $tmp_path.DIRECTORY_SEPARATOR.$str;
|
return $tmp_path.DIRECTORY_SEPARATOR.$str;
|
||||||
else
|
} else {
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function base_url(){
|
function base_url()
|
||||||
|
{
|
||||||
return sprintf(
|
return sprintf(
|
||||||
"%s://%s",
|
"%s://%s",
|
||||||
isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http',
|
isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http',
|
||||||
@ -207,7 +245,8 @@ function base_url(){
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function config_loading($current_path,$fld){
|
function config_loading($current_path, $fld)
|
||||||
|
{
|
||||||
if (file_exists($current_path.$fld.".config")) {
|
if (file_exists($current_path.$fld.".config")) {
|
||||||
require_once($current_path.$fld.".config");
|
require_once($current_path.$fld.".config");
|
||||||
return true;
|
return true;
|
||||||
@ -221,7 +260,8 @@ function config_loading($current_path,$fld){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function image_check_memory_usage($img, $max_breedte, $max_hoogte){
|
function image_check_memory_usage($img, $max_breedte, $max_hoogte)
|
||||||
|
{
|
||||||
if (file_exists($img)) {
|
if (file_exists($img)) {
|
||||||
$K64 = 65536; // number of bytes in 64K
|
$K64 = 65536; // number of bytes in 64K
|
||||||
$memory_usage = memory_get_usage();
|
$memory_usage = memory_get_usage();
|
||||||
@ -254,37 +294,50 @@ function endsWith($haystack, $needle)
|
|||||||
return $needle === "" || substr($haystack, -strlen($needle)) === $needle;
|
return $needle === "" || substr($haystack, -strlen($needle)) === $needle;
|
||||||
}
|
}
|
||||||
|
|
||||||
function new_thumbnails_creation($targetPath,$targetFile,$name,$current_path,$relative_image_creation,$relative_path_from_current_pos,$relative_image_creation_name_to_prepend,$relative_image_creation_name_to_append,$relative_image_creation_width,$relative_image_creation_height,$fixed_image_creation,$fixed_path_from_filemanager,$fixed_image_creation_name_to_prepend,$fixed_image_creation_to_append,$fixed_image_creation_width,$fixed_image_creation_height){
|
function new_thumbnails_creation($targetPath, $targetFile, $name, $current_path, $relative_image_creation, $relative_path_from_current_pos, $relative_image_creation_name_to_prepend, $relative_image_creation_name_to_append, $relative_image_creation_width, $relative_image_creation_height, $fixed_image_creation, $fixed_path_from_filemanager, $fixed_image_creation_name_to_prepend, $fixed_image_creation_to_append, $fixed_image_creation_width, $fixed_image_creation_height)
|
||||||
|
{
|
||||||
//create relative thumbs
|
//create relative thumbs
|
||||||
$all_ok=true;
|
$all_ok=true;
|
||||||
if ($relative_image_creation) {
|
if ($relative_image_creation) {
|
||||||
foreach ($relative_path_from_current_pos as $k=>$path) {
|
foreach ($relative_path_from_current_pos as $k=>$path) {
|
||||||
if($path!="" && $path[strlen($path)-1]!="/") $path.="/";
|
if ($path!="" && $path[strlen($path)-1]!="/") {
|
||||||
if (!file_exists($targetPath.$path)) create_folder($targetPath.$path,false);
|
$path.="/";
|
||||||
|
}
|
||||||
|
if (!file_exists($targetPath.$path)) {
|
||||||
|
create_folder($targetPath.$path, false);
|
||||||
|
}
|
||||||
$info=pathinfo($name);
|
$info=pathinfo($name);
|
||||||
if(!endsWith($targetPath,$path))
|
if (!endsWith($targetPath, $path)) {
|
||||||
if(!create_img($targetFile, $targetPath.$path.$relative_image_creation_name_to_prepend[$k].$info['filename'].$relative_image_creation_name_to_append[$k].".".$info['extension'], $relative_image_creation_width[$k], $relative_image_creation_height[$k]))
|
if (!create_img($targetFile, $targetPath.$path.$relative_image_creation_name_to_prepend[$k].$info['filename'].$relative_image_creation_name_to_append[$k].".".$info['extension'], $relative_image_creation_width[$k], $relative_image_creation_height[$k])) {
|
||||||
$all_ok=false;
|
$all_ok=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//create fixed thumbs
|
//create fixed thumbs
|
||||||
if ($fixed_image_creation) {
|
if ($fixed_image_creation) {
|
||||||
foreach ($fixed_path_from_filemanager as $k=>$path) {
|
foreach ($fixed_path_from_filemanager as $k=>$path) {
|
||||||
if($path!="" && $path[strlen($path)-1]!="/") $path.="/";
|
if ($path!="" && $path[strlen($path)-1]!="/") {
|
||||||
|
$path.="/";
|
||||||
|
}
|
||||||
$base_dir=$path.substr_replace($targetPath, '', 0, strlen($current_path));
|
$base_dir=$path.substr_replace($targetPath, '', 0, strlen($current_path));
|
||||||
if (!file_exists($base_dir)) create_folder($base_dir,false);
|
if (!file_exists($base_dir)) {
|
||||||
|
create_folder($base_dir, false);
|
||||||
|
}
|
||||||
$info=pathinfo($name);
|
$info=pathinfo($name);
|
||||||
if(!create_img($targetFile, $base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension'], $fixed_image_creation_width[$k], $fixed_image_creation_height[$k]))
|
if (!create_img($targetFile, $base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension'], $fixed_image_creation_width[$k], $fixed_image_creation_height[$k])) {
|
||||||
$all_ok=false;
|
$all_ok=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $all_ok;
|
return $all_ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Get a remote file, using whichever mechanism is enabled
|
// Get a remote file, using whichever mechanism is enabled
|
||||||
function get_file_by_url($url) {
|
function get_file_by_url($url)
|
||||||
|
{
|
||||||
if (ini_get('allow_url_fopen')) {
|
if (ini_get('allow_url_fopen')) {
|
||||||
return file_get_contents($url);
|
return file_get_contents($url);
|
||||||
}
|
}
|
||||||
@ -303,5 +356,3 @@ function get_file_by_url($url) {
|
|||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
35
adm/filemanager/index.php
Normal file
35
adm/filemanager/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2016 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||||
|
* that is bundled with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://opensource.org/licenses/afl-3.0.php
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@prestashop.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* DISCLAIMER
|
||||||
|
*
|
||||||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||||||
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
|
*
|
||||||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2016 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
35
adm/filemanager/jPlayer/add-on/index.php
Normal file
35
adm/filemanager/jPlayer/add-on/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2016 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||||
|
* that is bundled with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://opensource.org/licenses/afl-3.0.php
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@prestashop.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* DISCLAIMER
|
||||||
|
*
|
||||||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||||||
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
|
*
|
||||||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2016 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
35
adm/filemanager/jPlayer/index.php
Normal file
35
adm/filemanager/jPlayer/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2016 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||||
|
* that is bundled with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://opensource.org/licenses/afl-3.0.php
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@prestashop.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* DISCLAIMER
|
||||||
|
*
|
||||||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||||||
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
|
*
|
||||||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2016 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
35
adm/filemanager/jPlayer/popcorn/index.php
Normal file
35
adm/filemanager/jPlayer/popcorn/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2016 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||||
|
* that is bundled with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://opensource.org/licenses/afl-3.0.php
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@prestashop.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* DISCLAIMER
|
||||||
|
*
|
||||||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||||||
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
|
*
|
||||||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2016 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
35
adm/filemanager/jPlayer/skin/blue.monday/index.php
Normal file
35
adm/filemanager/jPlayer/skin/blue.monday/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2016 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||||
|
* that is bundled with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://opensource.org/licenses/afl-3.0.php
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@prestashop.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* DISCLAIMER
|
||||||
|
*
|
||||||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||||||
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
|
*
|
||||||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2016 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
Binary file not shown.
35
adm/filemanager/jPlayer/skin/index.php
Normal file
35
adm/filemanager/jPlayer/skin/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2016 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||||
|
* that is bundled with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://opensource.org/licenses/afl-3.0.php
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@prestashop.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* DISCLAIMER
|
||||||
|
*
|
||||||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||||||
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
|
*
|
||||||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2016 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
35
adm/filemanager/js/index.php
Normal file
35
adm/filemanager/js/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2016 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||||
|
* that is bundled with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://opensource.org/licenses/afl-3.0.php
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@prestashop.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* DISCLAIMER
|
||||||
|
*
|
||||||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||||||
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
|
*
|
||||||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2016 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
@ -55,4 +55,3 @@ define('lang_Extract','bura çıxart');
|
|||||||
define('lang_File_info', 'fayl məlumatı');
|
define('lang_File_info', 'fayl məlumatı');
|
||||||
define('lang_Edit_image', 'şəkli redaktə et');
|
define('lang_Edit_image', 'şəkli redaktə et');
|
||||||
define('lang_Duplicate', 'Dublikat');
|
define('lang_Duplicate', 'Dublikat');
|
||||||
?>
|
|
||||||
|
@ -55,4 +55,3 @@ define('lang_Extract','extract here');
|
|||||||
define('lang_File_info', 'file info');
|
define('lang_File_info', 'file info');
|
||||||
define('lang_Edit_image', 'edit image');
|
define('lang_Edit_image', 'edit image');
|
||||||
define('lang_Duplicate', 'Duplicate');
|
define('lang_Duplicate', 'Duplicate');
|
||||||
?>
|
|
||||||
|
@ -55,4 +55,3 @@ define('lang_Extract','extract here');
|
|||||||
define('lang_File_info', 'file info');
|
define('lang_File_info', 'file info');
|
||||||
define('lang_Edit_image', 'edit image');
|
define('lang_Edit_image', 'edit image');
|
||||||
define('lang_Duplicate', 'Duplicate');
|
define('lang_Duplicate', 'Duplicate');
|
||||||
?>
|
|
||||||
|
@ -51,4 +51,3 @@ define('lang_OK','OK');
|
|||||||
define('lang_Cancel', 'Zrušit');
|
define('lang_Cancel', 'Zrušit');
|
||||||
define('lang_Sorting', 'řazení');
|
define('lang_Sorting', 'řazení');
|
||||||
define('lang_Duplicate', 'Duplicate');
|
define('lang_Duplicate', 'Duplicate');
|
||||||
?>
|
|
||||||
|
@ -55,4 +55,3 @@ define('lang_Extract','extract here');
|
|||||||
define('lang_File_info', 'file info');
|
define('lang_File_info', 'file info');
|
||||||
define('lang_Edit_image', 'edit image');
|
define('lang_Edit_image', 'edit image');
|
||||||
define('lang_Duplicate', 'Duplicate');
|
define('lang_Duplicate', 'Duplicate');
|
||||||
?>
|
|
||||||
|
@ -55,5 +55,3 @@ define('lang_Extract','extract here');
|
|||||||
define('lang_File_info', 'file info');
|
define('lang_File_info', 'file info');
|
||||||
define('lang_Edit_image', 'edit image');
|
define('lang_Edit_image', 'edit image');
|
||||||
define('lang_Duplicate', 'Duplicate');
|
define('lang_Duplicate', 'Duplicate');
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -55,4 +55,3 @@ define('lang_Extract','Extraer aquí');
|
|||||||
define('lang_File_info', 'Información');
|
define('lang_File_info', 'Información');
|
||||||
define('lang_Edit_image', 'Editar imagen');
|
define('lang_Edit_image', 'Editar imagen');
|
||||||
define('lang_Duplicate', 'Duplicate');
|
define('lang_Duplicate', 'Duplicate');
|
||||||
?>
|
|
||||||
|
@ -55,4 +55,3 @@ define('lang_Extract','استخراج در اینجا');
|
|||||||
define('lang_File_info', 'اطلاعات فایل');
|
define('lang_File_info', 'اطلاعات فایل');
|
||||||
define('lang_Edit_image', 'ویرایش تصویر');
|
define('lang_Edit_image', 'ویرایش تصویر');
|
||||||
define('lang_Duplicate', 'Duplicate');
|
define('lang_Duplicate', 'Duplicate');
|
||||||
?>
|
|
||||||
|
@ -34,11 +34,11 @@ define('lang_Rename_existing_file','Ce fichier existe déjà');
|
|||||||
define('lang_Rename_existing_folder', 'Ce dossier existe déjà');
|
define('lang_Rename_existing_folder', 'Ce dossier existe déjà');
|
||||||
define('lang_Empty_name', 'Le nom est vide');
|
define('lang_Empty_name', 'Le nom est vide');
|
||||||
define('lang_Text_filter', 'texte de filtrage');
|
define('lang_Text_filter', 'texte de filtrage');
|
||||||
define('lang_Swipe_help','Swipe the name of file/folder to show options');
|
define('lang_Swipe_help', 'Glissez le nom du fichier/dossier pour afficher les options');
|
||||||
define('lang_Upload_base','Base upload');
|
define('lang_Upload_base', 'Upload classique');
|
||||||
define('lang_Upload_java','JAVA upload (big size files)');
|
define('lang_Upload_java', 'JAVA upload (fichiers de grandes tailles)');
|
||||||
define('lang_Upload_java_help',"If the Java Applet don't load 1. make sure you have Java installed otherwise <a href='http://java.com/en/download/'>[download link]</a> 2. make sure nothing is blocked from firewall");
|
define('lang_Upload_java_help', "Si l'applet Java Applet ne charge pas 1. Assurez-vous que vous avez bien installé Java <a href='http://java.com/en/download/'>[download link]</a> 2. Assurez-vous que votre pare-feu ne bloque pas la connexion.");
|
||||||
define('lang_Upload_base_help',"Drag & Drop file/s inside above area or click in it (for modern browsers) otherwise select the file and click on button. When the upload end, click on upper return button.");
|
define('lang_Upload_base_help', "Glisser & Déposer le(s) fichier(s) à l'intérieur de la zone ou cliquez dessus (pour les derniers navigateurs), sinon sélectionnez le fichier. Lorsque l'upload est terminé, cliquez sur le bouton revenir.");
|
||||||
define('lang_Type_dir', 'dir');
|
define('lang_Type_dir', 'dir');
|
||||||
define('lang_Type', 'Type');
|
define('lang_Type', 'Type');
|
||||||
define('lang_Dimension', 'Dimension');
|
define('lang_Dimension', 'Dimension');
|
||||||
@ -55,4 +55,3 @@ define('lang_Extract','Extraire ici');
|
|||||||
define('lang_File_info', 'Information');
|
define('lang_File_info', 'Information');
|
||||||
define('lang_Edit_image', 'Editer l\'image');
|
define('lang_Edit_image', 'Editer l\'image');
|
||||||
define('lang_Duplicate', 'Dupliquer');
|
define('lang_Duplicate', 'Dupliquer');
|
||||||
?>
|
|
||||||
|
@ -55,5 +55,3 @@ define('lang_Extract','raspakiraj ovdje');
|
|||||||
define('lang_File_info', 'informacije');
|
define('lang_File_info', 'informacije');
|
||||||
define('lang_Edit_image', 'uredi sliku');
|
define('lang_Edit_image', 'uredi sliku');
|
||||||
define('lang_Duplicate', 'kopiraj');
|
define('lang_Duplicate', 'kopiraj');
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -55,4 +55,3 @@ define('lang_Extract','kibontás ide');
|
|||||||
define('lang_File_info', 'fájl info');
|
define('lang_File_info', 'fájl info');
|
||||||
define('lang_Edit_image', 'kép szerkesztése');
|
define('lang_Edit_image', 'kép szerkesztése');
|
||||||
define('lang_Duplicate', 'Klónozás');
|
define('lang_Duplicate', 'Klónozás');
|
||||||
?>
|
|
||||||
|
@ -55,5 +55,3 @@ define('lang_Extract','extract disini');
|
|||||||
define('lang_File_info', 'info berkas');
|
define('lang_File_info', 'info berkas');
|
||||||
define('lang_Edit_image', 'edit gambar');
|
define('lang_Edit_image', 'edit gambar');
|
||||||
define('lang_Duplicate', 'Duplikat');
|
define('lang_Duplicate', 'Duplikat');
|
||||||
|
|
||||||
?>
|
|
||||||
|
35
adm/filemanager/lang/index.php
Normal file
35
adm/filemanager/lang/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2016 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||||
|
* that is bundled with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://opensource.org/licenses/afl-3.0.php
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@prestashop.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* DISCLAIMER
|
||||||
|
*
|
||||||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||||||
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
|
*
|
||||||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2016 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
@ -55,4 +55,3 @@ define('lang_Extract','estrai qui');
|
|||||||
define('lang_File_info', 'informazioni file');
|
define('lang_File_info', 'informazioni file');
|
||||||
define('lang_Edit_image', 'modifica immagine');
|
define('lang_Edit_image', 'modifica immagine');
|
||||||
define('lang_Duplicate', 'Duplica');
|
define('lang_Duplicate', 'Duplica');
|
||||||
?>
|
|
||||||
|
@ -55,5 +55,3 @@ define('lang_Extract','энд задла');
|
|||||||
define('lang_File_info', 'файлын мэдээлэл');
|
define('lang_File_info', 'файлын мэдээлэл');
|
||||||
define('lang_Edit_image', 'зураг засварлах');
|
define('lang_Edit_image', 'зураг засварлах');
|
||||||
define('lang_Duplicate', 'Давхардуулах');
|
define('lang_Duplicate', 'Давхардуулах');
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -55,5 +55,3 @@ define('lang_Extract','extract here');
|
|||||||
define('lang_File_info', 'Fil-info');
|
define('lang_File_info', 'Fil-info');
|
||||||
define('lang_Edit_image', 'Rediger bilde');
|
define('lang_Edit_image', 'Rediger bilde');
|
||||||
define('lang_Duplicate', 'Duplicate');
|
define('lang_Duplicate', 'Duplicate');
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -55,4 +55,3 @@ define('lang_Extract','hier uitpakken');
|
|||||||
define('lang_File_info', 'bestands-info');
|
define('lang_File_info', 'bestands-info');
|
||||||
define('lang_Edit_image', 'afbeelding bewerken');
|
define('lang_Edit_image', 'afbeelding bewerken');
|
||||||
define('lang_Duplicate', 'Duplicate');
|
define('lang_Duplicate', 'Duplicate');
|
||||||
?>
|
|
||||||
|
@ -55,4 +55,3 @@ define('lang_Extract','extract here');
|
|||||||
define('lang_File_info', 'file info');
|
define('lang_File_info', 'file info');
|
||||||
define('lang_Edit_image', 'edit image');
|
define('lang_Edit_image', 'edit image');
|
||||||
define('lang_Duplicate', 'Duplicate');
|
define('lang_Duplicate', 'Duplicate');
|
||||||
?>
|
|
@ -55,4 +55,3 @@ define('lang_Extract','extract here');
|
|||||||
define('lang_File_info', 'file info');
|
define('lang_File_info', 'file info');
|
||||||
define('lang_Edit_image', 'edit image');
|
define('lang_Edit_image', 'edit image');
|
||||||
define('lang_Duplicate', 'Duplicate');
|
define('lang_Duplicate', 'Duplicate');
|
||||||
?>
|
|
||||||
|
@ -55,4 +55,3 @@ define('lang_Extract','Распаковать здесь');
|
|||||||
define('lang_File_info', 'Свойства файла');
|
define('lang_File_info', 'Свойства файла');
|
||||||
define('lang_Edit_image', 'Редактировать');
|
define('lang_Edit_image', 'Редактировать');
|
||||||
define('lang_Duplicate', 'Duplicate');
|
define('lang_Duplicate', 'Duplicate');
|
||||||
?>
|
|
||||||
|
@ -55,5 +55,3 @@ define('lang_Extract','packa upp här'); // extract here
|
|||||||
define('lang_File_info', 'fil information'); // file info
|
define('lang_File_info', 'fil information'); // file info
|
||||||
define('lang_Edit_image', 'editera bild'); // edit image
|
define('lang_Edit_image', 'editera bild'); // edit image
|
||||||
define('lang_Duplicate', 'Duplicera'); // Duplicate
|
define('lang_Duplicate', 'Duplicera'); // Duplicate
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -13,14 +13,14 @@ define('lang_Upload_file','Súbor');
|
|||||||
define('lang_Filters', 'Filtrovať');
|
define('lang_Filters', 'Filtrovať');
|
||||||
define('lang_Videos', 'Videá');
|
define('lang_Videos', 'Videá');
|
||||||
define('lang_Music', 'Hudba');
|
define('lang_Music', 'Hudba');
|
||||||
define('lang_New_Folder','Adresár');
|
define('lang_New_Folder', 'Priečinok');
|
||||||
define('lang_Folder_Created','Adresár bol vytvorený');
|
define('lang_Folder_Created', 'Priečinok bol vytvorený');
|
||||||
define('lang_Existing_Folder','Adresár už existuje');
|
define('lang_Existing_Folder', 'Priečinok už existuje');
|
||||||
define('lang_Confirm_Folder_del','Naozaj chcete vymazať adresár a odstrániť tak všetky súbory v ňom?');
|
define('lang_Confirm_Folder_del', 'Naozaj chcete vymazať priečinok a odstrániť tak všetky súbory v ňom?');
|
||||||
define('lang_Return_Files_List', 'Späť na zoznam súborov');
|
define('lang_Return_Files_List', 'Späť na zoznam súborov');
|
||||||
define('lang_Preview', 'Náhľad');
|
define('lang_Preview', 'Náhľad');
|
||||||
define('lang_Download','Stiahnuť');
|
define('lang_Download', 'Prevziať');
|
||||||
define('lang_Insert_Folder_Name','Názov adresára:');
|
define('lang_Insert_Folder_Name', 'Názov priečinku:');
|
||||||
define('lang_Root', 'root');
|
define('lang_Root', 'root');
|
||||||
define('lang_Rename', 'Premenovať');
|
define('lang_Rename', 'Premenovať');
|
||||||
define('lang_Back', 'späť');
|
define('lang_Back', 'späť');
|
||||||
@ -31,13 +31,13 @@ define('lang_View_boxes','Ikony');
|
|||||||
define('lang_Toolbar', 'Nástroje');
|
define('lang_Toolbar', 'Nástroje');
|
||||||
define('lang_Actions', 'Pridať');
|
define('lang_Actions', 'Pridať');
|
||||||
define('lang_Rename_existing_file', 'Súbor už existuje');
|
define('lang_Rename_existing_file', 'Súbor už existuje');
|
||||||
define('lang_Rename_existing_folder','Adresár už existuje');
|
define('lang_Rename_existing_folder', 'Priečinok už existuje');
|
||||||
define('lang_Empty_name', 'Názov je prázdny');
|
define('lang_Empty_name', 'Názov je prázdny');
|
||||||
define('lang_Text_filter', 'Vyhľadať');
|
define('lang_Text_filter', 'Vyhľadať');
|
||||||
define('lang_Swipe_help','Pre viac možností prejdite myšou na súboru/adresár');
|
define('lang_Swipe_help', 'Pre viac možností prejdite myšou na súboru/priečinok');
|
||||||
define('lang_Upload_base', 'Klasické nahratie súborov');
|
define('lang_Upload_base', 'Klasické nahratie súborov');
|
||||||
define('lang_Upload_java', 'Nahrať súbory cez JAVA (veľké súbory)');
|
define('lang_Upload_java', 'Nahrať súbory cez JAVA (veľké súbory)');
|
||||||
define('lang_Upload_java_help',"Ak sa vám nezobrazí Java Applet, 1. uistite sa, že máte nainštalovanú Java, (<a href='http://java.com/en/download/'>[stiahnuť]</a>) 2. uistite sa, že nie je zablokovaná cez Firewall");
|
define('lang_Upload_java_help', "Ak sa vám nezobrazí Java Applet, 1. uistite sa, že máte nainštalovanú Javu, (<a href='http://java.com/en/download/'>[prevziať]</a>) 2. uistite sa, že nie je zablokovaná cez Firewall");
|
||||||
define('lang_Upload_base_help', "Myšou presuňte súbory alebo kliknite na určenú plochu a vyberte súbory. Keď je nahrávanie dokončené, kliknite na tlačidlo 'Späť na zoznam súborov'.");
|
define('lang_Upload_base_help', "Myšou presuňte súbory alebo kliknite na určenú plochu a vyberte súbory. Keď je nahrávanie dokončené, kliknite na tlačidlo 'Späť na zoznam súborov'.");
|
||||||
define('lang_Type_dir', 'dir');
|
define('lang_Type_dir', 'dir');
|
||||||
define('lang_Type', 'Typ');
|
define('lang_Type', 'Typ');
|
||||||
@ -50,10 +50,8 @@ define('lang_Date_type','d.m.Y');
|
|||||||
define('lang_OK', 'OK');
|
define('lang_OK', 'OK');
|
||||||
define('lang_Cancel', 'Zrušiť');
|
define('lang_Cancel', 'Zrušiť');
|
||||||
define('lang_Sorting', 'Zoradiť');
|
define('lang_Sorting', 'Zoradiť');
|
||||||
define('lang_Show_url','Zobratiť URL');
|
define('lang_Show_url', 'Zobraziť URL');
|
||||||
define('lang_Extract', 'Rozbaliť sem');
|
define('lang_Extract', 'Rozbaliť sem');
|
||||||
define('lang_File_info', 'Informácie o súbore');
|
define('lang_File_info', 'Informácie o súbore');
|
||||||
define('lang_Edit_image', 'Upraviť obrázok');
|
define('lang_Edit_image', 'Upraviť obrázok');
|
||||||
define('lang_Duplicate','Duplicate');
|
define('lang_Duplicate', 'Duplikovať');
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -55,4 +55,3 @@ define('lang_Extract','buraya çıkart');
|
|||||||
define('lang_File_info', 'dosya bilgisi');
|
define('lang_File_info', 'dosya bilgisi');
|
||||||
define('lang_Edit_image', 'resmi düzenle');
|
define('lang_Edit_image', 'resmi düzenle');
|
||||||
define('lang_Duplicate', 'Çoğalt');
|
define('lang_Duplicate', 'Çoğalt');
|
||||||
?>
|
|
@ -55,4 +55,3 @@ define('lang_Extract','extract here');
|
|||||||
define('lang_File_info', 'file info');
|
define('lang_File_info', 'file info');
|
||||||
define('lang_Edit_image', 'edit image');
|
define('lang_Edit_image', 'edit image');
|
||||||
define('lang_Duplicate', 'Duplicate');
|
define('lang_Duplicate', 'Duplicate');
|
||||||
?>
|
|
||||||
|
2
adm/filemanager/plugin.min.js
vendored
2
adm/filemanager/plugin.min.js
vendored
@ -6,4 +6,4 @@
|
|||||||
*
|
*
|
||||||
* Contributing: https://github.com/trippo/ResponsiveFilemanager
|
* Contributing: https://github.com/trippo/ResponsiveFilemanager
|
||||||
*/
|
*/
|
||||||
tinymce.PluginManager.add("filemanager",function(e){function t(t,n,r,i){urltype=2;if(r=="image"){urltype=1}if(r=="media"){urltype=3}var s="RESPONSIVE FileManager";if(typeof e.settings.filemanager_title!=="undefined"&&e.settings.filemanager_title)s=e.settings.filemanager_title;var o="";var u="false";if(typeof e.settings.filemanager_sort_by!=="undefined"&&e.settings.filemanager_sort_by)o=e.settings.filemanager_sort_by;if(typeof e.settings.filemanager_descending!=="undefined"&&e.settings.filemanager_descending)u=e.settings.filemanager_descending;tinymce.activeEditor.windowManager.open({title:s,file:e.settings.external_filemanager_path+"dialog.php?type="+urltype+"&descending="+u+"&sort_by="+o+"&lang="+e.settings.language,width:860,height:570,resizable:true,maximizable:true,inline:1},{setUrl:function(n){var r=i.document.getElementById(t);r.value=e.convertURL(n);if("fireEvent"in r){r.fireEvent("onchange")}else{var s=document.createEvent("HTMLEvents");s.initEvent("change",false,true);r.dispatchEvent(s)}}})}tinymce.activeEditor.settings.file_browser_callback=t;return false})
|
tinymce.PluginManager.add("filemanager",function(e){function t(t,n,r,i){urltype=2;if(r=="image"){urltype=1}if(r=="media"){urltype=3}var s="RESPONSIVE FileManager";if(typeof e.settings.filemanager_title!=="undefined"&&e.settings.filemanager_title)s=e.settings.filemanager_title;var o="";var u="false";if(typeof e.settings.filemanager_sort_by!=="undefined"&&e.settings.filemanager_sort_by)o=e.settings.filemanager_sort_by;if(typeof e.settings.filemanager_descending!=="undefined"&&e.settings.filemanager_descending)u=e.settings.filemanager_descending;tinymce.activeEditor.windowManager.open({title:s,file:e.settings.external_filemanager_path.replace(/\/\/filemanager/, '\/filemanager')+"dialog.php?type="+urltype+"&descending="+u+"&sort_by="+o+"&lang="+e.settings.language,width:860,height:570,resizable:true,maximizable:true,inline:1},{setUrl:function(n){var r=i.document.getElementById(t);r.value=e.convertURL(n);if("fireEvent"in r){r.fireEvent("onchange")}else{var s=document.createEvent("HTMLEvents");s.initEvent("change",false,true);r.dispatchEvent(s)}}})}tinymce.activeEditor.settings.file_browser_callback=t;return false})
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
include('config/config.php');
|
include('config/config.php');
|
||||||
if ($_SESSION['verify'] != 'RESPONSIVEfilemanager') die('forbiden');
|
if ($_SESSION['verify'] != 'RESPONSIVEfilemanager') {
|
||||||
|
die('forbiden');
|
||||||
|
}
|
||||||
include('include/utils.php');
|
include('include/utils.php');
|
||||||
|
|
||||||
$_POST['path'] = $current_path.$_POST['path'];
|
$_POST['path'] = $current_path.str_replace('\0', '', $_POST['path']);
|
||||||
$_POST['path_thumb'] = $thumbs_base_path.$_POST['path_thumb'];
|
$_POST['path_thumb'] = $thumbs_base_path.str_replace("\0", '', $_POST['path_thumb']);
|
||||||
|
|
||||||
$storeFolder = $_POST['path'];
|
$storeFolder = $_POST['path'];
|
||||||
$storeFolderThumb = $_POST['path_thumb'];
|
$storeFolderThumb = $_POST['path_thumb'];
|
||||||
@ -14,30 +16,29 @@ $thumb_pos = strpos($_POST['path_thumb'], $thumbs_base_path);
|
|||||||
|
|
||||||
if ($path_pos === false || $thumb_pos === false
|
if ($path_pos === false || $thumb_pos === false
|
||||||
|| preg_match('/\.{1,2}[\/|\\\]/', $_POST['path_thumb']) !== 0
|
|| preg_match('/\.{1,2}[\/|\\\]/', $_POST['path_thumb']) !== 0
|
||||||
|| preg_match('/\.{1,2}[\/|\\\]/', $_POST['path']) !== 0)
|
|| preg_match('/\.{1,2}[\/|\\\]/', $_POST['path']) !== 0) {
|
||||||
die('wrong path');
|
die('wrong path');
|
||||||
|
}
|
||||||
|
|
||||||
$path = $storeFolder;
|
$path = $storeFolder;
|
||||||
$cycle = true;
|
$cycle = true;
|
||||||
$max_cycles = 50;
|
$max_cycles = 50;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($cycle && $i < $max_cycles)
|
while ($cycle && $i < $max_cycles) {
|
||||||
{
|
|
||||||
$i++;
|
$i++;
|
||||||
if ($path == $current_path) $cycle = false;
|
if ($path == $current_path) {
|
||||||
if (file_exists($path.'config.php'))
|
$cycle = false;
|
||||||
{
|
}
|
||||||
|
if (file_exists($path.'config.php')) {
|
||||||
require_once($path.'config.php');
|
require_once($path.'config.php');
|
||||||
$cycle = false;
|
$cycle = false;
|
||||||
}
|
}
|
||||||
$path = fix_dirname($path).'/';
|
$path = fix_dirname($path).'/';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_FILES))
|
if (!empty($_FILES)) {
|
||||||
{
|
|
||||||
$info = pathinfo($_FILES['file']['name']);
|
$info = pathinfo($_FILES['file']['name']);
|
||||||
if (isset($info['extension']) && in_array(fix_strtolower($info['extension']), $ext))
|
if (isset($info['extension']) && in_array(fix_strtolower($info['extension']), $ext)) {
|
||||||
{
|
|
||||||
$tempFile = $_FILES['file']['tmp_name'];
|
$tempFile = $_FILES['file']['tmp_name'];
|
||||||
|
|
||||||
$targetPath = $storeFolder;
|
$targetPath = $storeFolder;
|
||||||
@ -48,12 +49,10 @@ if (!empty($_FILES))
|
|||||||
array_pop($file_name_splitted);
|
array_pop($file_name_splitted);
|
||||||
$_FILES['file']['name'] = implode('-', $file_name_splitted).'.'.$info['extension'];
|
$_FILES['file']['name'] = implode('-', $file_name_splitted).'.'.$info['extension'];
|
||||||
|
|
||||||
if (file_exists($targetPath.$_FILES['file']['name']))
|
if (file_exists($targetPath.$_FILES['file']['name'])) {
|
||||||
{
|
|
||||||
$i = 1;
|
$i = 1;
|
||||||
$info = pathinfo($_FILES['file']['name']);
|
$info = pathinfo($_FILES['file']['name']);
|
||||||
while (file_exists($targetPath.$info['filename'].'_'.$i.'.'.$info['extension']))
|
while (file_exists($targetPath.$info['filename'].'_'.$i.'.'.$info['extension'])) {
|
||||||
{
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$_FILES['file']['name'] = $info['filename'].'_'.$i.'.'.$info['extension'];
|
$_FILES['file']['name'] = $info['filename'].'_'.$i.'.'.$info['extension'];
|
||||||
@ -61,98 +60,78 @@ if (!empty($_FILES))
|
|||||||
$targetFile = $targetPath.$_FILES['file']['name'];
|
$targetFile = $targetPath.$_FILES['file']['name'];
|
||||||
$targetFileThumb = $targetPathThumb.$_FILES['file']['name'];
|
$targetFileThumb = $targetPathThumb.$_FILES['file']['name'];
|
||||||
|
|
||||||
/************ FIX UPLOAD NO-IMAGE FILES **************/
|
if (in_array(fix_strtolower($info['extension']), $ext_img) && @getimagesize($tempFile) != false) {
|
||||||
if (in_array(fix_strtolower($info['extension']), $ext_img) && @getimagesize($tempFile) != false)
|
|
||||||
$is_img = true;
|
$is_img = true;
|
||||||
elseif (in_array(fix_strtolower($info['extension']), $ext_file))
|
} else {
|
||||||
{
|
|
||||||
$is_img = false;
|
$is_img = false;
|
||||||
$is_file = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$is_img = false;
|
|
||||||
$is_file = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($is_file) {
|
if ($is_img) {
|
||||||
move_uploaded_file($tempFile, $targetFile);
|
|
||||||
chmod($targetFile, 0755);
|
|
||||||
$memory_error = false;
|
|
||||||
}
|
|
||||||
elseif ($is_img)
|
|
||||||
/******************* END FIX **********************/
|
|
||||||
{
|
|
||||||
move_uploaded_file($tempFile, $targetFile);
|
move_uploaded_file($tempFile, $targetFile);
|
||||||
chmod($targetFile, 0755);
|
chmod($targetFile, 0755);
|
||||||
|
|
||||||
$memory_error = false;
|
$memory_error = false;
|
||||||
if (!create_img_gd($targetFile, $targetFileThumb, 122, 91))
|
if (!create_img_gd($targetFile, $targetFileThumb, 122, 91)) {
|
||||||
$memory_error = false;
|
$memory_error = false;
|
||||||
else
|
} else {
|
||||||
{
|
if (!new_thumbnails_creation($targetPath, $targetFile, $_FILES['file']['name'], $current_path, $relative_image_creation, $relative_path_from_current_pos, $relative_image_creation_name_to_prepend, $relative_image_creation_name_to_append, $relative_image_creation_width, $relative_image_creation_height, $fixed_image_creation, $fixed_path_from_filemanager, $fixed_image_creation_name_to_prepend, $fixed_image_creation_to_append, $fixed_image_creation_width, $fixed_image_creation_height)) {
|
||||||
if (!new_thumbnails_creation($targetPath, $targetFile, $_FILES['file']['name'], $current_path, $relative_image_creation, $relative_path_from_current_pos, $relative_image_creation_name_to_prepend, $relative_image_creation_name_to_append, $relative_image_creation_width, $relative_image_creation_height, $fixed_image_creation, $fixed_path_from_filemanager, $fixed_image_creation_name_to_prepend, $fixed_image_creation_to_append, $fixed_image_creation_width, $fixed_image_creation_height))
|
|
||||||
$memory_error = false;
|
$memory_error = false;
|
||||||
else
|
} else {
|
||||||
{
|
|
||||||
$imginfo = getimagesize($targetFile);
|
$imginfo = getimagesize($targetFile);
|
||||||
$srcWidth = $imginfo[0];
|
$srcWidth = $imginfo[0];
|
||||||
$srcHeight = $imginfo[1];
|
$srcHeight = $imginfo[1];
|
||||||
|
|
||||||
if ($image_resizing)
|
if ($image_resizing) {
|
||||||
{
|
if ($image_resizing_width == 0) {
|
||||||
if ($image_resizing_width == 0)
|
if ($image_resizing_height == 0) {
|
||||||
{
|
|
||||||
if ($image_resizing_height == 0)
|
|
||||||
{
|
|
||||||
$image_resizing_width = $srcWidth;
|
$image_resizing_width = $srcWidth;
|
||||||
$image_resizing_height = $srcHeight;
|
$image_resizing_height = $srcHeight;
|
||||||
} else
|
} else {
|
||||||
$image_resizing_width = $image_resizing_height * $srcWidth / $srcHeight;
|
$image_resizing_width = $image_resizing_height * $srcWidth / $srcHeight;
|
||||||
} elseif ($image_resizing_height == 0)
|
}
|
||||||
|
} elseif ($image_resizing_height == 0) {
|
||||||
$image_resizing_height = $image_resizing_width * $srcHeight / $srcWidth;
|
$image_resizing_height = $image_resizing_width * $srcHeight / $srcWidth;
|
||||||
|
}
|
||||||
$srcWidth = $image_resizing_width;
|
$srcWidth = $image_resizing_width;
|
||||||
$srcHeight = $image_resizing_height;
|
$srcHeight = $image_resizing_height;
|
||||||
create_img_gd($targetFile, $targetFile, $image_resizing_width, $image_resizing_height);
|
create_img_gd($targetFile, $targetFile, $image_resizing_width, $image_resizing_height);
|
||||||
}
|
}
|
||||||
//max resizing limit control
|
//max resizing limit control
|
||||||
$resize = false;
|
$resize = false;
|
||||||
if ($image_max_width != 0 && $srcWidth > $image_max_width)
|
if ($image_max_width != 0 && $srcWidth > $image_max_width) {
|
||||||
{
|
|
||||||
$resize = true;
|
$resize = true;
|
||||||
$srcHeight = $image_max_width * $srcHeight / $srcWidth;
|
$srcHeight = $image_max_width * $srcHeight / $srcWidth;
|
||||||
$srcWidth = $image_max_width;
|
$srcWidth = $image_max_width;
|
||||||
}
|
}
|
||||||
if ($image_max_height != 0 && $srcHeight > $image_max_height)
|
if ($image_max_height != 0 && $srcHeight > $image_max_height) {
|
||||||
{
|
|
||||||
$resize = true;
|
$resize = true;
|
||||||
$srcWidth = $image_max_height * $srcWidth / $srcHeight;
|
$srcWidth = $image_max_height * $srcWidth / $srcHeight;
|
||||||
$srcHeight = $image_max_height;
|
$srcHeight = $image_max_height;
|
||||||
}
|
}
|
||||||
if ($resize)
|
if ($resize) {
|
||||||
create_img_gd($targetFile, $targetFile, $srcWidth, $srcHeight);
|
create_img_gd($targetFile, $targetFile, $srcWidth, $srcHeight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($memory_error)
|
}
|
||||||
{
|
if ($memory_error) {
|
||||||
//error
|
//error
|
||||||
unlink($targetFile);
|
unlink($targetFile);
|
||||||
header('HTTP/1.1 406 Not enought Memory', true, 406);
|
header('HTTP/1.1 406 Not enought Memory', true, 406);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
move_uploaded_file($tempFile, $targetFile);
|
||||||
|
chmod($targetFile, 0755);
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
header('HTTP/1.1 406 file not permitted', true, 406);
|
header('HTTP/1.1 406 file not permitted', true, 406);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
header('HTTP/1.1 405 Bad Request', true, 405);
|
header('HTTP/1.1 405 Bad Request', true, 405);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if (isset($_POST['submit']))
|
if (isset($_POST['submit'])) {
|
||||||
{
|
|
||||||
$query = http_build_query(
|
$query = http_build_query(
|
||||||
array(
|
array(
|
||||||
'type' => $_POST['type'],
|
'type' => $_POST['type'],
|
||||||
@ -164,5 +143,3 @@ if (isset($_POST['submit']))
|
|||||||
);
|
);
|
||||||
header('location: dialog.php?'.$query);
|
header('location: dialog.php?'.$query);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
35
adm/filemanager/uploader/index.php
Normal file
35
adm/filemanager/uploader/index.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2016 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||||
|
* that is bundled with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://opensource.org/licenses/afl-3.0.php
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@prestashop.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* DISCLAIMER
|
||||||
|
*
|
||||||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||||||
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
|
*
|
||||||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2016 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Location: ../");
|
||||||
|
exit;
|
Loading…
Reference in New Issue
Block a user