update prestashop

This commit is contained in:
Thibault GUILLAUME 2015-09-22 18:22:11 +02:00
parent 8afc4c86c0
commit 74b8829296
863 changed files with 147188 additions and 130112 deletions

View File

@ -26,25 +26,25 @@
class Adapter_AddressFactory class Adapter_AddressFactory
{ {
/** /**
* Initilize an address corresponding to the specified id address or if empty to the * Initilize an address corresponding to the specified id address or if empty to the
* default shop configuration * default shop configuration
* @param null $id_address * @param null $id_address
* @param bool $with_geoloc * @param bool $with_geoloc
* @return Address * @return Address
*/ */
public function findOrCreate($id_address = null, $with_geoloc = false) public function findOrCreate($id_address = null, $with_geoloc = false)
{ {
$func_args = func_get_args(); $func_args = func_get_args();
return call_user_func_array(array('Address', 'initialize'), $func_args); return call_user_func_array(array('Address', 'initialize'), $func_args);
} }
/** /**
* Check if an address exists depending on given $id_address * Check if an address exists depending on given $id_address
* @param $id_address * @param $id_address
* @return bool * @return bool
*/ */
public function addressExists($id_address) public function addressExists($id_address)
{ {
return Address::addressExists($id_address); return Address::addressExists($id_address);
} }

View File

@ -0,0 +1,38 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class Adapter_CacheManager
{
/**
* Cleans the cache for specific cache key.
*
* @param $key
*/
public function clean($key)
{
Cache::clean($key);
}
}

View File

@ -26,14 +26,13 @@
class Adapter_Configuration implements Core_Business_ConfigurationInterface class Adapter_Configuration implements Core_Business_ConfigurationInterface
{ {
/**
/** * Returns constant defined by given $key if exists or check directly into PrestaShop
* Returns constant defined by given $key if exists or check directly into PrestaShop * Configuration
* Configuration * @param $key
* @param $key * @return mixed
* @return mixed */
*/ public function get($key)
public function get($key)
{ {
if (defined($key)) { if (defined($key)) {
return constant($key); return constant($key);

View File

@ -26,23 +26,23 @@
class Adapter_Database implements Core_Foundation_Database_DatabaseInterface class Adapter_Database implements Core_Foundation_Database_DatabaseInterface
{ {
/** /**
* Perform a SELECT sql statement * Perform a SELECT sql statement
* @param $sqlString * @param $sqlString
* @return array|false * @return array|false
* @throws PrestaShopDatabaseException * @throws PrestaShopDatabaseException
*/ */
public function select($sqlString) public function select($sqlString)
{ {
return Db::getInstance()->executeS($sqlString); return Db::getInstance()->executeS($sqlString);
} }
/** /**
* Escape $unsafe to be used into a SQL statement * Escape $unsafe to be used into a SQL statement
* @param $unsafeData * @param $unsafeData
* @return string * @return string
*/ */
public function escape($unsafeData) public function escape($unsafeData)
{ {
// Prepare required params // Prepare required params
$html_ok = true; $html_ok = true;

View File

@ -24,84 +24,81 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
class Adapter_EntityMapper { class Adapter_EntityMapper
{
/**
* Load ObjectModel
* @param $id
* @param $id_lang
* @param $entity ObjectModel
* @param $entity_defs
* @param $id_shop
* @param $should_cache_objects
* @throws PrestaShopDatabaseException
*/
public function load($id, $id_lang, $entity, $entity_defs, $id_shop, $should_cache_objects)
{
// Load object from database if object id is present
$cache_id = 'objectmodel_' . $entity_defs['classname'] . '_' . (int)$id . '_' . (int)$id_shop . '_' . (int)$id_lang;
if (!$should_cache_objects || !Cache::isStored($cache_id)) {
$sql = new DbQuery();
$sql->from($entity_defs['table'], 'a');
$sql->where('a.`' . bqSQL($entity_defs['primary']) . '` = ' . (int)$id);
/** // Get lang informations
* Load ObjectModel if ($id_lang && isset($entity_defs['multilang']) && $entity_defs['multilang']) {
* @param $id $sql->leftJoin($entity_defs['table'] . '_lang', 'b', 'a.`' . bqSQL($entity_defs['primary']) . '` = b.`' . bqSQL($entity_defs['primary']) . '` AND b.`id_lang` = ' . (int)$id_lang);
* @param $id_lang if ($id_shop && !empty($entity_defs['multilang_shop'])) {
* @param $entity ObjectModel $sql->where('b.`id_shop` = ' . (int)$id_shop);
* @param $entity_defs }
* @param $id_shop }
* @param $should_cache_objects
* @throws PrestaShopDatabaseException
*/
public function load($id, $id_lang, $entity, $entity_defs, $id_shop, $should_cache_objects)
{
// Load object from database if object id is present
$cache_id = 'objectmodel_' . $entity_defs['classname'] . '_' . (int)$id . '_' . (int)$id_shop . '_' . (int)$id_lang;
if (!$should_cache_objects || !Cache::isStored($cache_id)) {
$sql = new DbQuery();
$sql->from($entity_defs['table'], 'a');
$sql->where('a.`' . bqSQL($entity_defs['primary']) . '` = ' . (int)$id);
// Get lang informations // Get shop informations
if ($id_lang && isset($entity_defs['multilang']) && $entity_defs['multilang']) { if (Shop::isTableAssociated($entity_defs['table'])) {
$sql->leftJoin($entity_defs['table'] . '_shop', 'c', 'a.`' . bqSQL($entity_defs['primary']) . '` = c.`' . bqSQL($entity_defs['primary']) . '` AND c.`id_shop` = ' . (int)$id_shop);
}
$sql->leftJoin($entity_defs['table'] . '_lang', 'b', 'a.`' . bqSQL($entity_defs['primary']) . '` = b.`' . bqSQL($entity_defs['primary']) . '` AND b.`id_lang` = ' . (int)$id_lang); if ($object_datas = Db::getInstance()->getRow($sql)) {
if ($id_shop && !empty($entity_defs['multilang_shop'])) { if (!$id_lang && isset($entity_defs['multilang']) && $entity_defs['multilang']) {
$sql->where('b.`id_shop` = ' . (int)$id_shop); $sql = 'SELECT *
}
}
// Get shop informations
if (Shop::isTableAssociated($entity_defs['table'])) {
$sql->leftJoin($entity_defs['table'] . '_shop', 'c', 'a.`' . bqSQL($entity_defs['primary']) . '` = c.`' . bqSQL($entity_defs['primary']) . '` AND c.`id_shop` = ' . (int)$id_shop);
}
if ($object_datas = Db::getInstance()->getRow($sql)) {
if (!$id_lang && isset($entity_defs['multilang']) && $entity_defs['multilang']) {
$sql = 'SELECT *
FROM `' . bqSQL(_DB_PREFIX_ . $entity_defs['table']) . '_lang` FROM `' . bqSQL(_DB_PREFIX_ . $entity_defs['table']) . '_lang`
WHERE `' . bqSQL($entity_defs['primary']) . '` = ' . (int)$id WHERE `' . bqSQL($entity_defs['primary']) . '` = ' . (int)$id
.(($id_shop && $entity->isLangMultishop()) ? ' AND `id_shop` = ' . (int)$id_shop : ''); .(($id_shop && $entity->isLangMultishop()) ? ' AND `id_shop` = ' . (int)$id_shop : '');
if ($object_datas_lang = Db::getInstance()->executeS($sql)) { if ($object_datas_lang = Db::getInstance()->executeS($sql)) {
foreach ($object_datas_lang as $row) {
foreach ($object_datas_lang as $row) { foreach ($row as $key => $value) {
foreach ($row as $key => $value) { if ($key != $entity_defs['primary'] && array_key_exists($key, $entity)) {
if ($key != $entity_defs['primary'] && array_key_exists($key, $entity)) { if (!isset($object_datas[$key]) || !is_array($object_datas[$key])) {
if (!isset($object_datas[$key]) || !is_array($object_datas[$key])) $object_datas[$key] = array();
$object_datas[$key] = array(); }
$object_datas[$key][$row['id_lang']] = $value;
}
}
}
}
}
$entity->id = (int)$id;
foreach ($object_datas as $key => $value) {
if (array_key_exists($key, $entity)) {
$entity->{$key} = $value;
} else {
unset($object_datas[$key]);
}
}
if ($should_cache_objects) {
Cache::store($cache_id, $object_datas);
}
}
} else {
$object_datas = Cache::retrieve($cache_id);
if ($object_datas) {
$entity->id = (int)$id;
foreach ($object_datas as $key => $value) {
$entity->{$key} = $value;
}
}
}
}
$object_datas[$key][$row['id_lang']] = $value;
}
}
}
}
}
$entity->id = (int)$id;
foreach ($object_datas as $key => $value) {
if (array_key_exists($key, $entity)) {
$entity->{$key} = $value;
} else {
unset($object_datas[$key]);
}
}
if ($should_cache_objects) {
Cache::store($cache_id, $object_datas);
}
}
} else {
$object_datas = Cache::retrieve($cache_id);
if ($object_datas) {
$entity->id = (int)$id;
foreach ($object_datas as $key => $value) {
$entity->{$key} = $value;
}
}
}
}
} }

View File

@ -26,4 +26,4 @@
class Adapter_Exception extends Core_Foundation_Exception_Exception class Adapter_Exception extends Core_Foundation_Exception_Exception
{ {
} }

View File

@ -0,0 +1,54 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class Adapter_HookManager
{
/**
* Execute modules for specified hook
*
* @param string $hook_name Hook Name
* @param array $hook_args Parameters for the functions
* @param int $id_module Execute hook for this module only
* @param bool $array_return If specified, module output will be set by name in an array
* @param bool $check_exceptions Check permission exceptions
* @param bool $use_push Force change to be refreshed on Dashboard widgets
* @param int $id_shop If specified, hook will be execute the shop with this ID
*
* @throws PrestaShopException
*
* @return string/array modules output
*/
public function exec($hook_name,
$hook_args = array(),
$id_module = null,
$array_return = false,
$check_exceptions = true,
$use_push = false,
$id_shop = null)
{
return Hook::exec($hook_name, $hook_args, $id_module, $array_return, $check_exceptions, $use_push, $id_shop);
}
}

View File

@ -0,0 +1,87 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class Adapter_PackItemsManager
{
/**
* Get the Products contained in the given Pack.
*
* @param Pack $pack
* @param integer $id_lang Optional
* @return Array[Product] The products contained in this Pack, with special dynamic attributes [pack_quantity, id_pack_product_attribute]
*/
public function getPackItems($pack, $id_lang = false)
{
if ($id_lang === false) {
$configuration = Adapter_ServiceLocator::get('Core_Business_ConfigurationInterface');
$id_lang = (int)$configuration->get('PS_LANG_DEFAULT');
}
return Pack::getItems($pack->id, $id_lang);
}
/**
* Get all Packs that contains the given item in the corresponding declination.
*
* @param Product $item
* @param integer $item_attribute_id
* @param integer $id_lang Optional
* @return Array[Pack] The packs that contains the given item, with special dynamic attribute [pack_item_quantity]
*/
public function getPacksContainingItem($item, $item_attribute_id, $id_lang = false)
{
if ($id_lang === false) {
$configuration = Adapter_ServiceLocator::get('Core_Business_ConfigurationInterface');
$id_lang = (int)$configuration->get('PS_LANG_DEFAULT');
}
return Pack::getPacksContainingItem($item->id, $item_attribute_id, $id_lang);
}
/**
* Is this product a pack?
*
* @param Product $product
* @return boolean
*/
public function isPack($product)
{
return Pack::isPack($product->id);
}
/**
* Is this product in a pack?
* If $id_product_attribute specified, then will restrict search on the given combination,
* else this method will match a product if at least one of all its combination is in a pack.
*
* @param Product $product
* @param integer $id_product_attribute Optional combination of the product
* @return boolean
*/
public function isPacked($product, $id_product_attribute = false)
{
return Pack::isPacked($product->id, $id_product_attribute);
}
}

View File

@ -32,20 +32,19 @@ class Adapter_ProductPriceCalculator
$id_product_attribute = null, $id_product_attribute = null,
$decimals = 6, $decimals = 6,
$divisor = null, $divisor = null,
$only_reduc = false, $only_reduc = false,
$usereduc = true, $usereduc = true,
$quantity = 1, $quantity = 1,
$force_associated_tax = false, $force_associated_tax = false,
$id_customer = null, $id_customer = null,
$id_cart = null, $id_cart = null,
$id_address = null, $id_address = null,
&$specific_price_output = null, &$specific_price_output = null,
$with_ecotax = true, $with_ecotax = true,
$use_group_reduction = true, $use_group_reduction = true,
Context $context = null, Context $context = null,
$use_customer_price = true $use_customer_price = true
) ) {
{
return Product::getPriceStatic( return Product::getPriceStatic(
$id_product, $id_product,
$usetax, $usetax,

View File

@ -26,29 +26,29 @@
class Adapter_ServiceLocator class Adapter_ServiceLocator
{ {
/** /**
* Set a service container Instance * Set a service container Instance
* @var Core_Foundation_IoC_Container * @var Core_Foundation_IoC_Container
*/ */
private static $service_container; private static $service_container;
public static function setServiceContainerInstance(Core_Foundation_IoC_Container $container) public static function setServiceContainerInstance(Core_Foundation_IoC_Container $container)
{ {
self::$service_container = $container; self::$service_container = $container;
} }
/** /**
* Get a service depending on its given $serviceName * Get a service depending on its given $serviceName
* @param $serviceName * @param $serviceName
* @return mixed|object * @return mixed|object
* @throws Adapter_Exception * @throws Adapter_Exception
*/ */
public static function get($serviceName) public static function get($serviceName)
{ {
if (empty(self::$service_container) || is_null(self::$service_container)) { if (empty(self::$service_container) || is_null(self::$service_container)) {
throw new Adapter_Exception('Service container is not set.'); throw new Adapter_Exception('Service container is not set.');
} }
return self::$service_container->make($serviceName); return self::$service_container->make($serviceName);
} }
} }

View File

@ -0,0 +1,34 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class Adapter_StockManager
{
public function getStockAvailableByProduct($product, $id_product_attribute = null, $id_shop = null)
{
return new StockAvailable(StockAvailable::getStockAvailableIdByProductId($product->id, $id_product_attribute, $id_shop));
}
}

View File

@ -26,24 +26,24 @@
class Core_Business_CMS_CMSRepository extends Core_Foundation_Database_EntityRepository class Core_Business_CMS_CMSRepository extends Core_Foundation_Database_EntityRepository
{ {
/** /**
* Return CMSRepository lang associative table name * Return CMSRepository lang associative table name
* @return string * @return string
*/ */
private function getLanguageTableNameWithPrefix() private function getLanguageTableNameWithPrefix()
{ {
return $this->getTableNameWithPrefix() . '_lang'; return $this->getTableNameWithPrefix() . '_lang';
} }
/** /**
* Return all CMSRepositories depending on $id_lang/$id_shop tuple * Return all CMSRepositories depending on $id_lang/$id_shop tuple
* @param $id_lang * @param $id_lang
* @param $id_shop * @param $id_shop
* @return array|null * @return array|null
*/ */
public function i10nFindAll($id_lang, $id_shop) public function i10nFindAll($id_lang, $id_shop)
{ {
$sql = ' $sql = '
SELECT * SELECT *
FROM `'.$this->getTableNameWithPrefix().'` c FROM `'.$this->getTableNameWithPrefix().'` c
JOIN `'.$this->getPrefix().'cms_lang` cl ON c.`id_cms`= cl.`id_cms` JOIN `'.$this->getPrefix().'cms_lang` cl ON c.`id_cms`= cl.`id_cms`
@ -52,20 +52,20 @@ class Core_Business_CMS_CMSRepository extends Core_Foundation_Database_EntityRep
'; ';
return $this->hydrateMany($this->db->select($sql)); return $this->hydrateMany($this->db->select($sql));
} }
/** /**
* Return all CMSRepositories depending on $id_lang/$id_shop tuple * Return all CMSRepositories depending on $id_lang/$id_shop tuple
* @param $id_cms * @param $id_cms
* @param $id_lang * @param $id_lang
* @param $id_shop * @param $id_shop
* @return CMS|null * @return CMS|null
* @throws Core_Foundation_Database_Exception * @throws Core_Foundation_Database_Exception
*/ */
public function i10nFindOneById($id_cms, $id_lang, $id_shop) public function i10nFindOneById($id_cms, $id_lang, $id_shop)
{ {
$sql = ' $sql = '
SELECT * SELECT *
FROM `'.$this->getTableNameWithPrefix().'` c FROM `'.$this->getTableNameWithPrefix().'` c
JOIN `'.$this->getPrefix().'cms_lang` cl ON c.`id_cms`= cl.`id_cms` JOIN `'.$this->getPrefix().'cms_lang` cl ON c.`id_cms`= cl.`id_cms`
@ -75,6 +75,6 @@ class Core_Business_CMS_CMSRepository extends Core_Foundation_Database_EntityRep
LIMIT 0 , 1 LIMIT 0 , 1
'; ';
return $this->hydrateOne($this->db->select($sql)); return $this->hydrateOne($this->db->select($sql));
} }
} }

View File

@ -26,19 +26,17 @@
class Core_Business_CMS_CMSRoleRepository extends Core_Foundation_Database_EntityRepository class Core_Business_CMS_CMSRoleRepository extends Core_Foundation_Database_EntityRepository
{ {
/** /**
* Return all CMSRoles which are already associated * Return all CMSRoles which are already associated
* @return array|null * @return array|null
*/ */
public function getCMSRolesAssociated() public function getCMSRolesAssociated()
{ {
$sql = ' $sql = '
SELECT * SELECT *
FROM `'.$this->getTableNameWithPrefix().'` FROM `'.$this->getTableNameWithPrefix().'`
WHERE `id_cms` != 0'; WHERE `id_cms` != 0';
return $this->hydrateMany($this->db->select($sql)); return $this->hydrateMany($this->db->select($sql));
} }
}
}

View File

@ -26,12 +26,12 @@
class Core_Business_ContainerBuilder class Core_Business_ContainerBuilder
{ {
/** /**
* Construct PrestaShop Core Service container * Construct PrestaShop Core Service container
* @return Core_Foundation_IoC_Container * @return Core_Foundation_IoC_Container
* @throws Core_Foundation_IoC_Exception * @throws Core_Foundation_IoC_Exception
*/ */
public function build() public function build()
{ {
$container = new Core_Foundation_IoC_Container; $container = new Core_Foundation_IoC_Container;

View File

@ -26,67 +26,66 @@
class Core_Business_Email_EmailLister class Core_Business_Email_EmailLister
{ {
private $filesystem; private $filesystem;
public function __construct(Core_Foundation_FileSystem_FileSystem $fs) public function __construct(Core_Foundation_FileSystem_FileSystem $fs)
{ {
// Register dependencies // Register dependencies
$this->filesystem = $fs; $this->filesystem = $fs;
} }
/** /**
* Return the list of available mails * Return the list of available mails
* @param null $lang * @param null $lang
* @param null $dir * @param null $dir
* @return array|null * @return array|null
*/ */
public function getAvailableMails($dir) public function getAvailableMails($dir)
{ {
if (!is_dir($dir)) { if (!is_dir($dir)) {
return null; return null;
} }
$mail_directory = $this->filesystem->listEntriesRecursively($dir); $mail_directory = $this->filesystem->listEntriesRecursively($dir);
$mail_list = array(); $mail_list = array();
// Remove unwanted .html / .txt / .tpl / .php / . / .. // Remove unwanted .html / .txt / .tpl / .php / . / ..
foreach ($mail_directory as $mail) { foreach ($mail_directory as $mail) {
if (strpos($mail->getFilename(), '.') !== false) {
$tmp = explode('.', $mail->getFilename());
if (strpos($mail->getFilename(), '.') !== false) { // Check for filename existence (left part) and if extension is html (right part)
$tmp = explode('.', $mail->getFilename()); if (($tmp === false || !isset($tmp[0])) || (isset($tmp[1]) && $tmp[1] !== 'html')) {
continue;
}
// Check for filename existence (left part) and if extension is html (right part) $mail_name_no_ext = $tmp[0];
if ( ($tmp === false || !isset($tmp[0])) || (isset($tmp[1]) && $tmp[1] !== 'html')) { if (!in_array($mail_name_no_ext, $mail_list)) {
continue; $mail_list[] = $mail_name_no_ext;
} }
}
}
$mail_name_no_ext = $tmp[0]; return $mail_list;
if (!in_array($mail_name_no_ext, $mail_list)) { }
$mail_list[] = $mail_name_no_ext;
}
}
}
return $mail_list;
}
/** /**
* Give in input getAvailableMails(), will output a human readable and proper string name * Give in input getAvailableMails(), will output a human readable and proper string name
* @return string * @return string
*/ */
public function getCleanedMailName($mail_name) public function getCleanedMailName($mail_name)
{ {
if (strpos($mail_name, '.') !== false) { if (strpos($mail_name, '.') !== false) {
$tmp = explode('.', $mail_name); $tmp = explode('.', $mail_name);
if ($tmp === false || !isset($tmp[0])) { if ($tmp === false || !isset($tmp[0])) {
return $mail_name; return $mail_name;
} }
$mail_name = $tmp[0]; $mail_name = $tmp[0];
} }
return ucfirst(str_replace(array('_', '-'), ' ', $mail_name)); return ucfirst(str_replace(array('_', '-'), ' ', $mail_name));
} }
} }

View File

@ -26,189 +26,189 @@
class Core_Business_Payment_PaymentOption class Core_Business_Payment_PaymentOption
{ {
private $callToActionText; private $callToActionText;
private $logo; private $logo;
private $action; private $action;
private $method; private $method;
private $inputs; private $inputs;
private $form; private $form;
private $moduleName; private $moduleName;
/** /**
* Return Call to Action Text * Return Call to Action Text
* @return string * @return string
*/ */
public function getCallToActionText() public function getCallToActionText()
{ {
return $this->callToActionText; return $this->callToActionText;
} }
/** /**
* Set Call To Action Text * Set Call To Action Text
* @param $callToActionText * @param $callToActionText
* @return $this * @return $this
*/ */
public function setCallToActionText($callToActionText) public function setCallToActionText($callToActionText)
{ {
$this->callToActionText = $callToActionText; $this->callToActionText = $callToActionText;
return $this; return $this;
} }
/** /**
* Return logo path * Return logo path
* @return string * @return string
*/ */
public function getLogo() public function getLogo()
{ {
return $this->logo; return $this->logo;
} }
/** /**
* Set logo path * Set logo path
* @param $logo * @param $logo
* @return $this * @return $this
*/ */
public function setLogo($logo) public function setLogo($logo)
{ {
$this->logo = $logo; $this->logo = $logo;
return $this; return $this;
} }
/** /**
* Return action to perform (POST/GET) * Return action to perform (POST/GET)
* @return string * @return string
*/ */
public function getAction() public function getAction()
{ {
return $this->action; return $this->action;
} }
/** /**
* Set action to be performed by this option * Set action to be performed by this option
* @param $action * @param $action
* @return $this * @return $this
*/ */
public function setAction($action) public function setAction($action)
{ {
$this->action = $action; $this->action = $action;
return $this; return $this;
} }
public function getMethod() public function getMethod()
{ {
return $this->method; return $this->method;
} }
public function setMethod($method) public function setMethod($method)
{ {
$this->method = $method; $this->method = $method;
return $this; return $this;
} }
/** /**
* Return inputs contained in this payment option * Return inputs contained in this payment option
* @return mixed * @return mixed
*/ */
public function getInputs() public function getInputs()
{ {
return $this->inputs; return $this->inputs;
} }
/** /**
* Set inputs for this payment option * Set inputs for this payment option
* @param $inputs * @param $inputs
* @return $this * @return $this
*/ */
public function setInputs($inputs) public function setInputs($inputs)
{ {
$this->inputs = $inputs; $this->inputs = $inputs;
return $this; return $this;
} }
/** /**
* Get payment option form * Get payment option form
* @return mixed * @return mixed
*/ */
public function getForm() public function getForm()
{ {
return $this->form; return $this->form;
} }
/** /**
* Set payment option form * Set payment option form
* @param $form * @param $form
* @return $this * @return $this
*/ */
public function setForm($form) public function setForm($form)
{ {
$this->form = $form; $this->form = $form;
return $this; return $this;
} }
/** /**
* Get related module name to this payment option * Get related module name to this payment option
* @return string * @return string
*/ */
public function getModuleName() public function getModuleName()
{ {
return $this->moduleName; return $this->moduleName;
} }
/** /**
* Set related module name to this payment option * Set related module name to this payment option
* @param $moduleName * @param $moduleName
* @return $this * @return $this
*/ */
public function setModuleName($moduleName) public function setModuleName($moduleName)
{ {
$this->moduleName = $moduleName; $this->moduleName = $moduleName;
return $this; return $this;
} }
/** /**
* Legacy options were specified this way: * Legacy options were specified this way:
* - either an array with a top level property 'cta_text' * - either an array with a top level property 'cta_text'
* and then the other properties * and then the other properties
* - or a numerically indexed array or arrays as described above * - or a numerically indexed array or arrays as described above
* Since this was a mess, this method is provided to convert them. * Since this was a mess, this method is provided to convert them.
* It takes as input a legacy option (in either form) and always * It takes as input a legacy option (in either form) and always
* returns an array of instances of Core_Business_Payment_PaymentOption * returns an array of instances of Core_Business_Payment_PaymentOption
*/ */
public static function convertLegacyOption(array $legacyOption) public static function convertLegacyOption(array $legacyOption)
{ {
if (!$legacyOption) if (!$legacyOption) {
return; return;
}
if (array_key_exists('cta_text', $legacyOption)) { if (array_key_exists('cta_text', $legacyOption)) {
$legacyOption = array($legacyOption); $legacyOption = array($legacyOption);
} }
$newOptions = array(); $newOptions = array();
$defaults = array( $defaults = array(
'action' => null, 'action' => null,
'form' => null, 'form' => null,
'method' => null, 'method' => null,
'inputs' => array(), 'inputs' => array(),
'logo' => null 'logo' => null
); );
foreach ($legacyOption as $option) { foreach ($legacyOption as $option) {
$option = array_merge($defaults, $option);
$option = array_merge($defaults, $option); $newOption = new Core_Business_Payment_PaymentOption();
$newOption->setCallToActionText($option['cta_text'])
->setAction($option['action'])
->setForm($option['form'])
->setInputs($option['inputs'])
->setLogo($option['logo'])
->setMethod($option['method']);
$newOption = new Core_Business_Payment_PaymentOption(); $newOptions[] = $newOption;
$newOption->setCallToActionText($option['cta_text']) }
->setAction($option['action'])
->setForm($option['form'])
->setInputs($option['inputs'])
->setLogo($option['logo'])
->setMethod($option['method']);
$newOptions[] = $newOption; return $newOptions;
} }
return $newOptions;
}
} }

View File

@ -0,0 +1,150 @@
<?php
/**
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2015 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class Core_Business_Stock_StockManager
{
/**
* This will update a Pack quantity and will decrease the quantity of containing Products if needed.
*
* @param Product $product A product pack object to update its quantity
* @param StockAvailable $stock_available the stock of the product to fix with correct quantity
* @param integer $delta_quantity The movement of the stock (negative for a decrease)
* @param integer|null $id_shop Opional shop ID
*/
public function updatePackQuantity($product, $stock_available, $delta_quantity, $id_shop = null)
{
$configuration = Adapter_ServiceLocator::get('Core_Business_ConfigurationInterface');
if ($product->pack_stock_type == 1 || $product->pack_stock_type == 2 || ($product->pack_stock_type == 3 && $configuration->get('PS_PACK_STOCK_TYPE') > 0)) {
$packItemsManager = Adapter_ServiceLocator::get('Adapter_PackItemsManager');
$products_pack = $packItemsManager->getPackItems($product);
$stockAvailable = new Core_Business_Stock_StockManager();
$stockManager = Adapter_ServiceLocator::get('Adapter_StockManager');
$cacheManager = Adapter_ServiceLocator::get('Adapter_CacheManager');
foreach ($products_pack as $product_pack) {
$productStockAvailable = $stockManager->getStockAvailableByProduct($product_pack, $product_pack->id_pack_product_attribute, $id_shop);
$productStockAvailable->quantity = $productStockAvailable->quantity + ($delta_quantity * $product_pack->pack_quantity);
$productStockAvailable->update();
$cacheManager->clean('StockAvailable::getQuantityAvailableByProduct_'.(int)$product_pack->id.'*');
}
}
$stock_available->quantity = $stock_available->quantity + $delta_quantity;
if ($product->pack_stock_type == 0 || $product->pack_stock_type == 2 ||
($product->pack_stock_type == 3 && ($configuration->get('PS_PACK_STOCK_TYPE') == 0 || $configuration->get('PS_PACK_STOCK_TYPE') == 2))) {
$stock_available->update();
}
}
/**
* This will decrease (if needed) Packs containing this product
* (with the right declinaison) if there is not enough product in stocks.
*
* @param Product $product A product object to update its quantity
* @param integer $id_product_attribute The product attribute to update
* @param StockAvailable $stock_available the stock of the product to fix with correct quantity
* @param integer|null $id_shop Opional shop ID
*/
public function updatePacksQuantityContainingProduct($product, $id_product_attribute, $stock_available, $id_shop = null)
{
$configuration = Adapter_ServiceLocator::get('Core_Business_ConfigurationInterface');
$packItemsManager = Adapter_ServiceLocator::get('Adapter_PackItemsManager');
$stockManager = Adapter_ServiceLocator::get('Adapter_StockManager');
$cacheManager = Adapter_ServiceLocator::get('Adapter_CacheManager');
$packs = $packItemsManager->getPacksContainingItem($product, $id_product_attribute);
foreach($packs as $pack) {
// Decrease stocks of the pack only if pack is in linked stock mode (option called 'Decrement both')
if (!((int)$pack->pack_stock_type == 2) &&
!((int)$pack->pack_stock_type == 3 && $configuration->get('PS_PACK_STOCK_TYPE') == 2)
) {
continue;
}
// Decrease stocks of the pack only if there is not enough items to constituate the actual pack stocks.
// How many packs can be constituated with the remaining product stocks
$quantity_by_pack = $pack->pack_item_quantity;
$max_pack_quantity = max(array(0, floor($stock_available->quantity / $quantity_by_pack)));
$stock_available_pack = $stockManager->getStockAvailableByProduct($pack, null, $id_shop);
if ($stock_available_pack->quantity > $max_pack_quantity) {
$stock_available_pack->quantity = $max_pack_quantity;
$stock_available_pack->update();
$cacheManager->clean('StockAvailable::getQuantityAvailableByProduct_'.(int)$pack->id.'*');
}
}
}
/**
* Will update Product available stock int he given declinaison. If product is a Pack, could decrease the sub products.
* If Product is contained in a Pack, Pack could be decreased or not (only if sub product stocks become not sufficient).
*
* @param Product $product The product to update its stockAvailable
* @param integer $id_product_attribute The declinaison to update (null if not)
* @param integer $delta_quantity The quantity change (positive or negative)
* @param integer|null $id_shop Optional
*/
public function updateQuantity($product, $id_product_attribute, $delta_quantity, $id_shop = null)
{
$stockManager = Adapter_ServiceLocator::get('Adapter_StockManager');
$stockAvailable = $stockManager->getStockAvailableByProduct($product, $id_product_attribute, $id_shop);
$packItemsManager = Adapter_ServiceLocator::get('Adapter_PackItemsManager');
$cacheManager = Adapter_ServiceLocator::get('Adapter_CacheManager');
$hookManager = Adapter_ServiceLocator::get('Adapter_HookManager');
// Update quantity of the pack products
if ($packItemsManager->isPack($product)) {
// The product is a pack
$this->updatePackQuantity($product, $stockAvailable, $delta_quantity, $id_shop);
} else {
// The product is not a pack
$stockAvailable->quantity = $stockAvailable->quantity + $delta_quantity;
$stockAvailable->update();
// Decrease case only: the stock of linked packs should be decreased too.
if ($delta_quantity < 0) {
// The product is not a pack, but the product combination is part of a pack (use of isPacked, not isPack)
if ($packItemsManager->isPacked($product, $id_product_attribute)) {
$this->updatePacksQuantityContainingProduct($product, $id_product_attribute, $stockAvailable, $id_shop);
}
}
}
$cacheManager->clean('StockAvailable::getQuantityAvailableByProduct_'.(int)$product->id.'*');
$hookManager->exec('actionUpdateQuantity',
array(
'id_product' => $product->id,
'id_product_attribute' => $id_product_attribute,
'quantity' => $stockAvailable->quantity
)
);
}
}

View File

@ -26,17 +26,17 @@
interface Core_Foundation_Database_EntityInterface interface Core_Foundation_Database_EntityInterface
{ {
/** /**
* Returns the name of the repository class for this entity. * Returns the name of the repository class for this entity.
* If unspecified, a generic repository will be used for the entity. * If unspecified, a generic repository will be used for the entity.
* *
* @return string or falsey value * @return string or falsey value
*/ */
public static function getRepositoryClassName(); public static function getRepositoryClassName();
public function save(); public function save();
public function delete(); public function delete();
public function hydrate(array $keyValueData); public function hydrate(array $keyValueData);
} }

View File

@ -26,90 +26,89 @@
class Core_Foundation_Database_EntityManager class Core_Foundation_Database_EntityManager
{ {
private $db; private $db;
private $configuration; private $configuration;
private $entityMetaData = array(); private $entityMetaData = array();
public function __construct( public function __construct(
Core_Foundation_Database_DatabaseInterface $db, Core_Foundation_Database_DatabaseInterface $db,
Core_Business_ConfigurationInterface $configuration Core_Business_ConfigurationInterface $configuration
) ) {
{ $this->db = $db;
$this->db = $db; $this->configuration = $configuration;
$this->configuration = $configuration;
} }
/** /**
* Return current database object used * Return current database object used
* @return Core_Foundation_Database_DatabaseInterface * @return Core_Foundation_Database_DatabaseInterface
*/ */
public function getDatabase() public function getDatabase()
{ {
return $this->db; return $this->db;
} }
/** /**
* Return current repository used * Return current repository used
* @param $className * @param $className
* @return mixed * @return mixed
*/ */
public function getRepository($className) public function getRepository($className)
{ {
if (is_callable(array($className, 'getRepositoryClassName'))) { if (is_callable(array($className, 'getRepositoryClassName'))) {
$repositoryClass = call_user_func(array($className, 'getRepositoryClassName')); $repositoryClass = call_user_func(array($className, 'getRepositoryClassName'));
} else { } else {
$repositoryClass = null; $repositoryClass = null;
} }
if (!$repositoryClass) { if (!$repositoryClass) {
$repositoryClass = 'Core_Foundation_Database_EntityRepository'; $repositoryClass = 'Core_Foundation_Database_EntityRepository';
} }
$repository = new $repositoryClass( $repository = new $repositoryClass(
$this, $this,
$this->configuration->get('_DB_PREFIX_'), $this->configuration->get('_DB_PREFIX_'),
$this->getEntityMetaData($className) $this->getEntityMetaData($className)
); );
return $repository; return $repository;
} }
/** /**
* Return entity's meta data * Return entity's meta data
* @param $className * @param $className
* @return mixed * @return mixed
* @throws Adapter_Exception * @throws Adapter_Exception
*/ */
public function getEntityMetaData($className) public function getEntityMetaData($className)
{ {
if (!array_key_exists($className, $this->entityMetaData)) { if (!array_key_exists($className, $this->entityMetaData)) {
$metaDataRetriever = new Adapter_EntityMetaDataRetriever; $metaDataRetriever = new Adapter_EntityMetaDataRetriever;
$this->entityMetaData[$className] = $metaDataRetriever->getEntityMetaData($className); $this->entityMetaData[$className] = $metaDataRetriever->getEntityMetaData($className);
} }
return $this->entityMetaData[$className]; return $this->entityMetaData[$className];
} }
/** /**
* Flush entity to DB * Flush entity to DB
* @param Core_Foundation_Database_EntityInterface $entity * @param Core_Foundation_Database_EntityInterface $entity
* @return $this * @return $this
*/ */
public function save(Core_Foundation_Database_EntityInterface $entity) public function save(Core_Foundation_Database_EntityInterface $entity)
{ {
$entity->save(); $entity->save();
return $this; return $this;
} }
/** /**
* DElete entity from DB * DElete entity from DB
* @param Core_Foundation_Database_EntityInterface $entity * @param Core_Foundation_Database_EntityInterface $entity
* @return $this * @return $this
*/ */
public function delete(Core_Foundation_Database_EntityInterface $entity) public function delete(Core_Foundation_Database_EntityInterface $entity)
{ {
$entity->delete(); $entity->delete();
return $this; return $this;
} }
} }

View File

@ -26,99 +26,98 @@
class Core_Foundation_Database_EntityRepository class Core_Foundation_Database_EntityRepository
{ {
protected $entityManager; protected $entityManager;
protected $db; protected $db;
protected $tablesPrefix; protected $tablesPrefix;
protected $entityMetaData; protected $entityMetaData;
protected $queryBuilder; protected $queryBuilder;
public function __construct( public function __construct(
Core_Foundation_Database_EntityManager $entityManager, Core_Foundation_Database_EntityManager $entityManager,
$tablesPrefix, $tablesPrefix,
Core_Foundation_Database_EntityMetaData $entityMetaData Core_Foundation_Database_EntityMetaData $entityMetaData
) ) {
{ $this->entityManager = $entityManager;
$this->entityManager = $entityManager; $this->db = $this->entityManager->getDatabase();
$this->db = $this->entityManager->getDatabase(); $this->tablesPrefix = $tablesPrefix;
$this->tablesPrefix = $tablesPrefix; $this->entityMetaData = $entityMetaData;
$this->entityMetaData = $entityMetaData; $this->queryBuilder = new Core_Foundation_Database_EntityManager_QueryBuilder($this->db);
$this->queryBuilder = new Core_Foundation_Database_EntityManager_QueryBuilder($this->db); }
}
public function __call($method, $arguments) public function __call($method, $arguments)
{ {
if (0 === strpos($method, 'findOneBy')) { if (0 === strpos($method, 'findOneBy')) {
$one = true; $one = true;
$by = substr($method, 9); $by = substr($method, 9);
} else if (0 === strpos($method, 'findBy')) { } elseif (0 === strpos($method, 'findBy')) {
$one = false; $one = false;
$by = substr($method, 6); $by = substr($method, 6);
} else { } else {
throw new Core_Foundation_Database_Exception(sprintf('Undefind method %s.', $method)); throw new Core_Foundation_Database_Exception(sprintf('Undefind method %s.', $method));
} }
if (count($arguments) !== 1) { if (count($arguments) !== 1) {
throw new Core_Foundation_Database_Exception(sprintf('Method %s takes exactly one argument.', $method)); throw new Core_Foundation_Database_Exception(sprintf('Method %s takes exactly one argument.', $method));
} }
if (!$by) { if (!$by) {
$where = $arguments[0]; $where = $arguments[0];
} else { } else {
$where = array(); $where = array();
$by = $this->convertToDbFieldName($by); $by = $this->convertToDbFieldName($by);
$where[$by] = $arguments[0]; $where[$by] = $arguments[0];
} }
return $this->doFind($one, $where); return $this->doFind($one, $where);
} }
/** /**
* Convert a camelCase field name to a snakeCase one * Convert a camelCase field name to a snakeCase one
* e.g.: findAllByIdCMS => id_cms * e.g.: findAllByIdCMS => id_cms
* @param $camel_case_field_name * @param $camel_case_field_name
* @return string * @return string
*/ */
private function convertToDbFieldName($camel_case_field_name) private function convertToDbFieldName($camel_case_field_name)
{ {
return strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $camel_case_field_name)); return strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $camel_case_field_name));
} }
/** /**
* Return ID field name * Return ID field name
* @return mixed * @return mixed
* @throws Core_Foundation_Database_Exception * @throws Core_Foundation_Database_Exception
*/ */
protected function getIdFieldName() protected function getIdFieldName()
{ {
$primary = $this->entityMetaData->getPrimaryKeyFieldnames(); $primary = $this->entityMetaData->getPrimaryKeyFieldnames();
if (count($primary) === 0) { if (count($primary) === 0) {
throw new Core_Foundation_Database_Exception( throw new Core_Foundation_Database_Exception(
sprintf( sprintf(
'No primary key defined in entity `%s`.', 'No primary key defined in entity `%s`.',
$this->entityMetaData->getEntityClassName() $this->entityMetaData->getEntityClassName()
) )
); );
} else if (count($primary) > 1) { } elseif (count($primary) > 1) {
throw new Core_Foundation_Database_Exception( throw new Core_Foundation_Database_Exception(
sprintf( sprintf(
'Entity `%s` has a composite primary key, which is not supported by entity repositories.', 'Entity `%s` has a composite primary key, which is not supported by entity repositories.',
$this->entityMetaData->getEntityClassName() $this->entityMetaData->getEntityClassName()
) )
); );
} }
return $primary[0]; return $primary[0];
} }
/** /**
* Returns escaped+prefixed current table name * Returns escaped+prefixed current table name
* @return mixed * @return mixed
*/ */
protected function getTableNameWithPrefix() protected function getTableNameWithPrefix()
{ {
return $this->db->escape($this->tablesPrefix . $this->entityMetaData->getTableName()); return $this->db->escape($this->tablesPrefix . $this->entityMetaData->getTableName());
} }
/** /**
* Returns escaped DB table prefix * Returns escaped DB table prefix
@ -129,93 +128,93 @@ class Core_Foundation_Database_EntityRepository
return $this->db->escape($this->tablesPrefix); return $this->db->escape($this->tablesPrefix);
} }
/** /**
* Return a new empty Entity depending on current Repository selected * Return a new empty Entity depending on current Repository selected
* @return mixed * @return mixed
*/ */
public function getNewEntity() public function getNewEntity()
{ {
$entityClassName = $this->entityMetaData->getEntityClassName(); $entityClassName = $this->entityMetaData->getEntityClassName();
return new $entityClassName; return new $entityClassName;
} }
/** /**
* This function takes an array of database rows as input * This function takes an array of database rows as input
* and returns an hydrated entity if there is one row only. * and returns an hydrated entity if there is one row only.
* *
* Null is returned when there are no rows, and an exception is thrown * Null is returned when there are no rows, and an exception is thrown
* if there are too many rows. * if there are too many rows.
* *
* @param array $rows Database rows * @param array $rows Database rows
*/ */
protected function hydrateOne(array $rows) protected function hydrateOne(array $rows)
{ {
if (count($rows) === 0) { if (count($rows) === 0) {
return null; return null;
} else if (count($rows) > 1) { } elseif (count($rows) > 1) {
throw new Core_Foundation_Database_Exception('Too many rows returned.'); throw new Core_Foundation_Database_Exception('Too many rows returned.');
} else { } else {
$data = $rows[0]; $data = $rows[0];
$entity = $this-> getNewEntity(); $entity = $this-> getNewEntity();
$entity->hydrate($data); $entity->hydrate($data);
return $entity; return $entity;
} }
} }
protected function hydrateMany(array $rows) protected function hydrateMany(array $rows)
{ {
$entities = array(); $entities = array();
foreach ($rows as $row) { foreach ($rows as $row) {
$entity = $this->getNewEntity(); $entity = $this->getNewEntity();
$entity->hydrate($row); $entity->hydrate($row);
$entities[] = $entity; $entities[] = $entity;
} }
return $entities; return $entities;
} }
/** /**
* Constructs and performs 'SELECT' in DB * Constructs and performs 'SELECT' in DB
* @param $one * @param $one
* @param array $cumulativeConditions * @param array $cumulativeConditions
* @return array|mixed|null * @return array|mixed|null
* @throws Core_Foundation_Database_Exception * @throws Core_Foundation_Database_Exception
*/ */
private function doFind($one, array $cumulativeConditions) private function doFind($one, array $cumulativeConditions)
{ {
$whereClause = $this->queryBuilder->buildWhereConditions('AND', $cumulativeConditions); $whereClause = $this->queryBuilder->buildWhereConditions('AND', $cumulativeConditions);
$sql = 'SELECT * FROM ' . $this->getTableNameWithPrefix() . ' WHERE ' . $whereClause; $sql = 'SELECT * FROM ' . $this->getTableNameWithPrefix() . ' WHERE ' . $whereClause;
$rows = $this->db->select($sql); $rows = $this->db->select($sql);
if ($one) { if ($one) {
return $this->hydrateOne($rows); return $this->hydrateOne($rows);
} else { } else {
return $this->hydrateMany($rows); return $this->hydrateMany($rows);
} }
} }
/** /**
* Find one entity in DB * Find one entity in DB
* @param $id * @param $id
* @return array|mixed|null * @return array|mixed|null
* @throws Core_Foundation_Database_Exception * @throws Core_Foundation_Database_Exception
*/ */
public function findOne($id) public function findOne($id)
{ {
$conditions = array(); $conditions = array();
$conditions[$this->getIdFieldName()] = $id; $conditions[$this->getIdFieldName()] = $id;
return $this->doFind(true, $conditions); return $this->doFind(true, $conditions);
} }
/** /**
* Find all entities in DB * Find all entities in DB
* @return array * @return array
*/ */
public function findAll() public function findAll()
{ {
$sql = 'SELECT * FROM ' . $this->getTableNameWithPrefix(); $sql = 'SELECT * FROM ' . $this->getTableNameWithPrefix();
return $this->hydrateMany($this->db->select($sql)); return $this->hydrateMany($this->db->select($sql));
} }
} }

View File

@ -26,4 +26,4 @@
class Core_Foundation_Database_Exception extends Core_Foundation_Exception_Exception class Core_Foundation_Database_Exception extends Core_Foundation_Exception_Exception
{ {
} }

View File

@ -26,8 +26,8 @@
class Core_Foundation_Exception_Exception extends Exception class Core_Foundation_Exception_Exception extends Exception
{ {
public function __construct($message = null, $code = 0, Exception $previous = null) public function __construct($message = null, $code = 0, Exception $previous = null)
{ {
parent::__construct($message, $code, $previous); parent::__construct($message, $code, $previous);
} }
} }

View File

@ -26,4 +26,4 @@
class Core_Foundation_FileSystem_Exception extends Core_Foundation_Exception_Exception class Core_Foundation_FileSystem_Exception extends Core_Foundation_Exception_Exception
{ {
} }

View File

@ -26,109 +26,116 @@
class Core_Foundation_FileSystem_FileSystem class Core_Foundation_FileSystem_FileSystem
{ {
/** /**
* Replaces directory separators with the system's native one * Replaces directory separators with the system's native one
* and trims the trailing separator. * and trims the trailing separator.
*/ */
public function normalizePath($path) public function normalizePath($path)
{ {
return rtrim( return rtrim(
str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $path), str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $path),
DIRECTORY_SEPARATOR DIRECTORY_SEPARATOR
); );
} }
private function joinTwoPaths($a, $b) private function joinTwoPaths($a, $b)
{ {
return $this->normalizePath($a) . DIRECTORY_SEPARATOR . $this->normalizePath($b); return $this->normalizePath($a) . DIRECTORY_SEPARATOR . $this->normalizePath($b);
} }
/** /**
* Joins an arbitrary number of paths, normalizing them along the way. * Joins an arbitrary number of paths, normalizing them along the way.
*/ */
public function joinPaths() public function joinPaths()
{ {
if (func_num_args() < 2) { if (func_num_args() < 2) {
throw new Core_Foundation_FileSystem_Exception('joinPaths requires at least 2 arguments.'); throw new Core_Foundation_FileSystem_Exception('joinPaths requires at least 2 arguments.');
} else if (func_num_args() === 2) { } else if (func_num_args() === 2) {
return $this->joinTwoPaths(func_get_arg(0), func_get_arg(1)); $arg_O = func_get_arg(0);
} else if (func_num_args() > 2) { $arg_1 = func_get_arg(1);
return $this->joinPaths(
func_get_arg(0),
call_user_func_array(
array($this, 'joinPaths'),
array_slice(func_get_args(), 1)
)
);
}
}
/** return $this->joinTwoPaths($arg_O, $arg_1);
* Performs a depth first listing of directory entries. } else if (func_num_args() > 2) {
* Throws exception if $path is not a file. $func_args = func_get_args();
* If $path is a file and not a directory, just gets the file info for it $arg_0 = func_get_arg(0);
* and return it in an array.
* @return an array of SplFileInfo object indexed by file path
*/
public function listEntriesRecursively($path)
{
if (!file_exists($path)) {
throw new Core_Foundation_FileSystem_Exception(
sprintf(
'No such file or directory: %s',
$path
)
);
}
if (!is_dir($path)) { return $this->joinPaths(
throw new Core_Foundation_FileSystem_Exception( $arg_0,
sprintf( call_user_func_array(
'%s is not a directory', array($this,
$path 'joinPaths'),
) array_slice($func_args, 1)
); )
} );
}
}
$entries = array(); /**
* Performs a depth first listing of directory entries.
* Throws exception if $path is not a file.
* If $path is a file and not a directory, just gets the file info for it
* and return it in an array.
* @return an array of SplFileInfo object indexed by file path
*/
public function listEntriesRecursively($path)
{
if (!file_exists($path)) {
throw new Core_Foundation_FileSystem_Exception(
sprintf(
'No such file or directory: %s',
$path
)
);
}
foreach (scandir($path) as $entry) { if (!is_dir($path)) {
if ($entry === '.' || $entry === '..') { throw new Core_Foundation_FileSystem_Exception(
continue; sprintf(
} '%s is not a directory',
$path
)
);
}
$newPath = $this->joinPaths($path, $entry); $entries = array();
$info = new SplFileInfo($newPath);
$entries[$newPath] = $info; foreach (scandir($path) as $entry) {
if ($entry === '.' || $entry === '..') {
continue;
}
if ($info->isDir()) { $newPath = $this->joinPaths($path, $entry);
$entries = array_merge( $info = new SplFileInfo($newPath);
$entries,
$this->listEntriesRecursively($newPath)
);
}
}
return $entries; $entries[$newPath] = $info;
}
/** if ($info->isDir()) {
* Filter used by listFilesRecursively. $entries = array_merge(
*/ $entries,
private function matchOnlyFiles(SplFileInfo $info) $this->listEntriesRecursively($newPath)
{ );
return $info->isFile(); }
} }
/** return $entries;
* Same as listEntriesRecursively but returns only files. }
*/
public function listFilesRecursively($path) /**
{ * Filter used by listFilesRecursively.
return array_filter( */
$this->listEntriesRecursively($path), private function matchOnlyFiles(SplFileInfo $info)
array($this, 'matchOnlyFiles') {
); return $info->isFile();
} }
/**
* Same as listEntriesRecursively but returns only files.
*/
public function listFilesRecursively($path)
{
return array_filter(
$this->listEntriesRecursively($path),
array($this, 'matchOnlyFiles')
);
}
} }

View File

@ -108,7 +108,7 @@ class Core_Foundation_IoC_Container
$paramClass = $param->getClass(); $paramClass = $param->getClass();
if ($paramClass) { if ($paramClass) {
$args[] = $this->doMake($param->getClass()->getName(), $alreadySeen); $args[] = $this->doMake($param->getClass()->getName(), $alreadySeen);
} else if ($param->isDefaultValueAvailable()) { } elseif ($param->isDefaultValueAvailable()) {
$args[] = $param->getDefaultValue(); $args[] = $param->getDefaultValue();
} else { } else {
throw new Core_Foundation_IoC_Exception(sprintf('Cannot build a `%s`.', $className)); throw new Core_Foundation_IoC_Exception(sprintf('Cannot build a `%s`.', $className));
@ -149,7 +149,7 @@ class Core_Foundation_IoC_Container
if (is_callable($constructor)) { if (is_callable($constructor)) {
$service = call_user_func($constructor); $service = call_user_func($constructor);
} else if (!is_string($constructor)) { } elseif (!is_string($constructor)) {
// user already provided the value, no need to construct it. // user already provided the value, no need to construct it.
$service = $constructor; $service = $constructor;
} else { } else {

View File

@ -24,19 +24,23 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_PS_ADMIN_DIR_')) if (!defined('_PS_ADMIN_DIR_')) {
define('_PS_ADMIN_DIR_', getcwd()); define('_PS_ADMIN_DIR_', getcwd());
}
require(_PS_ADMIN_DIR_.'/../config/config.inc.php'); require(_PS_ADMIN_DIR_.'/../config/config.inc.php');
require(_PS_ADMIN_DIR_.'/functions.php'); require(_PS_ADMIN_DIR_.'/functions.php');
// For retrocompatibility with "tab" parameter // For retrocompatibility with "tab" parameter
if (!isset($_GET['controller']) && isset($_GET['tab'])) if (!isset($_GET['controller']) && isset($_GET['tab'])) {
$_GET['controller'] = strtolower($_GET['tab']); $_GET['controller'] = strtolower($_GET['tab']);
if (!isset($_POST['controller']) && isset($_POST['tab'])) }
$_POST['controller'] = strtolower($_POST['tab']); if (!isset($_POST['controller']) && isset($_POST['tab'])) {
if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) $_POST['controller'] = strtolower($_POST['tab']);
$_REQUEST['controller'] = strtolower($_REQUEST['tab']); }
if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) {
$_REQUEST['controller'] = strtolower($_REQUEST['tab']);
}
// Retrocompatibility with 1.4 // Retrocompatibility with 1.4
$_REQUEST['ajaxMode'] = $_POST['ajaxMode'] = $_GET['ajaxMode'] = $_REQUEST['ajax'] = $_POST['ajax'] = $_GET['ajax'] = 1; $_REQUEST['ajaxMode'] = $_POST['ajaxMode'] = $_GET['ajaxMode'] = $_REQUEST['ajax'] = $_POST['ajax'] = $_GET['ajax'] = 1;

View File

@ -24,8 +24,9 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_PS_ADMIN_DIR_')) if (!defined('_PS_ADMIN_DIR_')) {
define('_PS_ADMIN_DIR_', getcwd()); define('_PS_ADMIN_DIR_', getcwd());
}
include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
/* Getting cookie or logout */ /* Getting cookie or logout */
@ -33,27 +34,28 @@ require_once(_PS_ADMIN_DIR_.'/init.php');
$context = Context::getContext(); $context = Context::getContext();
if (Tools::isSubmit('ajaxReferrers')) if (Tools::isSubmit('ajaxReferrers')) {
require(_PS_CONTROLLER_DIR_.'admin/AdminReferrersController.php'); require(_PS_CONTROLLER_DIR_.'admin/AdminReferrersController.php');
if (Tools::getValue('page') == 'prestastore' AND @fsockopen('addons.prestashop.com', 80, $errno, $errst, 3))
readfile('http://addons.prestashop.com/adminmodules.php?lang='.$context->language->iso_code);
if (Tools::isSubmit('getAvailableFields') AND Tools::isSubmit('entity'))
{
$jsonArray = array();
$import = new AdminImportController();
$fields = $import->getAvailableFields(true);
foreach ($fields as $field)
$jsonArray[] = '{"field":"'.addslashes($field).'"}';
die('['.implode(',', $jsonArray).']');
} }
if (Tools::isSubmit('ajaxProductPackItems')) if (Tools::getValue('page') == 'prestastore' and @fsockopen('addons.prestashop.com', 80, $errno, $errst, 3)) {
{ readfile('http://addons.prestashop.com/adminmodules.php?lang='.$context->language->iso_code);
$jsonArray = array(); }
$products = Db::getInstance()->executeS('
if (Tools::isSubmit('getAvailableFields') and Tools::isSubmit('entity')) {
$jsonArray = array();
$import = new AdminImportController();
$fields = $import->getAvailableFields(true);
foreach ($fields as $field) {
$jsonArray[] = '{"field":"'.addslashes($field).'"}';
}
die('['.implode(',', $jsonArray).']');
}
if (Tools::isSubmit('ajaxProductPackItems')) {
$jsonArray = array();
$products = Db::getInstance()->executeS('
SELECT p.`id_product`, pl.`name` SELECT p.`id_product`, pl.`name`
FROM `'._DB_PREFIX_.'product` p FROM `'._DB_PREFIX_.'product` p
NATURAL LEFT JOIN `'._DB_PREFIX_.'product_lang` pl NATURAL LEFT JOIN `'._DB_PREFIX_.'product_lang` pl
@ -62,35 +64,32 @@ if (Tools::isSubmit('ajaxProductPackItems'))
AND NOT EXISTS (SELECT 1 FROM `'._DB_PREFIX_.'pack` WHERE `id_product_pack` = p.`id_product`) AND NOT EXISTS (SELECT 1 FROM `'._DB_PREFIX_.'pack` WHERE `id_product_pack` = p.`id_product`)
AND p.`id_product` != '.(int)(Tools::getValue('id_product'))); AND p.`id_product` != '.(int)(Tools::getValue('id_product')));
foreach ($products as $packItem) foreach ($products as $packItem) {
$jsonArray[] = '{"value": "'.(int)($packItem['id_product']).'-'.addslashes($packItem['name']).'", "text":"'.(int)($packItem['id_product']).' - '.addslashes($packItem['name']).'"}'; $jsonArray[] = '{"value": "'.(int)($packItem['id_product']).'-'.addslashes($packItem['name']).'", "text":"'.(int)($packItem['id_product']).' - '.addslashes($packItem['name']).'"}';
die('['.implode(',', $jsonArray).']'); }
die('['.implode(',', $jsonArray).']');
} }
if (Tools::isSubmit('getChildrenCategories') && Tools::isSubmit('id_category_parent')) if (Tools::isSubmit('getChildrenCategories') && Tools::isSubmit('id_category_parent')) {
{ $children_categories = Category::getChildrenWithNbSelectedSubCat(Tools::getValue('id_category_parent'), Tools::getValue('selectedCat'), Context::getContext()->language->id, null, Tools::getValue('use_shop_context'));
$children_categories = Category::getChildrenWithNbSelectedSubCat(Tools::getValue('id_category_parent'), Tools::getValue('selectedCat'), Context::getContext()->language->id, null, Tools::getValue('use_shop_context')); die(Tools::jsonEncode($children_categories));
die(Tools::jsonEncode($children_categories));
} }
if (Tools::isSubmit('getNotifications')) if (Tools::isSubmit('getNotifications')) {
{ $notification = new Notification;
$notification = new Notification; die(Tools::jsonEncode($notification->getLastElements()));
die(Tools::jsonEncode($notification->getLastElements()));
} }
if (Tools::isSubmit('updateElementEmployee') && Tools::getValue('updateElementEmployeeType')) if (Tools::isSubmit('updateElementEmployee') && Tools::getValue('updateElementEmployeeType')) {
{ $notification = new Notification;
$notification = new Notification; die($notification->updateEmployeeLastElement(Tools::getValue('updateElementEmployeeType')));
die($notification->updateEmployeeLastElement(Tools::getValue('updateElementEmployeeType')));
} }
if (Tools::isSubmit('searchCategory')) if (Tools::isSubmit('searchCategory')) {
{ $q = Tools::getValue('q');
$q = Tools::getValue('q'); $limit = Tools::getValue('limit');
$limit = Tools::getValue('limit'); $results = Db::getInstance()->executeS(
$results = Db::getInstance()->executeS( 'SELECT c.`id_category`, cl.`name`
'SELECT c.`id_category`, cl.`name`
FROM `'._DB_PREFIX_.'category` c FROM `'._DB_PREFIX_.'category` c
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').') LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').')
WHERE cl.`id_lang` = '.(int)$context->language->id.' AND c.`level_depth` <> 0 WHERE cl.`id_lang` = '.(int)$context->language->id.' AND c.`level_depth` <> 0
@ -98,28 +97,30 @@ if (Tools::isSubmit('searchCategory'))
GROUP BY c.id_category GROUP BY c.id_category
ORDER BY c.`position` ORDER BY c.`position`
LIMIT '.(int)$limit); LIMIT '.(int)$limit);
if ($results) if ($results) {
foreach ($results as $result) foreach ($results as $result) {
echo trim($result['name']).'|'.(int)$result['id_category']."\n"; echo trim($result['name']).'|'.(int)$result['id_category']."\n";
}
}
} }
if (Tools::isSubmit('getParentCategoriesId') && $id_category = Tools::getValue('id_category')) if (Tools::isSubmit('getParentCategoriesId') && $id_category = Tools::getValue('id_category')) {
{ $category = new Category((int)$id_category);
$category = new Category((int)$id_category); $results = Db::getInstance()->executeS('SELECT `id_category` FROM `'._DB_PREFIX_.'category` c WHERE c.`nleft` < '.(int)$category->nleft.' AND c.`nright` > '.(int)$category->nright.'');
$results = Db::getInstance()->executeS('SELECT `id_category` FROM `'._DB_PREFIX_.'category` c WHERE c.`nleft` < '.(int)$category->nleft.' AND c.`nright` > '.(int)$category->nright.''); $output = array();
$output = array(); foreach ($results as $result) {
foreach ($results as $result) $output[] = $result;
$output[] = $result; }
die(Tools::jsonEncode($output)); die(Tools::jsonEncode($output));
} }
if (Tools::isSubmit('getZones')) if (Tools::isSubmit('getZones')) {
{ $html = '<select id="zone_to_affect" name="zone_to_affect">';
$html = '<select id="zone_to_affect" name="zone_to_affect">'; foreach (Zone::getZones() as $z) {
foreach (Zone::getZones() as $z) $html .= '<option value="'.$z['id_zone'].'">'.$z['name'].'</option>';
$html .= '<option value="'.$z['id_zone'].'">'.$z['name'].'</option>'; }
$html .= '</select>'; $html .= '</select>';
$array = array('hasError' => false, 'errors' => '', 'data' => $html); $array = array('hasError' => false, 'errors' => '', 'data' => $html);
die(Tools::jsonEncode($array)); die(Tools::jsonEncode($array));
} }

View File

@ -23,15 +23,17 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_PS_ADMIN_DIR_')) if (!defined('_PS_ADMIN_DIR_')) {
define('_PS_ADMIN_DIR_', getcwd()); define('_PS_ADMIN_DIR_', getcwd());
}
include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
/* Getting cookie or logout */ /* Getting cookie or logout */
require_once(_PS_ADMIN_DIR_.'/init.php'); require_once(_PS_ADMIN_DIR_.'/init.php');
$query = Tools::getValue('q', false); $query = Tools::getValue('q', false);
if (!$query OR $query == '' OR strlen($query) < 1) if (!$query or $query == '' or strlen($query) < 1) {
die(); die();
}
/* /*
* In the SQL request the "q" param is used entirely to match result in database. * In the SQL request the "q" param is used entirely to match result in database.
@ -40,14 +42,16 @@ if (!$query OR $query == '' OR strlen($query) < 1)
* is not write in the name field of the product. * is not write in the name field of the product.
* So the ref pattern will be cut for the search request. * So the ref pattern will be cut for the search request.
*/ */
if($pos = strpos($query, ' (ref:')) if ($pos = strpos($query, ' (ref:')) {
$query = substr($query, 0, $pos); $query = substr($query, 0, $pos);
}
$excludeIds = Tools::getValue('excludeIds', false); $excludeIds = Tools::getValue('excludeIds', false);
if ($excludeIds && $excludeIds != 'NaN') if ($excludeIds && $excludeIds != 'NaN') {
$excludeIds = implode(',', array_map('intval', explode(',', $excludeIds))); $excludeIds = implode(',', array_map('intval', explode(',', $excludeIds)));
else } else {
$excludeIds = ''; $excludeIds = '';
}
// Excluding downloadable products from packs because download from pack is not supported // Excluding downloadable products from packs because download from pack is not supported
$excludeVirtuals = (bool)Tools::getValue('excludeVirtuals', true); $excludeVirtuals = (bool)Tools::getValue('excludeVirtuals', true);
@ -63,26 +67,24 @@ $sql = 'SELECT p.`id_product`, pl.`link_rewrite`, p.`reference`, pl.`name`, imag
ON (image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop='.(int)$context->shop->id.') ON (image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop='.(int)$context->shop->id.')
LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$context->language->id.') LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$context->language->id.')
WHERE (pl.name LIKE \'%'.pSQL($query).'%\' OR p.reference LIKE \'%'.pSQL($query).'%\')'. WHERE (pl.name LIKE \'%'.pSQL($query).'%\' OR p.reference LIKE \'%'.pSQL($query).'%\')'.
(!empty($excludeIds) ? ' AND p.id_product NOT IN ('.$excludeIds.') ' : ' '). (!empty($excludeIds) ? ' AND p.id_product NOT IN ('.$excludeIds.') ' : ' ').
($excludeVirtuals ? 'AND NOT EXISTS (SELECT 1 FROM `'._DB_PREFIX_.'product_download` pd WHERE (pd.id_product = p.id_product))' : ''). ($excludeVirtuals ? 'AND NOT EXISTS (SELECT 1 FROM `'._DB_PREFIX_.'product_download` pd WHERE (pd.id_product = p.id_product))' : '').
($exclude_packs ? 'AND (p.cache_is_pack IS NULL OR p.cache_is_pack = 0)' : ''). ($exclude_packs ? 'AND (p.cache_is_pack IS NULL OR p.cache_is_pack = 0)' : '').
' GROUP BY p.id_product'; ' GROUP BY p.id_product';
$items = Db::getInstance()->executeS($sql); $items = Db::getInstance()->executeS($sql);
if ($items && ($excludeIds || strpos($_SERVER['HTTP_REFERER'], 'AdminScenes') !== false)) if ($items && ($excludeIds || strpos($_SERVER['HTTP_REFERER'], 'AdminScenes') !== false)) {
foreach ($items as $item) foreach ($items as $item) {
echo trim($item['name']).(!empty($item['reference']) ? ' (ref: '.$item['reference'].')' : '').'|'.(int)($item['id_product'])."\n"; echo trim($item['name']).(!empty($item['reference']) ? ' (ref: '.$item['reference'].')' : '').'|'.(int)($item['id_product'])."\n";
elseif ($items) }
{ } elseif ($items) {
// packs // packs
$results = array(); $results = array();
foreach ($items as $item) foreach ($items as $item) {
{ // check if product have combination
// check if product have combination if (Combination::isFeatureActive() && $item['cache_default_attribute']) {
if (Combination::isFeatureActive() && $item['cache_default_attribute']) $sql = 'SELECT pa.`id_product_attribute`, pa.`reference`, ag.`id_attribute_group`, pai.`id_image`, agl.`name` AS group_name, al.`name` AS attribute_name,
{
$sql = 'SELECT pa.`id_product_attribute`, pa.`reference`, ag.`id_attribute_group`, pai.`id_image`, agl.`name` AS group_name, al.`name` AS attribute_name,
a.`id_attribute` a.`id_attribute`
FROM `'._DB_PREFIX_.'product_attribute` pa FROM `'._DB_PREFIX_.'product_attribute` pa
'.Shop::addSqlAssociation('product_attribute', 'pa').' '.Shop::addSqlAssociation('product_attribute', 'pa').'
@ -96,47 +98,43 @@ elseif ($items)
GROUP BY pa.`id_product_attribute`, ag.`id_attribute_group` GROUP BY pa.`id_product_attribute`, ag.`id_attribute_group`
ORDER BY pa.`id_product_attribute`'; ORDER BY pa.`id_product_attribute`';
$combinations = Db::getInstance()->executeS($sql); $combinations = Db::getInstance()->executeS($sql);
if (!empty($combinations)) if (!empty($combinations)) {
{ foreach ($combinations as $k => $combination) {
foreach ($combinations as $k => $combination) $results[$combination['id_product_attribute']]['id'] = $item['id_product'];
{ $results[$combination['id_product_attribute']]['id_product_attribute'] = $combination['id_product_attribute'];
$results[$combination['id_product_attribute']]['id'] = $item['id_product']; !empty($results[$combination['id_product_attribute']]['name']) ? $results[$combination['id_product_attribute']]['name'] .= ' '.$combination['group_name'].'-'.$combination['attribute_name']
$results[$combination['id_product_attribute']]['id_product_attribute'] = $combination['id_product_attribute']; : $results[$combination['id_product_attribute']]['name'] = $item['name'].' '.$combination['group_name'].'-'.$combination['attribute_name'];
!empty($results[$combination['id_product_attribute']]['name']) ? $results[$combination['id_product_attribute']]['name'] .= ' '.$combination['group_name'].'-'.$combination['attribute_name'] if (!empty($combination['reference'])) {
: $results[$combination['id_product_attribute']]['name'] = $item['name'].' '.$combination['group_name'].'-'.$combination['attribute_name']; $results[$combination['id_product_attribute']]['ref'] = $combination['reference'];
if (!empty($combination['reference'])) } else {
$results[$combination['id_product_attribute']]['ref'] = $combination['reference']; $results[$combination['id_product_attribute']]['ref'] = !empty($item['reference']) ? $item['reference'] : '';
else }
$results[$combination['id_product_attribute']]['ref'] = !empty($item['reference']) ? $item['reference'] : ''; if (empty($results[$combination['id_product_attribute']]['image'])) {
if (empty($results[$combination['id_product_attribute']]['image'])) $results[$combination['id_product_attribute']]['image'] = str_replace('http://', Tools::getShopProtocol(), $context->link->getImageLink($item['link_rewrite'], $combination['id_image'], 'home_default'));
$results[$combination['id_product_attribute']]['image'] = str_replace('http://', Tools::getShopProtocol(), $context->link->getImageLink($item['link_rewrite'], $combination['id_image'], 'home_default')); }
} }
} } else {
else $product = array(
{ 'id' => (int)($item['id_product']),
$product = array( 'name' => $item['name'],
'id' => (int)($item['id_product']), 'ref' => (!empty($item['reference']) ? $item['reference'] : ''),
'name' => $item['name'], 'image' => str_replace('http://', Tools::getShopProtocol(), $context->link->getImageLink($item['link_rewrite'], $item['id_image'], 'home_default')),
'ref' => (!empty($item['reference']) ? $item['reference'] : ''), );
'image' => str_replace('http://', Tools::getShopProtocol(), $context->link->getImageLink($item['link_rewrite'], $item['id_image'], 'home_default')), array_push($results, $product);
); }
array_push($results, $product); } else {
} $product = array(
} 'id' => (int)($item['id_product']),
else 'name' => $item['name'],
{ 'ref' => (!empty($item['reference']) ? $item['reference'] : ''),
$product = array( 'image' => str_replace('http://', Tools::getShopProtocol(), $context->link->getImageLink($item['link_rewrite'], $item['id_image'], 'home_default')),
'id' => (int)($item['id_product']), );
'name' => $item['name'], array_push($results, $product);
'ref' => (!empty($item['reference']) ? $item['reference'] : ''), }
'image' => str_replace('http://', Tools::getShopProtocol(), $context->link->getImageLink($item['link_rewrite'], $item['id_image'], 'home_default')), }
); $results = array_values($results);
array_push($results, $product); echo Tools::jsonEncode($results);
} } else {
} Tools::jsonEncode(new stdClass);
$results = array_values($results);
echo Tools::jsonEncode($results);
} }
else
Tools::jsonEncode(new stdClass);

View File

@ -24,53 +24,63 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_PS_ADMIN_DIR_')) if (!defined('_PS_ADMIN_DIR_')) {
define('_PS_ADMIN_DIR_', getcwd()); define('_PS_ADMIN_DIR_', getcwd());
}
include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
if (!Context::getContext()->employee->isLoggedBack()) if (!Context::getContext()->employee->isLoggedBack()) {
Tools::redirectAdmin(Context::getContext()->link->getAdminLink('AdminLogin')); Tools::redirectAdmin(Context::getContext()->link->getAdminLink('AdminLogin'));
}
$tabAccess = Profile::getProfileAccess(Context::getContext()->employee->id_profile, $tabAccess = Profile::getProfileAccess(Context::getContext()->employee->id_profile,
Tab::getIdFromClassName('AdminBackup')); Tab::getIdFromClassName('AdminBackup'));
if ($tabAccess['view'] !== '1') if ($tabAccess['view'] !== '1') {
die (Tools::displayError('You do not have permission to view this.')); die(Tools::displayError('You do not have permission to view this.'));
}
$backupdir = realpath(PrestaShopBackup::getBackupPath()); $backupdir = realpath(PrestaShopBackup::getBackupPath());
if ($backupdir === false) if ($backupdir === false) {
die (Tools::displayError('There is no "/backup" directory.')); die(Tools::displayError('There is no "/backup" directory.'));
}
if (!$backupfile = Tools::getValue('filename')) if (!$backupfile = Tools::getValue('filename')) {
die (Tools::displayError('No file has been specified.')); die(Tools::displayError('No file has been specified.'));
}
// Check the realpath so we can validate the backup file is under the backup directory // Check the realpath so we can validate the backup file is under the backup directory
$backupfile = realpath($backupdir.DIRECTORY_SEPARATOR.$backupfile); $backupfile = realpath($backupdir.DIRECTORY_SEPARATOR.$backupfile);
if ($backupfile === false OR strncmp($backupdir, $backupfile, strlen($backupdir)) != 0 ) if ($backupfile === false or strncmp($backupdir, $backupfile, strlen($backupdir)) != 0) {
die (Tools::dieOrLog('The backup file does not exist.')); die(Tools::dieOrLog('The backup file does not exist.'));
}
if (substr($backupfile, -4) == '.bz2') if (substr($backupfile, -4) == '.bz2') {
$contentType = 'application/x-bzip2'; $contentType = 'application/x-bzip2';
else if (substr($backupfile, -3) == '.gz') } elseif (substr($backupfile, -3) == '.gz') {
$contentType = 'application/x-gzip'; $contentType = 'application/x-gzip';
else } else {
$contentType = 'text/x-sql'; $contentType = 'text/x-sql';
}
$fp = @fopen($backupfile, 'r'); $fp = @fopen($backupfile, 'r');
if ($fp === false) if ($fp === false) {
die (Tools::displayError('Unable to open backup file(s).').' "'.addslashes($backupfile).'"'); die(Tools::displayError('Unable to open backup file(s).').' "'.addslashes($backupfile).'"');
}
// Add the correct headers, this forces the file is saved // Add the correct headers, this forces the file is saved
header('Content-Type: '.$contentType); header('Content-Type: '.$contentType);
header('Content-Disposition: attachment; filename="'.Tools::getValue('filename'). '"'); header('Content-Disposition: attachment; filename="'.Tools::getValue('filename'). '"');
if (ob_get_level() && ob_get_length() > 0) if (ob_get_level() && ob_get_length() > 0) {
ob_clean(); ob_clean();
}
$ret = @fpassthru($fp); $ret = @fpassthru($fp);
fclose($fp); fclose($fp);
if ($ret === false) if ($ret === false) {
die (Tools::displayError('Unable to display backup file(s).').' "'.addslashes($backupfile).'"'); die(Tools::displayError('Unable to display backup file(s).').' "'.addslashes($backupfile).'"');
}

View File

@ -24,20 +24,18 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_PS_ADMIN_DIR_')) if (!defined('_PS_ADMIN_DIR_')) {
define('_PS_ADMIN_DIR_', getcwd()); define('_PS_ADMIN_DIR_', getcwd());
}
include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
if (isset($_GET['secure_key'])) if (isset($_GET['secure_key'])) {
{ $secureKey = md5(_COOKIE_KEY_.Configuration::get('PS_SHOP_NAME'));
$secureKey = md5(_COOKIE_KEY_.Configuration::get('PS_SHOP_NAME')); if (!empty($secureKey) && $secureKey === $_GET['secure_key']) {
if (!empty($secureKey) && $secureKey === $_GET['secure_key']) $shop_ids = Shop::getCompleteListOfShopsID();
{ foreach ($shop_ids as $shop_id) {
$shop_ids = Shop::getCompleteListOfShopsID(); Shop::setContext(Shop::CONTEXT_SHOP, (int)$shop_id);
foreach($shop_ids as $shop_id) Currency::refreshCurrencies();
{ }
Shop::setContext(Shop::CONTEXT_SHOP, (int)$shop_id); }
Currency::refreshCurrencies(); }
}
}
}

View File

@ -24,14 +24,14 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_PS_ADMIN_DIR_')) if (!defined('_PS_ADMIN_DIR_')) {
define('_PS_ADMIN_DIR_', getcwd()); define('_PS_ADMIN_DIR_', getcwd());
}
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 (isset($_GET['img']) AND Validate::isMd5($_GET['img']) AND isset($_GET['name']) AND Validate::isGenericName($_GET['name']) AND file_exists(_PS_UPLOAD_DIR_.$_GET['img'])) if (isset($_GET['img']) and Validate::isMd5($_GET['img']) and isset($_GET['name']) and Validate::isGenericName($_GET['name']) and file_exists(_PS_UPLOAD_DIR_.$_GET['img'])) {
{ header('Content-type: image/jpeg');
header('Content-type: image/jpeg'); header('Content-Disposition: attachment; filename="'.$_GET['name'].'.jpg"');
header('Content-Disposition: attachment; filename="'.$_GET['name'].'.jpg"'); echo file_get_contents(_PS_UPLOAD_DIR_.$_GET['img']);
echo file_get_contents(_PS_UPLOAD_DIR_.$_GET['img']);
} }

View File

@ -24,8 +24,9 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_PS_ADMIN_DIR_')) if (!defined('_PS_ADMIN_DIR_')) {
define('_PS_ADMIN_DIR_', getcwd()); define('_PS_ADMIN_DIR_', getcwd());
}
include_once(_PS_ADMIN_DIR_.'/../config/config.inc.php'); include_once(_PS_ADMIN_DIR_.'/../config/config.inc.php');
$module = Tools::getValue('module'); $module = Tools::getValue('module');
@ -38,67 +39,65 @@ $height = Tools::getValue('height');
$id_employee = Tools::getValue('id_employee'); $id_employee = Tools::getValue('id_employee');
$id_lang = Tools::getValue('id_lang'); $id_lang = Tools::getValue('id_lang');
if (!isset($cookie->id_employee) || !$cookie->id_employee || $cookie->id_employee != $id_employee) if (!isset($cookie->id_employee) || !$cookie->id_employee || $cookie->id_employee != $id_employee) {
die(Tools::displayError()); die(Tools::displayError());
}
if (!Validate::isModuleName($module)) if (!Validate::isModuleName($module)) {
die(Tools::displayError()); die(Tools::displayError());
}
if (!Tools::file_exists_cache($module_path = _PS_ROOT_DIR_.'/modules/'.$module.'/'.$module.'.php')) if (!Tools::file_exists_cache($module_path = _PS_ROOT_DIR_.'/modules/'.$module.'/'.$module.'.php')) {
die(Tools::displayError()); die(Tools::displayError());
}
$shop_id = ''; $shop_id = '';
Shop::setContext(Shop::CONTEXT_ALL); Shop::setContext(Shop::CONTEXT_ALL);
if (Context::getContext()->cookie->shopContext) if (Context::getContext()->cookie->shopContext) {
{ $split = explode('-', Context::getContext()->cookie->shopContext);
$split = explode('-', Context::getContext()->cookie->shopContext); if (count($split) == 2) {
if (count($split) == 2) if ($split[0] == 'g') {
{ if (Context::getContext()->employee->hasAuthOnShopGroup($split[1])) {
if ($split[0] == 'g') Shop::setContext(Shop::CONTEXT_GROUP, $split[1]);
{ } else {
if (Context::getContext()->employee->hasAuthOnShopGroup($split[1])) $shop_id = Context::getContext()->employee->getDefaultShopID();
Shop::setContext(Shop::CONTEXT_GROUP, $split[1]); Shop::setContext(Shop::CONTEXT_SHOP, $shop_id);
else }
{ } elseif (Shop::getShop($split[1]) && Context::getContext()->employee->hasAuthOnShop($split[1])) {
$shop_id = Context::getContext()->employee->getDefaultShopID(); $shop_id = $split[1];
Shop::setContext(Shop::CONTEXT_SHOP, $shop_id); Shop::setContext(Shop::CONTEXT_SHOP, $shop_id);
} } else {
} $shop_id = Context::getContext()->employee->getDefaultShopID();
else if (Shop::getShop($split[1]) && Context::getContext()->employee->hasAuthOnShop($split[1])) Shop::setContext(Shop::CONTEXT_SHOP, $shop_id);
{ }
$shop_id = $split[1]; }
Shop::setContext(Shop::CONTEXT_SHOP, $shop_id);
}
else
{
$shop_id = Context::getContext()->employee->getDefaultShopID();
Shop::setContext(Shop::CONTEXT_SHOP, $shop_id);
}
}
} }
// Check multishop context and set right context if need // Check multishop context and set right context if need
if (Shop::getContext()) if (Shop::getContext()) {
{ if (Shop::getContext() == Shop::CONTEXT_SHOP && !Shop::CONTEXT_SHOP) {
if (Shop::getContext() == Shop::CONTEXT_SHOP && !Shop::CONTEXT_SHOP) Shop::setContext(Shop::CONTEXT_GROUP, Shop::getContextShopGroupID());
Shop::setContext(Shop::CONTEXT_GROUP, Shop::getContextShopGroupID()); }
if (Shop::getContext() == Shop::CONTEXT_GROUP && !Shop::CONTEXT_GROUP) if (Shop::getContext() == Shop::CONTEXT_GROUP && !Shop::CONTEXT_GROUP) {
Shop::setContext(Shop::CONTEXT_ALL); Shop::setContext(Shop::CONTEXT_ALL);
}
} }
// Replace existing shop if necessary // Replace existing shop if necessary
if (!$shop_id) if (!$shop_id) {
Context::getContext()->shop = new Shop(Configuration::get('PS_SHOP_DEFAULT')); Context::getContext()->shop = new Shop(Configuration::get('PS_SHOP_DEFAULT'));
elseif (Context::getContext()->shop->id != $shop_id) } elseif (Context::getContext()->shop->id != $shop_id) {
Context::getContext()->shop = new Shop($shop_id); Context::getContext()->shop = new Shop($shop_id);
}
require_once($module_path); require_once($module_path);
$graph = new $module(); $graph = new $module();
$graph->setEmployee($id_employee); $graph->setEmployee($id_employee);
$graph->setLang($id_lang); $graph->setLang($id_lang);
if ($option) if ($option) {
$graph->setOption($option, $layers); $graph->setOption($option, $layers);
}
$graph->create($render, $type, $width, $height, $layers); $graph->create($render, $type, $width, $height, $layers);
$graph->draw(); $graph->draw();

View File

@ -2,132 +2,131 @@
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'])) }
$_SESSION['descending'] = $_GET['descending'] === 'true'; if (isset($_GET['descending'])) {
break; $_SESSION['descending'] = $_GET['descending'] === 'true';
case 'image_size': }
if (realpath(dirname(_PS_ROOT_DIR_.$_POST['path'])) != realpath(_PS_ROOT_DIR_.$upload_dir)) break;
die(); case 'image_size':
$pos = strpos($_POST['path'], $upload_dir); if (realpath(dirname(_PS_ROOT_DIR_.$_POST['path'])) != realpath(_PS_ROOT_DIR_.$upload_dir)) {
if ($pos !== false) die();
{ }
$info = getimagesize(substr_replace($_POST['path'], $current_path, $pos, strlen($upload_dir))); $pos = strpos($_POST['path'], $upload_dir);
echo json_encode($info); if ($pos !== false) {
} $info = getimagesize(substr_replace($_POST['path'], $current_path, $pos, strlen($upload_dir)));
echo json_encode($info);
}
break; break;
case 'save_img': case 'save_img':
$info = pathinfo($_POST['name']); $info = pathinfo($_POST['name']);
if (strpos($_POST['path'], '/') === 0 if (strpos($_POST['path'], '/') === 0
|| strpos($_POST['path'], '../') !== false || strpos($_POST['path'], '../') !== false
|| strpos($_POST['path'], './') === 0 || strpos($_POST['path'], './') === 0
|| 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']); }
if ($image_data === false) $image_data = get_file_by_url($_POST['url']);
{ 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
//try{ //try{
create_img_gd($current_path.$_POST['path'].$_POST['name'], $thumbs_base_path.$_POST['path'].$_POST['name'], 122, 91); create_img_gd($current_path.$_POST['path'].$_POST['name'], $thumbs_base_path.$_POST['path'].$_POST['name'], 122, 91);
new_thumbnails_creation($current_path.$_POST['path'], $current_path.$_POST['path'].$_POST['name'], $_POST['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); new_thumbnails_creation($current_path.$_POST['path'], $current_path.$_POST['path'].$_POST['name'], $_POST['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);
/*} catch (Exception $e) { /*} catch (Exception $e) {
$src_thumb=$mini_src=""; $src_thumb=$mini_src="";
}*/ }*/
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']; }
$info = pathinfo($path); $path = $current_path.$_POST['path'];
$base_folder = $current_path.fix_dirname($_POST['path']).'/'; $info = pathinfo($path);
switch ($info['extension']) $base_folder = $current_path.fix_dirname($_POST['path']).'/';
{ 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);
{ $FullFileName = $zip->statIndex($i);
$OnlyFileName = $zip->getNameIndex($i); if ($FullFileName['name'][strlen($FullFileName['name']) - 1] == '/') {
$FullFileName = $zip->statIndex($i); create_folder($base_folder.$FullFileName['name']);
if ($FullFileName['name'][strlen($FullFileName['name']) - 1] == '/') }
{ }
create_folder($base_folder.$FullFileName['name']); //unzip into the folders
} for ($i = 0; $i < $zip->numFiles; $i++) {
} $OnlyFileName = $zip->getNameIndex($i);
//unzip into the folders $FullFileName = $zip->statIndex($i);
for ($i = 0; $i < $zip->numFiles; $i++)
{
$OnlyFileName = $zip->getNameIndex($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();
} } else {
$zip->close(); echo 'failed to open file';
} }
else break;
echo 'failed to open file'; case 'gz':
break; $p = new PharData($path);
case 'gz': $p->decompress(); // creates files.tar
$p = new PharData($path); break;
$p->decompress(); // creates files.tar case 'tar':
break; // unarchive from the tar
case 'tar': $phar = new PharData($path);
// unarchive from the tar $phar->decompressFiles();
$phar = new PharData($path); $files = array();
$phar->decompressFiles(); check_files_extensions_on_phar($phar, $files, '', $ext);
$files = array(); $phar->extractTo($current_path.fix_dirname($_POST['path']).'/', $files, true);
check_files_extensions_on_phar($phar, $files, '', $ext);
$phar->extractTo($current_path.fix_dirname($_POST['path']).'/', $files, true);
break; break;
} }
break; break;
case 'media_preview': case 'media_preview':
$preview_file = $_GET['file']; $preview_file = $_GET['file'];
$info = pathinfo($preview_file); $info = pathinfo($preview_file);
?> ?>
<div id="jp_container_1" class="jp-video " style="margin:0 auto;"> <div id="jp_container_1" class="jp-video " style="margin:0 auto;">
<div class="jp-type-single"> <div class="jp-type-single">
<div id="jquery_jplayer_1" class="jp-jplayer"></div> <div id="jquery_jplayer_1" class="jp-jplayer"></div>
@ -184,9 +183,8 @@ if (isset($_GET['action']))
</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">
$(document).ready(function () { $(document).ready(function () {
@ -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,9 +214,9 @@ 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">
$(document).ready(function () { $(document).ready(function () {
@ -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 }
die('no action passed'); } else {
die('no action passed');
}
?> ?>

View File

@ -1,20 +1,23 @@
<?php <?php
session_start(); session_start();
if (!defined('_PS_ADMIN_DIR_')) if (!defined('_PS_ADMIN_DIR_')) {
define('_PS_ADMIN_DIR_',dirname(__FILE__).'/../../'); 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')) if (function_exists('mb_internal_encoding')) {
mb_internal_encoding('UTF-8'); 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
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@ -105,7 +108,7 @@ $ext_video = array('mov', 'mpeg', 'mp4', 'avi', 'mpg', 'wma', 'flv', 'webm'); //
$ext_music = array();//array('mp3', 'm4a', 'ac3', 'aiff', 'mid','ogg','wav'); //Audio $ext_music = array();//array('mp3', 'm4a', 'ac3', 'aiff', 'mid','ogg','wav'); //Audio
$ext_misc = array();// 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
/****************** /******************
@ -167,5 +170,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)
?>

File diff suppressed because it is too large Load Diff

View File

@ -1,205 +1,207 @@
<?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) {
if ($path == $base) $cycle = false; $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; }
} $path = fix_dirname($path).'/';
$path = fix_dirname($path).'/'; $cycle = false;
$cycle = false;
} }
$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) {
if (preg_match('/\.{1,2}[\/|\\\]/', $name) !== 0) die('wrong name'); 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']))
{
switch ($_GET['action'])
{
case 'delete_file':
if ($delete_files)
{
unlink($path);
if (file_exists($path_thumb))
unlink($path_thumb);
$info = pathinfo($path);
if ($relative_image_creation)
{
foreach ($relative_path_from_current_pos as $k => $path)
{
if ($path != '' && $path[strlen($path) - 1] != '/')
$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']))
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)
{
foreach ($fixed_path_from_filemanager as $k => $path)
{
if ($path != '' && $path[strlen($path) - 1] != '/')
$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']))
unlink($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].'.'.$info['extension']);
}
}
}
break;
case 'delete_folder':
if ($delete_folders)
{
if (is_dir($path_thumb))
deleteDir($path_thumb);
if (is_dir($path))
{
deleteDir($path);
if ($fixed_image_creation)
{
foreach ($fixed_path_from_filemanager as $k => $paths)
{
if ($paths != '' && $paths[strlen($paths) - 1] != '/') $paths .= '/';
$base_dir = $paths.substr_replace($path, '', 0, strlen($current_path));
if (is_dir($base_dir))
deleteDir($base_dir);
}
}
}
}
break;
case 'create_folder':
if ($create_folders)
create_folder(fix_path($path, $transliteration), fix_path($path_thumb, $transliteration));
break;
case 'rename_folder':
if ($rename_folders)
{
$name = fix_filename($name, $transliteration);
$name = str_replace('.', '', $name);
if (!empty($name))
{
if (!rename_folder($path, $name, $transliteration))
die(lang_Rename_existing_folder);
rename_folder($path_thumb, $name, $transliteration);
if ($fixed_image_creation)
{
foreach ($fixed_path_from_filemanager as $k => $paths)
{
if ($paths != '' && $paths[strlen($paths) - 1] != '/') $paths .= '/';
$base_dir = $paths.substr_replace($path, '', 0, strlen($current_path));
rename_folder($base_dir, $name, $transliteration);
}
}
} else
die(lang_Empty_name);
}
break;
case 'rename_file':
if ($rename_files)
{
$name = fix_filename($name, $transliteration);
if (!empty($name))
{
if (!rename_file($path, $name, $transliteration))
die(lang_Rename_existing_file);
rename_file($path_thumb, $name, $transliteration);
if ($fixed_image_creation)
{
$info = pathinfo($path);
foreach ($fixed_path_from_filemanager as $k => $paths)
{
if ($paths != '' && $paths[strlen($paths) - 1] != '/') $paths .= '/';
$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']))
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
die(lang_Empty_name);
}
break;
case 'duplicate_file':
if ($duplicate_files)
{
$name = fix_filename($name, $transliteration);
if (!empty($name))
{
if (!duplicate_file($path, $name))
die(lang_Rename_existing_file);
duplicate_file($path_thumb, $name);
if ($fixed_image_creation)
{
$info = pathinfo($path);
foreach ($fixed_path_from_filemanager as $k => $paths)
{
if ($paths != '' && $paths[strlen($paths) - 1] != '/') $paths .= '/';
$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']))
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
die(lang_Empty_name);
}
break;
default:
die('wrong action');
break;
}
} }
if (isset($_GET['action'])) {
switch ($_GET['action']) {
case 'delete_file':
if ($delete_files) {
unlink($path);
if (file_exists($path_thumb)) {
unlink($path_thumb);
}
$info = pathinfo($path);
if ($relative_image_creation) {
foreach ($relative_path_from_current_pos as $k => $path) {
if ($path != '' && $path[strlen($path) - 1] != '/') {
$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'])) {
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) {
foreach ($fixed_path_from_filemanager as $k => $path) {
if ($path != '' && $path[strlen($path) - 1] != '/') {
$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'])) {
unlink($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].'.'.$info['extension']);
}
}
}
}
break;
case 'delete_folder':
if ($delete_folders) {
if (is_dir($path_thumb)) {
deleteDir($path_thumb);
}
if (is_dir($path)) {
deleteDir($path);
if ($fixed_image_creation) {
foreach ($fixed_path_from_filemanager as $k => $paths) {
if ($paths != '' && $paths[strlen($paths) - 1] != '/') {
$paths .= '/';
}
$base_dir = $paths.substr_replace($path, '', 0, strlen($current_path));
if (is_dir($base_dir)) {
deleteDir($base_dir);
}
}
}
}
}
break;
case 'create_folder':
if ($create_folders) {
create_folder(fix_path($path, $transliteration), fix_path($path_thumb, $transliteration));
}
break;
case 'rename_folder':
if ($rename_folders) {
$name = fix_filename($name, $transliteration);
$name = str_replace('.', '', $name);
if (!empty($name)) {
if (!rename_folder($path, $name, $transliteration)) {
die(lang_Rename_existing_folder);
}
rename_folder($path_thumb, $name, $transliteration);
if ($fixed_image_creation) {
foreach ($fixed_path_from_filemanager as $k => $paths) {
if ($paths != '' && $paths[strlen($paths) - 1] != '/') {
$paths .= '/';
}
$base_dir = $paths.substr_replace($path, '', 0, strlen($current_path));
rename_folder($base_dir, $name, $transliteration);
}
}
} else {
die(lang_Empty_name);
}
}
break;
case 'rename_file':
if ($rename_files) {
$name = fix_filename($name, $transliteration);
if (!empty($name)) {
if (!rename_file($path, $name, $transliteration)) {
die(lang_Rename_existing_file);
}
rename_file($path_thumb, $name, $transliteration);
if ($fixed_image_creation) {
$info = pathinfo($path);
foreach ($fixed_path_from_filemanager as $k => $paths) {
if ($paths != '' && $paths[strlen($paths) - 1] != '/') {
$paths .= '/';
}
$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'])) {
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 {
die(lang_Empty_name);
}
}
break;
case 'duplicate_file':
if ($duplicate_files) {
$name = fix_filename($name, $transliteration);
if (!empty($name)) {
if (!duplicate_file($path, $name)) {
die(lang_Rename_existing_file);
}
duplicate_file($path_thumb, $name);
if ($fixed_image_creation) {
$info = pathinfo($path);
foreach ($fixed_path_from_filemanager as $k => $paths) {
if ($paths != '' && $paths[strlen($paths) - 1] != '/') {
$paths .= '/';
}
$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'])) {
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 {
die(lang_Empty_name);
}
}
break;
default:
die('wrong action');
break;
}
}

View File

@ -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;
?>

File diff suppressed because it is too large Load Diff

View File

@ -1,91 +1,114 @@
<?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)){ {
$info=pathinfo($old_path); if (file_exists($old_path)) {
$new_path=$info['dirname']."/".$name.".".$info['extension']; $info=pathinfo($old_path);
if(file_exists($new_path)) return false; $new_path=$info['dirname']."/".$name.".".$info['extension'];
return copy($old_path,$new_path); if (file_exists($new_path)) {
return false;
}
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); {
if(file_exists($old_path)){ $name=fix_filename($name, $transliteration);
$info=pathinfo($old_path); if (file_exists($old_path)) {
$new_path=$info['dirname']."/".$name.".".$info['extension']; $info=pathinfo($old_path);
if(file_exists($new_path)) return false; $new_path=$info['dirname']."/".$name.".".$info['extension'];
return rename($old_path,$new_path); if (file_exists($new_path)) {
return false;
}
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); {
if(file_exists($old_path)){ $name=fix_filename($name, $transliteration);
$new_path=fix_dirname($old_path)."/".$name; if (file_exists($old_path)) {
if(file_exists($new_path)) return false; $new_path=fix_dirname($old_path)."/".$name;
return rename($old_path,$new_path); if (file_exists($new_path)) {
return false;
}
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)){ {
require_once('php_image_magician.php'); if (image_check_memory_usage($imgfile, $newwidth, $newheight)) {
$magicianObj = new imageLib($imgfile); require_once('php_image_magician.php');
$magicianObj -> resizeImage($newwidth, $newheight, 'crop'); $magicianObj = new imageLib($imgfile);
$magicianObj -> saveImage($imgthumb,80); $magicianObj -> resizeImage($newwidth, $newheight, 'crop');
return true; $magicianObj -> saveImage($imgthumb, 80);
return true;
} }
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)){ {
require_once('php_image_magician.php'); if (image_check_memory_usage($imgfile, $newwidth, $newheight)) {
$magicianObj = new imageLib($imgfile); require_once('php_image_magician.php');
$magicianObj -> resizeImage($newwidth, $newheight, 'auto'); $magicianObj = new imageLib($imgfile);
$magicianObj -> saveImage($imgthumb,80); $magicianObj -> resizeImage($newwidth, $newheight, 'auto');
return true; $magicianObj -> saveImage($imgthumb, 80);
}else{ return true;
return false; } else {
return false;
} }
} }
function makeSize($size) { function makeSize($size)
$units = array('B','KB','MB','GB','TB'); {
$u = 0; $units = array('B','KB','MB','GB','TB');
while ( (round($size / 1024) > 0) && ($u < 4) ) { $u = 0;
$size = $size / 1024; while ((round($size / 1024) > 0) && ($u < 4)) {
$u++; $size = $size / 1024;
} $u++;
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, '/'). '/';
foreach($files as $t) { foreach ($files as $t) {
if ($t<>"." && $t<>"..") { if ($t<>"." && $t<>"..") {
$currentFile = $cleanPath . $t; $currentFile = $cleanPath . $t;
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,163 +118,174 @@ 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 (function_exists('mb_strtolower')) if (function_exists('mb_strtolower')) {
if(!in_array(mb_strtolower($fileinfo['extension']),$ext)) if (!in_array(mb_strtolower($fileinfo['extension']), $ext)) {
unlink($path); unlink($path);
else } elseif (!in_array(Tools::strtolower($fileinfo['extension']), $ext)) {
if(!in_array(Tools::strtolower($fileinfo['extension']),$ext))
unlink($path); unlink($path);
}else{ }
}
} else {
$files = scandir($path); $files = scandir($path);
foreach($files as $file){ foreach ($files as $file) {
check_files_extensions_on_path(trim($path,'/')."/".$file,$ext); check_files_extensions_on_path(trim($path, '/')."/".$file, $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 ) {
{ foreach ($phar as $file) {
if( $file->isFile() ) if ($file->isFile()) {
{ if (function_exists('mb_strtolower')) {
if (function_exists('mb_strtolower')) if (in_array(mb_strtolower($file->getExtension()), $ext)) {
if(in_array(mb_strtolower($file->getExtension()),$ext)) $files[] = $basepath.$file->getFileName();
$files[] = $basepath.$file->getFileName( ); } elseif (in_array(Tools::strtolower($file->getExtension()), $ext)) {
else $files[] = $basepath.$file->getFileName();
if(in_array(Tools::strtolower($file->getExtension()),$ext)) }
$files[] = $basepath.$file->getFileName( ); }
} } elseif ($file->isDir()) {
else if( $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( function_exists( 'transliterator_transliterate' ) ) if ($transliteration) {
{ 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);
}
$str = preg_replace( "/[^a-zA-Z0-9\.\[\]_| -]/", '', $str ); $str = preg_replace("/[^a-zA-Z0-9\.\[\]_| -]/", '', $str);
} }
$str=str_replace(array('"',"'","/","\\"),"",$str); $str=str_replace(array('"', "'", "/", "\\"), "", $str);
$str=strip_tags($str); $str=strip_tags($str);
// 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' ) ) {
return mb_strtoupper($str); if (function_exists('mb_strtoupper')) {
else return mb_strtoupper($str);
return strtoupper($str); } else {
return strtoupper($str);
}
} }
function fix_strtolower($str){ function fix_strtolower($str)
if( function_exists( 'mb_strtoupper' ) ) {
return mb_strtolower($str); if (function_exists('mb_strtoupper')) {
else return mb_strtolower($str);
return strtolower($str); } else {
return strtolower($str);
}
} }
function fix_path($path,$transliteration){ function fix_path($path, $transliteration)
{
$info=pathinfo($path); $info=pathinfo($path);
if (($s = strrpos($path, '/')) !== false) $s++; if (($s = strrpos($path, '/')) !== false) {
if (($e = strrpos($path, '.') - $s) !== strlen($info['filename'])) $s++;
{ }
$info['filename'] = substr($path, $s, $e); if (($e = strrpos($path, '.') - $s) !== strlen($info['filename'])) {
$info['basename'] = substr($path, $s); $info['filename'] = substr($path, $s, $e);
$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',
$_SERVER['HTTP_HOST'] $_SERVER['HTTP_HOST']
); );
} }
function config_loading($current_path,$fld){ function config_loading($current_path, $fld)
if(file_exists($current_path.$fld.".config")){ {
require_once($current_path.$fld.".config"); if (file_exists($current_path.$fld.".config")) {
return true; require_once($current_path.$fld.".config");
return true;
} }
echo "!!!!".$parent=fix_dirname($fld); echo "!!!!".$parent=fix_dirname($fld);
if($parent!="." && !empty($parent)){ if ($parent!="." && !empty($parent)) {
config_loading($current_path,$parent); config_loading($current_path, $parent);
} }
return false; return false;
} }
function image_check_memory_usage($img, $max_breedte, $max_hoogte){ function image_check_memory_usage($img, $max_breedte, $max_hoogte)
if(file_exists($img)){ {
$K64 = 65536; // number of bytes in 64K if (file_exists($img)) {
$memory_usage = memory_get_usage(); $K64 = 65536; // number of bytes in 64K
$memory_limit = abs(intval(str_replace('M','',ini_get('memory_limit'))*1024*1024)); $memory_usage = memory_get_usage();
$image_properties = getimagesize($img); $memory_limit = abs(intval(str_replace('M', '', ini_get('memory_limit'))*1024*1024));
$image_width = $image_properties[0]; $image_properties = getimagesize($img);
$image_height = $image_properties[1]; $image_width = $image_properties[0];
$image_bits = $image_properties['bits']; $image_height = $image_properties[1];
$image_memory_usage = $K64 + ($image_width * $image_height * ($image_bits ) * 2); $image_bits = $image_properties['bits'];
$thumb_memory_usage = $K64 + ($max_breedte * $max_hoogte * ($image_bits ) * 2); $image_memory_usage = $K64 + ($image_width * $image_height * ($image_bits) * 2);
$memory_needed = intval($memory_usage + $image_memory_usage + $thumb_memory_usage); $thumb_memory_usage = $K64 + ($max_breedte * $max_hoogte * ($image_bits) * 2);
$memory_needed = intval($memory_usage + $image_memory_usage + $thumb_memory_usage);
if($memory_needed > $memory_limit){ if ($memory_needed > $memory_limit) {
ini_set('memory_limit',(intval($memory_needed/1024/1024)+5) . 'M'); ini_set('memory_limit', (intval($memory_needed/1024/1024)+5) . 'M');
if(ini_get('memory_limit') == (intval($memory_needed/1024/1024)+5) . 'M'){ if (ini_get('memory_limit') == (intval($memory_needed/1024/1024)+5) . 'M') {
return true; return true;
}else{ } else {
return false; return false;
} }
}else{ } else {
return true; return true;
} }
}else{ } else {
return false; return false;
} }
} }
@ -260,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.="/";
$info=pathinfo($name); }
if(!endsWith($targetPath,$path)) if (!file_exists($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])) create_folder($targetPath.$path, false);
$all_ok=false; }
} $info=pathinfo($name);
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])) {
$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]!="/") {
$base_dir=$path.substr_replace($targetPath, '', 0, strlen($current_path)); $path.="/";
if (!file_exists($base_dir)) create_folder($base_dir,false); }
$info=pathinfo($name); $base_dir=$path.substr_replace($targetPath, '', 0, strlen($current_path));
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 (!file_exists($base_dir)) {
$all_ok=false; create_folder($base_dir, false);
} }
$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])) {
$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);
} }
@ -309,5 +356,3 @@ function get_file_by_url($url) {
return $data; return $data;
} }
?>

View File

@ -1,58 +1,57 @@
<?php <?php
define('lang_Select','Seç'); define('lang_Select', 'Seç');
define('lang_Erase','Sil'); define('lang_Erase', 'Sil');
define('lang_Open','Aç'); define('lang_Open', 'Aç');
define('lang_Confirm_del','Bu faylı silmek istədiyinizdə əminsinizmi?'); define('lang_Confirm_del', 'Bu faylı silmek istədiyinizdə əminsinizmi?');
define('lang_All','Hamısı'); define('lang_All', 'Hamısı');
define('lang_Files','Fayllar'); define('lang_Files', 'Fayllar');
define('lang_Images','Şəkillər'); define('lang_Images', 'Şəkillər');
define('lang_Archives','Arxivlər'); define('lang_Archives', 'Arxivlər');
define('lang_Error_Upload','Yükləmək istədiyiniz fayl maksimum limiti keçdi.'); define('lang_Error_Upload', 'Yükləmək istədiyiniz fayl maksimum limiti keçdi.');
define('lang_Error_extension','Fayl uzantısı icazəsi yoxdur.'); define('lang_Error_extension', 'Fayl uzantısı icazəsi yoxdur.');
define('lang_Upload_file','Fayl Yüklə'); define('lang_Upload_file', 'Fayl Yüklə');
define('lang_Filters','Filtrlər'); define('lang_Filters', 'Filtrlər');
define('lang_Videos','Videolar'); define('lang_Videos', 'Videolar');
define('lang_Music','Mahnılar'); define('lang_Music', 'Mahnılar');
define('lang_New_Folder','Yeni Folder'); define('lang_New_Folder', 'Yeni Folder');
define('lang_Folder_Created','Folder müvəffəqiyyətlə yaradıldı.'); define('lang_Folder_Created', 'Folder müvəffəqiyyətlə yaradıldı.');
define('lang_Existing_Folder','Mövcud folder'); define('lang_Existing_Folder', 'Mövcud folder');
define('lang_Confirm_Folder_del','Bu folderi və içindəkiləri silmək istədiyinizə əminsinizmi?'); define('lang_Confirm_Folder_del', 'Bu folderi və içindəkiləri silmək istədiyinizə əminsinizmi?');
define('lang_Return_Files_List','Faylların siyahısına geri qayıt'); define('lang_Return_Files_List', 'Faylların siyahısına geri qayıt');
define('lang_Preview','İlk baxış'); define('lang_Preview', 'İlk baxış');
define('lang_Download','Yüklə'); define('lang_Download', 'Yüklə');
define('lang_Insert_Folder_Name','Folder adı əlavə et:'); define('lang_Insert_Folder_Name', 'Folder adı əlavə et:');
define('lang_Root','kök'); define('lang_Root', 'kök');
define('lang_Rename','Yenidən Adlandır'); define('lang_Rename', 'Yenidən Adlandır');
define('lang_Back','geri'); define('lang_Back', 'geri');
define('lang_View','Görünüş'); define('lang_View', 'Görünüş');
define('lang_View_list','List görünüşü'); define('lang_View_list', 'List görünüşü');
define('lang_View_columns_list','Sütunlu list görünüşü'); define('lang_View_columns_list', 'Sütunlu list görünüşü');
define('lang_View_boxes','Qutu görünüşü'); define('lang_View_boxes', 'Qutu görünüşü');
define('lang_Toolbar','Alətlər Paneli'); define('lang_Toolbar', 'Alətlər Paneli');
define('lang_Actions','Fəaliyyətlər'); define('lang_Actions', 'Fəaliyyətlər');
define('lang_Rename_existing_file','Bu fayl var artıq'); define('lang_Rename_existing_file', 'Bu fayl var artıq');
define('lang_Rename_existing_folder','Bu folder var artıq'); define('lang_Rename_existing_folder', 'Bu folder var artıq');
define('lang_Empty_name','Ad sahəsi boşdur.'); define('lang_Empty_name', 'Ad sahəsi boşdur.');
define('lang_Text_filter','filtrlə...'); define('lang_Text_filter', 'filtrlə...');
define('lang_Swipe_help','Variantları görmək üçün file/folder adına tıklayın'); define('lang_Swipe_help', 'Variantları görmək üçün file/folder adına tıklayın');
define('lang_Upload_base','Normal Yükləmə'); define('lang_Upload_base', 'Normal Yükləmə');
define('lang_Upload_java','JAVA Yükləmə (Böyük fayllar üçün)'); define('lang_Upload_java', 'JAVA Yükləmə (Böyük fayllar üçün)');
define('lang_Upload_java_help',"Əgər Java tətbiqi yüklənmədisə; 1- Kompüterinizdə Java yüklənmiş olduğundan əmin olun yada <a href='http://java.com/en/download/'>[Java'nı Buradan Yükləyin]</a> 2- Təhlükəsizlik divarının heç bir şeyə mane olmadığından əmin olun."); define('lang_Upload_java_help', "Əgər Java tətbiqi yüklənmədisə; 1- Kompüterinizdə Java yüklənmiş olduğundan əmin olun yada <a href='http://java.com/en/download/'>[Java'nı Buradan Yükləyin]</a> 2- Təhlükəsizlik divarının heç bir şeyə mane olmadığından əmin olun.");
define('lang_Upload_base_help',"Faylları aşağıdakı sahəyə Gətir & Burax ve ya tıklayaraq açılan pəncərədən fayllarınızı seçin. Yükləmə başa çatdığında 'Return to files list' düyməsinə tıklayın."); define('lang_Upload_base_help', "Faylları aşağıdakı sahəyə Gətir & Burax ve ya tıklayaraq açılan pəncərədən fayllarınızı seçin. Yükləmə başa çatdığında 'Return to files list' düyməsinə tıklayın.");
define('lang_Type_dir','Kataloq'); define('lang_Type_dir', 'Kataloq');
define('lang_Type','Növ'); define('lang_Type', 'Növ');
define('lang_Dimension','Ölçü'); define('lang_Dimension', 'Ölçü');
define('lang_Size','Çəki'); define('lang_Size', 'Çəki');
define('lang_Date','Tarix'); define('lang_Date', 'Tarix');
define('lang_Filename','Fayl adı'); define('lang_Filename', 'Fayl adı');
define('lang_Operations','Əməliyyatlar'); define('lang_Operations', 'Əməliyyatlar');
define('lang_Date_type','d-m-Y'); define('lang_Date_type', 'd-m-Y');
define('lang_OK','Razıyam'); define('lang_OK', 'Razıyam');
define('lang_Cancel','Ləğv Et'); define('lang_Cancel', 'Ləğv Et');
define('lang_Sorting','sıralama'); define('lang_Sorting', 'sıralama');
define('lang_Show_url','URL göstər'); define('lang_Show_url', 'URL göstər');
define('lang_Extract','bura çıxart'); 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');
?>

View File

@ -1,58 +1,57 @@
<?php <?php
define('lang_Select','Избери'); define('lang_Select', 'Избери');
define('lang_Erase','Изтрий'); define('lang_Erase', 'Изтрий');
define('lang_Open','Отвори'); define('lang_Open', 'Отвори');
define('lang_Confirm_del','Сигурни ли сте, че искате да изтриете този файл?'); define('lang_Confirm_del', 'Сигурни ли сте, че искате да изтриете този файл?');
define('lang_All','Всичко'); define('lang_All', 'Всичко');
define('lang_Files','Файлове'); define('lang_Files', 'Файлове');
define('lang_Images','Изображения'); define('lang_Images', 'Изображения');
define('lang_Archives','Архиви'); define('lang_Archives', 'Архиви');
define('lang_Error_Upload','Каченият файл надминава максимално разрешената големина.'); define('lang_Error_Upload', 'Каченият файл надминава максимално разрешената големина.');
define('lang_Error_extension','Това файлово разширение не е позволено.'); define('lang_Error_extension', 'Това файлово разширение не е позволено.');
define('lang_Upload_file','Качете файл'); define('lang_Upload_file', 'Качете файл');
define('lang_Filters','Папка'); define('lang_Filters', 'Папка');
define('lang_Videos','Видео'); define('lang_Videos', 'Видео');
define('lang_Music','Музика'); define('lang_Music', 'Музика');
define('lang_New_Folder','Нова папка'); define('lang_New_Folder', 'Нова папка');
define('lang_Folder_Created','Папката е правилно създадена'); define('lang_Folder_Created', 'Папката е правилно създадена');
define('lang_Existing_Folder','Съществуваща папка'); define('lang_Existing_Folder', 'Съществуваща папка');
define('lang_Confirm_Folder_del','Сигурни ли сте, че искате да изтриете папката и всичко, което се съдържа с нея?'); define('lang_Confirm_Folder_del', 'Сигурни ли сте, че искате да изтриете папката и всичко, което се съдържа с нея?');
define('lang_Return_Files_List','Връщане към списъка с файлове'); define('lang_Return_Files_List', 'Връщане към списъка с файлове');
define('lang_Preview','Преглед'); define('lang_Preview', 'Преглед');
define('lang_Download','Свали'); define('lang_Download', 'Свали');
define('lang_Insert_Folder_Name','Въведете име на папката:'); define('lang_Insert_Folder_Name', 'Въведете име на папката:');
define('lang_Root','root'); define('lang_Root', 'root');
define('lang_Rename','Преименуване'); define('lang_Rename', 'Преименуване');
define('lang_Back','обратно'); define('lang_Back', 'обратно');
define('lang_View','View'); define('lang_View', 'View');
define('lang_View_list','List view'); define('lang_View_list', 'List view');
define('lang_View_columns_list','Columns list view'); define('lang_View_columns_list', 'Columns list view');
define('lang_View_boxes','Box view'); define('lang_View_boxes', 'Box view');
define('lang_Toolbar','Toolbar'); define('lang_Toolbar', 'Toolbar');
define('lang_Actions','Actions'); define('lang_Actions', 'Actions');
define('lang_Rename_existing_file','The file is already existing'); define('lang_Rename_existing_file', 'The file is already existing');
define('lang_Rename_existing_folder','The folder is already existing'); define('lang_Rename_existing_folder', 'The folder is already existing');
define('lang_Empty_name','The name is empty'); define('lang_Empty_name', 'The name is empty');
define('lang_Text_filter','text filter'); define('lang_Text_filter', 'text filter');
define('lang_Swipe_help','Swipe the name of file/folder to show options'); define('lang_Swipe_help', 'Swipe the name of file/folder to show options');
define('lang_Upload_base','Base upload'); define('lang_Upload_base', 'Base upload');
define('lang_Upload_java','JAVA upload (big size files)'); define('lang_Upload_java', 'JAVA upload (big size files)');
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', "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_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', "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_Type_dir','dir'); define('lang_Type_dir', 'dir');
define('lang_Type','Type'); define('lang_Type', 'Type');
define('lang_Dimension','Dimension'); define('lang_Dimension', 'Dimension');
define('lang_Size','Size'); define('lang_Size', 'Size');
define('lang_Date','Date'); define('lang_Date', 'Date');
define('lang_Filename','Name'); define('lang_Filename', 'Name');
define('lang_Operations','Operations'); define('lang_Operations', 'Operations');
define('lang_Date_type','y-m-d'); define('lang_Date_type', 'y-m-d');
define('lang_OK','OK'); define('lang_OK', 'OK');
define('lang_Cancel','Cancel'); define('lang_Cancel', 'Cancel');
define('lang_Sorting','sorting'); define('lang_Sorting', 'sorting');
define('lang_Show_url','show URL'); define('lang_Show_url', 'show URL');
define('lang_Extract','extract here'); 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');
?>

View File

@ -1,58 +1,57 @@
<?php <?php
define('lang_Select','Selecionar'); define('lang_Select', 'Selecionar');
define('lang_Erase','Apagar'); define('lang_Erase', 'Apagar');
define('lang_Open','Abrir'); define('lang_Open', 'Abrir');
define('lang_Confirm_del','Tem certeza que quer deletar este arquivo?'); define('lang_Confirm_del', 'Tem certeza que quer deletar este arquivo?');
define('lang_All','Todos'); define('lang_All', 'Todos');
define('lang_Files','Arquivos'); define('lang_Files', 'Arquivos');
define('lang_Images','Imagens'); define('lang_Images', 'Imagens');
define('lang_Archives','Compactados'); define('lang_Archives', 'Compactados');
define('lang_Error_Upload','O arquivo enviado é maior que o limite permitido.'); define('lang_Error_Upload', 'O arquivo enviado é maior que o limite permitido.');
define('lang_Error_extension','Extensão não permitida.'); define('lang_Error_extension', 'Extensão não permitida.');
define('lang_Upload_file','Enviar um arquivo'); define('lang_Upload_file', 'Enviar um arquivo');
define('lang_Filters','Filtro'); define('lang_Filters', 'Filtro');
define('lang_Videos','Vídeos'); define('lang_Videos', 'Vídeos');
define('lang_Music','Musica'); define('lang_Music', 'Musica');
define('lang_New_Folder','Nova pasta'); define('lang_New_Folder', 'Nova pasta');
define('lang_Folder_Created','Pasta criada corretamente'); define('lang_Folder_Created', 'Pasta criada corretamente');
define('lang_Existing_Folder','Pasta existente'); define('lang_Existing_Folder', 'Pasta existente');
define('lang_Confirm_Folder_del','Tem certeza que você quer deletar a pasta e todo o seu conteúdo?'); define('lang_Confirm_Folder_del', 'Tem certeza que você quer deletar a pasta e todo o seu conteúdo?');
define('lang_Return_Files_List','Voltar à lista de arquivos'); define('lang_Return_Files_List', 'Voltar à lista de arquivos');
define('lang_Preview','Prévia'); define('lang_Preview', 'Prévia');
define('lang_Download','Baixar'); define('lang_Download', 'Baixar');
define('lang_Insert_Folder_Name','Insira o nome da pasta:'); define('lang_Insert_Folder_Name', 'Insira o nome da pasta:');
define('lang_Root','root'); define('lang_Root', 'root');
define('lang_Rename','Mudar o nome'); define('lang_Rename', 'Mudar o nome');
define('lang_Back','de volta'); define('lang_Back', 'de volta');
define('lang_View','View'); define('lang_View', 'View');
define('lang_View_list','List view'); define('lang_View_list', 'List view');
define('lang_View_columns_list','Columns list view'); define('lang_View_columns_list', 'Columns list view');
define('lang_View_boxes','Box view'); define('lang_View_boxes', 'Box view');
define('lang_Toolbar','Toolbar'); define('lang_Toolbar', 'Toolbar');
define('lang_Actions','Actions'); define('lang_Actions', 'Actions');
define('lang_Rename_existing_file','The file is already existing'); define('lang_Rename_existing_file', 'The file is already existing');
define('lang_Rename_existing_folder','The folder is already existing'); define('lang_Rename_existing_folder', 'The folder is already existing');
define('lang_Empty_name','The name is empty'); define('lang_Empty_name', 'The name is empty');
define('lang_Text_filter','text filter'); define('lang_Text_filter', 'text filter');
define('lang_Swipe_help','Swipe the name of file/folder to show options'); define('lang_Swipe_help', 'Swipe the name of file/folder to show options');
define('lang_Upload_base','Base upload'); define('lang_Upload_base', 'Base upload');
define('lang_Upload_java','JAVA upload (big size files)'); define('lang_Upload_java', 'JAVA upload (big size files)');
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', "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_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', "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_Type_dir','dir'); define('lang_Type_dir', 'dir');
define('lang_Type','Type'); define('lang_Type', 'Type');
define('lang_Dimension','Dimension'); define('lang_Dimension', 'Dimension');
define('lang_Size','Size'); define('lang_Size', 'Size');
define('lang_Date','Date'); define('lang_Date', 'Date');
define('lang_Filename','Name'); define('lang_Filename', 'Name');
define('lang_Operations','Operations'); define('lang_Operations', 'Operations');
define('lang_Date_type','y-m-d'); define('lang_Date_type', 'y-m-d');
define('lang_OK','OK'); define('lang_OK', 'OK');
define('lang_Cancel','Cancel'); define('lang_Cancel', 'Cancel');
define('lang_Sorting','sıralama'); define('lang_Sorting', 'sıralama');
define('lang_Show_url','show URL'); define('lang_Show_url', 'show URL');
define('lang_Extract','extract here'); 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');
?>

View File

@ -1,54 +1,53 @@
<?php <?php
define('lang_Select','Vybrat'); define('lang_Select', 'Vybrat');
define('lang_Erase','Smazat'); define('lang_Erase', 'Smazat');
define('lang_Open','Otevřít'); define('lang_Open', 'Otevřít');
define('lang_Confirm_del','Opravdu chcete smazat tento soubor?'); define('lang_Confirm_del', 'Opravdu chcete smazat tento soubor?');
define('lang_All','Vše'); define('lang_All', 'Vše');
define('lang_Files','Soubory'); define('lang_Files', 'Soubory');
define('lang_Images','Obrázky'); define('lang_Images', 'Obrázky');
define('lang_Archives','Archivy'); define('lang_Archives', 'Archivy');
define('lang_Error_Upload','Nahrávaný soubor je příliš velký.'); define('lang_Error_Upload', 'Nahrávaný soubor je příliš velký.');
define('lang_Error_extension','Nahrání souborů s touto příponou není povoleno.'); define('lang_Error_extension', 'Nahrání souborů s touto příponou není povoleno.');
define('lang_Upload_file','Nahrát soubor'); define('lang_Upload_file', 'Nahrát soubor');
define('lang_Filters','Filtr'); define('lang_Filters', 'Filtr');
define('lang_Videos','Videa'); define('lang_Videos', 'Videa');
define('lang_Music','Hudba'); define('lang_Music', 'Hudba');
define('lang_New_Folder','Nová složka'); define('lang_New_Folder', 'Nová složka');
define('lang_Folder_Created','Složka vytvořena'); define('lang_Folder_Created', 'Složka vytvořena');
define('lang_Existing_Folder','Existující složka'); define('lang_Existing_Folder', 'Existující složka');
define('lang_Confirm_Folder_del','Opravdu chcete smazat tuto složku a její obsah?'); define('lang_Confirm_Folder_del', 'Opravdu chcete smazat tuto složku a její obsah?');
define('lang_Return_Files_List','Zpět k seznamu souborů'); define('lang_Return_Files_List', 'Zpět k seznamu souborů');
define('lang_Preview','Náhled'); define('lang_Preview', 'Náhled');
define('lang_Download','Stáhnout'); define('lang_Download', 'Stáhnout');
define('lang_Insert_Folder_Name','Vložte název složky:'); define('lang_Insert_Folder_Name', 'Vložte název složky:');
define('lang_Root','root'); define('lang_Root', 'root');
define('lang_Rename','Přejmenovat'); define('lang_Rename', 'Přejmenovat');
define('lang_Back','zpátky'); define('lang_Back', 'zpátky');
define('lang_View','Zobrazení'); define('lang_View', 'Zobrazení');
define('lang_View_list','Seznam souborů'); define('lang_View_list', 'Seznam souborů');
define('lang_View_columns_list','Dvousloucpvý seznam souborů'); define('lang_View_columns_list', 'Dvousloucpvý seznam souborů');
define('lang_View_boxes','Dlaždicové zobrazení'); define('lang_View_boxes', 'Dlaždicové zobrazení');
define('lang_Toolbar','Toolbar'); define('lang_Toolbar', 'Toolbar');
define('lang_Actions','Akce'); define('lang_Actions', 'Akce');
define('lang_Rename_existing_file','Tento soubor již existuje'); define('lang_Rename_existing_file', 'Tento soubor již existuje');
define('lang_Rename_existing_folder','Tato složka již existuje'); define('lang_Rename_existing_folder', 'Tato složka již existuje');
define('lang_Empty_name','Zadali jste prázdný název'); define('lang_Empty_name', 'Zadali jste prázdný název');
define('lang_Text_filter','textový filtr'); define('lang_Text_filter', 'textový filtr');
define('lang_Swipe_help','Pro zobrazení možností klikněte na jméno souboru/složky.'); define('lang_Swipe_help', 'Pro zobrazení možností klikněte na jméno souboru/složky.');
define('lang_Upload_base','Základní nahrávání'); define('lang_Upload_base', 'Základní nahrávání');
define('lang_Upload_java','JAVA upload (pro velké soubory)'); define('lang_Upload_java', 'JAVA upload (pro velké soubory)');
define('lang_Upload_java_help',"Pokud se Java Applet nechce načíst: 1. ujistěte se, že Java je nainstalována ve vašem počítači <a href='http://java.com/en/download/'>[odkaz pro stažení]</a> 2. ujistěte se, že nic není blokováno firewallem"); define('lang_Upload_java_help', "Pokud se Java Applet nechce načíst: 1. ujistěte se, že Java je nainstalována ve vašem počítači <a href='http://java.com/en/download/'>[odkaz pro stažení]</a> 2. ujistěte se, že nic není blokováno firewallem");
define('lang_Upload_base_help',"Přetáhněte soubor(y) do prostoru výše nebo do něj klikněte myší (pro novější prohlížeče) v krajním případě vyberte soubory a klikněte na tlačítko. Po dokončení nahrávání klikněte na tlačítko zpět umístěné v horní části okna."); define('lang_Upload_base_help', "Přetáhněte soubor(y) do prostoru výše nebo do něj klikněte myší (pro novější prohlížeče) v krajním případě vyberte soubory a klikněte na tlačítko. Po dokončení nahrávání klikněte na tlačítko zpět umístěné v horní části okna.");
define('lang_Type_dir','adresář'); define('lang_Type_dir', 'adresář');
define('lang_Type','Typ'); define('lang_Type', 'Typ');
define('lang_Dimension','Rozměr'); define('lang_Dimension', 'Rozměr');
define('lang_Size','Velikost'); define('lang_Size', 'Velikost');
define('lang_Date','Datum'); define('lang_Date', 'Datum');
define('lang_Filename','Jméno'); define('lang_Filename', 'Jméno');
define('lang_Operations','Operace'); define('lang_Operations', 'Operace');
define('lang_Date_type','d.m.Y'); define('lang_Date_type', 'd.m.Y');
define('lang_OK','OK'); 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');
?>

View File

@ -1,58 +1,57 @@
<?php <?php
define('lang_Select','Ausw&auml;hlen'); define('lang_Select', 'Ausw&auml;hlen');
define('lang_Erase','L&ouml;schen'); define('lang_Erase', 'L&ouml;schen');
define('lang_Open','&Ouml;ffnen'); define('lang_Open', '&Ouml;ffnen');
define('lang_Confirm_del','Wollen Sie wirklich diese Datei l&ouml;schen?'); define('lang_Confirm_del', 'Wollen Sie wirklich diese Datei l&ouml;schen?');
define('lang_All','Alle'); define('lang_All', 'Alle');
define('lang_Files','Dateien'); define('lang_Files', 'Dateien');
define('lang_Images','Bilder'); define('lang_Images', 'Bilder');
define('lang_Archives','Archive'); define('lang_Archives', 'Archive');
define('lang_Error_Upload','Dateigr&ouml;&szlig;e &uuml;berschritten.'); define('lang_Error_Upload', 'Dateigr&ouml;&szlig;e &uuml;berschritten.');
define('lang_Error_extension','Dateityp nicht erlaubt.'); define('lang_Error_extension', 'Dateityp nicht erlaubt.');
define('lang_Upload_file','Datei hochladen'); define('lang_Upload_file', 'Datei hochladen');
define('lang_Filters','Filter'); define('lang_Filters', 'Filter');
define('lang_Videos','Videos'); define('lang_Videos', 'Videos');
define('lang_Music','Musik'); define('lang_Music', 'Musik');
define('lang_New_Folder','Ordner anlegen'); define('lang_New_Folder', 'Ordner anlegen');
define('lang_Folder_Created','Ordner erfolgreich erstellt'); define('lang_Folder_Created', 'Ordner erfolgreich erstellt');
define('lang_Existing_Folder','Ordner existiert bereichts'); define('lang_Existing_Folder', 'Ordner existiert bereichts');
define('lang_Confirm_Folder_del','Sind Sie sich, dass Sie diesen Ordner mit allen enthaltenen Dateien l&ouml;schen m&ouml;chten?'); define('lang_Confirm_Folder_del', 'Sind Sie sich, dass Sie diesen Ordner mit allen enthaltenen Dateien l&ouml;schen m&ouml;chten?');
define('lang_Return_Files_List','Zur&uuml;ck zur Dateiliste'); define('lang_Return_Files_List', 'Zur&uuml;ck zur Dateiliste');
define('lang_Preview','Vorschau'); define('lang_Preview', 'Vorschau');
define('lang_Download','Download'); define('lang_Download', 'Download');
define('lang_Insert_Folder_Name','Ordnername eingeben:'); define('lang_Insert_Folder_Name', 'Ordnername eingeben:');
define('lang_Root','Basis'); define('lang_Root', 'Basis');
define('lang_Rename','Umbenennen'); define('lang_Rename', 'Umbenennen');
define('lang_Back','zur&uuml;ck'); define('lang_Back', 'zur&uuml;ck');
define('lang_View','Ansicht'); define('lang_View', 'Ansicht');
define('lang_View_list','Liste'); define('lang_View_list', 'Liste');
define('lang_View_columns_list','Spalten'); define('lang_View_columns_list', 'Spalten');
define('lang_View_boxes','Boxen'); define('lang_View_boxes', 'Boxen');
define('lang_Toolbar','Werkzeugleiste'); define('lang_Toolbar', 'Werkzeugleiste');
define('lang_Actions','Aktionen'); define('lang_Actions', 'Aktionen');
define('lang_Rename_existing_file','Die existiert bereits'); define('lang_Rename_existing_file', 'Die existiert bereits');
define('lang_Rename_existing_folder','Das Verzeichnis existiert bereits'); define('lang_Rename_existing_folder', 'Das Verzeichnis existiert bereits');
define('lang_Empty_name','Der Name ist leer'); define('lang_Empty_name', 'Der Name ist leer');
define('lang_Text_filter','Suchen...'); define('lang_Text_filter', 'Suchen...');
define('lang_Swipe_help','Swipe the name of file/folder to show options'); define('lang_Swipe_help', 'Swipe the name of file/folder to show options');
define('lang_Upload_base','Base upload'); define('lang_Upload_base', 'Base upload');
define('lang_Upload_java','JAVA upload (gro&szlig;e Dateien)'); define('lang_Upload_java', 'JAVA upload (gro&szlig;e Dateien)');
define('lang_Upload_java_help',"Sollte das Java Applet nicht laden, stellen Sie sicher, dass 1. Java installiert ist <a href='http://java.com/en/download/'>[download link]</a> und 2. stellen Sie sicher, dass nichts von Ihrer Firewall geblockt wird"); define('lang_Upload_java_help', "Sollte das Java Applet nicht laden, stellen Sie sicher, dass 1. Java installiert ist <a href='http://java.com/en/download/'>[download link]</a> und 2. stellen Sie sicher, dass nichts von Ihrer Firewall geblockt wird");
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', "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_Type_dir','Ordner'); define('lang_Type_dir', 'Ordner');
define('lang_Type','Art'); define('lang_Type', 'Art');
define('lang_Dimension','Dimensionen'); define('lang_Dimension', 'Dimensionen');
define('lang_Size','Gr&ouml;&szlig;e'); define('lang_Size', 'Gr&ouml;&szlig;e');
define('lang_Date','Datum'); define('lang_Date', 'Datum');
define('lang_Operations','Aktionen'); define('lang_Operations', 'Aktionen');
define('lang_Filename','Dateiname'); define('lang_Filename', 'Dateiname');
define('lang_Date_type','d.m.Y'); //y-m-d define('lang_Date_type', 'd.m.Y'); //y-m-d
define('lang_OK','OK'); define('lang_OK', 'OK');
define('lang_Cancel','Abbrechen'); define('lang_Cancel', 'Abbrechen');
define('lang_Sorting','sorting'); define('lang_Sorting', 'sorting');
define('lang_Show_url','show URL'); define('lang_Show_url', 'show URL');
define('lang_Extract','extract here'); 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');
?>

View File

@ -1,59 +1,57 @@
<?php <?php
define('lang_Select','Select'); define('lang_Select', 'Select');
define('lang_Erase','Erase'); define('lang_Erase', 'Erase');
define('lang_Open','Open'); define('lang_Open', 'Open');
define('lang_Confirm_del','Are you sure you want to delete this file?'); define('lang_Confirm_del', 'Are you sure you want to delete this file?');
define('lang_All','All'); define('lang_All', 'All');
define('lang_Files','Files'); define('lang_Files', 'Files');
define('lang_Images','Images'); define('lang_Images', 'Images');
define('lang_Archives','Archives'); define('lang_Archives', 'Archives');
define('lang_Error_Upload','The uploaded file exceeds the max size allowed.'); define('lang_Error_Upload', 'The uploaded file exceeds the max size allowed.');
define('lang_Error_extension','File extension is not allowed.'); define('lang_Error_extension', 'File extension is not allowed.');
define('lang_Upload_file','Upload'); define('lang_Upload_file', 'Upload');
define('lang_Filters','Filters'); define('lang_Filters', 'Filters');
define('lang_Videos','Videos'); define('lang_Videos', 'Videos');
define('lang_Music','Music'); define('lang_Music', 'Music');
define('lang_New_Folder','New Folder'); define('lang_New_Folder', 'New Folder');
define('lang_Folder_Created','Folder correctly created'); define('lang_Folder_Created', 'Folder correctly created');
define('lang_Existing_Folder','Existing folder'); define('lang_Existing_Folder', 'Existing folder');
define('lang_Confirm_Folder_del','Are you sure to delete the folder and all the elements in it?'); define('lang_Confirm_Folder_del', 'Are you sure to delete the folder and all the elements in it?');
define('lang_Return_Files_List','Return to files list'); define('lang_Return_Files_List', 'Return to files list');
define('lang_Preview','Preview'); define('lang_Preview', 'Preview');
define('lang_Download','Download'); define('lang_Download', 'Download');
define('lang_Insert_Folder_Name','Insert folder name:'); define('lang_Insert_Folder_Name', 'Insert folder name:');
define('lang_Root','root'); define('lang_Root', 'root');
define('lang_Rename','Rename'); define('lang_Rename', 'Rename');
define('lang_Back','back'); define('lang_Back', 'back');
define('lang_View','View'); define('lang_View', 'View');
define('lang_View_list','List view'); define('lang_View_list', 'List view');
define('lang_View_columns_list','Columns list view'); define('lang_View_columns_list', 'Columns list view');
define('lang_View_boxes','Box view'); define('lang_View_boxes', 'Box view');
define('lang_Toolbar','Toolbar'); define('lang_Toolbar', 'Toolbar');
define('lang_Actions','Actions'); define('lang_Actions', 'Actions');
define('lang_Rename_existing_file','The file is already existing'); define('lang_Rename_existing_file', 'The file is already existing');
define('lang_Rename_existing_folder','The folder is already existing'); define('lang_Rename_existing_folder', 'The folder is already existing');
define('lang_Empty_name','The name is empty'); define('lang_Empty_name', 'The name is empty');
define('lang_Text_filter','text filter'); define('lang_Text_filter', 'text filter');
define('lang_Swipe_help','Swipe the name of file/folder to show options'); define('lang_Swipe_help', 'Swipe the name of file/folder to show options');
define('lang_Upload_base','Base upload'); define('lang_Upload_base', 'Base upload');
define('lang_Upload_java','JAVA upload (big size files)'); define('lang_Upload_java', 'JAVA upload (big size files)');
define('lang_Upload_java_help',"If the Java Applet doesn'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 by your firewall"); define('lang_Upload_java_help', "If the Java Applet doesn'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 by your firewall");
define('lang_Upload_base_help',"Drag & Drop files or click in the area above (modern browsers) and select the file(s). When the upload is complete, click the 'Return to files list' button."); define('lang_Upload_base_help', "Drag & Drop files or click in the area above (modern browsers) and select the file(s). When the upload is complete, click the 'Return to files list' button.");
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');
define('lang_Size','Size'); define('lang_Size', 'Size');
define('lang_Date','Date'); define('lang_Date', 'Date');
define('lang_Filename','Filename'); define('lang_Filename', 'Filename');
define('lang_Operations','Operations'); define('lang_Operations', 'Operations');
define('lang_Date_type','y-m-d'); define('lang_Date_type', 'y-m-d');
define('lang_OK','OK'); define('lang_OK', 'OK');
define('lang_Cancel','Cancel'); define('lang_Cancel', 'Cancel');
define('lang_Sorting','sorting'); define('lang_Sorting', 'sorting');
define('lang_Show_url','show URL'); define('lang_Show_url', 'show URL');
define('lang_Extract','extract here'); 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');
?>

View File

@ -1,58 +1,57 @@
<?php <?php
define('lang_Select','Seleccionar'); define('lang_Select', 'Seleccionar');
define('lang_Erase','Eliminar'); define('lang_Erase', 'Eliminar');
define('lang_Open','Abrir'); define('lang_Open', 'Abrir');
define('lang_Confirm_del','¿Seguro que deseas eliminar este archivo?'); define('lang_Confirm_del', '¿Seguro que deseas eliminar este archivo?');
define('lang_All','Todos'); define('lang_All', 'Todos');
define('lang_Files','Archivos'); define('lang_Files', 'Archivos');
define('lang_Images','Imágenes'); define('lang_Images', 'Imágenes');
define('lang_Archives','Ficheros'); define('lang_Archives', 'Ficheros');
define('lang_Error_Upload','El archivo que intenta subir excede el máximo permitido.'); define('lang_Error_Upload', 'El archivo que intenta subir excede el máximo permitido.');
define('lang_Error_extension','La extensión del archivo no está permitida.'); define('lang_Error_extension', 'La extensión del archivo no está permitida.');
define('lang_Upload_file','Subir'); define('lang_Upload_file', 'Subir');
define('lang_Filters','Filtros'); define('lang_Filters', 'Filtros');
define('lang_Videos','Videos'); define('lang_Videos', 'Videos');
define('lang_Music','Musica'); define('lang_Music', 'Musica');
define('lang_New_Folder','Nueva carpeta'); define('lang_New_Folder', 'Nueva carpeta');
define('lang_Folder_Created','La carpeta ha sido creada exitosamente.'); define('lang_Folder_Created', 'La carpeta ha sido creada exitosamente.');
define('lang_Existing_Folder','Carpeta existente'); define('lang_Existing_Folder', 'Carpeta existente');
define('lang_Confirm_Folder_del','¿Seguro que deseas eliminar la carpeta y todos los elementos que contiene?'); define('lang_Confirm_Folder_del', '¿Seguro que deseas eliminar la carpeta y todos los elementos que contiene?');
define('lang_Return_Files_List','Regresar a la lista de archivos'); define('lang_Return_Files_List', 'Regresar a la lista de archivos');
define('lang_Preview','Vista previa'); define('lang_Preview', 'Vista previa');
define('lang_Download','Descargar'); define('lang_Download', 'Descargar');
define('lang_Insert_Folder_Name','Nombre de la carpeta:'); define('lang_Insert_Folder_Name', 'Nombre de la carpeta:');
define('lang_Root','raíz'); define('lang_Root', 'raíz');
define('lang_Rename','Renombrar'); define('lang_Rename', 'Renombrar');
define('lang_Back','atrás'); define('lang_Back', 'atrás');
define('lang_View','Vista'); define('lang_View', 'Vista');
define('lang_View_list','Vista de lista'); define('lang_View_list', 'Vista de lista');
define('lang_View_columns_list','Vista de columnas'); define('lang_View_columns_list', 'Vista de columnas');
define('lang_View_boxes','Vista de miniaturas'); define('lang_View_boxes', 'Vista de miniaturas');
define('lang_Toolbar','Barra de herramientas'); define('lang_Toolbar', 'Barra de herramientas');
define('lang_Actions','Acciones'); define('lang_Actions', 'Acciones');
define('lang_Rename_existing_file','El archivo ya existe'); define('lang_Rename_existing_file', 'El archivo ya existe');
define('lang_Rename_existing_folder','La carpeta ya existe'); define('lang_Rename_existing_folder', 'La carpeta ya existe');
define('lang_Empty_name','El nombre se encuentra vacío'); define('lang_Empty_name', 'El nombre se encuentra vacío');
define('lang_Text_filter','filtro de texto'); define('lang_Text_filter', 'filtro de texto');
define('lang_Swipe_help','Deslize el nombre del archivo/carpeta para mostrar las opciones'); define('lang_Swipe_help', 'Deslize el nombre del archivo/carpeta para mostrar las opciones');
define('lang_Upload_base','Subida de archivos SIMPLE'); define('lang_Upload_base', 'Subida de archivos SIMPLE');
define('lang_Upload_java','Subida de archivos JAVA (para archivos pesados)'); define('lang_Upload_java', 'Subida de archivos JAVA (para archivos pesados)');
define('lang_Upload_java_help',"Si el applet no carga: 1. Asegúrate de tener Java instalado; sino descárgalo e instálalo <a href='http://java.com/en/download/'>desde aquí</a> 2. Asegúrate que tu firewall no esté bloqueando nada."); define('lang_Upload_java_help', "Si el applet no carga: 1. Asegúrate de tener Java instalado; sino descárgalo e instálalo <a href='http://java.com/en/download/'>desde aquí</a> 2. Asegúrate que tu firewall no esté bloqueando nada.");
define('lang_Upload_base_help',"Arrastra y suelta los archivos dentro de esta área o haga clic en ella (para navegadores modernos) de lo contrario, seleccione el archivo y haga clic en el botón. Cuando finalice la subida, haga clic en el botón superior para regresar."); define('lang_Upload_base_help', "Arrastra y suelta los archivos dentro de esta área o haga clic en ella (para navegadores modernos) de lo contrario, seleccione el archivo y haga clic en el botón. Cuando finalice la subida, haga clic en el botón superior para regresar.");
define('lang_Type_dir','Carpeta'); define('lang_Type_dir', 'Carpeta');
define('lang_Type','Tipo'); define('lang_Type', 'Tipo');
define('lang_Dimension','Dimensiones'); define('lang_Dimension', 'Dimensiones');
define('lang_Size','Peso'); define('lang_Size', 'Peso');
define('lang_Date','Fecha'); define('lang_Date', 'Fecha');
define('lang_Filename','Nombre'); define('lang_Filename', 'Nombre');
define('lang_Operations','Operaciones'); define('lang_Operations', 'Operaciones');
define('lang_Date_type','y-m-d'); define('lang_Date_type', 'y-m-d');
define('lang_OK','OK'); define('lang_OK', 'OK');
define('lang_Cancel','Cancelar'); define('lang_Cancel', 'Cancelar');
define('lang_Sorting','Ordenar'); define('lang_Sorting', 'Ordenar');
define('lang_Show_url','Mostrar URL'); define('lang_Show_url', 'Mostrar URL');
define('lang_Extract','Extraer aquí'); 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');
?>

View File

@ -1,58 +1,57 @@
<?php <?php
define('lang_Select','انتخاب'); define('lang_Select', 'انتخاب');
define('lang_Erase','حذف'); define('lang_Erase', 'حذف');
define('lang_Open','بازگشایی'); define('lang_Open', 'بازگشایی');
define('lang_Confirm_del','میخواهید این فایل را حذف کنید؟'); define('lang_Confirm_del', 'میخواهید این فایل را حذف کنید؟');
define('lang_All','همه'); define('lang_All', 'همه');
define('lang_Files','فایلها'); define('lang_Files', 'فایلها');
define('lang_Images','تصاویر'); define('lang_Images', 'تصاویر');
define('lang_Archives','آرشیو'); define('lang_Archives', 'آرشیو');
define('lang_Error_Upload','فایل آپلود شده بیش از حداکثر اندازه مجاز است.'); define('lang_Error_Upload', 'فایل آپلود شده بیش از حداکثر اندازه مجاز است.');
define('lang_Error_extension','نوع فایل مجاز نیست.'); define('lang_Error_extension', 'نوع فایل مجاز نیست.');
define('lang_Upload_file','آپلود'); define('lang_Upload_file', 'آپلود');
define('lang_Filters','فیلترها'); define('lang_Filters', 'فیلترها');
define('lang_Videos','ویدئوها'); define('lang_Videos', 'ویدئوها');
define('lang_Music','موزیک'); define('lang_Music', 'موزیک');
define('lang_New_Folder','فولدر جدید'); define('lang_New_Folder', 'فولدر جدید');
define('lang_Folder_Created','پوشه به درستی ایجاد شد'); define('lang_Folder_Created', 'پوشه به درستی ایجاد شد');
define('lang_Existing_Folder','پوشه های موجود'); define('lang_Existing_Folder', 'پوشه های موجود');
define('lang_Confirm_Folder_del','آیا میخواهید این فولدر را با تمام محتوایش حذف کنید؟'); define('lang_Confirm_Folder_del', 'آیا میخواهید این فولدر را با تمام محتوایش حذف کنید؟');
define('lang_Return_Files_List','برگشت به لیست فایلها'); define('lang_Return_Files_List', 'برگشت به لیست فایلها');
define('lang_Preview','پیش نمایش'); define('lang_Preview', 'پیش نمایش');
define('lang_Download','دانلود'); define('lang_Download', 'دانلود');
define('lang_Insert_Folder_Name','نام فولدر:'); define('lang_Insert_Folder_Name', 'نام فولدر:');
define('lang_Root','شاخه اصلی'); define('lang_Root', 'شاخه اصلی');
define('lang_Rename','تغییر نام'); define('lang_Rename', 'تغییر نام');
define('lang_Back','برگشت'); define('lang_Back', 'برگشت');
define('lang_View','نمایش'); define('lang_View', 'نمایش');
define('lang_View_list','نمایش لیست'); define('lang_View_list', 'نمایش لیست');
define('lang_View_columns_list','نمایش لیست ستونی'); define('lang_View_columns_list', 'نمایش لیست ستونی');
define('lang_View_boxes','نمایش باکسها'); define('lang_View_boxes', 'نمایش باکسها');
define('lang_Toolbar','نوار ابزار'); define('lang_Toolbar', 'نوار ابزار');
define('lang_Actions','عملیات'); define('lang_Actions', 'عملیات');
define('lang_Rename_existing_file','فایل از قبل موجود است'); define('lang_Rename_existing_file', 'فایل از قبل موجود است');
define('lang_Rename_existing_folder','فولدر از قبل موجود است'); define('lang_Rename_existing_folder', 'فولدر از قبل موجود است');
define('lang_Empty_name','نام خالی است'); define('lang_Empty_name', 'نام خالی است');
define('lang_Text_filter','فیلتر نوشته'); define('lang_Text_filter', 'فیلتر نوشته');
define('lang_Swipe_help','Swipe the name of file/folder to show options'); define('lang_Swipe_help', 'Swipe the name of file/folder to show options');
define('lang_Upload_base','آپلودر اصلی'); define('lang_Upload_base', 'آپلودر اصلی');
define('lang_Upload_java','آپلودر جاوا (فایلهای حجیم)'); define('lang_Upload_java', 'آپلودر جاوا (فایلهای حجیم)');
define('lang_Upload_java_help',"If the Java Applet doesn'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 by your firewall"); define('lang_Upload_java_help', "If the Java Applet doesn'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 by your firewall");
define('lang_Upload_base_help',"فایلها را از سیستم خود بکشید و اینجا رها کنید یا اینجا کلیک کنید و فایل انتخاب کنید و هنگامی که آپلود تمام شد، روی کلید \"برگشت به لیست فایلها\" کلیک کنید."); define('lang_Upload_base_help', "فایلها را از سیستم خود بکشید و اینجا رها کنید یا اینجا کلیک کنید و فایل انتخاب کنید و هنگامی که آپلود تمام شد، روی کلید \"برگشت به لیست فایلها\" کلیک کنید.");
define('lang_Type_dir','مسیر'); define('lang_Type_dir', 'مسیر');
define('lang_Type','نوع'); define('lang_Type', 'نوع');
define('lang_Dimension','بعد'); define('lang_Dimension', 'بعد');
define('lang_Size','اندازه'); define('lang_Size', 'اندازه');
define('lang_Date','تاریخ'); define('lang_Date', 'تاریخ');
define('lang_Filename','نام فایل'); define('lang_Filename', 'نام فایل');
define('lang_Operations','عملیات'); define('lang_Operations', 'عملیات');
define('lang_Date_type','y-m-d'); define('lang_Date_type', 'y-m-d');
define('lang_OK','باشه'); define('lang_OK', 'باشه');
define('lang_Cancel','لغو'); define('lang_Cancel', 'لغو');
define('lang_Sorting','مرتب سازی'); define('lang_Sorting', 'مرتب سازی');
define('lang_Show_url','نمایش آدرس'); define('lang_Show_url', 'نمایش آدرس');
define('lang_Extract','استخراج در اینجا'); 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');
?>

View File

@ -1,58 +1,57 @@
<?php <?php
define('lang_Select','Sélectionner'); define('lang_Select', 'Sélectionner');
define('lang_Erase','Effacer'); define('lang_Erase', 'Effacer');
define('lang_Open','Ouvrir'); define('lang_Open', 'Ouvrir');
define('lang_Confirm_del','Êtes-vous sûr de vouloir effacer ce fichier ?'); define('lang_Confirm_del', 'Êtes-vous sûr de vouloir effacer ce fichier ?');
define('lang_All','Tous'); define('lang_All', 'Tous');
define('lang_Files','Fichiers'); define('lang_Files', 'Fichiers');
define('lang_Images','Images'); define('lang_Images', 'Images');
define('lang_Archives','Archives'); define('lang_Archives', 'Archives');
define('lang_Error_Upload', 'Votre fichier dépasse la taille maximum autorisée.'); define('lang_Error_Upload', 'Votre fichier dépasse la taille maximum autorisée.');
define('lang_Error_extension','Extension de fichier non autorisée'); define('lang_Error_extension', 'Extension de fichier non autorisée');
define('lang_Upload_file','Envoyer un fichier'); define('lang_Upload_file', 'Envoyer un fichier');
define('lang_Filters','Filtrer'); define('lang_Filters', 'Filtrer');
define('lang_Videos','Vidéos'); define('lang_Videos', 'Vidéos');
define('lang_Music','Musique'); define('lang_Music', 'Musique');
define('lang_New_Folder','Nouveau dossier'); define('lang_New_Folder', 'Nouveau dossier');
define('lang_Folder_Created','Dossier correctement créé'); define('lang_Folder_Created', 'Dossier correctement créé');
define('lang_Existing_Folder','Dossier existant'); define('lang_Existing_Folder', 'Dossier existant');
define('lang_Confirm_Folder_del','Êtes-vous sûr de vouloir supprimer le dossier ainsi que tous ses éléments ?'); define('lang_Confirm_Folder_del', 'Êtes-vous sûr de vouloir supprimer le dossier ainsi que tous ses éléments ?');
define('lang_Return_Files_List','Revenir à la liste des fichiers'); define('lang_Return_Files_List', 'Revenir à la liste des fichiers');
define('lang_Preview','Aperçu'); define('lang_Preview', 'Aperçu');
define('lang_Download','Télécharger'); define('lang_Download', 'Télécharger');
define('lang_Insert_Folder_Name','Insérer le nom du dossier:'); define('lang_Insert_Folder_Name', 'Insérer le nom du dossier:');
define('lang_Root','Racine'); define('lang_Root', 'Racine');
define('lang_Rename','Renommer'); define('lang_Rename', 'Renommer');
define('lang_Back','Retour'); define('lang_Back', 'Retour');
define('lang_View','Vue'); define('lang_View', 'Vue');
define('lang_View_list','Vue par liste'); define('lang_View_list', 'Vue par liste');
define('lang_View_columns_list','Vue par listes de colonne'); define('lang_View_columns_list', 'Vue par listes de colonne');
define('lang_View_boxes','Vue par icônes'); define('lang_View_boxes', 'Vue par icônes');
define('lang_Toolbar','Barre d\'outils'); define('lang_Toolbar', 'Barre d\'outils');
define('lang_Actions','Actions'); define('lang_Actions', 'Actions');
define('lang_Rename_existing_file','Ce fichier existe déjà'); 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','Glissez le nom du fichier/dossier pour afficher les options'); define('lang_Swipe_help', 'Glissez le nom du fichier/dossier pour afficher les options');
define('lang_Upload_base','Upload classique'); define('lang_Upload_base', 'Upload classique');
define('lang_Upload_java','JAVA upload (fichiers de grandes tailles)'); define('lang_Upload_java', 'JAVA upload (fichiers de grandes tailles)');
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_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',"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_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');
define('lang_Size','Taille'); define('lang_Size', 'Taille');
define('lang_Date','Date'); define('lang_Date', 'Date');
define('lang_Filename','Nom'); define('lang_Filename', 'Nom');
define('lang_Operations','Opérations'); define('lang_Operations', 'Opérations');
define('lang_Date_type','d/m/Y'); define('lang_Date_type', 'd/m/Y');
define('lang_OK','OK'); define('lang_OK', 'OK');
define('lang_Cancel','Annuler'); define('lang_Cancel', 'Annuler');
define('lang_Sorting','Trier'); define('lang_Sorting', 'Trier');
define('lang_Show_url','Afficher l\'URL'); define('lang_Show_url', 'Afficher l\'URL');
define('lang_Extract','Extraire ici'); 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');
?>

View File

@ -1,59 +1,57 @@
<?php <?php
define('lang_Select','Odaberi'); define('lang_Select', 'Odaberi');
define('lang_Erase','Obriši'); define('lang_Erase', 'Obriši');
define('lang_Open','Otvori'); define('lang_Open', 'Otvori');
define('lang_Confirm_del','Jeste li sigurni da želite obrisati ovu datoteku?'); define('lang_Confirm_del', 'Jeste li sigurni da želite obrisati ovu datoteku?');
define('lang_All','Sve'); define('lang_All', 'Sve');
define('lang_Files','Datoteke'); define('lang_Files', 'Datoteke');
define('lang_Images','Slike'); define('lang_Images', 'Slike');
define('lang_Archives','Kompresirane arhive'); define('lang_Archives', 'Kompresirane arhive');
define('lang_Error_Upload','Datoteka koju želite prenesti prelazi maximalnu dopuštenu veličinu.'); define('lang_Error_Upload', 'Datoteka koju želite prenesti prelazi maximalnu dopuštenu veličinu.');
define('lang_Error_extension','Datoteka s tom ekstenzijom nije dopuštena.'); define('lang_Error_extension', 'Datoteka s tom ekstenzijom nije dopuštena.');
define('lang_Upload_file','Prenesi'); define('lang_Upload_file', 'Prenesi');
define('lang_Filters','Filteri'); define('lang_Filters', 'Filteri');
define('lang_Videos','Video zapisi'); define('lang_Videos', 'Video zapisi');
define('lang_Music','Glazba'); define('lang_Music', 'Glazba');
define('lang_New_Folder','Nova mapa'); define('lang_New_Folder', 'Nova mapa');
define('lang_Folder_Created','Mapa je uspješno kreirana'); define('lang_Folder_Created', 'Mapa je uspješno kreirana');
define('lang_Existing_Folder','Postojeća mapa'); define('lang_Existing_Folder', 'Postojeća mapa');
define('lang_Confirm_Folder_del','Jeste li sigurni da želite obrisati ovu mapu i sve datoteke u njoj?'); define('lang_Confirm_Folder_del', 'Jeste li sigurni da želite obrisati ovu mapu i sve datoteke u njoj?');
define('lang_Return_Files_List','Vrati se na pregled datoteka'); define('lang_Return_Files_List', 'Vrati se na pregled datoteka');
define('lang_Preview','Pogledaj'); define('lang_Preview', 'Pogledaj');
define('lang_Download','Preuzmi'); define('lang_Download', 'Preuzmi');
define('lang_Insert_Folder_Name','Naziv nove mape:'); define('lang_Insert_Folder_Name', 'Naziv nove mape:');
define('lang_Root','polazno'); define('lang_Root', 'polazno');
define('lang_Rename','Preimenuj'); define('lang_Rename', 'Preimenuj');
define('lang_Back','natrag'); define('lang_Back', 'natrag');
define('lang_View','Prikaz'); define('lang_View', 'Prikaz');
define('lang_View_list','Prikaz liste'); define('lang_View_list', 'Prikaz liste');
define('lang_View_columns_list','Prikaz stupac-liste'); define('lang_View_columns_list', 'Prikaz stupac-liste');
define('lang_View_boxes','Prikaz grid'); define('lang_View_boxes', 'Prikaz grid');
define('lang_Toolbar','Alatna traka'); define('lang_Toolbar', 'Alatna traka');
define('lang_Actions','Radnja'); define('lang_Actions', 'Radnja');
define('lang_Rename_existing_file','Datoteka već postoji'); define('lang_Rename_existing_file', 'Datoteka već postoji');
define('lang_Rename_existing_folder','Mapa već postoji'); define('lang_Rename_existing_folder', 'Mapa već postoji');
define('lang_Empty_name','Naziv nije upisan'); define('lang_Empty_name', 'Naziv nije upisan');
define('lang_Text_filter','filtriraj po nazivu'); define('lang_Text_filter', 'filtriraj po nazivu');
define('lang_Swipe_help','Povucite prstom ime datoteke / mape za prikaz mogućnosti'); define('lang_Swipe_help', 'Povucite prstom ime datoteke / mape za prikaz mogućnosti');
define('lang_Upload_base','Putanja do mape za prenesene datoteke'); define('lang_Upload_base', 'Putanja do mape za prenesene datoteke');
define('lang_Upload_java','JAVA prijenos (odlično za prijenos velikih datoteka)'); define('lang_Upload_java', 'JAVA prijenos (odlično za prijenos velikih datoteka)');
define('lang_Upload_java_help',"Ako se Java dodatak ne učita 1. provjerite imate li instaliran Java dodatak <a href='http://java.com/en/download/'>[link za preuzimanje]</a> 2. provjerite da firewall nije aktiviran i blokira dodatak"); define('lang_Upload_java_help', "Ako se Java dodatak ne učita 1. provjerite imate li instaliran Java dodatak <a href='http://java.com/en/download/'>[link za preuzimanje]</a> 2. provjerite da firewall nije aktiviran i blokira dodatak");
define('lang_Upload_base_help',"Povucite i ispustite datoteke ili samo kliknite (moderni preglednici) te odaberite datoteku(s). Kad prijenos završi, kliknite 'Natrag na pregled datoteka' gumb."); define('lang_Upload_base_help', "Povucite i ispustite datoteke ili samo kliknite (moderni preglednici) te odaberite datoteku(s). Kad prijenos završi, kliknite 'Natrag na pregled datoteka' gumb.");
define('lang_Type_dir','mapa'); define('lang_Type_dir', 'mapa');
define('lang_Type','Tip'); define('lang_Type', 'Tip');
define('lang_Dimension','Dimenzije'); define('lang_Dimension', 'Dimenzije');
define('lang_Size','Veličina'); define('lang_Size', 'Veličina');
define('lang_Date','Datum'); define('lang_Date', 'Datum');
define('lang_Filename','Naziv datoteke'); define('lang_Filename', 'Naziv datoteke');
define('lang_Operations','Radnje'); define('lang_Operations', 'Radnje');
define('lang_Date_type','y-m-d'); define('lang_Date_type', 'y-m-d');
define('lang_OK','U redu'); define('lang_OK', 'U redu');
define('lang_Cancel','Odustani'); define('lang_Cancel', 'Odustani');
define('lang_Sorting','sortiranje'); define('lang_Sorting', 'sortiranje');
define('lang_Show_url','prikaži URL'); define('lang_Show_url', 'prikaži URL');
define('lang_Extract','raspakiraj ovdje'); 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');
?>

View File

@ -1,58 +1,57 @@
<?php <?php
define('lang_Select','Tallózás'); define('lang_Select', 'Tallózás');
define('lang_Erase','Törlés'); define('lang_Erase', 'Törlés');
define('lang_Open','Megnyitás'); define('lang_Open', 'Megnyitás');
define('lang_Confirm_del','Biztos vagy benne, hogy törlöd ezt a fájlt?'); define('lang_Confirm_del', 'Biztos vagy benne, hogy törlöd ezt a fájlt?');
define('lang_All','Összes'); define('lang_All', 'Összes');
define('lang_Files','Fájlok'); define('lang_Files', 'Fájlok');
define('lang_Images','Képek'); define('lang_Images', 'Képek');
define('lang_Archives','Tömörített'); define('lang_Archives', 'Tömörített');
define('lang_Error_Upload','A kiválasztott fájl mérete túl nagy!'); define('lang_Error_Upload', 'A kiválasztott fájl mérete túl nagy!');
define('lang_Error_extension','A megadott kiterjesztésű fájl nem engedélyezett.'); define('lang_Error_extension', 'A megadott kiterjesztésű fájl nem engedélyezett.');
define('lang_Upload_file','Fájl feltöltése'); define('lang_Upload_file', 'Fájl feltöltése');
define('lang_Filters','Szűrő'); define('lang_Filters', 'Szűrő');
define('lang_Videos','Videó'); define('lang_Videos', 'Videó');
define('lang_Music','Zene'); define('lang_Music', 'Zene');
define('lang_New_Folder','Új mappa'); define('lang_New_Folder', 'Új mappa');
define('lang_Folder_Created','Mappa létrehozva'); define('lang_Folder_Created', 'Mappa létrehozva');
define('lang_Existing_Folder','Mappa már létezik'); define('lang_Existing_Folder', 'Mappa már létezik');
define('lang_Confirm_Folder_del','Biztos, hogy törlöd a könyvtárat és annak tartalmát?'); define('lang_Confirm_Folder_del', 'Biztos, hogy törlöd a könyvtárat és annak tartalmát?');
define('lang_Return_Files_List','Vissza a fájllistához'); define('lang_Return_Files_List', 'Vissza a fájllistához');
define('lang_Preview','Előnézet'); define('lang_Preview', 'Előnézet');
define('lang_Download','Letöltés'); define('lang_Download', 'Letöltés');
define('lang_Insert_Folder_Name','Mappa neve:'); define('lang_Insert_Folder_Name', 'Mappa neve:');
define('lang_Root','root'); define('lang_Root', 'root');
define('lang_Rename','Átnevezés'); define('lang_Rename', 'Átnevezés');
define('lang_Back','vissza'); define('lang_Back', 'vissza');
define('lang_View','Nézet'); define('lang_View', 'Nézet');
define('lang_View_list','Lista'); define('lang_View_list', 'Lista');
define('lang_View_columns_list','Oszlopok'); define('lang_View_columns_list', 'Oszlopok');
define('lang_View_boxes','Miniatűrök'); define('lang_View_boxes', 'Miniatűrök');
define('lang_Toolbar','Eszközök'); define('lang_Toolbar', 'Eszközök');
define('lang_Actions','Műveletek'); define('lang_Actions', 'Műveletek');
define('lang_Rename_existing_file','A fájl már létezik'); define('lang_Rename_existing_file', 'A fájl már létezik');
define('lang_Rename_existing_folder','A mappa már létezik'); define('lang_Rename_existing_folder', 'A mappa már létezik');
define('lang_Empty_name','A név nincs megadva'); define('lang_Empty_name', 'A név nincs megadva');
define('lang_Text_filter','szűrés'); define('lang_Text_filter', 'szűrés');
define('lang_Swipe_help','Húzd az egered a fájl/mappa nevére, hogy lásd az opciókat.'); define('lang_Swipe_help', 'Húzd az egered a fájl/mappa nevére, hogy lásd az opciókat.');
define('lang_Upload_base','Alapértelmezett feltöltő'); define('lang_Upload_base', 'Alapértelmezett feltöltő');
define('lang_Upload_java','JAVA feltöltő (nagyméretű fájlokhoz)'); define('lang_Upload_java', 'JAVA feltöltő (nagyméretű fájlokhoz)');
define('lang_Upload_java_help',"Ha a Java Applet nem töltődik be: 1. ellenőrizze, hogy a JAVA telepítve van-e, ha nincs: <a href='http://java.com/en/download/'>[letöltés]</a> 2. ellenőrizze, hogy a tűzfal nem blokkolja-e"); define('lang_Upload_java_help', "Ha a Java Applet nem töltődik be: 1. ellenőrizze, hogy a JAVA telepítve van-e, ha nincs: <a href='http://java.com/en/download/'>[letöltés]</a> 2. ellenőrizze, hogy a tűzfal nem blokkolja-e");
define('lang_Upload_base_help',"Fogd meg és húzd az ablakba a fájlt vagy kattints bele és válaszd ki majd nyomd meg a megnyitás gombot (modern böngészők). Amikor a feltöltés befejeződött kattints a fenti gombra a visszatéréshez."); define('lang_Upload_base_help', "Fogd meg és húzd az ablakba a fájlt vagy kattints bele és válaszd ki majd nyomd meg a megnyitás gombot (modern böngészők). Amikor a feltöltés befejeződött kattints a fenti gombra a visszatéréshez.");
define('lang_Type_dir','Mappa'); define('lang_Type_dir', 'Mappa');
define('lang_Type','Típus'); define('lang_Type', 'Típus');
define('lang_Dimension','Felbontás'); define('lang_Dimension', 'Felbontás');
define('lang_Size','Méret'); define('lang_Size', 'Méret');
define('lang_Date','Dátum'); define('lang_Date', 'Dátum');
define('lang_Filename','Név'); define('lang_Filename', 'Név');
define('lang_Operations','Műveletek'); define('lang_Operations', 'Műveletek');
define('lang_Date_type','y-m-d'); define('lang_Date_type', 'y-m-d');
define('lang_OK','OK'); define('lang_OK', 'OK');
define('lang_Cancel','Mégse'); define('lang_Cancel', 'Mégse');
define('lang_Sorting','rendezés'); define('lang_Sorting', 'rendezés');
define('lang_Show_url','URL mutatása'); define('lang_Show_url', 'URL mutatása');
define('lang_Extract','kibontás ide'); 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');
?>

View File

@ -1,59 +1,57 @@
<?php <?php
define('lang_Select','Pilih'); define('lang_Select', 'Pilih');
define('lang_Erase','Hapus'); define('lang_Erase', 'Hapus');
define('lang_Open','Buka'); define('lang_Open', 'Buka');
define('lang_Confirm_del','Apakah anda yakin menghapus berkas ini?'); define('lang_Confirm_del', 'Apakah anda yakin menghapus berkas ini?');
define('lang_All','Semua'); define('lang_All', 'Semua');
define('lang_Files','Berkas'); define('lang_Files', 'Berkas');
define('lang_Images','Gambar'); define('lang_Images', 'Gambar');
define('lang_Archives','Arsip'); define('lang_Archives', 'Arsip');
define('lang_Error_Upload','Berkas yang diubah melebihi batas ukuran yang diperbolehkan.'); define('lang_Error_Upload', 'Berkas yang diubah melebihi batas ukuran yang diperbolehkan.');
define('lang_Error_extension','Ekstensi berkas tidak diperbolehkan.'); define('lang_Error_extension', 'Ekstensi berkas tidak diperbolehkan.');
define('lang_Upload_file','Unggah'); define('lang_Upload_file', 'Unggah');
define('lang_Filters','Saring'); define('lang_Filters', 'Saring');
define('lang_Videos','Video'); define('lang_Videos', 'Video');
define('lang_Music','Musik'); define('lang_Music', 'Musik');
define('lang_New_Folder','Folder Baru'); define('lang_New_Folder', 'Folder Baru');
define('lang_Folder_Created','Folder Telah Dibuat'); define('lang_Folder_Created', 'Folder Telah Dibuat');
define('lang_Existing_Folder','Folder yang ada'); define('lang_Existing_Folder', 'Folder yang ada');
define('lang_Confirm_Folder_del','Apakah anda yakin menghapus folder dan semua isi didalamnya?'); define('lang_Confirm_Folder_del', 'Apakah anda yakin menghapus folder dan semua isi didalamnya?');
define('lang_Return_Files_List','Kembali ke daftar'); define('lang_Return_Files_List', 'Kembali ke daftar');
define('lang_Preview','Pratampil'); define('lang_Preview', 'Pratampil');
define('lang_Download','Unduh'); define('lang_Download', 'Unduh');
define('lang_Insert_Folder_Name','Masukkan nama folder:'); define('lang_Insert_Folder_Name', 'Masukkan nama folder:');
define('lang_Root','root'); define('lang_Root', 'root');
define('lang_Rename','Ubah nama'); define('lang_Rename', 'Ubah nama');
define('lang_Back','kembali'); define('lang_Back', 'kembali');
define('lang_View','lihat'); define('lang_View', 'lihat');
define('lang_View_list','Tampilan Daftar'); define('lang_View_list', 'Tampilan Daftar');
define('lang_View_columns_list','Tampilan Daftar kolom'); define('lang_View_columns_list', 'Tampilan Daftar kolom');
define('lang_View_boxes','Tampilan Kotak'); define('lang_View_boxes', 'Tampilan Kotak');
define('lang_Toolbar','Toolbar'); define('lang_Toolbar', 'Toolbar');
define('lang_Actions','Aksi'); define('lang_Actions', 'Aksi');
define('lang_Rename_existing_file','Berkas Sudah ada'); define('lang_Rename_existing_file', 'Berkas Sudah ada');
define('lang_Rename_existing_folder','Folder sudah ada'); define('lang_Rename_existing_folder', 'Folder sudah ada');
define('lang_Empty_name','Nama Kosong'); define('lang_Empty_name', 'Nama Kosong');
define('lang_Text_filter','saring teks'); define('lang_Text_filter', 'saring teks');
define('lang_Swipe_help','Arahkan pada nama berkas/folder untuk melihat pilihan'); define('lang_Swipe_help', 'Arahkan pada nama berkas/folder untuk melihat pilihan');
define('lang_Upload_base','Basis Unggah'); define('lang_Upload_base', 'Basis Unggah');
define('lang_Upload_java','Unggahan dengan JAVA (Berkas Ukuran Besar)'); define('lang_Upload_java', 'Unggahan dengan JAVA (Berkas Ukuran Besar)');
define('lang_Upload_java_help',"Jika JAVA applet tidak muncul maka, 1. Pastikan JAVA sudah terinstal, jika tidak <a href='http://java.com/en/download/'>[download link]</a> 2. Pastikan firewall anda tidak memblok aksi tersebut"); define('lang_Upload_java_help', "Jika JAVA applet tidak muncul maka, 1. Pastikan JAVA sudah terinstal, jika tidak <a href='http://java.com/en/download/'>[download link]</a> 2. Pastikan firewall anda tidak memblok aksi tersebut");
define('lang_Upload_base_help',"Seret & letakkan berkas atau klik area di atas (browser terbaru) dan pilih berkasnya. ketika proses unggah selesai, Klik tombol 'Kembali ke daftar'."); define('lang_Upload_base_help', "Seret & letakkan berkas atau klik area di atas (browser terbaru) dan pilih berkasnya. ketika proses unggah selesai, Klik tombol 'Kembali ke daftar'.");
define('lang_Type_dir','direktori'); define('lang_Type_dir', 'direktori');
define('lang_Type','Tipe'); define('lang_Type', 'Tipe');
define('lang_Dimension','Dimensi'); define('lang_Dimension', 'Dimensi');
define('lang_Size','Ukuran'); define('lang_Size', 'Ukuran');
define('lang_Date','Tanggal'); define('lang_Date', 'Tanggal');
define('lang_Filename','Nama_berkas'); define('lang_Filename', 'Nama_berkas');
define('lang_Operations','Operasi'); define('lang_Operations', 'Operasi');
define('lang_Date_type','y-m-d'); define('lang_Date_type', 'y-m-d');
define('lang_OK','OK'); define('lang_OK', 'OK');
define('lang_Cancel','Cancel'); define('lang_Cancel', 'Cancel');
define('lang_Sorting','Sortir'); define('lang_Sorting', 'Sortir');
define('lang_Show_url','lihat URL'); define('lang_Show_url', 'lihat URL');
define('lang_Extract','extract disini'); 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');
?>

View File

@ -1,58 +1,57 @@
<?php <?php
define('lang_Select','Seleziona'); define('lang_Select', 'Seleziona');
define('lang_Erase','Cancella'); define('lang_Erase', 'Cancella');
define('lang_Open','Apri'); define('lang_Open', 'Apri');
define('lang_Confirm_del','Sei sicuro di volere cancellare questo file?'); define('lang_Confirm_del', 'Sei sicuro di volere cancellare questo file?');
define('lang_All','Tutti'); define('lang_All', 'Tutti');
define('lang_Files','Files'); define('lang_Files', 'Files');
define('lang_Images','Immagini'); define('lang_Images', 'Immagini');
define('lang_Archives','Archivi'); define('lang_Archives', 'Archivi');
define('lang_Error_Upload','Il file caricato supera i limiti imposti.'); define('lang_Error_Upload', 'Il file caricato supera i limiti imposti.');
define('lang_Error_extension','Il tipo del file caricato non è permesso.'); define('lang_Error_extension', 'Il tipo del file caricato non è permesso.');
define('lang_Upload_file','Carica'); define('lang_Upload_file', 'Carica');
define('lang_Filters','Filtri'); define('lang_Filters', 'Filtri');
define('lang_Videos','Video'); define('lang_Videos', 'Video');
define('lang_Music','Musica'); define('lang_Music', 'Musica');
define('lang_New_Folder','Nuova Cartella'); define('lang_New_Folder', 'Nuova Cartella');
define('lang_Folder_Created','Cartella creata correttamente'); define('lang_Folder_Created', 'Cartella creata correttamente');
define('lang_Existing_Folder','Cartella già esistente'); define('lang_Existing_Folder', 'Cartella già esistente');
define('lang_Confirm_Folder_del','Sei sicuro di voler cancellare la cartella e tutti i file in essa contenuti?'); define('lang_Confirm_Folder_del', 'Sei sicuro di voler cancellare la cartella e tutti i file in essa contenuti?');
define('lang_Return_Files_List','Ritorna alla lista dei file'); define('lang_Return_Files_List', 'Ritorna alla lista dei file');
define('lang_Preview','Anteprima'); define('lang_Preview', 'Anteprima');
define('lang_Download','Download'); define('lang_Download', 'Download');
define('lang_Insert_Folder_Name','Inserisci il nome della cartella:'); define('lang_Insert_Folder_Name', 'Inserisci il nome della cartella:');
define('lang_Root','base'); define('lang_Root', 'base');
define('lang_Rename','Rinomina'); define('lang_Rename', 'Rinomina');
define('lang_Back','indietro'); define('lang_Back', 'indietro');
define('lang_View','Vista'); define('lang_View', 'Vista');
define('lang_View_list','Vista a lista'); define('lang_View_list', 'Vista a lista');
define('lang_View_columns_list','Vista a colonne'); define('lang_View_columns_list', 'Vista a colonne');
define('lang_View_boxes','Vista a box'); define('lang_View_boxes', 'Vista a box');
define('lang_Toolbar','Toolbar'); define('lang_Toolbar', 'Toolbar');
define('lang_Actions','Azioni'); define('lang_Actions', 'Azioni');
define('lang_Rename_existing_file','Il file esiste già'); define('lang_Rename_existing_file', 'Il file esiste già');
define('lang_Rename_existing_folder','La cartella esiste già'); define('lang_Rename_existing_folder', 'La cartella esiste già');
define('lang_Empty_name','Il nome è vuoto'); define('lang_Empty_name', 'Il nome è vuoto');
define('lang_Text_filter','filtro di testo'); define('lang_Text_filter', 'filtro di testo');
define('lang_Swipe_help','Esegui uno Swipe sul nome del file/cartella per mostrare le opzioni'); define('lang_Swipe_help', 'Esegui uno Swipe sul nome del file/cartella per mostrare le opzioni');
define('lang_Upload_base','Upload Base'); define('lang_Upload_base', 'Upload Base');
define('lang_Upload_java','JAVA upload (file di grosse dimensioni)'); define('lang_Upload_java', 'JAVA upload (file di grosse dimensioni)');
define('lang_Upload_java_help',"Se non si carica l'applet java 1. assicurati di aver installato java nel computer altrimenti <a href='http://java.com/en/download/'>[download link]</a> 2. asscurati di non essere bloccato da un firewall"); define('lang_Upload_java_help', "Se non si carica l'applet java 1. assicurati di aver installato java nel computer altrimenti <a href='http://java.com/en/download/'>[download link]</a> 2. asscurati di non essere bloccato da un firewall");
define('lang_Upload_base_help',"Trascina i file nell'area superiore o clicca in essa (per i moderni browser) altrimenti seleziona il file e clicca sul bottone. Quando il caricamento dei file è terminato clicca sul bottone di ritorno in alto."); define('lang_Upload_base_help', "Trascina i file nell'area superiore o clicca in essa (per i moderni browser) altrimenti seleziona il file e clicca sul bottone. Quando il caricamento dei file è terminato clicca sul bottone di ritorno in alto.");
define('lang_Type_dir','dir'); define('lang_Type_dir', 'dir');
define('lang_Type','Tipo'); define('lang_Type', 'Tipo');
define('lang_Dimension','Dimensione'); define('lang_Dimension', 'Dimensione');
define('lang_Size','Peso'); define('lang_Size', 'Peso');
define('lang_Date','Data'); define('lang_Date', 'Data');
define('lang_Filename','Nome'); define('lang_Filename', 'Nome');
define('lang_Operations','Operazioni'); define('lang_Operations', 'Operazioni');
define('lang_Date_type','d/m/y'); define('lang_Date_type', 'd/m/y');
define('lang_OK','OK'); define('lang_OK', 'OK');
define('lang_Cancel','Annulla'); define('lang_Cancel', 'Annulla');
define('lang_Sorting','ordina'); define('lang_Sorting', 'ordina');
define('lang_Show_url','mostra URL'); define('lang_Show_url', 'mostra URL');
define('lang_Extract','estrai qui'); 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');
?>

View File

@ -1,59 +1,57 @@
<?php <?php
define('lang_Select','Сонгох'); define('lang_Select', 'Сонгох');
define('lang_Erase','Устгах'); define('lang_Erase', 'Устгах');
define('lang_Open','Нээх'); define('lang_Open', 'Нээх');
define('lang_Confirm_del','Та энэ файлыг устгахдаа итгэлтэй байна уу?'); define('lang_Confirm_del', 'Та энэ файлыг устгахдаа итгэлтэй байна уу?');
define('lang_All','Бүгд'); define('lang_All', 'Бүгд');
define('lang_Files','Файлууд'); define('lang_Files', 'Файлууд');
define('lang_Images','Зурагнууд'); define('lang_Images', 'Зурагнууд');
define('lang_Archives','Архивлагдсан файлууд'); define('lang_Archives', 'Архивлагдсан файлууд');
define('lang_Error_Upload','Хуулсан файл зөвшөөрөгдөх хэмжээнээс их байна.'); define('lang_Error_Upload', 'Хуулсан файл зөвшөөрөгдөх хэмжээнээс их байна.');
define('lang_Error_extension','Файлын өргөтгөх зөвшөөрөгдөөгүй.'); define('lang_Error_extension', 'Файлын өргөтгөх зөвшөөрөгдөөгүй.');
define('lang_Upload_file','Хуулах'); define('lang_Upload_file', 'Хуулах');
define('lang_Filters','Шүүлтүүрүүд'); define('lang_Filters', 'Шүүлтүүрүүд');
define('lang_Videos','Бичлэгнүүд'); define('lang_Videos', 'Бичлэгнүүд');
define('lang_Music','Дуунууд'); define('lang_Music', 'Дуунууд');
define('lang_New_Folder','Шинэ хавтас'); define('lang_New_Folder', 'Шинэ хавтас');
define('lang_Folder_Created','Хавтас амжилттай үүслээ'); define('lang_Folder_Created', 'Хавтас амжилттай үүслээ');
define('lang_Existing_Folder','Давхардсан хавтас'); define('lang_Existing_Folder', 'Давхардсан хавтас');
define('lang_Confirm_Folder_del','Хавтас болон доторх бүх файлуудыг устгахдаа итгэлтэй байна уу?'); define('lang_Confirm_Folder_del', 'Хавтас болон доторх бүх файлуудыг устгахдаа итгэлтэй байна уу?');
define('lang_Return_Files_List','Файлын жагсаалт руу буцах'); define('lang_Return_Files_List', 'Файлын жагсаалт руу буцах');
define('lang_Preview','Урьдчилан харах'); define('lang_Preview', 'Урьдчилан харах');
define('lang_Download','Татаж авах'); define('lang_Download', 'Татаж авах');
define('lang_Insert_Folder_Name','Хавтасны нэрийг оруулна уу:'); define('lang_Insert_Folder_Name', 'Хавтасны нэрийг оруулна уу:');
define('lang_Root','root'); define('lang_Root', 'root');
define('lang_Rename','Нэрлэх'); define('lang_Rename', 'Нэрлэх');
define('lang_Back','буцах'); define('lang_Back', 'буцах');
define('lang_View','Үзэх'); define('lang_View', 'Үзэх');
define('lang_View_list','Жагсаалтаар харах'); define('lang_View_list', 'Жагсаалтаар харах');
define('lang_View_columns_list','Баганаар харах'); define('lang_View_columns_list', 'Баганаар харах');
define('lang_View_boxes','Хайрцгаар харах'); define('lang_View_boxes', 'Хайрцгаар харах');
define('lang_Toolbar','Товчилсон товчнууд'); define('lang_Toolbar', 'Товчилсон товчнууд');
define('lang_Actions','Үйлдэл'); define('lang_Actions', 'Үйлдэл');
define('lang_Rename_existing_file','Файл аль хэдийнэ үүссэн байна'); define('lang_Rename_existing_file', 'Файл аль хэдийнэ үүссэн байна');
define('lang_Rename_existing_folder','Хавтас аль хэдийнэ үүсэн байна'); define('lang_Rename_existing_folder', 'Хавтас аль хэдийнэ үүсэн байна');
define('lang_Empty_name','Нэр хоосон байна'); define('lang_Empty_name', 'Нэр хоосон байна');
define('lang_Text_filter','текстэн шүүлтүүр'); define('lang_Text_filter', 'текстэн шүүлтүүр');
define('lang_Swipe_help','Файл/Хавтасны нэрийг товшоод тохиргоог харна уу'); define('lang_Swipe_help', 'Файл/Хавтасны нэрийг товшоод тохиргоог харна уу');
define('lang_Upload_base','Энгийнээр хуулах'); define('lang_Upload_base', 'Энгийнээр хуулах');
define('lang_Upload_java','JAVA-гаар хуулах (их хэмжээтэй файл)'); define('lang_Upload_java', 'JAVA-гаар хуулах (их хэмжээтэй файл)');
define('lang_Upload_java_help',"Хэрэв Java Applet уншихгүй бол 1. Java суусан эсэхийг шалгана уу, үгүй бол <a href='http://java.com/en/download/'>[эндээс татаж авна уу]</a> 2. Галт хана дээр хаалт хийсэн эсэхийг шалгана уу"); define('lang_Upload_java_help', "Хэрэв Java Applet уншихгүй бол 1. Java суусан эсэхийг шалгана уу, үгүй бол <a href='http://java.com/en/download/'>[эндээс татаж авна уу]</a> 2. Галт хана дээр хаалт хийсэн эсэхийг шалгана уу");
define('lang_Upload_base_help',"Хуулах хэсэг дээр файлыг зөөж тавих болон дээр нь дарж хуулж болно (орчин үеийн хөтөч дээр). Хуулж дууссан бол 'Файлын жагсаалт руу буцах' товчин дээр дарна уу."); define('lang_Upload_base_help', "Хуулах хэсэг дээр файлыг зөөж тавих болон дээр нь дарж хуулж болно (орчин үеийн хөтөч дээр). Хуулж дууссан бол 'Файлын жагсаалт руу буцах' товчин дээр дарна уу.");
define('lang_Type_dir','dir'); define('lang_Type_dir', 'dir');
define('lang_Type','Төрөл'); define('lang_Type', 'Төрөл');
define('lang_Dimension','Харьцаа'); define('lang_Dimension', 'Харьцаа');
define('lang_Size','Хэмжээ'); define('lang_Size', 'Хэмжээ');
define('lang_Date','Огноо'); define('lang_Date', 'Огноо');
define('lang_Filename','Файлын нэр'); define('lang_Filename', 'Файлын нэр');
define('lang_Operations','Үйлдэлүүд'); define('lang_Operations', 'Үйлдэлүүд');
define('lang_Date_type','y-m-d'); define('lang_Date_type', 'y-m-d');
define('lang_OK','ОК'); define('lang_OK', 'ОК');
define('lang_Cancel','Буцах'); define('lang_Cancel', 'Буцах');
define('lang_Sorting','эрэмбэлэх'); define('lang_Sorting', 'эрэмбэлэх');
define('lang_Show_url','URL-г харах'); define('lang_Show_url', 'URL-г харах');
define('lang_Extract','энд задла'); 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', 'Давхардуулах');
?>

View File

@ -1,59 +1,57 @@
<?php <?php
define('lang_Select','Velg'); define('lang_Select', 'Velg');
define('lang_Erase','Slett'); define('lang_Erase', 'Slett');
define('lang_Open','Åpne'); define('lang_Open', 'Åpne');
define('lang_Confirm_del','Er du sikker på at du vil slette denne filen?'); define('lang_Confirm_del', 'Er du sikker på at du vil slette denne filen?');
define('lang_All','Alle'); define('lang_All', 'Alle');
define('lang_Files','Filer'); define('lang_Files', 'Filer');
define('lang_Images','Bilder'); define('lang_Images', 'Bilder');
define('lang_Archives','Arkiv'); define('lang_Archives', 'Arkiv');
define('lang_Error_Upload','Den opplastede filen overskrider maksimal tillatt størrelse.'); define('lang_Error_Upload', 'Den opplastede filen overskrider maksimal tillatt størrelse.');
define('lang_Error_extension','Filtypen er ikke tillatt.'); define('lang_Error_extension', 'Filtypen er ikke tillatt.');
define('lang_Upload_file','Last opp fil'); define('lang_Upload_file', 'Last opp fil');
define('lang_Filters','Filter'); define('lang_Filters', 'Filter');
define('lang_Videos','Videoer'); define('lang_Videos', 'Videoer');
define('lang_Music','Musikk'); define('lang_Music', 'Musikk');
define('lang_New_Folder','Ny mappe'); define('lang_New_Folder', 'Ny mappe');
define('lang_Folder_Created','Mappe opprettet'); define('lang_Folder_Created', 'Mappe opprettet');
define('lang_Existing_Folder','Eksisterende mappe'); define('lang_Existing_Folder', 'Eksisterende mappe');
define('lang_Confirm_Folder_del','Er du sikker på at du vil slette mappen og alt innholdet?'); define('lang_Confirm_Folder_del', 'Er du sikker på at du vil slette mappen og alt innholdet?');
define('lang_Return_Files_List','Tilbake til filoversikten'); define('lang_Return_Files_List', 'Tilbake til filoversikten');
define('lang_Preview','Forhåndsvisning'); define('lang_Preview', 'Forhåndsvisning');
define('lang_Download','Last ned'); define('lang_Download', 'Last ned');
define('lang_Insert_Folder_Name','Gi mappen et navn:'); define('lang_Insert_Folder_Name', 'Gi mappen et navn:');
define('lang_Root','Rot'); define('lang_Root', 'Rot');
define('lang_Rename','Gi nytt navn'); define('lang_Rename', 'Gi nytt navn');
define('lang_Back','Tilbake'); define('lang_Back', 'Tilbake');
define('lang_View','Visning'); define('lang_View', 'Visning');
define('lang_View_list','Listevisning'); define('lang_View_list', 'Listevisning');
define('lang_View_columns_list','Side ved side'); define('lang_View_columns_list', 'Side ved side');
define('lang_View_boxes','Boksvisning'); define('lang_View_boxes', 'Boksvisning');
define('lang_Toolbar','Verktøylinje'); define('lang_Toolbar', 'Verktøylinje');
define('lang_Actions','Gjøremål'); define('lang_Actions', 'Gjøremål');
define('lang_Rename_existing_file','Filen er allerede opprettet'); define('lang_Rename_existing_file', 'Filen er allerede opprettet');
define('lang_Rename_existing_folder','Mappen er allerede opprettet'); define('lang_Rename_existing_folder', 'Mappen er allerede opprettet');
define('lang_Empty_name','Tomt navn'); define('lang_Empty_name', 'Tomt navn');
define('lang_Text_filter','Tekst-filter'); define('lang_Text_filter', 'Tekst-filter');
define('lang_Swipe_help','Sveip filnavnet/mappenavnet for å vise alternativer'); define('lang_Swipe_help', 'Sveip filnavnet/mappenavnet for å vise alternativer');
define('lang_Upload_base','Vanlig opplasting'); define('lang_Upload_base', 'Vanlig opplasting');
define('lang_Upload_java','Java-opplasting (store filer)'); define('lang_Upload_java', 'Java-opplasting (store filer)');
define('lang_Upload_java_help',"Hvis java-appleten ikke lastes: 1. Sjekk om Java er installert, hvis ikke <a href='http://java.com/en/download/'>last ned Java</a> 2. Sjekk brannmur-innstillingene."); define('lang_Upload_java_help', "Hvis java-appleten ikke lastes: 1. Sjekk om Java er installert, hvis ikke <a href='http://java.com/en/download/'>last ned Java</a> 2. Sjekk brannmur-innstillingene.");
define('lang_Upload_base_help',"Dra og slipp filen(e) i området over eller klikk (virker for moderne nettlesere). Ved bruk av gammel nettleser: Velg filen og klikk på knappen. Når opplastingen er ferdig, klikk på tilbake-knappen øverst."); define('lang_Upload_base_help', "Dra og slipp filen(e) i området over eller klikk (virker for moderne nettlesere). Ved bruk av gammel nettleser: Velg filen og klikk på knappen. Når opplastingen er ferdig, klikk på tilbake-knappen øverst.");
define('lang_Type_dir','Mappe'); define('lang_Type_dir', 'Mappe');
define('lang_Type','Type'); define('lang_Type', 'Type');
define('lang_Dimension','Dimensjoner'); define('lang_Dimension', 'Dimensjoner');
define('lang_Size','Størrelse'); define('lang_Size', 'Størrelse');
define('lang_Date','Dato'); define('lang_Date', 'Dato');
define('lang_Filename','Filnavn'); define('lang_Filename', 'Filnavn');
define('lang_Operations','Handlinger'); define('lang_Operations', 'Handlinger');
define('lang_Date_type','d.m.y'); define('lang_Date_type', 'd.m.y');
define('lang_OK','OK'); define('lang_OK', 'OK');
define('lang_Cancel','Avbryt'); define('lang_Cancel', 'Avbryt');
define('lang_Sorting','Sortering'); define('lang_Sorting', 'Sortering');
define('lang_Show_url','Vis URL'); define('lang_Show_url', 'Vis URL');
define('lang_Extract','extract here'); 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');
?>

View File

@ -1,58 +1,57 @@
<?php <?php
define('lang_Select','Selecteren'); define('lang_Select', 'Selecteren');
define('lang_Erase','Verwijderen'); define('lang_Erase', 'Verwijderen');
define('lang_Open','Openen'); define('lang_Open', 'Openen');
define('lang_Confirm_del','Weet u zeker dat u dit bestand wilt verwijderen?'); define('lang_Confirm_del', 'Weet u zeker dat u dit bestand wilt verwijderen?');
define('lang_All','Alles Weergeven'); define('lang_All', 'Alles Weergeven');
define('lang_Files','Bestanden'); define('lang_Files', 'Bestanden');
define('lang_Images','Afbeeldingen'); define('lang_Images', 'Afbeeldingen');
define('lang_Archives','Archieven'); define('lang_Archives', 'Archieven');
define('lang_Error_Upload','Het bestand overschrijdt de maximum toegestane grootte.'); define('lang_Error_Upload', 'Het bestand overschrijdt de maximum toegestane grootte.');
define('lang_Error_extension','Bestand extensie is niet toegestaan'); define('lang_Error_extension', 'Bestand extensie is niet toegestaan');
define('lang_Upload_file','Bestand uploaden'); define('lang_Upload_file', 'Bestand uploaden');
define('lang_Filters','Filter'); define('lang_Filters', 'Filter');
define('lang_Videos','Videos'); define('lang_Videos', 'Videos');
define('lang_Music','Muziek'); define('lang_Music', 'Muziek');
define('lang_New_Folder','Nieuwe map'); define('lang_New_Folder', 'Nieuwe map');
define('lang_Folder_Created','Map aangemaakt'); define('lang_Folder_Created', 'Map aangemaakt');
define('lang_Existing_Folder','Bestaande map'); define('lang_Existing_Folder', 'Bestaande map');
define('lang_Confirm_Folder_del','Weet u zeker dat u deze map en alle bestanden hierin wilt verwijderen?'); define('lang_Confirm_Folder_del', 'Weet u zeker dat u deze map en alle bestanden hierin wilt verwijderen?');
define('lang_Return_Files_List','Terug naar bestanden'); define('lang_Return_Files_List', 'Terug naar bestanden');
define('lang_Preview','Voorbeeld'); define('lang_Preview', 'Voorbeeld');
define('lang_Download','Download'); define('lang_Download', 'Download');
define('lang_Insert_Folder_Name','Map naam:'); define('lang_Insert_Folder_Name', 'Map naam:');
define('lang_Root','root'); define('lang_Root', 'root');
define('lang_Rename','Hernoemen'); define('lang_Rename', 'Hernoemen');
define('lang_Back','terug'); define('lang_Back', 'terug');
define('lang_View','Weergave'); define('lang_View', 'Weergave');
define('lang_View_list','Lijst weergave'); define('lang_View_list', 'Lijst weergave');
define('lang_View_columns_list','Kolom-lijst weergave'); define('lang_View_columns_list', 'Kolom-lijst weergave');
define('lang_View_boxes','Tegel weergave'); define('lang_View_boxes', 'Tegel weergave');
define('lang_Toolbar','Werkbalk'); define('lang_Toolbar', 'Werkbalk');
define('lang_Actions','Acties'); define('lang_Actions', 'Acties');
define('lang_Rename_existing_file','Het bestand bestaat al'); define('lang_Rename_existing_file', 'Het bestand bestaat al');
define('lang_Rename_existing_folder','De map bestaat al'); define('lang_Rename_existing_folder', 'De map bestaat al');
define('lang_Empty_name','De bestandsnaam is leeg'); define('lang_Empty_name', 'De bestandsnaam is leeg');
define('lang_Text_filter','Zoeken...'); define('lang_Text_filter', 'Zoeken...');
define('lang_Swipe_help','Swipe over de naam van een bestand of map om opties te zien'); define('lang_Swipe_help', 'Swipe over de naam van een bestand of map om opties te zien');
define('lang_Upload_base','Standaard uploader'); define('lang_Upload_base', 'Standaard uploader');
define('lang_Upload_java','JAVA upload (voor grote bestanden)'); define('lang_Upload_java', 'JAVA upload (voor grote bestanden)');
define('lang_Upload_java_help',"Als de Java Applet niet laadt: 1. Heeft u JAVA geinstalleerd? Zo niet, download het hier: <a href='http://java.com/en/download/'>java.com/en/download/</a> 2. Wees er zeker van dat de firewall deze actie accepteert"); define('lang_Upload_java_help', "Als de Java Applet niet laadt: 1. Heeft u JAVA geinstalleerd? Zo niet, download het hier: <a href='http://java.com/en/download/'>java.com/en/download/</a> 2. Wees er zeker van dat de firewall deze actie accepteert");
define('lang_Upload_base_help',"Klik en sleep (meerdere) bestanden vanaf uw computer naar het \"Drop files\" vlak hierboven om bestanden toe te voegen.<br/> Ook is het mogelijk om in een dialoogvenster (meerdere) bestanden te selecteren, klik hiervoor op \"Drop files\"<br/><br/><i>Als alle uploads voltooid zijn kunt u terugkeren met de knop \"Terug naar bestanden\"</i>"); define('lang_Upload_base_help', "Klik en sleep (meerdere) bestanden vanaf uw computer naar het \"Drop files\" vlak hierboven om bestanden toe te voegen.<br/> Ook is het mogelijk om in een dialoogvenster (meerdere) bestanden te selecteren, klik hiervoor op \"Drop files\"<br/><br/><i>Als alle uploads voltooid zijn kunt u terugkeren met de knop \"Terug naar bestanden\"</i>");
define('lang_Type_dir','map'); define('lang_Type_dir', 'map');
define('lang_Type','Type'); define('lang_Type', 'Type');
define('lang_Dimension','Afmetingen'); define('lang_Dimension', 'Afmetingen');
define('lang_Size','Grootte'); define('lang_Size', 'Grootte');
define('lang_Date','Datum'); define('lang_Date', 'Datum');
define('lang_Filename','Naam'); define('lang_Filename', 'Naam');
define('lang_Operations','Bewerkingen'); define('lang_Operations', 'Bewerkingen');
define('lang_Date_type','j-m-d'); define('lang_Date_type', 'j-m-d');
define('lang_OK','OK'); define('lang_OK', 'OK');
define('lang_Cancel','Annuleren'); define('lang_Cancel', 'Annuleren');
define('lang_Sorting','Sorteren op'); define('lang_Sorting', 'Sorteren op');
define('lang_Show_url','toon URL'); define('lang_Show_url', 'toon URL');
define('lang_Extract','hier uitpakken'); 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');
?>

View File

@ -1,58 +1,57 @@
<?php <?php
define('lang_Select','Wybierz'); define('lang_Select', 'Wybierz');
define('lang_Erase','Wyczyść'); define('lang_Erase', 'Wyczyść');
define('lang_Open','Otwórz'); define('lang_Open', 'Otwórz');
define('lang_Confirm_del','Czy jesteś pewien, że chcesz usunąć ten plik?'); define('lang_Confirm_del', 'Czy jesteś pewien, że chcesz usunąć ten plik?');
define('lang_All','Wszystkie'); define('lang_All', 'Wszystkie');
define('lang_Files','Pliki'); define('lang_Files', 'Pliki');
define('lang_Images','Zdjęcia'); define('lang_Images', 'Zdjęcia');
define('lang_Archives','Archiwa'); define('lang_Archives', 'Archiwa');
define('lang_Error_Upload','Plik przekracza maksymalny dozwolony rozmiar.'); define('lang_Error_Upload', 'Plik przekracza maksymalny dozwolony rozmiar.');
define('lang_Error_extension','Niedozwolone rozszerzenie pliku.'); define('lang_Error_extension', 'Niedozwolone rozszerzenie pliku.');
define('lang_Upload_file','Wgraj plik'); define('lang_Upload_file', 'Wgraj plik');
define('lang_Filters','Filtr widoku'); define('lang_Filters', 'Filtr widoku');
define('lang_Videos','Filmy'); define('lang_Videos', 'Filmy');
define('lang_Music','Muzyka'); define('lang_Music', 'Muzyka');
define('lang_New_Folder','Dodaj nowy folder'); define('lang_New_Folder', 'Dodaj nowy folder');
define('lang_Folder_Created','Folder został utworzony poprawnie'); define('lang_Folder_Created', 'Folder został utworzony poprawnie');
define('lang_Existing_Folder','Istniejący folder'); define('lang_Existing_Folder', 'Istniejący folder');
define('lang_Confirm_Folder_del','Czy jesteś pewien, że chcesz usunąć folder i wszystko co znajduje się w nim?'); define('lang_Confirm_Folder_del', 'Czy jesteś pewien, że chcesz usunąć folder i wszystko co znajduje się w nim?');
define('lang_Return_Files_List','Powrót do listy plików'); define('lang_Return_Files_List', 'Powrót do listy plików');
define('lang_Preview','Podgląd'); define('lang_Preview', 'Podgląd');
define('lang_Download','Pobierz'); define('lang_Download', 'Pobierz');
define('lang_Insert_Folder_Name','Podaj nazwę folderu:'); define('lang_Insert_Folder_Name', 'Podaj nazwę folderu:');
define('lang_Root','root'); define('lang_Root', 'root');
define('lang_Rename','Zmień nazwę'); define('lang_Rename', 'Zmień nazwę');
define('lang_Back','[..]'); define('lang_Back', '[..]');
define('lang_View','Widok'); define('lang_View', 'Widok');
define('lang_View_list','Lista'); define('lang_View_list', 'Lista');
define('lang_View_columns_list','Kolumny'); define('lang_View_columns_list', 'Kolumny');
define('lang_View_boxes','Bloki'); define('lang_View_boxes', 'Bloki');
define('lang_Toolbar','Pasek'); define('lang_Toolbar', 'Pasek');
define('lang_Actions','Opcje'); define('lang_Actions', 'Opcje');
define('lang_Rename_existing_file','Ten plik już tutaj umieszczono'); define('lang_Rename_existing_file', 'Ten plik już tutaj umieszczono');
define('lang_Rename_existing_folder','Ten folder już tutaj utworzono'); define('lang_Rename_existing_folder', 'Ten folder już tutaj utworzono');
define('lang_Empty_name','Nie podano wymaganej nazwy'); define('lang_Empty_name', 'Nie podano wymaganej nazwy');
define('lang_Text_filter','wpisz txt'); define('lang_Text_filter', 'wpisz txt');
define('lang_Swipe_help','Kliknij w nazwę pliku/folderu by wyświetlić dostępne opcje'); define('lang_Swipe_help', 'Kliknij w nazwę pliku/folderu by wyświetlić dostępne opcje');
define('lang_Upload_base','Wgrywanie standardowe'); define('lang_Upload_base', 'Wgrywanie standardowe');
define('lang_Upload_java','Wgrywanie przez skrypty JS (dla dużych plików)'); define('lang_Upload_java', 'Wgrywanie przez skrypty JS (dla dużych plików)');
define('lang_Upload_java_help',"Jeżeli ten aplet JS nie powoduje wgrywania 1. Sprawdź czy masz pobraną i uruchomioną obsługę skryptów w JAVA na stronie JAVA <a href='http://java.com/en/download/'>[pobierz]</a> 2. Upewnij się, że nie jest to blokada wynikająca z ustawień zapory firewall"); define('lang_Upload_java_help', "Jeżeli ten aplet JS nie powoduje wgrywania 1. Sprawdź czy masz pobraną i uruchomioną obsługę skryptów w JAVA na stronie JAVA <a href='http://java.com/en/download/'>[pobierz]</a> 2. Upewnij się, że nie jest to blokada wynikająca z ustawień zapory firewall");
define('lang_Upload_base_help',"Metoda zwana Przeciągnij & Upuść pliki w poniższy obszar, lub kliknij weń (dotyczy tylko najnowszych przeglądarek), lub wybierz plik i kliknij w przycisk. Kiedy zakończy się proces wgrywania, kliknij wyżej na przycisk by zakończyć."); define('lang_Upload_base_help', "Metoda zwana Przeciągnij & Upuść pliki w poniższy obszar, lub kliknij weń (dotyczy tylko najnowszych przeglądarek), lub wybierz plik i kliknij w przycisk. Kiedy zakończy się proces wgrywania, kliknij wyżej na przycisk by zakończyć.");
define('lang_Type_dir','FLD'); define('lang_Type_dir', 'FLD');
define('lang_Type','wg. typu'); define('lang_Type', 'wg. typu');
define('lang_Dimension','Wymiary'); define('lang_Dimension', 'Wymiary');
define('lang_Size','wg. wagi'); define('lang_Size', 'wg. wagi');
define('lang_Date','wg. daty'); define('lang_Date', 'wg. daty');
define('lang_Filename','wg. nazwy'); define('lang_Filename', 'wg. nazwy');
define('lang_Operations','Opcje'); define('lang_Operations', 'Opcje');
define('lang_Date_type','d-m-y'); define('lang_Date_type', 'd-m-y');
define('lang_OK','OK'); define('lang_OK', 'OK');
define('lang_Cancel','Anuluj'); define('lang_Cancel', 'Anuluj');
define('lang_Sorting','SORTOWANIE'); define('lang_Sorting', 'SORTOWANIE');
define('lang_Show_url','show URL'); define('lang_Show_url', 'show URL');
define('lang_Extract','extract here'); 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');
?>

View File

@ -1,58 +1,57 @@
<?php <?php
define('lang_Select','Seleccionar'); define('lang_Select', 'Seleccionar');
define('lang_Erase','Eliminar'); define('lang_Erase', 'Eliminar');
define('lang_Open','Abrir'); define('lang_Open', 'Abrir');
define('lang_Confirm_del','Tem certeza que pretende eliminar este arquivo?'); define('lang_Confirm_del', 'Tem certeza que pretende eliminar este arquivo?');
define('lang_All','Todos'); define('lang_All', 'Todos');
define('lang_Files','Ficheiros'); define('lang_Files', 'Ficheiros');
define('lang_Images','Imagens'); define('lang_Images', 'Imagens');
define('lang_Archives','Compactados'); define('lang_Archives', 'Compactados');
define('lang_Error_Upload','O ficheiro enviado é maior que o limite permitido.'); define('lang_Error_Upload', 'O ficheiro enviado é maior que o limite permitido.');
define('lang_Error_extension','Extensão não permitida.'); define('lang_Error_extension', 'Extensão não permitida.');
define('lang_Upload_file','Carregar ficheiro'); define('lang_Upload_file', 'Carregar ficheiro');
define('lang_Filters','Filtro'); define('lang_Filters', 'Filtro');
define('lang_Videos','Vídeos'); define('lang_Videos', 'Vídeos');
define('lang_Music','Música'); define('lang_Music', 'Música');
define('lang_New_Folder','Nova pasta'); define('lang_New_Folder', 'Nova pasta');
define('lang_Folder_Created','Pasta criada com sucesso'); define('lang_Folder_Created', 'Pasta criada com sucesso');
define('lang_Existing_Folder','Pasta existente'); define('lang_Existing_Folder', 'Pasta existente');
define('lang_Confirm_Folder_del','Tem certeza que pretende eliminar a pasta e todo o seu conteúdo?'); define('lang_Confirm_Folder_del', 'Tem certeza que pretende eliminar a pasta e todo o seu conteúdo?');
define('lang_Return_Files_List','Voltar à lista de ficheiros'); define('lang_Return_Files_List', 'Voltar à lista de ficheiros');
define('lang_Preview','Pré-visualizar'); define('lang_Preview', 'Pré-visualizar');
define('lang_Download','Descarregar'); define('lang_Download', 'Descarregar');
define('lang_Insert_Folder_Name','Insira o nome da pasta:'); define('lang_Insert_Folder_Name', 'Insira o nome da pasta:');
define('lang_Root','root'); define('lang_Root', 'root');
define('lang_Rename','Mudar o nome'); define('lang_Rename', 'Mudar o nome');
define('lang_Back','de volta'); define('lang_Back', 'de volta');
define('lang_View','View'); define('lang_View', 'View');
define('lang_View_list','List view'); define('lang_View_list', 'List view');
define('lang_View_columns_list','Columns list view'); define('lang_View_columns_list', 'Columns list view');
define('lang_View_boxes','Box view'); define('lang_View_boxes', 'Box view');
define('lang_Toolbar','Toolbar'); define('lang_Toolbar', 'Toolbar');
define('lang_Actions','Actions'); define('lang_Actions', 'Actions');
define('lang_Rename_existing_file','The file is already existing'); define('lang_Rename_existing_file', 'The file is already existing');
define('lang_Rename_existing_folder','The folder is already existing'); define('lang_Rename_existing_folder', 'The folder is already existing');
define('lang_Empty_name','The name is empty'); define('lang_Empty_name', 'The name is empty');
define('lang_Text_filter','text filter'); define('lang_Text_filter', 'text filter');
define('lang_Swipe_help','Swipe the name of file/folder to show options'); define('lang_Swipe_help', 'Swipe the name of file/folder to show options');
define('lang_Upload_base','Base upload'); define('lang_Upload_base', 'Base upload');
define('lang_Upload_java','JAVA upload (big size files)'); define('lang_Upload_java', 'JAVA upload (big size files)');
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', "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_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', "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_Type_dir','dir'); define('lang_Type_dir', 'dir');
define('lang_Type','Type'); define('lang_Type', 'Type');
define('lang_Dimension','Dimension'); define('lang_Dimension', 'Dimension');
define('lang_Size','Size'); define('lang_Size', 'Size');
define('lang_Date','Date'); define('lang_Date', 'Date');
define('lang_Filename','Name'); define('lang_Filename', 'Name');
define('lang_Operations','Operations'); define('lang_Operations', 'Operations');
define('lang_Date_type','y-m-d'); define('lang_Date_type', 'y-m-d');
define('lang_OK','OK'); define('lang_OK', 'OK');
define('lang_Cancel','Cancel'); define('lang_Cancel', 'Cancel');
define('lang_Sorting','sorting'); define('lang_Sorting', 'sorting');
define('lang_Show_url','show URL'); define('lang_Show_url', 'show URL');
define('lang_Extract','extract here'); 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');
?>

View File

@ -1,58 +1,57 @@
<?php <?php
define('lang_Select','Выбрать'); define('lang_Select', 'Выбрать');
define('lang_Erase','Удалить'); define('lang_Erase', 'Удалить');
define('lang_Open','Открыть'); define('lang_Open', 'Открыть');
define('lang_Confirm_del','Уверены, что хотите удалить этот файл?'); define('lang_Confirm_del', 'Уверены, что хотите удалить этот файл?');
define('lang_All','Все'); define('lang_All', 'Все');
define('lang_Files','Файлы'); define('lang_Files', 'Файлы');
define('lang_Images','Изображения'); define('lang_Images', 'Изображения');
define('lang_Archives','Архивы'); define('lang_Archives', 'Архивы');
define('lang_Error_Upload','Загружаемый файл превышает допустимый размер.'); define('lang_Error_Upload', 'Загружаемый файл превышает допустимый размер.');
define('lang_Error_extension','Недопустимый формат файла.'); define('lang_Error_extension', 'Недопустимый формат файла.');
define('lang_Upload_file','Загрузить файл'); define('lang_Upload_file', 'Загрузить файл');
define('lang_Filters','Фильтр'); define('lang_Filters', 'Фильтр');
define('lang_Videos','Видео'); define('lang_Videos', 'Видео');
define('lang_Music','Музыка'); define('lang_Music', 'Музыка');
define('lang_New_Folder','New folder'); define('lang_New_Folder', 'New folder');
define('lang_Folder_Created','Папка успешно создана'); define('lang_Folder_Created', 'Папка успешно создана');
define('lang_Existing_Folder','Существующая папка'); define('lang_Existing_Folder', 'Существующая папка');
define('lang_Confirm_Folder_del','Уверены, что хотите удалить эту папку и все файлы в ней?'); define('lang_Confirm_Folder_del', 'Уверены, что хотите удалить эту папку и все файлы в ней?');
define('lang_Return_Files_List','Вернуться к списку файлов'); define('lang_Return_Files_List', 'Вернуться к списку файлов');
define('lang_Preview','Просмотр'); define('lang_Preview', 'Просмотр');
define('lang_Download','Загрузить'); define('lang_Download', 'Загрузить');
define('lang_Insert_Folder_Name','Введите имя папки:'); define('lang_Insert_Folder_Name', 'Введите имя папки:');
define('lang_Root','Корневая папка'); define('lang_Root', 'Корневая папка');
define('lang_Rename','Переименовать'); define('lang_Rename', 'Переименовать');
define('lang_Back','назад'); define('lang_Back', 'назад');
define('lang_View','Вид'); define('lang_View', 'Вид');
define('lang_View_list','Список'); define('lang_View_list', 'Список');
define('lang_View_columns_list','Столбцы'); define('lang_View_columns_list', 'Столбцы');
define('lang_View_boxes','Плитка'); define('lang_View_boxes', 'Плитка');
define('lang_Toolbar','Панель'); define('lang_Toolbar', 'Панель');
define('lang_Actions','Действия'); define('lang_Actions', 'Действия');
define('lang_Rename_existing_file','Файл уже существует'); define('lang_Rename_existing_file', 'Файл уже существует');
define('lang_Rename_existing_folder','Папка уже существует'); define('lang_Rename_existing_folder', 'Папка уже существует');
define('lang_Empty_name','Не заполнено имя'); define('lang_Empty_name', 'Не заполнено имя');
define('lang_Text_filter','фильтр'); define('lang_Text_filter', 'фильтр');
define('lang_Swipe_help','Наведите на имя файла/папки, чтобы увидеть опции'); define('lang_Swipe_help', 'Наведите на имя файла/папки, чтобы увидеть опции');
define('lang_Upload_base','Основная загрузка'); define('lang_Upload_base', 'Основная загрузка');
define('lang_Upload_java','JAVA загрузка (для файлов больших размеров)'); define('lang_Upload_java', 'JAVA загрузка (для файлов больших размеров)');
define('lang_Upload_java_help',"Если Java-апплет не загружается: 1. Убедитесь, что установлена Java, в противном случае <a href='http://java.com/en/download/'>[скачайте]</a> 2. Убедитесь, что фаервол ничего не блокирует"); define('lang_Upload_java_help', "Если Java-апплет не загружается: 1. Убедитесь, что установлена Java, в противном случае <a href='http://java.com/en/download/'>[скачайте]</a> 2. Убедитесь, что фаервол ничего не блокирует");
define('lang_Upload_base_help',"Перетащите файлы в область выше или щелкните по ней мышкой (для современных браузеров) и выберите файл(ы). После завершения загрузки нажмите кнопку &laquo;Вернуться к списку файлов&raquo;."); define('lang_Upload_base_help', "Перетащите файлы в область выше или щелкните по ней мышкой (для современных браузеров) и выберите файл(ы). После завершения загрузки нажмите кнопку &laquo;Вернуться к списку файлов&raquo;.");
define('lang_Type_dir','папка'); define('lang_Type_dir', 'папка');
define('lang_Type','Тип'); define('lang_Type', 'Тип');
define('lang_Dimension','Разрешение'); define('lang_Dimension', 'Разрешение');
define('lang_Size','Размер'); define('lang_Size', 'Размер');
define('lang_Date','Дата'); define('lang_Date', 'Дата');
define('lang_Filename','Имя&nbsp;файла'); define('lang_Filename', 'Имя&nbsp;файла');
define('lang_Operations','Действие'); define('lang_Operations', 'Действие');
define('lang_Date_type','y-m-d'); define('lang_Date_type', 'y-m-d');
define('lang_OK','OK'); define('lang_OK', 'OK');
define('lang_Cancel','Отмена'); define('lang_Cancel', 'Отмена');
define('lang_Sorting','Сортировка'); define('lang_Sorting', 'Сортировка');
define('lang_Show_url','Показать URL'); define('lang_Show_url', 'Показать URL');
define('lang_Extract','Распаковать здесь'); 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');
?>

View File

@ -1,59 +1,57 @@
<?php <?php
define('lang_Select','Välj'); // Select define('lang_Select', 'Välj'); // Select
define('lang_Erase','Radera'); // Erase define('lang_Erase', 'Radera'); // Erase
define('lang_Open','Öppna'); // Open define('lang_Open', 'Öppna'); // Open
define('lang_Confirm_del','Är du säker på att du vill radera denna fil?'); //Are you sure you want to delete this file? define('lang_Confirm_del', 'Är du säker på att du vill radera denna fil?'); //Are you sure you want to delete this file?
define('lang_All','Alla'); // All define('lang_All', 'Alla'); // All
define('lang_Files','Filer'); // Files define('lang_Files', 'Filer'); // Files
define('lang_Images','Bilder'); // Images define('lang_Images', 'Bilder'); // Images
define('lang_Archives','Arkiv'); // Archives define('lang_Archives', 'Arkiv'); // Archives
define('lang_Error_Upload','Den uppladdade filen överskrider max storleken.'); // The uploaded file exceeds the max size allowed. define('lang_Error_Upload', 'Den uppladdade filen överskrider max storleken.'); // The uploaded file exceeds the max size allowed.
define('lang_Error_extension','Filtypen är ej tillåten.'); // File extension is not allowed. define('lang_Error_extension', 'Filtypen är ej tillåten.'); // File extension is not allowed.
define('lang_Upload_file','Ladda upp'); // Upload define('lang_Upload_file', 'Ladda upp'); // Upload
define('lang_Filters','Filter'); // Filters define('lang_Filters', 'Filter'); // Filters
define('lang_Videos','Videor'); // Videos define('lang_Videos', 'Videor'); // Videos
define('lang_Music','Musik'); // Music define('lang_Music', 'Musik'); // Music
define('lang_New_Folder','Ny katalog'); // New Folder define('lang_New_Folder', 'Ny katalog'); // New Folder
define('lang_Folder_Created','Katalogen har skapats'); // Folder correctly created define('lang_Folder_Created', 'Katalogen har skapats'); // Folder correctly created
define('lang_Existing_Folder','Befintlig katalog'); // Existing folder define('lang_Existing_Folder', 'Befintlig katalog'); // Existing folder
define('lang_Confirm_Folder_del','Är du säker på att du vill radera denna katalog samt dess innehåll?'); // Are you sure to delete the folder and all the elements in it? define('lang_Confirm_Folder_del', 'Är du säker på att du vill radera denna katalog samt dess innehåll?'); // Are you sure to delete the folder and all the elements in it?
define('lang_Return_Files_List','Tillbaka till filvisaren'); // Return to files list define('lang_Return_Files_List', 'Tillbaka till filvisaren'); // Return to files list
define('lang_Preview','Förhandsgranska'); // Preview define('lang_Preview', 'Förhandsgranska'); // Preview
define('lang_Download','Ladda hem'); // Download define('lang_Download', 'Ladda hem'); // Download
define('lang_Insert_Folder_Name','Ange katalog namn:'); // Insert folder name: define('lang_Insert_Folder_Name', 'Ange katalog namn:'); // Insert folder name:
define('lang_Root','root'); // root define('lang_Root', 'root'); // root
define('lang_Rename','Byt namn'); // Rename define('lang_Rename', 'Byt namn'); // Rename
define('lang_Back','tillbaka'); // back define('lang_Back', 'tillbaka'); // back
define('lang_View','Visa'); // View define('lang_View', 'Visa'); // View
define('lang_View_list','Listvy'); // List view define('lang_View_list', 'Listvy'); // List view
define('lang_View_columns_list','Columnvy'); // Columns list view define('lang_View_columns_list', 'Columnvy'); // Columns list view
define('lang_View_boxes','Boxvy'); // Box view define('lang_View_boxes', 'Boxvy'); // Box view
define('lang_Toolbar','Verktygsfält'); // Toolbar define('lang_Toolbar', 'Verktygsfält'); // Toolbar
define('lang_Actions','Åtgärder'); // Actions define('lang_Actions', 'Åtgärder'); // Actions
define('lang_Rename_existing_file','Det finns redan en fil med det namnet'); // The file is already existing define('lang_Rename_existing_file', 'Det finns redan en fil med det namnet'); // The file is already existing
define('lang_Rename_existing_folder','Det finns redan en katalog med det namnet'); // The folder is already existing define('lang_Rename_existing_folder', 'Det finns redan en katalog med det namnet'); // The folder is already existing
define('lang_Empty_name','Du har ej angivet något namn'); // The name is empty define('lang_Empty_name', 'Du har ej angivet något namn'); // The name is empty
define('lang_Text_filter','text filter'); // text filter define('lang_Text_filter', 'text filter'); // text filter
define('lang_Swipe_help','Svep över filnamnet/katalognamnet för att visa åtgärder'); // Swipe the name of file/folder to show options define('lang_Swipe_help', 'Svep över filnamnet/katalognamnet för att visa åtgärder'); // Swipe the name of file/folder to show options
define('lang_Upload_base','Basal uppladdning'); // Base upload define('lang_Upload_base', 'Basal uppladdning'); // Base upload
define('lang_Upload_java','JAVA uppladdning (för stora filer)'); // JAVA upload (big size files) define('lang_Upload_java', 'JAVA uppladdning (för stora filer)'); // JAVA upload (big size files)
define('lang_Upload_java_help',"Om Java Appleten inte laddar, 1. säkerställ att Java är installerat, <a href='http://java.com/en/download/'>ladda hem</a> och installera om det saknas 2. säkerställ att programmet inte blokeras av din brandvägg"); // If the Java Applet doesn'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 by your firewall define('lang_Upload_java_help', "Om Java Appleten inte laddar, 1. säkerställ att Java är installerat, <a href='http://java.com/en/download/'>ladda hem</a> och installera om det saknas 2. säkerställ att programmet inte blokeras av din brandvägg"); // If the Java Applet doesn'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 by your firewall
define('lang_Upload_base_help',"Dra och släpa filer eller klicka ovan och välj en eller flera filer. När uppladningen är klar, klicka på 'Tillbaka till filvisaren' knappen."); // Drag & Drop files or click in the area above (modern browsers) and select the file(s). When the upload is complete, click the 'Return to files list' button. define('lang_Upload_base_help', "Dra och släpa filer eller klicka ovan och välj en eller flera filer. När uppladningen är klar, klicka på 'Tillbaka till filvisaren' knappen."); // Drag & Drop files or click in the area above (modern browsers) and select the file(s). When the upload is complete, click the 'Return to files list' button.
define('lang_Type_dir','katalog'); // dir define('lang_Type_dir', 'katalog'); // dir
define('lang_Type','Typ'); // Type define('lang_Type', 'Typ'); // Type
define('lang_Dimension','Dimension'); // Dimension define('lang_Dimension', 'Dimension'); // Dimension
define('lang_Size','Storlek'); // Size define('lang_Size', 'Storlek'); // Size
define('lang_Date','Datum'); // Date define('lang_Date', 'Datum'); // Date
define('lang_Filename','Filname'); // Filename define('lang_Filename', 'Filname'); // Filename
define('lang_Operations','Handlingar'); // Operations define('lang_Operations', 'Handlingar'); // Operations
define('lang_Date_type','y-m-d'); // y-m-d define('lang_Date_type', 'y-m-d'); // y-m-d
define('lang_OK','OK'); // OK define('lang_OK', 'OK'); // OK
define('lang_Cancel','Avbryt'); // Cancel define('lang_Cancel', 'Avbryt'); // Cancel
define('lang_Sorting','sortering'); // sorting define('lang_Sorting', 'sortering'); // sorting
define('lang_Show_url','visa sökväg'); // show URL define('lang_Show_url', 'visa sökväg'); // show URL
define('lang_Extract','packa upp här'); // extract here 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
?>

View File

@ -1,59 +1,57 @@
<?php <?php
define('lang_Select','Vybrať'); define('lang_Select', 'Vybrať');
define('lang_Erase','Odstrániť'); define('lang_Erase', 'Odstrániť');
define('lang_Open','Otvoriť'); define('lang_Open', 'Otvoriť');
define('lang_Confirm_del','Naozaj chcete vymazať tento súbor?'); define('lang_Confirm_del', 'Naozaj chcete vymazať tento súbor?');
define('lang_All','Všetky'); define('lang_All', 'Všetky');
define('lang_Files','Súbory'); define('lang_Files', 'Súbory');
define('lang_Images','Obrázky'); define('lang_Images', 'Obrázky');
define('lang_Archives','Archívy'); define('lang_Archives', 'Archívy');
define('lang_Error_Upload','Súbor presahuje maximálnu veľkosť.'); define('lang_Error_Upload', 'Súbor presahuje maximálnu veľkosť.');
define('lang_Error_extension','Typ súboru nie je podporovaný.'); define('lang_Error_extension', 'Typ súboru nie je podporovaný.');
define('lang_Upload_file','Súbor'); 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','Priečinok'); define('lang_New_Folder', 'Priečinok');
define('lang_Folder_Created','Priečinok bol vytvorený'); define('lang_Folder_Created', 'Priečinok bol vytvorený');
define('lang_Existing_Folder','Priečinok už existuje'); define('lang_Existing_Folder', 'Priečinok už existuje');
define('lang_Confirm_Folder_del','Naozaj chcete vymazať priečinok 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','Prevziať'); define('lang_Download', 'Prevziať');
define('lang_Insert_Folder_Name','Názov priečinku:'); 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äť');
define('lang_View','Zobraziť'); define('lang_View', 'Zobraziť');
define('lang_View_list','Zoznam'); define('lang_View_list', 'Zoznam');
define('lang_View_columns_list','Stĺpce'); define('lang_View_columns_list', 'Stĺpce');
define('lang_View_boxes','Ikony'); 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','Priečinok 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/priečinok'); 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ú Javu, (<a href='http://java.com/en/download/'>[prevziať]</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');
define('lang_Dimension','Rozlíšenie'); define('lang_Dimension', 'Rozlíšenie');
define('lang_Size','Veľkosť'); define('lang_Size', 'Veľkosť');
define('lang_Date','Dátum'); define('lang_Date', 'Dátum');
define('lang_Filename','Názov'); define('lang_Filename', 'Názov');
define('lang_Operations','Operácie'); define('lang_Operations', 'Operácie');
define('lang_Date_type','d.m.Y'); 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','Zobraziť 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','Duplikovať'); define('lang_Duplicate', 'Duplikovať');
?>

View File

@ -1,58 +1,57 @@
<?php <?php
define('lang_Select','Seç'); define('lang_Select', 'Seç');
define('lang_Erase','Sil'); define('lang_Erase', 'Sil');
define('lang_Open','Aç'); define('lang_Open', 'Aç');
define('lang_Confirm_del','Bu dosyayı silmek istediğinizden emin misiniz?'); define('lang_Confirm_del', 'Bu dosyayı silmek istediğinizden emin misiniz?');
define('lang_All','Tümü'); define('lang_All', 'Tümü');
define('lang_Files','Dosyalar'); define('lang_Files', 'Dosyalar');
define('lang_Images','Resimler'); define('lang_Images', 'Resimler');
define('lang_Archives','Arşivler'); define('lang_Archives', 'Arşivler');
define('lang_Error_Upload','Yüklemeye çalıştığınız dosya maximum yükleme limitini aştı.'); define('lang_Error_Upload', 'Yüklemeye çalıştığınız dosya maximum yükleme limitini aştı.');
define('lang_Error_extension','Dosya uzantısı izni yok.'); define('lang_Error_extension', 'Dosya uzantısı izni yok.');
define('lang_Upload_file','Dosya Yükle'); define('lang_Upload_file', 'Dosya Yükle');
define('lang_Filters','Filtreler'); define('lang_Filters', 'Filtreler');
define('lang_Videos','Videolar'); define('lang_Videos', 'Videolar');
define('lang_Music','Müzikler'); define('lang_Music', 'Müzikler');
define('lang_New_Folder','Yeni Klasör'); define('lang_New_Folder', 'Yeni Klasör');
define('lang_Folder_Created','Klasör başarıyla oluşturuldu.'); define('lang_Folder_Created', 'Klasör başarıyla oluşturuldu.');
define('lang_Existing_Folder','Mevcut klasör'); define('lang_Existing_Folder', 'Mevcut klasör');
define('lang_Confirm_Folder_del','Bu klasörü ve içindekileri silmek istediğinizden emin misiniz?'); define('lang_Confirm_Folder_del', 'Bu klasörü ve içindekileri silmek istediğinizden emin misiniz?');
define('lang_Return_Files_List','Dosya listesine geri dön'); define('lang_Return_Files_List', 'Dosya listesine geri dön');
define('lang_Preview','Önizleme'); define('lang_Preview', 'Önizleme');
define('lang_Download','İndir'); define('lang_Download', 'İndir');
define('lang_Insert_Folder_Name','Klasör adı ekle:'); define('lang_Insert_Folder_Name', 'Klasör adı ekle:');
define('lang_Root','kök'); define('lang_Root', 'kök');
define('lang_Rename','Yeniden Adlandır'); define('lang_Rename', 'Yeniden Adlandır');
define('lang_Back','geri'); define('lang_Back', 'geri');
define('lang_View','Görünüm'); define('lang_View', 'Görünüm');
define('lang_View_list','Liste görünümü'); define('lang_View_list', 'Liste görünümü');
define('lang_View_columns_list','Kolonlu liste görünümü'); define('lang_View_columns_list', 'Kolonlu liste görünümü');
define('lang_View_boxes','Kutu görünümü'); define('lang_View_boxes', 'Kutu görünümü');
define('lang_Toolbar','Araç Çubuğu'); define('lang_Toolbar', 'Araç Çubuğu');
define('lang_Actions','Eylemler'); define('lang_Actions', 'Eylemler');
define('lang_Rename_existing_file','Bu dosya zaten mevcut'); define('lang_Rename_existing_file', 'Bu dosya zaten mevcut');
define('lang_Rename_existing_folder','Bu klasör zaten mevcut'); define('lang_Rename_existing_folder', 'Bu klasör zaten mevcut');
define('lang_Empty_name','İsim alanı boş.'); define('lang_Empty_name', 'İsim alanı boş.');
define('lang_Text_filter','filtrele...'); define('lang_Text_filter', 'filtrele...');
define('lang_Swipe_help','Seçenekleri görüntülemek için dosya/klasör ismine tıklayın'); define('lang_Swipe_help', 'Seçenekleri görüntülemek için dosya/klasör ismine tıklayın');
define('lang_Upload_base','Normal Yükleme'); define('lang_Upload_base', 'Normal Yükleme');
define('lang_Upload_java','JAVA Yükleme (Büyük dosyalar için)'); define('lang_Upload_java', 'JAVA Yükleme (Büyük dosyalar için)');
define('lang_Upload_java_help',"Eğer Java uygulaması yüklenmediyse; 1- Bilgisayarınızda Java yüklü olduğundan emin olun yada <a href='http://java.com/en/download/'>[Java'yı Buradan İndirin]</a> 2- Güvenlik duvarının hiçbir şeye engel olmadığından emin olun."); define('lang_Upload_java_help', "Eğer Java uygulaması yüklenmediyse; 1- Bilgisayarınızda Java yüklü olduğundan emin olun yada <a href='http://java.com/en/download/'>[Java'yı Buradan İndirin]</a> 2- Güvenlik duvarının hiçbir şeye engel olmadığından emin olun.");
define('lang_Upload_base_help',"Dosyaları aşağıdaki alana Taşı & Bırak veya tıklayarak açılan pencereden dosyalarınızı seçin. Yükleme bittiğinde 'Return to files list' butonuna tıklayın."); define('lang_Upload_base_help', "Dosyaları aşağıdaki alana Taşı & Bırak veya tıklayarak açılan pencereden dosyalarınızı seçin. Yükleme bittiğinde 'Return to files list' butonuna tıklayın.");
define('lang_Type_dir','dizin'); define('lang_Type_dir', 'dizin');
define('lang_Type','Tür'); define('lang_Type', 'Tür');
define('lang_Dimension','Ebat'); define('lang_Dimension', 'Ebat');
define('lang_Size','Boyut'); define('lang_Size', 'Boyut');
define('lang_Date','Tarih'); define('lang_Date', 'Tarih');
define('lang_Filename','Dosya adı'); define('lang_Filename', 'Dosya adı');
define('lang_Operations','İşlemler'); define('lang_Operations', 'İşlemler');
define('lang_Date_type','d-m-Y'); define('lang_Date_type', 'd-m-Y');
define('lang_OK','Tamam'); define('lang_OK', 'Tamam');
define('lang_Cancel','İptal'); define('lang_Cancel', 'İptal');
define('lang_Sorting','sıralama'); define('lang_Sorting', 'sıralama');
define('lang_Show_url','URL göster'); define('lang_Show_url', 'URL göster');
define('lang_Extract','buraya çıkart'); 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');
?>

View File

@ -1,58 +1,57 @@
<?php <?php
define('lang_Select','Вибрати'); define('lang_Select', 'Вибрати');
define('lang_Erase','Видалити'); define('lang_Erase', 'Видалити');
define('lang_Open','Відкрити'); define('lang_Open', 'Відкрити');
define('lang_Confirm_del','Впевнені, що хочете видалити цей файл?'); define('lang_Confirm_del', 'Впевнені, що хочете видалити цей файл?');
define('lang_All','Всі'); define('lang_All', 'Всі');
define('lang_Files','Файли'); define('lang_Files', 'Файли');
define('lang_Images','Зображення'); define('lang_Images', 'Зображення');
define('lang_Archives','Архіви'); define('lang_Archives', 'Архіви');
define('lang_Error_Upload','Файл, що завантажується перевищує дозволений розмір.'); define('lang_Error_Upload', 'Файл, що завантажується перевищує дозволений розмір.');
define('lang_Error_extension','Неприпустимий формат файлу.'); define('lang_Error_extension', 'Неприпустимий формат файлу.');
define('lang_Upload_file','Завантажити файл'); define('lang_Upload_file', 'Завантажити файл');
define('lang_Filters','Фільтр'); define('lang_Filters', 'Фільтр');
define('lang_Videos','Відео'); define('lang_Videos', 'Відео');
define('lang_Music','Музика'); define('lang_Music', 'Музика');
define('lang_New_Folder','Нова папка'); define('lang_New_Folder', 'Нова папка');
define('lang_Folder_Created','Папку успішно створено'); define('lang_Folder_Created', 'Папку успішно створено');
define('lang_Existing_Folder','Існуюча папка'); define('lang_Existing_Folder', 'Існуюча папка');
define('lang_Confirm_Folder_del','Впевнені, що хочете видалити цю папку і всі файли в ній?'); define('lang_Confirm_Folder_del', 'Впевнені, що хочете видалити цю папку і всі файли в ній?');
define('lang_Return_Files_List','Повернутися до списку файлів'); define('lang_Return_Files_List', 'Повернутися до списку файлів');
define('lang_Preview','Перегляд'); define('lang_Preview', 'Перегляд');
define('lang_Download','Завантажити'); define('lang_Download', 'Завантажити');
define('lang_Insert_Folder_Name','Введіть ім`я папки:'); define('lang_Insert_Folder_Name', 'Введіть ім`я папки:');
define('lang_Root','Коренева папка'); define('lang_Root', 'Коренева папка');
define('lang_Rename','Переіменувати'); define('lang_Rename', 'Переіменувати');
define('lang_Back','назад'); define('lang_Back', 'назад');
define('lang_View','Вигляд'); define('lang_View', 'Вигляд');
define('lang_View_list','Список'); define('lang_View_list', 'Список');
define('lang_View_columns_list','Стовпчики'); define('lang_View_columns_list', 'Стовпчики');
define('lang_View_boxes','Плиткою'); define('lang_View_boxes', 'Плиткою');
define('lang_Toolbar','Панель'); define('lang_Toolbar', 'Панель');
define('lang_Actions','Дії'); define('lang_Actions', 'Дії');
define('lang_Rename_existing_file','Файл вже існує'); define('lang_Rename_existing_file', 'Файл вже існує');
define('lang_Rename_existing_folder','Папка вже існує'); define('lang_Rename_existing_folder', 'Папка вже існує');
define('lang_Empty_name','Не заповнено ім`я'); define('lang_Empty_name', 'Не заповнено ім`я');
define('lang_Text_filter','фільтр'); define('lang_Text_filter', 'фільтр');
define('lang_Swipe_help','Наведіть на ім`я файлу/папки, щоб побачити опції'); define('lang_Swipe_help', 'Наведіть на ім`я файлу/папки, щоб побачити опції');
define('lang_Upload_base','Основне завантаження'); define('lang_Upload_base', 'Основне завантаження');
define('lang_Upload_java','JAVA-завантаження (для файлів великих розмірів)'); define('lang_Upload_java', 'JAVA-завантаження (для файлів великих розмірів)');
define('lang_Upload_java_help',"Якщо Java-апплет не завантажується: 1. переконайтесь, що Java встановлено на вашому комп`ютері, інакше <a href='http://java.com/en/download/'>[завантажте]</a> 2. переконайтесь, що фаєрвол нічого не блокує"); define('lang_Upload_java_help', "Якщо Java-апплет не завантажується: 1. переконайтесь, що Java встановлено на вашому комп`ютері, інакше <a href='http://java.com/en/download/'>[завантажте]</a> 2. переконайтесь, що фаєрвол нічого не блокує");
define('lang_Upload_base_help',"Перетягніть файли в область, що вище або клікніть по ній мишкою (для сучасних браузерів), в іншому разі виберіть файл та натисніть кнопку. Коли завантаження закінчиться - натисніть кнопку повернення."); define('lang_Upload_base_help', "Перетягніть файли в область, що вище або клікніть по ній мишкою (для сучасних браузерів), в іншому разі виберіть файл та натисніть кнопку. Коли завантаження закінчиться - натисніть кнопку повернення.");
define('lang_Type_dir','папка'); define('lang_Type_dir', 'папка');
define('lang_Type','Тип'); define('lang_Type', 'Тип');
define('lang_Dimension','Розмір'); define('lang_Dimension', 'Розмір');
define('lang_Size','Об`єм'); define('lang_Size', 'Об`єм');
define('lang_Date','Дата'); define('lang_Date', 'Дата');
define('lang_Filename','Ім`я файлу'); define('lang_Filename', 'Ім`я файлу');
define('lang_Operations','Дії'); define('lang_Operations', 'Дії');
define('lang_Date_type','р-м-д'); define('lang_Date_type', 'р-м-д');
define('lang_OK','OK'); define('lang_OK', 'OK');
define('lang_Cancel','Відміна'); define('lang_Cancel', 'Відміна');
define('lang_Sorting','Сортування'); define('lang_Sorting', 'Сортування');
define('lang_Show_url','show URL'); define('lang_Show_url', 'show URL');
define('lang_Extract','extract here'); 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');
?>

View File

@ -1,6 +1,8 @@
<?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.str_replace('\0', '', $_POST['path']); $_POST['path'] = $current_path.str_replace('\0', '', $_POST['path']);
@ -13,146 +15,131 @@ $path_pos = strpos($storeFolder, $current_path);
$thumb_pos = strpos($_POST['path_thumb'], $thumbs_base_path); $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) {
if ($path == $current_path) $cycle = false; $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;
} }
$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;
$targetPathThumb = $storeFolderThumb; $targetPathThumb = $storeFolderThumb;
$_FILES['file']['name'] = fix_filename($_FILES['file']['name'], $transliteration); $_FILES['file']['name'] = fix_filename($_FILES['file']['name'], $transliteration);
$file_name_splitted = explode('.', $_FILES['file']['name']); $file_name_splitted = explode('.', $_FILES['file']['name']);
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']; $targetFile = $targetPath.$_FILES['file']['name'];
} $targetFileThumb = $targetPathThumb.$_FILES['file']['name'];
$targetFile = $targetPath.$_FILES['file']['name'];
$targetFileThumb = $targetPathThumb.$_FILES['file']['name'];
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;
else } else {
$is_img = false; $is_img = false;
}
if ($is_img) if ($is_img) {
{ 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);
{ $srcWidth = $imginfo[0];
$imginfo = getimagesize($targetFile); $srcHeight = $imginfo[1];
$srcWidth = $imginfo[0];
$srcHeight = $imginfo[1];
if ($image_resizing) if ($image_resizing) {
{ if ($image_resizing_width == 0) {
if ($image_resizing_width == 0) if ($image_resizing_height == 0) {
{ $image_resizing_width = $srcWidth;
if ($image_resizing_height == 0) $image_resizing_height = $srcHeight;
{ } else {
$image_resizing_width = $srcWidth; $image_resizing_width = $image_resizing_height * $srcWidth / $srcHeight;
$image_resizing_height = $srcHeight; }
} else } elseif ($image_resizing_height == 0) {
$image_resizing_width = $image_resizing_height * $srcWidth / $srcHeight; $image_resizing_height = $image_resizing_width * $srcHeight / $srcWidth;
} elseif ($image_resizing_height == 0) }
$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;
{ $srcHeight = $image_max_width * $srcHeight / $srcWidth;
$resize = true; $srcWidth = $image_max_width;
$srcHeight = $image_max_width * $srcHeight / $srcWidth; }
$srcWidth = $image_max_width; if ($image_max_height != 0 && $srcHeight > $image_max_height) {
} $resize = true;
if ($image_max_height != 0 && $srcHeight > $image_max_height) $srcWidth = $image_max_height * $srcWidth / $srcHeight;
{ $srcHeight = $image_max_height;
$resize = true; }
$srcWidth = $image_max_height * $srcWidth / $srcHeight; if ($resize) {
$srcHeight = $image_max_height; create_img_gd($targetFile, $targetFile, $srcWidth, $srcHeight);
} }
if ($resize) }
create_img_gd($targetFile, $targetFile, $srcWidth, $srcHeight); }
} if ($memory_error) {
} //error
if ($memory_error) unlink($targetFile);
{ header('HTTP/1.1 406 Not enought Memory', true, 406);
//error exit();
unlink($targetFile); }
header('HTTP/1.1 406 Not enought Memory', true, 406); } else {
exit(); move_uploaded_file($tempFile, $targetFile);
} chmod($targetFile, 0755);
} }
else } else {
{ header('HTTP/1.1 406 file not permitted', true, 406);
move_uploaded_file($tempFile, $targetFile); exit();
chmod($targetFile, 0755); }
} } else {
} else header('HTTP/1.1 405 Bad Request', true, 405);
{ exit();
header('HTTP/1.1 406 file not permitted', true, 406);
exit();
}
} else
{
header('HTTP/1.1 405 Bad Request', true, 405);
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'], 'lang' => $_POST['lang'],
'lang' => $_POST['lang'], 'popup' => $_POST['popup'],
'popup' => $_POST['popup'], 'field_id' => $_POST['field_id'],
'field_id' => $_POST['field_id'], 'fldr' => $_POST['fldr'],
'fldr' => $_POST['fldr'], )
) );
); header('location: dialog.php?'.$query);
header('location: dialog.php?'.$query);
} }
?>

View File

@ -25,4 +25,4 @@
*/ */
$dir = Context::getContext()->smarty->getTemplateDir(0).'controllers'.DIRECTORY_SEPARATOR.trim($con->override_folder, '\\/').DIRECTORY_SEPARATOR; $dir = Context::getContext()->smarty->getTemplateDir(0).'controllers'.DIRECTORY_SEPARATOR.trim($con->override_folder, '\\/').DIRECTORY_SEPARATOR;
$footer_tpl = file_exists($dir.'footer.tpl') ? $dir.'footer.tpl' : 'footer.tpl'; $footer_tpl = file_exists($dir.'footer.tpl') ? $dir.'footer.tpl' : 'footer.tpl';
echo Context::getContext()->smarty->fetch($footer_tpl); echo Context::getContext()->smarty->fetch($footer_tpl);

View File

@ -23,13 +23,14 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_PS_ADMIN_DIR_')) if (!defined('_PS_ADMIN_DIR_')) {
define('_PS_ADMIN_DIR_', getcwd()); define('_PS_ADMIN_DIR_', getcwd());
}
require_once(_PS_ADMIN_DIR_.'/../images.inc.php'); require_once(_PS_ADMIN_DIR_.'/../images.inc.php');
function bindDatepicker($id, $time) function bindDatepicker($id, $time)
{ {
if ($time) if ($time) {
echo ' echo '
var dateObj = new Date(); var dateObj = new Date();
var hours = dateObj.getHours(); var hours = dateObj.getHours();
var mins = dateObj.getMinutes(); var mins = dateObj.getMinutes();
@ -38,8 +39,9 @@ function bindDatepicker($id, $time)
if (mins < 10) { mins = "0" + mins; } if (mins < 10) { mins = "0" + mins; }
if (secs < 10) { secs = "0" + secs; } if (secs < 10) { secs = "0" + secs; }
var time = " "+hours+":"+mins+":"+secs;'; var time = " "+hours+":"+mins+":"+secs;';
}
echo ' echo '
$(function() { $(function() {
$("#'.Tools::htmlentitiesUTF8($id).'").datepicker({ $("#'.Tools::htmlentitiesUTF8($id).'").datepicker({
prevText:"", prevText:"",
@ -55,20 +57,23 @@ function bindDatepicker($id, $time)
*/ */
function includeDatepicker($id, $time = false) function includeDatepicker($id, $time = false)
{ {
Tools::displayAsDeprecated(); Tools::displayAsDeprecated();
echo '<script type="text/javascript" src="'.__PS_BASE_URI__.'js/jquery/ui/jquery.ui.core.min.js"></script>'; echo '<script type="text/javascript" src="'.__PS_BASE_URI__.'js/jquery/ui/jquery.ui.core.min.js"></script>';
echo '<link type="text/css" rel="stylesheet" href="'.__PS_BASE_URI__.'js/jquery/ui/themes/ui-lightness/jquery.ui.theme.css" />'; echo '<link type="text/css" rel="stylesheet" href="'.__PS_BASE_URI__.'js/jquery/ui/themes/ui-lightness/jquery.ui.theme.css" />';
echo '<link type="text/css" rel="stylesheet" href="'.__PS_BASE_URI__.'js/jquery/ui/themes/ui-lightness/jquery.ui.datepicker.css" />'; echo '<link type="text/css" rel="stylesheet" href="'.__PS_BASE_URI__.'js/jquery/ui/themes/ui-lightness/jquery.ui.datepicker.css" />';
$iso = Db::getInstance()->getValue('SELECT iso_code FROM '._DB_PREFIX_.'lang WHERE `id_lang` = '.(int)Context::getContext()->language->id); $iso = Db::getInstance()->getValue('SELECT iso_code FROM '._DB_PREFIX_.'lang WHERE `id_lang` = '.(int)Context::getContext()->language->id);
if ($iso != 'en') if ($iso != 'en') {
echo '<script type="text/javascript" src="'.__PS_BASE_URI__.'js/jquery/ui/i18n/jquery.ui.datepicker-'.Tools::htmlentitiesUTF8($iso).'.js"></script>'; echo '<script type="text/javascript" src="'.__PS_BASE_URI__.'js/jquery/ui/i18n/jquery.ui.datepicker-'.Tools::htmlentitiesUTF8($iso).'.js"></script>';
echo '<script type="text/javascript">'; }
if (is_array($id)) echo '<script type="text/javascript">';
foreach ($id as $id2) if (is_array($id)) {
bindDatepicker($id2, $time); foreach ($id as $id2) {
else bindDatepicker($id2, $time);
bindDatepicker($id, $time); }
echo '</script>'; } else {
bindDatepicker($id, $time);
}
echo '</script>';
} }
/** /**
@ -80,40 +85,41 @@ function includeDatepicker($id, $time = false)
*/ */
function rewriteSettingsFile($base_urls = null, $theme = null, $array_db = null) function rewriteSettingsFile($base_urls = null, $theme = null, $array_db = null)
{ {
$defines = array(); $defines = array();
$defines['_PS_CACHING_SYSTEM_'] = _PS_CACHING_SYSTEM_; $defines['_PS_CACHING_SYSTEM_'] = _PS_CACHING_SYSTEM_;
$defines['_PS_CACHE_ENABLED_'] = _PS_CACHE_ENABLED_; $defines['_PS_CACHE_ENABLED_'] = _PS_CACHE_ENABLED_;
$defines['_DB_NAME_'] = (($array_db && isset($array_db['_DB_NAME_'])) ? $array_db['_DB_NAME_'] : _DB_NAME_); $defines['_DB_NAME_'] = (($array_db && isset($array_db['_DB_NAME_'])) ? $array_db['_DB_NAME_'] : _DB_NAME_);
$defines['_MYSQL_ENGINE_'] = (($array_db && isset($array_db['_MYSQL_ENGINE_'])) ? $array_db['_MYSQL_ENGINE_'] : _MYSQL_ENGINE_); $defines['_MYSQL_ENGINE_'] = (($array_db && isset($array_db['_MYSQL_ENGINE_'])) ? $array_db['_MYSQL_ENGINE_'] : _MYSQL_ENGINE_);
$defines['_DB_SERVER_'] = (($array_db && isset($array_db['_DB_SERVER_'])) ? $array_db['_DB_SERVER_'] : _DB_SERVER_); $defines['_DB_SERVER_'] = (($array_db && isset($array_db['_DB_SERVER_'])) ? $array_db['_DB_SERVER_'] : _DB_SERVER_);
$defines['_DB_USER_'] = (($array_db && isset($array_db['_DB_USER_'])) ? $array_db['_DB_USER_'] : _DB_USER_); $defines['_DB_USER_'] = (($array_db && isset($array_db['_DB_USER_'])) ? $array_db['_DB_USER_'] : _DB_USER_);
$defines['_DB_PREFIX_'] = (($array_db && isset($array_db['_DB_PREFIX_'])) ? $array_db['_DB_PREFIX_'] : _DB_PREFIX_); $defines['_DB_PREFIX_'] = (($array_db && isset($array_db['_DB_PREFIX_'])) ? $array_db['_DB_PREFIX_'] : _DB_PREFIX_);
$defines['_DB_PASSWD_'] = (($array_db && isset($array_db['_DB_PASSWD_'])) ? $array_db['_DB_PASSWD_'] : _DB_PASSWD_); $defines['_DB_PASSWD_'] = (($array_db && isset($array_db['_DB_PASSWD_'])) ? $array_db['_DB_PASSWD_'] : _DB_PASSWD_);
$defines['_COOKIE_KEY_'] = addslashes(_COOKIE_KEY_); $defines['_COOKIE_KEY_'] = addslashes(_COOKIE_KEY_);
$defines['_COOKIE_IV_'] = addslashes(_COOKIE_IV_); $defines['_COOKIE_IV_'] = addslashes(_COOKIE_IV_);
$defines['_PS_CREATION_DATE_'] = addslashes(_PS_CREATION_DATE_); $defines['_PS_CREATION_DATE_'] = addslashes(_PS_CREATION_DATE_);
if (defined('_RIJNDAEL_KEY_')) if (defined('_RIJNDAEL_KEY_')) {
$defines['_RIJNDAEL_KEY_'] = addslashes(_RIJNDAEL_KEY_); $defines['_RIJNDAEL_KEY_'] = addslashes(_RIJNDAEL_KEY_);
if (defined('_RIJNDAEL_IV_')) }
$defines['_RIJNDAEL_IV_'] = addslashes(_RIJNDAEL_IV_); if (defined('_RIJNDAEL_IV_')) {
$defines['_PS_VERSION_'] = addslashes(_PS_VERSION_); $defines['_RIJNDAEL_IV_'] = addslashes(_RIJNDAEL_IV_);
$content = "<?php\n\n"; }
foreach ($defines as $k => $value) $defines['_PS_VERSION_'] = addslashes(_PS_VERSION_);
{ $content = "<?php\n\n";
if ($k == '_PS_VERSION_') foreach ($defines as $k => $value) {
$content .= 'if (!defined(\''.$k.'\'))'."\n\t"; if ($k == '_PS_VERSION_') {
$content .= 'if (!defined(\''.$k.'\'))'."\n\t";
}
$content .= 'define(\''.$k.'\', \''.addslashes($value).'\');'."\n"; $content .= 'define(\''.$k.'\', \''.addslashes($value).'\');'."\n";
} }
copy(_PS_ADMIN_DIR_.'/../config/settings.inc.php', _PS_ADMIN_DIR_.'/../config/settings.old.php'); copy(_PS_ADMIN_DIR_.'/../config/settings.inc.php', _PS_ADMIN_DIR_.'/../config/settings.old.php');
if ($fd = fopen(_PS_ADMIN_DIR_.'/../config/settings.inc.php', 'w')) if ($fd = fopen(_PS_ADMIN_DIR_.'/../config/settings.inc.php', 'w')) {
{ fwrite($fd, $content);
fwrite($fd, $content); fclose($fd);
fclose($fd); return true;
return true; }
} return false;
return false;
} }
/** /**
@ -125,7 +131,7 @@ function rewriteSettingsFile($base_urls = null, $theme = null, $array_db = null)
*/ */
function displayDate($sql_date, $with_time = false) function displayDate($sql_date, $with_time = false)
{ {
return strftime('%Y-%m-%d'.($with_time ? ' %H:%M:%S' : ''), strtotime($sql_date)); return strftime('%Y-%m-%d'.($with_time ? ' %H:%M:%S' : ''), strtotime($sql_date));
} }
/** /**
@ -139,90 +145,90 @@ function displayDate($sql_date, $with_time = false)
*/ */
function getPath($url_base, $id_category, $path = '', $highlight = '', $category_type = 'catalog', $home = false) function getPath($url_base, $id_category, $path = '', $highlight = '', $category_type = 'catalog', $home = false)
{ {
$context = Context::getContext(); $context = Context::getContext();
if ($category_type == 'catalog') if ($category_type == 'catalog') {
{ $category = Db::getInstance()->getRow('
$category = Db::getInstance()->getRow('
SELECT id_category, level_depth, nleft, nright SELECT id_category, level_depth, nleft, nright
FROM '._DB_PREFIX_.'category FROM '._DB_PREFIX_.'category
WHERE id_category = '.(int)$id_category); WHERE id_category = '.(int)$id_category);
if (isset($category['id_category'])) if (isset($category['id_category'])) {
{ $sql = 'SELECT c.id_category, cl.name, cl.link_rewrite
$sql = 'SELECT c.id_category, cl.name, cl.link_rewrite
FROM '._DB_PREFIX_.'category c FROM '._DB_PREFIX_.'category c
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = c.id_category'.Shop::addSqlRestrictionOnLang('cl').') LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = c.id_category'.Shop::addSqlRestrictionOnLang('cl').')
WHERE c.nleft <= '.(int)$category['nleft'].' WHERE c.nleft <= '.(int)$category['nleft'].'
AND c.nright >= '.(int)$category['nright'].' AND c.nright >= '.(int)$category['nright'].'
AND cl.id_lang = '.(int)$context->language->id. AND cl.id_lang = '.(int)$context->language->id.
($home ? ' AND c.id_category='.(int)$id_category : '').' ($home ? ' AND c.id_category='.(int)$id_category : '').'
AND c.id_category != '.(int)Category::getTopCategory()->id.' AND c.id_category != '.(int)Category::getTopCategory()->id.'
GROUP BY c.id_category GROUP BY c.id_category
ORDER BY c.level_depth ASC ORDER BY c.level_depth ASC
LIMIT '.(!$home ? (int)$category['level_depth'] + 1 : 1); LIMIT '.(!$home ? (int)$category['level_depth'] + 1 : 1);
$categories = Db::getInstance()->executeS($sql); $categories = Db::getInstance()->executeS($sql);
$full_path = ''; $full_path = '';
$n = 1; $n = 1;
$n_categories = (int)count($categories); $n_categories = (int)count($categories);
foreach ($categories as $category) foreach ($categories as $category) {
{ $link = Context::getContext()->link->getAdminLink('AdminCategories');
$link = Context::getContext()->link->getAdminLink('AdminCategories'); $edit = '<a href="'.Tools::safeOutput($link.'&id_category='.(int)$category['id_category'].'&'.(($category['id_category'] == 1 || $home) ? 'viewcategory' : 'updatecategory')).'" title="'.($category['id_category'] == Category::getRootCategory()->id_category ? 'Home' : 'Modify').'"><i class="icon-'.(($category['id_category'] == Category::getRootCategory()->id_category || $home) ? 'home' : 'pencil').'"></i></a> ';
$edit = '<a href="'.Tools::safeOutput($link.'&id_category='.(int)$category['id_category'].'&'.(($category['id_category'] == 1 || $home) ? 'viewcategory' : 'updatecategory')).'" title="'.($category['id_category'] == Category::getRootCategory()->id_category ? 'Home' : 'Modify').'"><i class="icon-'.(($category['id_category'] == Category::getRootCategory()->id_category || $home) ? 'home' : 'pencil').'"></i></a> '; $full_path .= $edit.
$full_path .= $edit. ($n < $n_categories ? '<a href="'.Tools::safeOutput($url_base.'&id_category='.(int)$category['id_category'].'&viewcategory&token='.Tools::getAdminToken('AdminCategories'.(int)Tab::getIdFromClassName('AdminCategories').(int)$context->employee->id)).'" title="'.htmlentities($category['name'], ENT_NOQUOTES, 'UTF-8').'">' : '').
($n < $n_categories ? '<a href="'.Tools::safeOutput($url_base.'&id_category='.(int)$category['id_category'].'&viewcategory&token='.Tools::getAdminToken('AdminCategories'.(int)Tab::getIdFromClassName('AdminCategories').(int)$context->employee->id)).'" title="'.htmlentities($category['name'], ENT_NOQUOTES, 'UTF-8').'">' : ''). (!empty($highlight) ? str_ireplace($highlight, '<span class="highlight">'.htmlentities($highlight, ENT_NOQUOTES, 'UTF-8').'</span>', $category['name']) : $category['name']).
(!empty($highlight) ? str_ireplace($highlight, '<span class="highlight">'.htmlentities($highlight, ENT_NOQUOTES, 'UTF-8').'</span>', $category['name']) : $category['name']). ($n < $n_categories ? '</a>' : '').
($n < $n_categories ? '</a>' : ''). (($n++ != $n_categories || !empty($path)) ? ' > ' : '');
(($n++ != $n_categories || !empty($path)) ? ' > ' : ''); }
}
return $full_path.$path; return $full_path.$path;
} }
} } elseif ($category_type == 'cms') {
elseif ($category_type == 'cms') $category = new CMSCategory($id_category, $context->language->id);
{ if (!$category->id) {
$category = new CMSCategory($id_category, $context->language->id); return $path;
if (!$category->id) }
return $path;
$name = ($highlight != null) ? str_ireplace($highlight, '<span class="highlight">'.$highlight.'</span>', CMSCategory::hideCMSCategoryPosition($category->name)) : CMSCategory::hideCMSCategoryPosition($category->name); $name = ($highlight != null) ? str_ireplace($highlight, '<span class="highlight">'.$highlight.'</span>', CMSCategory::hideCMSCategoryPosition($category->name)) : CMSCategory::hideCMSCategoryPosition($category->name);
$edit = '<a href="'.Tools::safeOutput($url_base.'&id_cms_category='.$category->id.'&addcategory&token='.Tools::getAdminToken('AdminCmsContent'.(int)Tab::getIdFromClassName('AdminCmsContent').(int)$context->employee->id)).'"> $edit = '<a href="'.Tools::safeOutput($url_base.'&id_cms_category='.$category->id.'&addcategory&token='.Tools::getAdminToken('AdminCmsContent'.(int)Tab::getIdFromClassName('AdminCmsContent').(int)$context->employee->id)).'">
<i class="icon-pencil"></i></a> '; <i class="icon-pencil"></i></a> ';
if ($category->id == 1) if ($category->id == 1) {
$edit = '<li><a href="'.Tools::safeOutput($url_base.'&id_cms_category='.$category->id.'&viewcategory&token='.Tools::getAdminToken('AdminCmsContent'.(int)Tab::getIdFromClassName('AdminCmsContent').(int)$context->employee->id)).'"> $edit = '<li><a href="'.Tools::safeOutput($url_base.'&id_cms_category='.$category->id.'&viewcategory&token='.Tools::getAdminToken('AdminCmsContent'.(int)Tab::getIdFromClassName('AdminCmsContent').(int)$context->employee->id)).'">
<i class="icon-home"></i></a></li> '; <i class="icon-home"></i></a></li> ';
$path = $edit.'<li><a href="'.Tools::safeOutput($url_base.'&id_cms_category='.$category->id.'&viewcategory&token='.Tools::getAdminToken('AdminCmsContent'.(int)Tab::getIdFromClassName('AdminCmsContent').(int)$context->employee->id)).'"> }
$path = $edit.'<li><a href="'.Tools::safeOutput($url_base.'&id_cms_category='.$category->id.'&viewcategory&token='.Tools::getAdminToken('AdminCmsContent'.(int)Tab::getIdFromClassName('AdminCmsContent').(int)$context->employee->id)).'">
'.$name.'</a></li> > '.$path; '.$name.'</a></li> > '.$path;
if ($category->id == 1) if ($category->id == 1) {
return substr($path, 0, strlen($path) - 3); return substr($path, 0, strlen($path) - 3);
return getPath($url_base, $category->id_parent, $path, '', 'cms'); }
} return getPath($url_base, $category->id_parent, $path, '', 'cms');
}
} }
function getDirContent($path) function getDirContent($path)
{ {
$content = array(); $content = array();
if (is_dir($path)) if (is_dir($path)) {
{ $d = dir($path);
$d = dir($path); while (false !== ($entry = $d->read())) {
while (false !== ($entry = $d->read())) if ($entry{0} != '.') {
if ($entry{0} != '.') $content[] = $entry;
$content[] = $entry; }
$d->close(); }
} $d->close();
return $content; }
return $content;
} }
function createDir($path, $rights) function createDir($path, $rights)
{ {
if (file_exists($path)) if (file_exists($path)) {
return true; return true;
return @mkdir($path, $rights); }
return @mkdir($path, $rights);
} }
function checkPSVersion() function checkPSVersion()
{ {
$upgrader = new Upgrader(); $upgrader = new Upgrader();
return $upgrader->checkPSVersion(); return $upgrader->checkPSVersion();
} }
/** /**
@ -232,14 +238,15 @@ function checkPSVersion()
*/ */
function translate($string) function translate($string)
{ {
Tools::displayAsDeprecated(); Tools::displayAsDeprecated();
global $_LANGADM; global $_LANGADM;
if (!is_array($_LANGADM)) if (!is_array($_LANGADM)) {
return str_replace('"', '&quot;', $string); return str_replace('"', '&quot;', $string);
$key = md5(str_replace('\'', '\\\'', $string)); }
$str = (array_key_exists('index'.$key, $_LANGADM)) ? $_LANGADM['index'.$key] : ((array_key_exists('index'.$key, $_LANGADM)) ? $_LANGADM['index'.$key] : $string); $key = md5(str_replace('\'', '\\\'', $string));
return str_replace('"', '&quot;', stripslashes($str)); $str = (array_key_exists('index'.$key, $_LANGADM)) ? $_LANGADM['index'.$key] : ((array_key_exists('index'.$key, $_LANGADM)) ? $_LANGADM['index'.$key] : $string);
return str_replace('"', '&quot;', stripslashes($str));
} }
/** /**
@ -250,32 +257,31 @@ function translate($string)
*/ */
function checkingTab($tab) function checkingTab($tab)
{ {
$tab_lowercase = Tools::strtolower(trim($tab)); $tab_lowercase = Tools::strtolower(trim($tab));
if (!Validate::isTabName($tab)) if (!Validate::isTabName($tab)) {
return false; return false;
$row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('SELECT id_tab, module, class_name FROM `'._DB_PREFIX_.'tab` WHERE LOWER(class_name) = \''.pSQL($tab).'\''); }
if (!$row['id_tab']) $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('SELECT id_tab, module, class_name FROM `'._DB_PREFIX_.'tab` WHERE LOWER(class_name) = \''.pSQL($tab).'\'');
{ if (!$row['id_tab']) {
if (isset(AdminTab::$tabParenting[$tab])) if (isset(AdminTab::$tabParenting[$tab])) {
Tools::redirectAdmin('?tab='.AdminTab::$tabParenting[$tab].'&token='.Tools::getAdminTokenLite(AdminTab::$tabParenting[$tab])); Tools::redirectAdmin('?tab='.AdminTab::$tabParenting[$tab].'&token='.Tools::getAdminTokenLite(AdminTab::$tabParenting[$tab]));
echo sprintf(Tools::displayError('Page %s cannot be found.'), $tab); }
return false; echo sprintf(Tools::displayError('Page %s cannot be found.'), $tab);
} return false;
}
// Class file is included in Dispatcher::dispatch() function // Class file is included in Dispatcher::dispatch() function
if (!class_exists($tab, false) || !$row['id_tab']) if (!class_exists($tab, false) || !$row['id_tab']) {
{ echo sprintf(Tools::displayError('The class %s cannot be found.'), $tab);
echo sprintf(Tools::displayError('The class %s cannot be found.'), $tab); return false;
return false; }
} $admin_obj = new $tab;
$admin_obj = new $tab; if (!$admin_obj->viewAccess() && ($admin_obj->table != 'employee' || Context::getContext()->employee->id != Tools::getValue('id_employee') || !Tools::isSubmit('updateemployee'))) {
if (!$admin_obj->viewAccess() && ($admin_obj->table != 'employee' || Context::getContext()->employee->id != Tools::getValue('id_employee') || !Tools::isSubmit('updateemployee'))) $admin_obj->_errors = array(Tools::displayError('Access denied.'));
{ echo $admin_obj->displayErrors();
$admin_obj->_errors = array(Tools::displayError('Access denied.')); return false;
echo $admin_obj->displayErrors(); }
return false; return $admin_obj;
}
return $admin_obj;
} }
/** /**
@ -283,14 +289,16 @@ function checkingTab($tab)
*/ */
function checkTabRights($id_tab) function checkTabRights($id_tab)
{ {
static $tab_accesses = null; static $tab_accesses = null;
if ($tab_accesses === null) if ($tab_accesses === null) {
$tab_accesses = Profile::getProfileAccesses(Context::getContext()->employee->id_profile); $tab_accesses = Profile::getProfileAccesses(Context::getContext()->employee->id_profile);
}
if (isset($tab_accesses[(int)$id_tab]['view'])) if (isset($tab_accesses[(int)$id_tab]['view'])) {
return ($tab_accesses[(int)$id_tab]['view'] === '1'); return ($tab_accesses[(int)$id_tab]['view'] === '1');
return false; }
return false;
} }
@ -334,62 +342,64 @@ function checkTabRights($id_tab)
*/ */
function simpleXMLToArray($xml, $flatten_values = true, $flatten_attributes = true, $flatten_children = true, $value_key = '@value', $attributes_key = '@attributes', $children_key = '@children') function simpleXMLToArray($xml, $flatten_values = true, $flatten_attributes = true, $flatten_children = true, $value_key = '@value', $attributes_key = '@attributes', $children_key = '@children')
{ {
$return = array(); $return = array();
if (!($xml instanceof SimpleXMLElement)) if (!($xml instanceof SimpleXMLElement)) {
return $return; return $return;
}
$name = $xml->getName(); $name = $xml->getName();
$value = trim((string)$xml); $value = trim((string)$xml);
if (strlen($value) == 0) if (strlen($value) == 0) {
$value = null; $value = null;
}
if ($value !== null) if ($value !== null) {
{ if (!$flatten_values) {
if (!$flatten_values) $return[$value_key] = $value;
$return[$value_key] = $value; } else {
else $return = $value;
$return = $value; }
} }
$children = array(); $children = array();
$first = true; $first = true;
foreach ($xml->children() as $element_name => $child) foreach ($xml->children() as $element_name => $child) {
{ $value = simpleXMLToArray($child, $flatten_values, $flatten_attributes, $flatten_children, $value_key, $attributes_key, $children_key);
$value = simpleXMLToArray($child, $flatten_values, $flatten_attributes, $flatten_children, $value_key, $attributes_key, $children_key); if (isset($children[$element_name])) {
if (isset($children[$element_name])) if ($first) {
{ $temp = $children[$element_name];
if ($first) unset($children[$element_name]);
{ $children[$element_name][] = $temp;
$temp = $children[$element_name]; $first = false;
unset($children[$element_name]); }
$children[$element_name][] = $temp; $children[$element_name][] = $value;
$first = false; } else {
} $children[$element_name] = $value;
$children[$element_name][] = $value; }
} }
else
$children[$element_name] = $value;
}
if (count($children) > 0) if (count($children) > 0) {
{ if (!$flatten_children) {
if (!$flatten_children) $return[$children_key] = $children;
$return[$children_key] = $children; } else {
else $return = array_merge($return, $children);
$return = array_merge($return, $children); }
} }
$attributes = array(); $attributes = array();
foreach ($xml->attributes() as $name => $value) foreach ($xml->attributes() as $name => $value) {
$attributes[$name] = trim($value); $attributes[$name] = trim($value);
}
if (count($attributes) > 0) if (count($attributes) > 0) {
if (!$flatten_attributes) if (!$flatten_attributes) {
$return[$attributes_key] = $attributes; $return[$attributes_key] = $attributes;
else } else {
$return = array_merge($return, $attributes); $return = array_merge($return, $attributes);
}
}
return $return; return $return;
} }
/** /**
@ -399,159 +409,157 @@ function simpleXMLToArray($xml, $flatten_values = true, $flatten_attributes = tr
*/ */
function runAdminTab($tab, $ajax_mode = false) function runAdminTab($tab, $ajax_mode = false)
{ {
$ajax_mode = (bool)$ajax_mode; $ajax_mode = (bool)$ajax_mode;
require_once(_PS_ADMIN_DIR_.'/init.php'); require_once(_PS_ADMIN_DIR_.'/init.php');
$cookie = Context::getContext()->cookie; $cookie = Context::getContext()->cookie;
if (empty($tab) && !count($_POST)) if (empty($tab) && !count($_POST)) {
{ $tab = 'AdminDashboard';
$tab = 'AdminDashboard'; $_POST['tab'] = $tab;
$_POST['tab'] = $tab; $_POST['token'] = Tools::getAdminTokenLite($tab);
$_POST['token'] = Tools::getAdminTokenLite($tab); }
} // $tab = $_REQUEST['tab'];
// $tab = $_REQUEST['tab']; if ($admin_obj = checkingTab($tab)) {
if ($admin_obj = checkingTab($tab)) Context::getContext()->controller = $admin_obj;
{ // init is different for new tabs (AdminController) and old tabs (AdminTab)
Context::getContext()->controller = $admin_obj; if ($admin_obj instanceof AdminController) {
// init is different for new tabs (AdminController) and old tabs (AdminTab) if ($ajax_mode) {
if ($admin_obj instanceof AdminController) $admin_obj->ajax = true;
{ }
if ($ajax_mode) $admin_obj->path = dirname($_SERVER['PHP_SELF']);
$admin_obj->ajax = true; $admin_obj->run();
$admin_obj->path = dirname($_SERVER['PHP_SELF']); } else {
$admin_obj->run(); if (!$ajax_mode) {
} require_once(_PS_ADMIN_DIR_.'/header.inc.php');
else }
{ $iso_user = Context::getContext()->language->id;
if (!$ajax_mode) $tabs = array();
require_once(_PS_ADMIN_DIR_.'/header.inc.php'); $tabs = Tab::recursiveTab($admin_obj->id, $tabs);
$iso_user = Context::getContext()->language->id; $tabs = array_reverse($tabs);
$tabs = array(); $bread = '';
$tabs = Tab::recursiveTab($admin_obj->id, $tabs); foreach ($tabs as $key => $item) {
$tabs = array_reverse($tabs); $bread .= ' <img src="../img/admin/separator_breadcrumb.png" style="margin-right:5px" alt="&gt;" />';
$bread = ''; if (count($tabs) - 1 > $key) {
foreach ($tabs as $key => $item) $bread .= '<a href="?tab='.$item['class_name'].'&token='.Tools::getAdminToken($item['class_name'].(int)$item['id_tab'].(int)Context::getContext()->employee->id).'">';
{ }
$bread .= ' <img src="../img/admin/separator_breadcrumb.png" style="margin-right:5px" alt="&gt;" />';
if (count($tabs) - 1 > $key)
$bread .= '<a href="?tab='.$item['class_name'].'&token='.Tools::getAdminToken($item['class_name'].(int)$item['id_tab'].(int)Context::getContext()->employee->id).'">';
$bread .= $item['name']; $bread .= $item['name'];
if (count($tabs) - 1 > $key) if (count($tabs) - 1 > $key) {
$bread .= '</a>'; $bread .= '</a>';
} }
}
if (!$ajax_mode && Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL && Context::getContext()->controller->multishop_context != Shop::CONTEXT_ALL) if (!$ajax_mode && Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL && Context::getContext()->controller->multishop_context != Shop::CONTEXT_ALL) {
{ echo '<div class="multishop_info">';
echo '<div class="multishop_info">'; if (Shop::getContext() == Shop::CONTEXT_GROUP) {
if (Shop::getContext() == Shop::CONTEXT_GROUP) $shop_group = new ShopGroup((int)Shop::getContextShopGroupID());
{ printf(Translate::getAdminTranslation('You are configuring your store for group shop %s'), '<b>'.$shop_group->name.'</b>');
$shop_group = new ShopGroup((int)Shop::getContextShopGroupID()); } elseif (Shop::getContext() == Shop::CONTEXT_SHOP) {
printf(Translate::getAdminTranslation('You are configuring your store for group shop %s'), '<b>'.$shop_group->name.'</b>'); printf(Translate::getAdminTranslation('You are configuring your store for shop %s'), '<b>'.Context::getContext()->shop->name.'</b>');
} }
elseif (Shop::getContext() == Shop::CONTEXT_SHOP) echo '</div>';
printf(Translate::getAdminTranslation('You are configuring your store for shop %s'), '<b>'.Context::getContext()->shop->name.'</b>'); }
echo '</div>'; if (Validate::isLoadedObject($admin_obj)) {
} if ($admin_obj->checkToken()) {
if (Validate::isLoadedObject($admin_obj)) if ($ajax_mode) {
{ // the differences with index.php is here
if ($admin_obj->checkToken()) $admin_obj->ajaxPreProcess();
{ $action = Tools::getValue('action');
if ($ajax_mode) // no need to use displayConf() here
{
// the differences with index.php is here
$admin_obj->ajaxPreProcess();
$action = Tools::getValue('action');
// no need to use displayConf() here
if (!empty($action) && method_exists($admin_obj, 'ajaxProcess'.Tools::toCamelCase($action))) if (!empty($action) && method_exists($admin_obj, 'ajaxProcess'.Tools::toCamelCase($action))) {
$admin_obj->{'ajaxProcess'.Tools::toCamelCase($action)}(); $admin_obj->{'ajaxProcess'.Tools::toCamelCase($action)}();
else } else {
$admin_obj->ajaxProcess(); $admin_obj->ajaxProcess();
}
// @TODO We should use a displayAjaxError // @TODO We should use a displayAjaxError
$admin_obj->displayErrors(); $admin_obj->displayErrors();
if (!empty($action) && method_exists($admin_obj, 'displayAjax'.Tools::toCamelCase($action))) if (!empty($action) && method_exists($admin_obj, 'displayAjax'.Tools::toCamelCase($action))) {
$admin_obj->{'displayAjax'.$action}(); $admin_obj->{'displayAjax'.$action}();
else } else {
$admin_obj->displayAjax(); $admin_obj->displayAjax();
} }
else } else {
{ /* Filter memorization */
/* Filter memorization */ if (isset($_POST) && !empty($_POST) && isset($admin_obj->table)) {
if (isset($_POST) && !empty($_POST) && isset($admin_obj->table)) foreach ($_POST as $key => $value) {
foreach ($_POST as $key => $value) if (is_array($admin_obj->table)) {
if (is_array($admin_obj->table)) foreach ($admin_obj->table as $table) {
{ if (strncmp($key, $table.'Filter_', 7) === 0 || strncmp($key, 'submitFilter', 12) === 0) {
foreach ($admin_obj->table as $table) $cookie->$key = !is_array($value) ? $value : serialize($value);
if (strncmp($key, $table.'Filter_', 7) === 0 || strncmp($key, 'submitFilter', 12) === 0) }
$cookie->$key = !is_array($value) ? $value : serialize($value); }
} } elseif (strncmp($key, $admin_obj->table.'Filter_', 7) === 0 || strncmp($key, 'submitFilter', 12) === 0) {
elseif (strncmp($key, $admin_obj->table.'Filter_', 7) === 0 || strncmp($key, 'submitFilter', 12) === 0) $cookie->$key = !is_array($value) ? $value : serialize($value);
$cookie->$key = !is_array($value) ? $value : serialize($value); }
}
}
if (isset($_GET) && !empty($_GET) && isset($admin_obj->table)) if (isset($_GET) && !empty($_GET) && isset($admin_obj->table)) {
foreach ($_GET as $key => $value) foreach ($_GET as $key => $value) {
if (is_array($admin_obj->table)) if (is_array($admin_obj->table)) {
{ foreach ($admin_obj->table as $table) {
foreach ($admin_obj->table as $table) if (strncmp($key, $table.'OrderBy', 7) === 0 || strncmp($key, $table.'Orderway', 8) === 0) {
if (strncmp($key, $table.'OrderBy', 7) === 0 || strncmp($key, $table.'Orderway', 8) === 0) $cookie->$key = $value;
$cookie->$key = $value; }
} }
elseif (strncmp($key, $admin_obj->table.'OrderBy', 7) === 0 || strncmp($key, $admin_obj->table.'Orderway', 12) === 0) } elseif (strncmp($key, $admin_obj->table.'OrderBy', 7) === 0 || strncmp($key, $admin_obj->table.'Orderway', 12) === 0) {
$cookie->$key = $value; $cookie->$key = $value;
$admin_obj->displayConf(); }
$admin_obj->postProcess(); }
$admin_obj->displayErrors(); }
$admin_obj->display(); $admin_obj->displayConf();
include(_PS_ADMIN_DIR_.'/footer.inc.php'); $admin_obj->postProcess();
} $admin_obj->displayErrors();
} $admin_obj->display();
else include(_PS_ADMIN_DIR_.'/footer.inc.php');
{ }
if ($ajax_mode) } else {
{ if ($ajax_mode) {
// If this is an XSS attempt, then we should only display a simple, secure page // If this is an XSS attempt, then we should only display a simple, secure page
if (ob_get_level() && ob_get_length() > 0) if (ob_get_level() && ob_get_length() > 0) {
ob_clean(); ob_clean();
}
// ${1} in the replacement string of the regexp is required, because the token may begin with a number and mix up with it (e.g. $17) // ${1} in the replacement string of the regexp is required, because the token may begin with a number and mix up with it (e.g. $17)
$url = preg_replace('/([&?]token=)[^&]*(&.*)?$/', '${1}'.$admin_obj->token.'$2', $_SERVER['REQUEST_URI']); $url = preg_replace('/([&?]token=)[^&]*(&.*)?$/', '${1}'.$admin_obj->token.'$2', $_SERVER['REQUEST_URI']);
if (false === strpos($url, '?token=') && false === strpos($url, '&token=')) if (false === strpos($url, '?token=') && false === strpos($url, '&token=')) {
$url .= '&token='.$admin_obj->token; $url .= '&token='.$admin_obj->token;
}
// we can display the correct url // we can display the correct url
// die(Tools::jsonEncode(array(Translate::getAdminTranslation('Invalid security token'),$url))); // die(Tools::jsonEncode(array(Translate::getAdminTranslation('Invalid security token'),$url)));
die(Tools::jsonEncode(Translate::getAdminTranslation('Invalid security token'))); die(Tools::jsonEncode(Translate::getAdminTranslation('Invalid security token')));
} } else {
else // If this is an XSS attempt, then we should only display a simple, secure page
{ if (ob_get_level() && ob_get_length() > 0) {
// If this is an XSS attempt, then we should only display a simple, secure page ob_clean();
if (ob_get_level() && ob_get_length() > 0) }
ob_clean();
// ${1} in the replacement string of the regexp is required, because the token may begin with a number and mix up with it (e.g. $17) // ${1} in the replacement string of the regexp is required, because the token may begin with a number and mix up with it (e.g. $17)
$url = preg_replace('/([&?]token=)[^&]*(&.*)?$/', '${1}'.$admin_obj->token.'$2', $_SERVER['REQUEST_URI']); $url = preg_replace('/([&?]token=)[^&]*(&.*)?$/', '${1}'.$admin_obj->token.'$2', $_SERVER['REQUEST_URI']);
if (false === strpos($url, '?token=') && false === strpos($url, '&token=')) if (false === strpos($url, '?token=') && false === strpos($url, '&token=')) {
$url .= '&token='.$admin_obj->token; $url .= '&token='.$admin_obj->token;
}
$message = Translate::getAdminTranslation('Invalid security token'); $message = Translate::getAdminTranslation('Invalid security token');
echo '<html><head><title>'.$message.'</title></head><body style="font-family:Arial,Verdana,Helvetica,sans-serif;background-color:#EC8686"> echo '<html><head><title>'.$message.'</title></head><body style="font-family:Arial,Verdana,Helvetica,sans-serif;background-color:#EC8686">
<div style="background-color:#FAE2E3;border:1px solid #000000;color:#383838;font-weight:700;line-height:20px;margin:0 0 10px;padding:10px 15px;width:500px"> <div style="background-color:#FAE2E3;border:1px solid #000000;color:#383838;font-weight:700;line-height:20px;margin:0 0 10px;padding:10px 15px;width:500px">
<img src="../img/admin/error2.png" style="margin:-4px 5px 0 0;vertical-align:middle"> <img src="../img/admin/error2.png" style="margin:-4px 5px 0 0;vertical-align:middle">
'.$message.' '.$message.'
</div>'; </div>';
echo '<a href="'.htmlentities($url).'" method="get" style="float:left;margin:10px"> echo '<a href="'.htmlentities($url).'" method="get" style="float:left;margin:10px">
<input type="button" value="'.Tools::htmlentitiesUTF8(Translate::getAdminTranslation('I understand the risks and I really want to display this page')).'" style="height:30px;margin-top:5px" /> <input type="button" value="'.Tools::htmlentitiesUTF8(Translate::getAdminTranslation('I understand the risks and I really want to display this page')).'" style="height:30px;margin-top:5px" />
</a> </a>
<a href="index.php" method="get" style="float:left;margin:10px"> <a href="index.php" method="get" style="float:left;margin:10px">
<input type="button" value="'.Tools::htmlentitiesUTF8(Translate::getAdminTranslation('Take me out of here!')).'" style="height:40px" /> <input type="button" value="'.Tools::htmlentitiesUTF8(Translate::getAdminTranslation('Take me out of here!')).'" style="height:40px" />
</a> </a>
</body></html>'; </body></html>';
die; die;
} }
} }
} }
} }
} }
} }

View File

@ -24,7 +24,8 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_PS_ADMIN_DIR_')) if (!defined('_PS_ADMIN_DIR_')) {
define('_PS_ADMIN_DIR_', getcwd()); define('_PS_ADMIN_DIR_', getcwd());
}
require(_PS_ADMIN_DIR_.'/../config/config.inc.php'); require(_PS_ADMIN_DIR_.'/../config/config.inc.php');
Controller::getController('GetFileController')->run(); Controller::getController('GetFileController')->run();

View File

@ -24,8 +24,9 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_PS_ADMIN_DIR_')) if (!defined('_PS_ADMIN_DIR_')) {
define('_PS_ADMIN_DIR_', getcwd()); define('_PS_ADMIN_DIR_', getcwd());
}
include_once(_PS_ADMIN_DIR_.'/../config/config.inc.php'); include_once(_PS_ADMIN_DIR_.'/../config/config.inc.php');
$module = Tools::getValue('module'); $module = Tools::getValue('module');
@ -42,69 +43,67 @@ $id_employee = (int)(Tools::getValue('id_employee'));
$id_lang = (int)(Tools::getValue('id_lang')); $id_lang = (int)(Tools::getValue('id_lang'));
if (!isset($cookie->id_employee) || !$cookie->id_employee || $cookie->id_employee != $id_employee) if (!isset($cookie->id_employee) || !$cookie->id_employee || $cookie->id_employee != $id_employee) {
die(Tools::displayError()); die(Tools::displayError());
}
if (!Validate::isModuleName($module)) if (!Validate::isModuleName($module)) {
die(Tools::displayError()); die(Tools::displayError());
}
if (!Tools::file_exists_cache($module_path = _PS_ROOT_DIR_.'/modules/'.$module.'/'.$module.'.php')) if (!Tools::file_exists_cache($module_path = _PS_ROOT_DIR_.'/modules/'.$module.'/'.$module.'.php')) {
die(Tools::displayError()); die(Tools::displayError());
}
$shop_id = ''; $shop_id = '';
Shop::setContext(Shop::CONTEXT_ALL); Shop::setContext(Shop::CONTEXT_ALL);
if (Context::getContext()->cookie->shopContext) if (Context::getContext()->cookie->shopContext) {
{ $split = explode('-', Context::getContext()->cookie->shopContext);
$split = explode('-', Context::getContext()->cookie->shopContext); if (count($split) == 2) {
if (count($split) == 2) if ($split[0] == 'g') {
{ if (Context::getContext()->employee->hasAuthOnShopGroup($split[1])) {
if ($split[0] == 'g') Shop::setContext(Shop::CONTEXT_GROUP, $split[1]);
{ } else {
if (Context::getContext()->employee->hasAuthOnShopGroup($split[1])) $shop_id = Context::getContext()->employee->getDefaultShopID();
Shop::setContext(Shop::CONTEXT_GROUP, $split[1]); Shop::setContext(Shop::CONTEXT_SHOP, $shop_id);
else }
{ } elseif (Shop::getShop($split[1]) && Context::getContext()->employee->hasAuthOnShop($split[1])) {
$shop_id = Context::getContext()->employee->getDefaultShopID(); $shop_id = $split[1];
Shop::setContext(Shop::CONTEXT_SHOP, $shop_id); Shop::setContext(Shop::CONTEXT_SHOP, $shop_id);
} } else {
} $shop_id = Context::getContext()->employee->getDefaultShopID();
else if (Shop::getShop($split[1]) && Context::getContext()->employee->hasAuthOnShop($split[1])) Shop::setContext(Shop::CONTEXT_SHOP, $shop_id);
{ }
$shop_id = $split[1]; }
Shop::setContext(Shop::CONTEXT_SHOP, $shop_id);
}
else
{
$shop_id = Context::getContext()->employee->getDefaultShopID();
Shop::setContext(Shop::CONTEXT_SHOP, $shop_id);
}
}
} }
// Check multishop context and set right context if need // Check multishop context and set right context if need
if (Shop::getContext()) if (Shop::getContext()) {
{ if (Shop::getContext() == Shop::CONTEXT_SHOP && !Shop::CONTEXT_SHOP) {
if (Shop::getContext() == Shop::CONTEXT_SHOP && !Shop::CONTEXT_SHOP) Shop::setContext(Shop::CONTEXT_GROUP, Shop::getContextShopGroupID());
Shop::setContext(Shop::CONTEXT_GROUP, Shop::getContextShopGroupID()); }
if (Shop::getContext() == Shop::CONTEXT_GROUP && !Shop::CONTEXT_GROUP) if (Shop::getContext() == Shop::CONTEXT_GROUP && !Shop::CONTEXT_GROUP) {
Shop::setContext(Shop::CONTEXT_ALL); Shop::setContext(Shop::CONTEXT_ALL);
}
} }
// Replace existing shop if necessary // Replace existing shop if necessary
if (!$shop_id) if (!$shop_id) {
Context::getContext()->shop = new Shop(Configuration::get('PS_SHOP_DEFAULT')); Context::getContext()->shop = new Shop(Configuration::get('PS_SHOP_DEFAULT'));
elseif (Context::getContext()->shop->id != $shop_id) } elseif (Context::getContext()->shop->id != $shop_id) {
Context::getContext()->shop = new Shop($shop_id); Context::getContext()->shop = new Shop($shop_id);
}
require_once($module_path); require_once($module_path);
$grid = new $module(); $grid = new $module();
$grid->setEmployee($id_employee); $grid->setEmployee($id_employee);
$grid->setLang($id_lang); $grid->setLang($id_lang);
if ($option) if ($option) {
$grid->setOption($option); $grid->setOption($option);
}
$grid->create($render, $type, $width, $height, $start, $limit, $sort, $dir); $grid->create($render, $type, $width, $height, $start, $limit, $sort, $dir);
$grid->render(); $grid->render();

View File

@ -36,18 +36,19 @@ $con->initFooter();
$title = array($tab->getFieldByLang('name')); $title = array($tab->getFieldByLang('name'));
Context::getContext()->smarty->assign(array( Context::getContext()->smarty->assign(array(
'navigationPipe', Configuration::get('PS_NAVIGATION_PIPE'), 'navigationPipe', Configuration::get('PS_NAVIGATION_PIPE'),
'meta_title' => implode(' '.Configuration::get('PS_NAVIGATION_PIPE').' ', $title), 'meta_title' => implode(' '.Configuration::get('PS_NAVIGATION_PIPE').' ', $title),
'display_header' => true, 'display_header' => true,
'display_footer' => true, 'display_header_javascript' => true,
'display_footer' => true,
)); ));
$dir = Context::getContext()->smarty->getTemplateDir(0).'controllers'.DIRECTORY_SEPARATOR.trim($con->override_folder, '\\/').DIRECTORY_SEPARATOR; $dir = Context::getContext()->smarty->getTemplateDir(0).'controllers'.DIRECTORY_SEPARATOR.trim($con->override_folder, '\\/').DIRECTORY_SEPARATOR;
$header_tpl = file_exists($dir.'header.tpl') ? $dir.'header.tpl' : 'header.tpl'; $header_tpl = file_exists($dir.'header.tpl') ? $dir.'header.tpl' : 'header.tpl';
$tool_tpl = file_exists($dir.'page_header_toolbar.tpl') ? $dir.'page_header_toolbar.tpl' : 'page_header_toolbar.tpl'; $tool_tpl = file_exists($dir.'page_header_toolbar.tpl') ? $dir.'page_header_toolbar.tpl' : 'page_header_toolbar.tpl';
Context::getContext()->smarty->assign(array( Context::getContext()->smarty->assign(array(
'show_page_header_toolbar' => true, 'show_page_header_toolbar' => true,
'title' => implode(' '.Configuration::get('PS_NAVIGATION_PIPE').' ', $title), 'title' => implode(' '.Configuration::get('PS_NAVIGATION_PIPE').' ', $title),
'toolbar_btn' => array() 'toolbar_btn' => array()
)); ));
echo Context::getContext()->smarty->fetch($header_tpl); echo Context::getContext()->smarty->fetch($header_tpl);
echo Context::getContext()->smarty->fetch($tool_tpl); echo Context::getContext()->smarty->fetch($tool_tpl);

View File

@ -25,30 +25,34 @@
*/ */
$timer_start = microtime(true); $timer_start = microtime(true);
if (!defined('_PS_ADMIN_DIR_')) if (!defined('_PS_ADMIN_DIR_')) {
define('_PS_ADMIN_DIR_', getcwd()); define('_PS_ADMIN_DIR_', getcwd());
}
if (!defined('PS_ADMIN_DIR')) if (!defined('PS_ADMIN_DIR')) {
define('PS_ADMIN_DIR', _PS_ADMIN_DIR_); define('PS_ADMIN_DIR', _PS_ADMIN_DIR_);
}
require(_PS_ADMIN_DIR_.'/../config/config.inc.php'); require(_PS_ADMIN_DIR_.'/../config/config.inc.php');
require(_PS_ADMIN_DIR_.'/functions.php'); require(_PS_ADMIN_DIR_.'/functions.php');
//small test to clear cache after upgrade //small test to clear cache after upgrade
if (Configuration::get('PS_UPGRADE_CLEAR_CACHE')) if (Configuration::get('PS_UPGRADE_CLEAR_CACHE')) {
{ header('Cache-Control: max-age=0, must-revalidate');
header('Cache-Control: max-age=0, must-revalidate'); header('Expires: Mon, 06 Jun 1985 06:06:00 GMT+1');
header('Expires: Mon, 06 Jun 1985 06:06:00 GMT+1'); Configuration::updateValue('PS_UPGRADE_CLEAR_CACHE', 0);
Configuration::updateValue('PS_UPGRADE_CLEAR_CACHE', 0);
} }
// For retrocompatibility with "tab" parameter // For retrocompatibility with "tab" parameter
if (!isset($_GET['controller']) && isset($_GET['tab'])) if (!isset($_GET['controller']) && isset($_GET['tab'])) {
$_GET['controller'] = strtolower($_GET['tab']); $_GET['controller'] = strtolower($_GET['tab']);
if (!isset($_POST['controller']) && isset($_POST['tab'])) }
$_POST['controller'] = strtolower($_POST['tab']); if (!isset($_POST['controller']) && isset($_POST['tab'])) {
if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) $_POST['controller'] = strtolower($_POST['tab']);
$_REQUEST['controller'] = strtolower($_REQUEST['tab']); }
if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) {
$_REQUEST['controller'] = strtolower($_REQUEST['tab']);
}
// Prepare and trigger admin dispatcher // Prepare and trigger admin dispatcher
Dispatcher::getInstance()->dispatch(); Dispatcher::getInstance()->dispatch();

View File

@ -30,122 +30,117 @@ $timerStart = microtime(true);
// $_GET['tab'] = $_GET['controller']; // $_GET['tab'] = $_GET['controller'];
// $_POST['tab'] = $_POST['controller']; // $_POST['tab'] = $_POST['controller'];
// $_REQUEST['tab'] = $_REQUEST['controller']; // $_REQUEST['tab'] = $_REQUEST['controller'];
try try {
{ $context = Context::getContext();
$context = Context::getContext(); if (isset($_GET['logout'])) {
if (isset($_GET['logout'])) $context->employee->logout();
$context->employee->logout(); }
if (!isset($context->employee) || !$context->employee->isLoggedBack()) if (!isset($context->employee) || !$context->employee->isLoggedBack()) {
Tools::redirectAdmin('index.php?controller=AdminLogin&redirect='.$_SERVER['REQUEST_URI']); Tools::redirectAdmin('index.php?controller=AdminLogin&redirect='.$_SERVER['REQUEST_URI']);
}
// Set current index // Set current index
// @deprecated global // @deprecated global
global $currentIndex; // retrocompatibility; global $currentIndex; // retrocompatibility;
$currentIndex = $_SERVER['SCRIPT_NAME'].(($controller = Tools::getValue('controller')) ? '?controller='.$controller: ''); $currentIndex = $_SERVER['SCRIPT_NAME'].(($controller = Tools::getValue('controller')) ? '?controller='.$controller: '');
if ($back = Tools::getValue('back')) if ($back = Tools::getValue('back')) {
$currentIndex .= '&back='.urlencode($back); $currentIndex .= '&back='.urlencode($back);
AdminTab::$currentIndex = $currentIndex; }
AdminTab::$currentIndex = $currentIndex;
$iso = $context->language->iso_code; $iso = $context->language->iso_code;
if (file_exists(_PS_TRANSLATIONS_DIR_.$iso.'/errors.php')) if (file_exists(_PS_TRANSLATIONS_DIR_.$iso.'/errors.php')) {
include(_PS_TRANSLATIONS_DIR_.$iso.'/errors.php'); include(_PS_TRANSLATIONS_DIR_.$iso.'/errors.php');
if (file_exists(_PS_TRANSLATIONS_DIR_.$iso.'/fields.php')) }
include(_PS_TRANSLATIONS_DIR_.$iso.'/fields.php'); if (file_exists(_PS_TRANSLATIONS_DIR_.$iso.'/fields.php')) {
if (file_exists(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php')) include(_PS_TRANSLATIONS_DIR_.$iso.'/fields.php');
include(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php'); }
if (file_exists(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php')) {
include(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php');
}
/* Server Params */ /* Server Params */
$protocol_link = (Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://'; $protocol_link = (Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
$protocol_content = (isset($useSSL) AND $useSSL AND Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://'; $protocol_content = (isset($useSSL) and $useSSL and Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
$link = new Link($protocol_link, $protocol_content); $link = new Link($protocol_link, $protocol_content);
$context->link = $link; $context->link = $link;
if (!defined('_PS_BASE_URL_')) if (!defined('_PS_BASE_URL_')) {
define('_PS_BASE_URL_', Tools::getShopDomain(true)); define('_PS_BASE_URL_', Tools::getShopDomain(true));
if (!defined('_PS_BASE_URL_SSL_')) }
define('_PS_BASE_URL_SSL_', Tools::getShopDomainSsl(true)); if (!defined('_PS_BASE_URL_SSL_')) {
define('_PS_BASE_URL_SSL_', Tools::getShopDomainSsl(true));
}
$path = dirname(__FILE__).'/themes/'; $path = dirname(__FILE__).'/themes/';
// if the current employee theme is not valid (check layout.tpl presence), // if the current employee theme is not valid (check layout.tpl presence),
// reset to default theme // reset to default theme
if (empty($context->employee->bo_theme) || if (empty($context->employee->bo_theme) ||
!file_exists($path.$context->employee->bo_theme.'/template/layout.tpl')) !file_exists($path.$context->employee->bo_theme.'/template/layout.tpl')) {
{ // default admin theme is "default".
// default admin theme is "default". $context->employee->bo_theme = '';
$context->employee->bo_theme = ''; if (file_exists($path.'default/template/layout.tpl')) {
if (file_exists($path.'default/template/layout.tpl')) $context->employee->bo_theme = 'default';
$context->employee->bo_theme = 'default'; } else {
else // if default theme doesn't exists, try to find one, otherwise throw exception
{ foreach (scandir($path) as $theme) {
// if default theme doesn't exists, try to find one, otherwise throw exception if ($theme[0] != '.' && file_exists($path.$theme.'/template/layout.tpl')) {
foreach (scandir($path) as $theme) $context->employee->bo_theme = $theme;
if ($theme[0] != '.' && file_exists($path.$theme.'/template/layout.tpl')) break;
{ }
$context->employee->bo_theme = $theme; }
break; // if no theme is found, admin can't work.
} if (empty($context->employee->bo_theme)) {
// if no theme is found, admin can't work. throw new PrestaShopException('Unable to load theme for employee, and no valid theme found');
if (empty($context->employee->bo_theme)) }
throw new PrestaShopException('Unable to load theme for employee, and no valid theme found'); }
} $context->employee->update();
$context->employee->update(); }
}
// Change shop context ? // Change shop context ?
if (Shop::isFeatureActive() && Tools::getValue('setShopContext') !== false) if (Shop::isFeatureActive() && Tools::getValue('setShopContext') !== false) {
{ $context->cookie->shopContext = Tools::getValue('setShopContext');
$context->cookie->shopContext = Tools::getValue('setShopContext'); $url = parse_url($_SERVER['REQUEST_URI']);
$url = parse_url($_SERVER['REQUEST_URI']); $query = (isset($url['query'])) ? $url['query'] : '';
$query = (isset($url['query'])) ? $url['query'] : ''; parse_str($query, $parseQuery);
parse_str($query, $parseQuery); unset($parseQuery['setShopContext']);
unset($parseQuery['setShopContext']); Tools::redirectAdmin($url['path'] . '?' . http_build_query($parseQuery, '', '&'));
Tools::redirectAdmin($url['path'] . '?' . http_build_query($parseQuery, '', '&')); }
}
$context->currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT')); $context->currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
if ($context->employee->isLoggedBack()) if ($context->employee->isLoggedBack()) {
{ $shop_id = '';
$shop_id = ''; Shop::setContext(Shop::CONTEXT_ALL);
Shop::setContext(Shop::CONTEXT_ALL); if ($context->cookie->shopContext) {
if ($context->cookie->shopContext) $split = explode('-', $context->cookie->shopContext);
{ if (count($split) == 2) {
$split = explode('-', $context->cookie->shopContext); if ($split[0] == 'g') {
if (count($split) == 2) if ($context->employee->hasAuthOnShopGroup($split[1])) {
{ Shop::setContext(Shop::CONTEXT_GROUP, $split[1]);
if ($split[0] == 'g') } else {
{ $shop_id = $context->employee->getDefaultShopID();
if ($context->employee->hasAuthOnShopGroup($split[1])) Shop::setContext(Shop::CONTEXT_SHOP, $shop_id);
Shop::setContext(Shop::CONTEXT_GROUP, $split[1]); }
else } elseif ($context->employee->hasAuthOnShop($split[1])) {
{ $shop_id = $split[1];
$shop_id = $context->employee->getDefaultShopID(); Shop::setContext(Shop::CONTEXT_SHOP, $shop_id);
Shop::setContext(Shop::CONTEXT_SHOP, $shop_id); } else {
} $shop_id = $context->employee->getDefaultShopID();
} Shop::setContext(Shop::CONTEXT_SHOP, $shop_id);
elseif ($context->employee->hasAuthOnShop($split[1])) }
{ }
$shop_id = $split[1]; }
Shop::setContext(Shop::CONTEXT_SHOP, $shop_id);
}
else
{
$shop_id = $context->employee->getDefaultShopID();
Shop::setContext(Shop::CONTEXT_SHOP, $shop_id);
}
}
}
// Replace existing shop if necessary // Replace existing shop if necessary
if (!$shop_id) if (!$shop_id) {
$context->shop = new Shop(Configuration::get('PS_SHOP_DEFAULT')); $context->shop = new Shop(Configuration::get('PS_SHOP_DEFAULT'));
else if ($context->shop->id != $shop_id) } elseif ($context->shop->id != $shop_id) {
$context->shop = new Shop($shop_id); $context->shop = new Shop($shop_id);
} }
} }
catch(PrestaShopException $e) } catch (PrestaShopException $e) {
{ $e->displayMessage();
$e->displayMessage();
} }

View File

@ -24,4 +24,4 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
header('Location: index.php?controller=AdminLogin'); header('Location: index.php?controller=AdminLogin');

View File

@ -23,4 +23,4 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
header('Location: index.php?controller=AdminLogin'); header('Location: index.php?controller=AdminLogin');

View File

@ -24,8 +24,9 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_PS_ADMIN_DIR_')) if (!defined('_PS_ADMIN_DIR_')) {
define('_PS_ADMIN_DIR_', getcwd()); define('_PS_ADMIN_DIR_', getcwd());
}
include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
/** /**
@ -34,27 +35,28 @@ include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
*/ */
Tools::displayFileAsDeprecated(); Tools::displayFileAsDeprecated();
if (!Context::getContext()->employee->id) if (!Context::getContext()->employee->id) {
Tools::redirectAdmin('index.php?controller=AdminLogin'); Tools::redirectAdmin('index.php?controller=AdminLogin');
}
$function_array = array( $function_array = array(
'pdf' => 'generateInvoicePDF', 'pdf' => 'generateInvoicePDF',
'id_order_slip' => 'generateOrderSlipPDF', 'id_order_slip' => 'generateOrderSlipPDF',
'id_delivery' => 'generateDeliverySlipPDF', 'id_delivery' => 'generateDeliverySlipPDF',
'delivery' => 'generateDeliverySlipPDF', 'delivery' => 'generateDeliverySlipPDF',
'invoices' => 'generateInvoicesPDF', 'invoices' => 'generateInvoicesPDF',
'invoices2' => 'generateInvoicesPDF2', 'invoices2' => 'generateInvoicesPDF2',
'slips' => 'generateOrderSlipsPDF', 'slips' => 'generateOrderSlipsPDF',
'deliveryslips' => 'generateDeliverySlipsPDF', 'deliveryslips' => 'generateDeliverySlipsPDF',
'id_supply_order' => 'generateSupplyOrderFormPDF' 'id_supply_order' => 'generateSupplyOrderFormPDF'
); );
$pdf_controller = new AdminPdfController(); $pdf_controller = new AdminPdfController();
foreach ($function_array as $var => $function) foreach ($function_array as $var => $function) {
if (isset($_GET[$var])) if (isset($_GET[$var])) {
{ $pdf_controller->{'process'.$function}();
$pdf_controller->{'process'.$function}(); exit;
exit; }
} }
exit; exit;

View File

@ -24,19 +24,23 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_PS_ADMIN_DIR_')) if (!defined('_PS_ADMIN_DIR_')) {
define('_PS_ADMIN_DIR_', getcwd()); define('_PS_ADMIN_DIR_', getcwd());
}
include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
if (!Tools::getValue('id_shop')) if (!Tools::getValue('id_shop')) {
Context::getContext()->shop->setContext(Shop::CONTEXT_ALL); Context::getContext()->shop->setContext(Shop::CONTEXT_ALL);
else } else {
Context::getContext()->shop->setContext(Shop::CONTEXT_SHOP, (int)Tools::getValue('id_shop')); Context::getContext()->shop->setContext(Shop::CONTEXT_SHOP, (int)Tools::getValue('id_shop'));
}
if (substr(_COOKIE_KEY_, 34, 8) != Tools::getValue('token')) if (substr(_COOKIE_KEY_, 34, 8) != Tools::getValue('token')) {
die; die;
}
ini_set('max_execution_time', 7200); ini_set('max_execution_time', 7200);
Search::indexation(Tools::getValue('full')); Search::indexation(Tools::getValue('full'));
if (Tools::getValue('redirect')) if (Tools::getValue('redirect')) {
Tools::redirectAdmin($_SERVER['HTTP_REFERER'].'&conf=4'); Tools::redirectAdmin($_SERVER['HTTP_REFERER'].'&conf=4');
}

View File

@ -23,13 +23,13 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." 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: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false); header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); header("Pragma: no-cache");
header("Location: ../"); header("Location: ../");
exit; exit;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -23,13 +23,13 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." 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: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false); header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); header("Pragma: no-cache");
header("Location: ../"); header("Location: ../");
exit; exit;

View File

@ -1,33 +1,2 @@
/* This stylesheet should be used to add your custom styles to the back-office without using the Sass sources. It will be loaded after all the default styles. /* This stylesheet should be used to add your custom styles to the back-office without using the Sass sources. It will be loaded after all the default styles.
You should NOT edit any other exisiting back-office CSS file manually: they are generated by the Sass preprocessor: http://www.sass-lang.com/ . */ You should NOT edit any other exisiting back-office CSS file manually: they are generated by the Sass preprocessor: http://www.sass-lang.com/ . */
.defaultForm .result {}
.defaultForm .result li {
list-style: none;
padding: 5px 10px;
}
.defaultForm .result li span {
margin-left: 10px;
}
.defaultForm .searchResult {
padding: 0;
position: absolute;
width: 50%;
z-index: 3;
}
.defaultForm .searchResult ul {
background: #fff;
border-radius: 5px;
margin: 0px;
padding: 0;
border:1px solid #ccc;
}
.defaultForm .searchResult ul li {
cursor: pointer;
list-style-type: none;
margin: 0;
padding: 5px 10px;
}
.defaultForm .searchResult ul li:hover {
background: #f1f1f1;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -23,13 +23,13 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." 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: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false); header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); header("Pragma: no-cache");
header("Location: ../"); header("Location: ../");
exit; exit;

View File

@ -23,13 +23,13 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." 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: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false); header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); header("Pragma: no-cache");
header("Location: ../"); header("Location: ../");
exit; exit;

View File

@ -160,11 +160,6 @@ $(document).ready(function() {
$('.page-head .breadcrumb').css('left', '70px'); $('.page-head .breadcrumb').css('left', '70px');
$('.page-head .page-subtitle').css('left', '70px'); $('.page-head .page-subtitle').css('left', '70px');
} else {
menuCollapse.css('margin-left', '');
$('.page-head .page-title').css('padding-left', '230px');
$('.page-head .breadcrumb').css('left', '230px');
$('.page-head .page-subtitle').css('left', '230px');
} }
} }

View File

@ -13,6 +13,7 @@ Tree.prototype =
{ {
var that = $(this); var that = $(this);
var name = this.$element.parent().find('ul.tree input').first().attr('name'); var name = this.$element.parent().find('ul.tree input').first().attr('name');
var idTree = this.$element.parent().find('.cattree.tree').first().attr('id');
this.$element.find("label.tree-toggler, .icon-folder-close, .icon-folder-open").unbind('click'); this.$element.find("label.tree-toggler, .icon-folder-close, .icon-folder-open").unbind('click');
this.$element.find("label.tree-toggler, .icon-folder-close, .icon-folder-open").click( this.$element.find("label.tree-toggler, .icon-folder-close, .icon-folder-open").click(
function () function ()
@ -95,17 +96,10 @@ Tree.prototype =
} }
}); });
} }
if (name != 'id_parent') if (typeof(treeClickFunc) != 'undefined')
{ {
this.$element.find(":input[type=radio]").unbind('click'); this.$element.find(":input[type=radio]").unbind('click');
this.$element.find(":input[type=radio]").click( this.$element.find(":input[type=radio]").click(treeClickFunc);
function()
{
location.href = location.href.replace(
/&id_category=[0-9]*/, "")+"&id_category="
+$(this).val();
}
);
} }
} }
@ -144,7 +138,8 @@ Tree.prototype =
expandAll : function($speed) expandAll : function($speed)
{ {
if (typeof(idTree) != 'undefined' && typeof(full_loaded) == 'undefined') var idTree = this.$element.parent().find('.cattree.tree').first().attr('id');
if (typeof(idTree) != 'undefined' && !$('#'+idTree).hasClass('full_loaded'))
{ {
var selected = []; var selected = [];
that = this; that = this;
@ -154,13 +149,14 @@ Tree.prototype =
selected.push($(this).val()); selected.push($(this).val());
} }
); );
var name = $('#'+idTree).parent().find('ul.tree input').first().attr('name'); var name = $('#'+idTree).find('ul.tree input').first().attr('name');
var inputType = $('#'+idTree).parent().find('ul.tree input').first().attr('type'); var inputType = $('#'+idTree).find('ul.tree input').first().attr('type');
var useCheckBox = 0; var useCheckBox = 0;
if (inputType == 'checkbox') if (inputType == 'checkbox')
{ {
useCheckBox = 1; useCheckBox = 1;
} }
$.get( $.get(
'ajax-tab.php', 'ajax-tab.php',
{controller:'AdminProducts',token:currentToken,action:'getCategoryTree',type:idTree,fullTree:1,selected:selected, inputName:name,useCheckBox:useCheckBox}, {controller:'AdminProducts',token:currentToken,action:'getCategoryTree',type:idTree,fullTree:1,selected:selected, inputName:name,useCheckBox:useCheckBox},
@ -175,7 +171,7 @@ Tree.prototype =
.removeClass("icon-folder-close") .removeClass("icon-folder-close")
.addClass("icon-folder-open"); .addClass("icon-folder-open");
$(this).parent().parent().children("ul.tree").show($speed); $(this).parent().parent().children("ul.tree").show($speed);
full_loaded = true; $('#'+idTree).addClass('full_loaded');
} }
); );
} }

View File

@ -148,6 +148,8 @@
dd.data_value dd.data_value
color: #aaa color: #aaa
@extend .clearfix @extend .clearfix
small
font-size: 0.5em
dd.dash_trend dd.dash_trend
background-color: white background-color: white
width: 80px width: 80px

View File

@ -23,13 +23,13 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." 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: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false); header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); header("Pragma: no-cache");
header("Location: ../"); header("Location: ../");
exit; exit;

View File

@ -32,4 +32,4 @@ header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); header("Pragma: no-cache");
header("Location: ../"); header("Location: ../");
exit; exit;

View File

@ -20,7 +20,7 @@ $chosen-focus-box-shadow: 0 1px 1px rgba(0, 0, 0, .075) inset, 0 0 8px rgba(82,
$chosen-focus-transition: border linear .2s, box-shadow linear .2s $chosen-focus-transition: border linear .2s, box-shadow linear .2s
$chosen-height: $input-height-base $chosen-height: $input-height-base
$chosen-multi-height: $input-height-base + 6px $chosen-multi-height: $input-height-base + 6px
$chosen-sprite-path: 'chosen-sprite.png' $chosen-sprite-path: '../img/chosen-sprite.png'
.chosen-select .chosen-select
width: 100% width: 100%
@ -74,7 +74,7 @@ $chosen-sprite-path: 'chosen-sprite.png'
&.active-result &.active-result
cursor: pointer cursor: pointer
display: list-item display: list-item
&.highlighted &.highlighted
background-color: $link-color background-color: $link-color
color: white color: white
em em
@ -106,8 +106,8 @@ $chosen-sprite-path: 'chosen-sprite.png'
span span
background: url($chosen-sprite-path) no-repeat -22px -3px background: url($chosen-sprite-path) no-repeat -22px -3px
.chosen-container-single .chosen-container-single
.chosen-single .chosen-single
background-color: $chosen-background background-color: $chosen-background
border: 1px solid $chosen-border border: 1px solid $chosen-border
color: $gray color: $gray
@ -148,7 +148,7 @@ $chosen-sprite-path: 'chosen-sprite.png'
top: 0 top: 0
width: 18px width: 18px
@include right(0) @include right(0)
b b
@extend .icon @extend .icon
@extend .icon-caret-down @extend .icon-caret-down
font-size: 14px font-size: 14px
@ -222,7 +222,7 @@ $chosen-sprite-path: 'chosen-sprite.png'
margin: 0 margin: 0
padding: 0 padding: 0
white-space: nowrap white-space: nowrap
input input
background: transparent !important background: transparent !important
border: 0 !important border: 0 !important
color: $gray color: $gray
@ -295,10 +295,10 @@ $chosen-sprite-path: 'chosen-sprite.png'
.search-field input .search-field input
color: #111 !important color: #111 !important
.chosen-disabled .chosen-disabled
cursor: default cursor: default
opacity: 0.5 !important opacity: 0.5 !important
.chosen-single .chosen-single
cursor: default cursor: default
.chosen-choices .search-choice .search-choice-close .chosen-choices .search-choice .search-choice-close
cursor: default cursor: default
@ -319,7 +319,7 @@ $chosen-sprite-path: 'chosen-sprite.png'
left: 26px left: 26px
right: auto right: auto
.chosen-choices .chosen-choices
.search-field input .search-field input
direction: rtl direction: rtl
li li
float: right float: right

View File

@ -33,6 +33,8 @@
border-color: darken(#CAE5F4,10%) border-color: darken(#CAE5F4,10%)
input, select input, select
margin: 0 margin: 0
&.center
margin: 0 auto
tbody tbody
> tr > td > tr > td
border-top: none border-top: none
@ -153,9 +155,22 @@ tr.highlighted td
table, thead, tbody, th, td, tr table, thead, tbody, th, td, tr
display: block display: block
thead tr thead tr
position: absolute display: block
top: -9999px float: left
left: -9999px width: 70%
&:first-child
width: 30%
th
width: 100% !important
&:first-child:last-child
display: none
th
height: 48px
text-align: center
th .fixed-width-md
float: left
th .fixed-width-sm
width: 100% !important
tr tr
border: 1px solid #ccc border: 1px solid #ccc
@include box-shadow(#EAEDEF 0 2px 0 0 ) @include box-shadow(#EAEDEF 0 2px 0 0 )

View File

@ -23,13 +23,13 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." 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: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false); header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); header("Pragma: no-cache");
header("Location: ../"); header("Location: ../");
exit; exit;

View File

@ -32,4 +32,4 @@ header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache'); header('Pragma: no-cache');
header('Location: ../../../../../../../../'); header('Location: ../../../../../../../../');
exit; exit;

Some files were not shown because too many files have changed in this diff Show More